From b73a702c2148fa89e07f8035a652997cf156c36b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Couturier?= Date: Fri, 28 Feb 2020 16:30:52 +0100 Subject: [PATCH] new --- OneRoundIoT/OneRound/rc4_hash2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]); } -- 2.39.5