From 137f8adedb33df733dd981cb3d4b68bc6d1c9b33 Mon Sep 17 00:00:00 2001 From: couturie Date: Fri, 18 Aug 2017 18:36:36 +0200 Subject: [PATCH] new --- OneRoundIoT/OneRound/one_round_new.cpp | 134 ++++++++++++++----------- OneRoundIoT/openssl/Makefile | 1 - 2 files changed, 75 insertions(+), 60 deletions(-) diff --git a/OneRoundIoT/OneRound/one_round_new.cpp b/OneRoundIoT/OneRound/one_round_new.cpp index de1b0d2..9046044 100644 --- a/OneRoundIoT/OneRound/one_round_new.cpp +++ b/OneRoundIoT/OneRound/one_round_new.cpp @@ -30,10 +30,10 @@ using namespace std; int key_size=256; int nb_test=1; int ctr=0; -int h=64; +const int h=32; -int h2=h*h; +const int h2=h*h; @@ -143,9 +143,9 @@ void encrypt_ctr(uchar* seq_in, uchar *seq_out, int len,uchar* RM1,int *Pbox, in uchar *fX=new uchar[h2]; int ind1,ind2; - + for(int a=0;a10000) { - printf("nb tests is not correct\n"); - exit(0); - } - else - printf("nb tests = %d\n\n",nb_test); -*/ int seed=time(NULL); @@ -465,6 +479,8 @@ int main(int argc, char** argv) { for(int i=0;i