From: Raphaƫl Couturier Date: Sun, 1 Mar 2020 13:30:12 +0000 (+0100) Subject: new X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/eff7c8ed3a5515ef551c85075c5532c6f6f5c7d4 new --- diff --git a/OneRoundIoT/OneRound/rc4_hash3.cpp b/OneRoundIoT/OneRound/rc4_hash3.cpp index 07269d0..822b1aa 100644 --- a/OneRoundIoT/OneRound/rc4_hash3.cpp +++ b/OneRoundIoT/OneRound/rc4_hash3.cpp @@ -169,7 +169,8 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, uchar *S, int h) { // 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; @@ -177,17 +178,21 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, uchar *S, int h) { uint64_t *ss=(uint64_t*)seq_in; - int a; + int a=0; + for(int it=0;it>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>3); }