X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/a53042810806234973b50050883fc24bcdc83ecb..5dc05da2f861c83c65edbcc78681b54d01753bd9:/OneRoundIoT/EnhancedOneRound/enhanced_oneround.cpp?ds=sidebyside diff --git a/OneRoundIoT/EnhancedOneRound/enhanced_oneround.cpp b/OneRoundIoT/EnhancedOneRound/enhanced_oneround.cpp index 751c071..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