// Goal: Calculate the hash value
// Output: RM (hash value)
uchar X[h];
- int ind1,ind2;
+ //uint64_t rm2[h>>8];
+ int ind1=0;
uint64_t *rm=(uint64_t*)RM1;
uint64_t *ss=(uint64_t*)seq_in;
- int a;
+ int a=0;
+
for(int it=0;it<len;it++) {
- ind1=(it*h)>>3;
// Mix with dynamic RM
rm[0]=rm[0]^ss[ind1];
rm[0]=xorshift64(rm[0] );
- for(a=1;a<(h>>3);a++) {
+ for(a=1;a<h;a++) {
rm[a]=rm[a]^ss[ind1+a];
rm[a]=xorshift64(rm[a] ^ rm[a-1]);
}
- rm[0]=xorshift64(rm[a] ^ rm[0] );
+ // printf("argh %d\n",a);
+ rm[0]=xorshift64(rm[a-1]);
+
+
+ ind1+=h;
}
if(change==1) {
seq[4]++;
- seq[5]--;
+ // seq[5]--;
}
if(change==2) {
seq[9]++;
- seq[10]--;
+ // seq[10]--;
}
printf("seq 4 %d\n",seq[4]);
t=TimeStart();
for(int i=0;i<nb_test;i++)
{
- hash_DSD_BIN(seq, RM1,len,Sbox1,h);
+ hash_DSD_BIN(seq, RM1,len,Sbox1,h>>3);
}