int i;
for(i=0;i<nb_test;i++)
{
-// encrypt(seq, seq2,len,RM1,Pbox,PboxRM,Sbox1,Sbox2,0);
- encrypt_ctr(seq, seq2,len,RM1,Pbox,PboxRM,Sbox1,Sbox2,1);
+ if(ctr)
+ encrypt_ctr(seq, seq2,len,RM1,Pbox,PboxRM,Sbox1,Sbox2,1);
+ else
+ encrypt(seq, seq2,len,RM1,Pbox,PboxRM,Sbox1,Sbox2,0);
+
}
time+=TimeStop(t);
time=0;
t=TimeStart();
for(i=0;i<nb_test;i++) {
-// decrypt(seq2,seq,len,RM2,Pbox,PboxRM,Sbox1,Sbox2,0);
- encrypt_ctr(seq2, seq,len,RM2,Pbox,PboxRM,Sbox1,Sbox2,0);
+ if(ctr)
+ encrypt_ctr(seq2, seq,len,RM2,Pbox,PboxRM,Sbox1,Sbox2,0);
+ else
+ decrypt(seq2,seq,len,RM2,Pbox,PboxRM,Sbox1,Sbox2,0);
+
}
time+=TimeStop(t);