X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/b73a702c2148fa89e07f8035a652997cf156c36b..54769a8ee0ec8e6038b44fdbf9656585e7d3e31c:/OneRoundIoT/OneRound/rc4_hash2.cpp 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]); }