X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/1c5994c77784086a9fc557f039afc3c03847e249..4095e8a185238f0a37bbce6cb4c084e28e46bbeb:/OneRoundIoT/OneRound/one_round_new.cpp?ds=inline diff --git a/OneRoundIoT/OneRound/one_round_new.cpp b/OneRoundIoT/OneRound/one_round_new.cpp index b936005..f0cafd6 100644 --- a/OneRoundIoT/OneRound/one_round_new.cpp +++ b/OneRoundIoT/OneRound/one_round_new.cpp @@ -178,6 +178,24 @@ void encrypt_ctr(uchar* seq_in, uchar *seq_out, int len,uchar* RM1,int *Pbox, in } + for(int a=0;a>=8; + X[a+1]=X[a+1]^(mm&255); + mm>>=8; + X[a+2]=X[a+2]^(mm&255); + mm>>=8; + X[a+3]=X[a+3]^(mm&255); + } + + + + + for(int a=0;a>=8; - fX[a+1]=fX[a+1]^seq_in[ind2+a+1]^(mm&255); - mm>>=8; - fX[a+2]=fX[a+2]^seq_in[ind2+a+2]^(mm&255); - mm>>=8; - fX[a+3]=fX[a+3]^seq_in[ind2+a+3]^(mm&255); }