uchar j0=0;
for (int it=0; it<ldata; it++) {
- i0 = ((i0+1)+X[(i0+1)%h]);
+ i0 = X[(i0+1)&(h-1)];
j0 = (j0 + sc[i0]);
uchar tmp = sc[i0];
sc[i0] = sc[j0];
sc[j0] = tmp;
- r[it]=sc[(sc[i0]+sc[j0])&0xFF];
+ r[it]=sc[i0];//sc[(sc[i0]+sc[j0])&255];
}
}
*/
// if(it==40)
// exit(0);
+
+
for(int a=0;a<h;a+=4) {
RM1[a]=S[RM1[a]];
RM1[a+1]=S[RM1[a+1]];
Secretkey[i]=lrand48()&0xFF;
counter[i]=lrand48()&0xFF;
}
-
int size = 64;
uchar DK[size];
for (int i = 0; i < 64 ; i++) {
// DK[i]=digest[i];
DK[i]=mix[i];
+ //cout<<(int)DK[i]<<" ";
}
+ //cout<<endl;
+