]> 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 909593eb45229fa96bd89b308fa7f915f499fe73..cb833c4547276976a609f83194583c3c44fa418f 100644 (file)
@@ -147,8 +147,11 @@ void encrypt_ctr(uchar* seq_in, uchar *seq_out, int len,uchar* RM1,int *Pbox, in
   int ind1,ind2;
 
   
   int ind1,ind2;
 
   
-   for(int a=0;a<h2;a++) {
+   for(int a=0;a<h2;a+=4) {
      X[a]=Sbox1[a&0xFF];           //Warning according to the size of h2, we can be outsize of Sbox1[a]
      X[a]=Sbox1[a&0xFF];           //Warning according to the size of h2, we can be outsize of Sbox1[a]
+     X[a+1]=Sbox1[(a+1)&0xFF];
+     X[a+2]=Sbox1[(a+2)&0xFF];
+     X[a+3]=Sbox1[(a+3)&0xFF];           
    }
 
    
    }