+ time_decrypt=0;
+ t=TimeStart();
+ switch(h) {
+ case 4:
+ for(i=0;i<nb_test;i++) {
+ if(ctr)
+ encrypt_ctr<4*4>(seq2, seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,myrand,0);
+ else
+ decrypt<4*4>(seq2,seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,Inv_Sbox1,Inv_Sbox2,myrand,0);
+ }
+ break;
+ case 8:
+ for(i=0;i<nb_test;i++) {
+ if(ctr)
+ encrypt_ctr<8*8>(seq2, seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,myrand,0);
+ else
+ decrypt<8*8>(seq2,seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,Inv_Sbox1,Inv_Sbox2,myrand,0);
+ }
+ break;
+ case 16:
+ for(i=0;i<nb_test;i++) {
+ if(ctr)
+ encrypt_ctr<16*16>(seq2, seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,myrand,0);
+ else
+ decrypt<16*16>(seq2,seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,Inv_Sbox1,Inv_Sbox2,myrand,0);
+ }
+ break;
+ case 32:
+ for(i=0;i<nb_test;i++) {
+ if(ctr)
+ encrypt_ctr<32*32>(seq2, seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,myrand,0);
+ else
+ decrypt<32*32>(seq2,seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,Inv_Sbox1,Inv_Sbox2,myrand,0);
+ }
+ break;
+ case 64:
+ for(i=0;i<nb_test;i++) {
+ if(ctr)
+ encrypt_ctr<64*64>(seq2, seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,myrand,0);
+ else
+ decrypt<64*64>(seq2,seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,Inv_Sbox1,Inv_Sbox2,myrand,0);
+ }
+ break;
+ case 128:
+ for(i=0;i<nb_test;i++) {
+ if(ctr)
+ encrypt_ctr<128*128>(seq2, seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,myrand,0);
+ else
+ decrypt<128*128>(seq2,seq,len,RM1_copy,Pbox,PboxRM,Sbox1,Sbox2,Inv_Sbox1,Inv_Sbox2,myrand,0);
+ }
+ break;
+ }