rm2[a]=myrand;
}
- for(int a=0;a<h;a+=4) {
+ /* for(int a=0;a<h;a+=4) {
X[a]=seq_in[ind2+a];
X[a+1]=seq_in[ind2+a+1];
X[a+2]=seq_in[ind2+a+2];
X[a+3]=seq_in[ind2+a+3];
}
-
+ */
for(int a=0;a<h;a+=4) {
- tmp[a]=Inv_Sbox2[X[a]]^RM2[a];
- tmp[a+1]=Inv_Sbox2[X[a+1]]^RM2[a+1];
- tmp[a+2]=Inv_Sbox2[X[a+2]]^RM2[a+2];
- tmp[a+3]=Inv_Sbox2[X[a+3]]^RM2[a+3];
+ tmp[a]=Inv_Sbox2[seq_in[ind2+a]]^RM2[a];
+ tmp[a+1]=Inv_Sbox2[seq_in[ind2+a+1]]^RM2[a+1];
+ tmp[a+2]=Inv_Sbox2[seq_in[ind2+a+2]]^RM2[a+2];
+ tmp[a+3]=Inv_Sbox2[seq_in[ind2+a+3]]^RM2[a+3];
}
- for(int a=0;a<h;a+=4) {
+ /* for(int a=0;a<h;a+=4) {
X[a]=Inv_Sbox1[tmp[a]]^RM1[a];
X[a+1]=Inv_Sbox1[tmp[a+1]]^RM1[a+1];
X[a+2]=Inv_Sbox1[tmp[a+2]]^RM1[a+2];
X[a+3]=Inv_Sbox1[tmp[a+3]]^RM1[a+3];
- }
+ }*/
for(int a=0;a<h;a+=4) {
- seq_out[ind1+a]=X[a];
- seq_out[ind1+a+1]=X[a+1];
- seq_out[ind1+a+2]=X[a+2];
- seq_out[ind1+a+3]=X[a+3];
+ seq_out[ind1+a]=Inv_Sbox1[tmp[a]]^RM1[a];
+ seq_out[ind1+a+1]=Inv_Sbox1[tmp[a+1]]^RM1[a+1];
+ seq_out[ind1+a+2]=Inv_Sbox1[tmp[a+2]]^RM1[a+2];
+ seq_out[ind1+a+3]=Inv_Sbox1[tmp[a+3]]^RM1[a+3];
}
for(int a=0;a<h;a+=4) {