From 54769a8ee0ec8e6038b44fdbf9656585e7d3e31c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Couturier?= Date: Fri, 28 Feb 2020 17:52:59 +0100 Subject: [PATCH 1/1] new --- OneRoundIoT/OneRound/rc4_hash2.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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]); } -- 2.39.5