X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/1c5994c77784086a9fc557f039afc3c03847e249..7c98efa79737de9ab1562b4cc33bbbe7d1178bba:/OneRoundIoT/OneRound/one_round_new.cpp?ds=sidebyside diff --git a/OneRoundIoT/OneRound/one_round_new.cpp b/OneRoundIoT/OneRound/one_round_new.cpp index b936005..f5546cf 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); }