X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/54ba144ca7fa40eea15a30b68c1987042ed4e4f0..50aed0e4bc4897c2ccad084a80e1cac8bfe088e3:/OneRoundIoT/OneRound/one_round_new.cpp diff --git a/OneRoundIoT/OneRound/one_round_new.cpp b/OneRoundIoT/OneRound/one_round_new.cpp index d64021d..be38534 100644 --- a/OneRoundIoT/OneRound/one_round_new.cpp +++ b/OneRoundIoT/OneRound/one_round_new.cpp @@ -147,8 +147,11 @@ void encrypt_ctr(uchar* seq_in, uchar *seq_out, int len,uchar* RM1,int *Pbox, in int ind1,ind2; - for(int a=0;a(seq, seq2,len,RM1,Pbox,PboxRM,Sbox1,Sbox2,0); + } + break; + case 128: + for(i=0;i(seq, seq2,len,RM1,Pbox,PboxRM,Sbox1,Sbox2,1); + else + encrypt<128*128>(seq, seq2,len,RM1,Pbox,PboxRM,Sbox1,Sbox2,0); + } break; } - time+=TimeStop(t); - cout<<"Time encrypt "<(seq2,seq,len,RM2,Pbox,PboxRM,Inv_Sbox1,Inv_Sbox2,0); } break; + case 128: + for(i=0;i(seq2, seq,len,RM2,Pbox,PboxRM,Sbox1,Sbox2,0); + else + decrypt<128*128>(seq2,seq,len,RM2,Pbox,PboxRM,Inv_Sbox1,Inv_Sbox2,0); + } + break; } - time+=TimeStop(t); - cout<<"Time decrypt "<