X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/1c5994c77784086a9fc557f039afc3c03847e249..6df9f32e1ab10a1e08a191ac7fac273e74397831:/OneRoundIoT/OneRound/one_round_new.cpp 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); }