From: Raphaƫl Couturier Date: Fri, 28 Feb 2020 16:52:59 +0000 (+0100) Subject: new X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/54769a8ee0ec8e6038b44fdbf9656585e7d3e31c?ds=sidebyside new --- diff --git a/OneRoundIoT/OneRound/rc4_hash2.cpp b/OneRoundIoT/OneRound/rc4_hash2.cpp index 89790e4..10f9823 100644 --- a/OneRoundIoT/OneRound/rc4_hash2.cpp +++ b/OneRoundIoT/OneRound/rc4_hash2.cpp @@ -176,7 +176,7 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, uchar *S, int h) { uint64_t *rm=(uint64_t*)RM1; - uint64_t *xx=(uint64_t*)X; + // uint64_t *xx=(uint64_t*)X; uint64_t *ss=(uint64_t*)seq_in; @@ -188,18 +188,11 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, uchar *S, int h) { 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]; + rm[a]=rm[a]^ss[ind1+a]; + sum+=rm[a]; } @@ -208,6 +201,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<(h>>3);a++) { rm[a]^=xorshift64(rm[a-1]); + //rm[a]^=splitmix64(rm[a-1]); }