From eff7c8ed3a5515ef551c85075c5532c6f6f5c7d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Couturier?= Date: Sun, 1 Mar 2020 14:30:12 +0100 Subject: [PATCH] new --- OneRoundIoT/OneRound/rc4_hash3.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) 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); } -- 2.39.5