From: Raphaƫl Couturier Date: Fri, 28 Feb 2020 15:30:52 +0000 (+0100) Subject: new X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/b73a702c2148fa89e07f8035a652997cf156c36b?ds=sidebyside new --- diff --git a/OneRoundIoT/OneRound/rc4_hash2.cpp b/OneRoundIoT/OneRound/rc4_hash2.cpp index 013d657..89790e4 100644 --- a/OneRoundIoT/OneRound/rc4_hash2.cpp +++ b/OneRoundIoT/OneRound/rc4_hash2.cpp @@ -185,7 +185,7 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, uchar *S, int h) { //ind1=Pbox[it]*h; //ind2=Pbox[(it+len/2)]*h; - ind1=it*h/8; + ind1=(it*h)>>3; // Mix with dynamic RM uint64_t sum=0; /* for(int a=0;a>3);a++) { xx[a]=rm[a]^ss[ind1+a]; sum+=xx[a]; } @@ -206,7 +206,7 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, uchar *S, int h) { rm[0]=xorshift64(sum); - for(int a=1;a>3);a++) { rm[a]^=xorshift64(rm[a-1]); }