From 77e5a4ed08f9f2f3134323df80307de602d00800 Mon Sep 17 00:00:00 2001 From: couturie Date: Tue, 17 Apr 2018 15:15:20 +0200 Subject: [PATCH 1/1] update of old one round in order to degrade it --- Old_one_round/one_round_light_auth.cpp | 40 +++++++++----------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/Old_one_round/one_round_light_auth.cpp b/Old_one_round/one_round_light_auth.cpp index 138efb6..6e6a4af 100644 --- a/Old_one_round/one_round_light_auth.cpp +++ b/Old_one_round/one_round_light_auth.cpp @@ -129,49 +129,37 @@ template void myhash(uchar *X, uchar* RM2, uchar *Sbox2) { uchar Y[h]; uchar X2[h]; + uchar Z[h]; for(int k=0;k0;a--) { + Z[a-1]=Z[a]^Y[a]; } - - - RM2[h-1]=Y[h-1]^Y[0]; - RM2[h-2]=RM2[h-1]^Y[h-1]; - RM2[h-3]=RM2[h-2]^Y[h-2]; - RM2[h-4]=RM2[h-3]^Y[h-3]; - for(int a=h-4;a>0;a-=4) { - RM2[a-1]=RM2[a]^Y[a]; - RM2[a-2]=RM2[a-1]^Y[a-1]; - RM2[a-3]=RM2[a-2]^Y[a-2]; - RM2[a-4]=RM2[a-3]^Y[a-3]; + for(int a=0;a