X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/5ba1e7ac73522b93e31fe7be8d11505ab1a7794c..5dc05da2f861c83c65edbcc78681b54d01753bd9:/OneRoundIoT/EnhancedOneRound/enhanced_oneround.cpp?ds=inline diff --git a/OneRoundIoT/EnhancedOneRound/enhanced_oneround.cpp b/OneRoundIoT/EnhancedOneRound/enhanced_oneround.cpp index 31f71d0..5842b5f 100644 --- a/OneRoundIoT/EnhancedOneRound/enhanced_oneround.cpp +++ b/OneRoundIoT/EnhancedOneRound/enhanced_oneround.cpp @@ -38,7 +38,7 @@ int ecbprng=0; - +typedef __uint64_t ulong; typedef unsigned char uchar; @@ -197,11 +197,13 @@ void encrypt_ecb_prng(uchar* seq_in, uchar *seq_out, int len,uchar* RM, int *Pbo uchar Y[h]; uchar fX[h]; uchar gY[h]; - uchar RM1[h]; - uchar RM2[h]; + uchar *RM1=&RM[0]; + uchar *RM2=&RM[h]; uchar tmp[h]; ulong *rm1=(ulong*)RM1; ulong *rm2=(ulong*)RM2; + + for(int it=0;it