]> AND Private Git Repository - Cipher_code.git/blobdiff - OneRoundIoT/OneRound/one_round_new.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
new
[Cipher_code.git] / OneRoundIoT / OneRound / one_round_new.cpp
index cb833c4547276976a609f83194583c3c44fa418f..76fb91c57cda4621aabc11585511bb38910e0245 100644 (file)
@@ -167,12 +167,11 @@ void encrypt_ctr(uchar* seq_in, uchar *seq_out, int len,uchar* RM1,int *Pbox, in
        
 
     for(int a=0;a<h2;a+=4) {
-      X[a]=X[Sbox1[a]];
-      X[a+1]=X[Sbox1[a+1]];
-      X[a+2]=X[Sbox1[a+2]];
-      X[a+3]=X[Sbox1[a+3]];
+      X[a]=Sbox1[X[a]];
+      X[a+1]=Sbox1[X[a+1]];
+      X[a+2]=Sbox1[X[a+2]];
+      X[a+3]=Sbox1[X[a+3]];
     }
-