From: Raphaƫl Couturier <raphael.couturier@univ-fcomte.fr>
Date: Sun, 1 Mar 2020 13:45:09 +0000 (+0100)
Subject: new
X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/8a13d49e7c75bb6aded0b7e038d4d8513d6c47cb?ds=inline;hp=9e6223f116e23fd4660e9a30b719f500778e740d

new
---

diff --git a/OneRoundIoT/OneRound/rc4_hash3.cpp b/OneRoundIoT/OneRound/rc4_hash3.cpp
index de5b40c..243fc1e 100644
--- a/OneRoundIoT/OneRound/rc4_hash3.cpp
+++ b/OneRoundIoT/OneRound/rc4_hash3.cpp
@@ -182,14 +182,14 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, uchar *S, int h) {
   
   for(int it=0;it<len;it++) {
     // Mix with dynamic RM
-    rm[0]=rm[0]^ss[ind1];
+    rm[0]=rm[h-1]^ss[ind1];
     rm[0]=xorshift64(rm[0] );
     for(a=1;a<h;a++) {
-      rm[a]=rm[a]^ss[ind1+a];
-      rm[a]=xorshift64(rm[a] ^ rm[a-1]);
+      rm[a]=rm[a-1]^ss[ind1+a];
+      rm[a]=xorshift64(rm[a]);
     }
     //    printf("argh %d\n",a);
-    rm[0]=xorshift64(rm[a-1]);
+    //rm[0]=xorshift64(rm[a-1]);
 
 
     ind1+=h;