19 bit;
Y=1111 1000 0010 1101 11 01 01  22 bit;
Z=01001 11 1010 0011 0000 1011

01 110 19 bit;
Y=1111 1000 0010 1101 11 01 01 22 bit;
Z=01001 11 1010 0011 0000 1011 23 bit;
Majority m =maj(x8,y10,z10)=(0,1,0)=0;
1)X8=1 m ga teng o’zgarmaydi;
2) Y10=0 m ga teng o’zgarmaydi;
3)Z10=0m ga teng o’zgaradi:
tx=x13x16x17x18=0111=1;
ty=y20y21;
tz=z7z20z21z22=1101=1;
KALIT K=x18y21z22=011=0 K24=0;
25* * X=100 1110 0000 0010 01 11 19 bit;
Y=1111 1000 0010 1101 11 01 01 22 bit;
Z=101001 11 1010 0011 0000 101 23 bit;
Majority m =maj(x8,y10,z10)=(0,1,1)=1;
1)X8=0 m ga teng o’zgarmaydi;
2) Y10=1 m ga teng o’zgaradi;
3)Z10=1m ga teng o’zgaradi:
tx=x13x16x17x18;
ty=y20y21=10=1;
tz=z7z20z21z22=1010=0;
KALIT- K=x18y21z22=111=1 K25=1;
26* * X=100 1110 0000 0010 01 11 19 bit;
Y=11111 1000 0010 1101 11 01 0 22 bit;
Z=0101 001 11 1010 0011 0000 10 23 bit;
Majority m =maj(x8,y10,z10)=(0,0,0)=0;
1)X8=0 m ga teng o’zgaradi;
2) Y10=0 m ga teng o’zgaradi;
3)Z10=0m ga teng o’zgaradi:
tx=x13x16x17x18=1011=1;
ty=y20y21=01=1;
tz=z7z20z21z22=1001=0
KALIT- K=x18y21z22=100=1 K26=1;
27 * X=1100 1110 0000 0010 01 1 19 bit;
Y=1111 11 1000 0010 1101 11 01 22 bit;
Z=0010 1 001 11 1010 0011 0000 1 23 bit;
Majority m =maj(x8,y10,z10)=(0,0,1)=0;
1)X8=0 m ga teng o’zgaradi;
2) Y10=0 m ga teng o’zgaradi;
3)Z10=1m ga teng o’zgarmaydi:
tx=x13x16x17x18=0001=1;
ty=y20y21=10=1;
KALIT- K=x18y21z22=111=1 K27=1;
28* * X=1 1100 1110 0000 0010 01 19 bit;
Y=1 1111 11 1000 0010 1101 11 0 22 bit;
Z=0010 1 001 11 1010 0011 0000 1 23 bit;
Majority m =maj(x8,y10,z10)=(0,0,1)=1;
1)X8=0 m ga teng o’zgaradi;
2) Y10=0 m ga teng o’zgaradi;
3)Z10=1m ga teng o’zgarmaydi:
tx=x13x16x17x18=0100=1;
ty=y20y21=11=0;
//tz=z7z20z21z22=0100;
KALIT- K=x18y21z22=101=0 K28=0;
29* X=11 1100 1110 0000 0010 0 19 bit;
Y=01 1111 11 1000 0010 1101 11 22 bit;
Z=0010 1 001 11 1010 0011 0000 1 23 bit;
Majority m =maj(x8,y10,z10)=(1,0,1)=1;
1)X8=0 m ga teng o’zgaradi;
2) Y10=0 m ga teng o’zgarmaydi;
3)Z10=0m ga teng o’zgaradi:
tx=x13x16x17x18=0010=1;
ty=y20y21=00; ///
tz=z7z20z21z22=1000=1;
KALIT- K=x18y21z22=011=0 K29=0;
30* * X=111 1100 1110 0000 0010 19 bit;
Y=01 1111 11 1000 0010 1101 11 22 bit;
Z=10010 1 001 11 1010 0011 0000 23 bit;
Majority m =maj(x8,y10,z10)=(1,0,1)=1;
1)X8=1 m ga teng o’zgaradi;
2) Y10=0 m ga teng o’zgarmaydi;
3)Z10=1m ga teng o’zgaradi:
tx=x13x16x17x18=0001=1;
tz=z7z20z21z22=0000=0;
KALIT- K=x18y21z22=010=0 K30=1;
SHIFR MATN :Abduqosimov CQDF!M
1)O—01110 01101= 00010 =C
2)D--0001110011= 10000 = Q
3)I--0010100110= 00011 = D
4)L--0101101110 = 00101 -- F
5)O--0111010101= 11011 = !
6)V--1010111001= 01100 = M
JAVOB : Abduqosimov ---->>>> CQDF!M
ODILOV ni shifrlaymiz A5/1 bo’yicha
#include
#define SIZEX 19
#define SIZEY 22
#define SIZEZ 23
int maj(int, int, int);
int main(){
int x[SIZEX] = {0,1,1,1,0,0,0,0,1,1,0,1,0,0,0,0,1,0,1};
int y[SIZEY] = {1,0,1,1,1,0,1,0,1,0,1,0,1,1,1,0,0,0,0,1,1,0};
int z[SIZEZ] = {1,0,0,0,0,1,0,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1};
int i,j = 0;
int m;
printf("\n");
for(i = 0; i < 9; i++){
m = maj(x[8], y[10], z[10]);
printf("X: ");
if(x[8] == m){
int t = x[13] ^ x[16] ^ x[17] ^ x[18];
for(j = SIZEX-1 ; j >= 0; j--){
if(j == 0){
x[j] = t;
}else{
x[j] = x[j-1];
}
}
}
for(j = 0; j < SIZEX; j++){
printf("%d", x[j]);
}
printf("\nY: ");
if(y[10] == m){
int t = y[20] ^ y[21];
for(j = SIZEY-1 ; j >= 0; j--){
if(j == 0){
y[j] = t;
}else{
y[j] = y[j-1];
}
}
}
for(j = 0; j < SIZEY; j++){
printf("%d",y[j]);
}
printf("\nZ: ");
if(z[10] == m){
int t = z[7] ^ z[20] ^ z[21] ^ z[22];
for(j = SIZEZ-1 ; j >= 0; j--){
if(j == 0){
z[j] = t;
}else{
z[j] = z[j-1];
}
}
}
for(j = 0; j < SIZEZ; j++){
printf("%d",z[j]);
}
if(i < 8){
int key = x[SIZEX-1] ^ y[SIZEY-1] ^ z[SIZEZ-1];
printf("\nKluch biti = %d ^ %d ^ %d = %d",x[SIZEX-1],y[SIZEY-1],z[SIZEZ-1],key);
printf("\n\n");
}
}
}
int maj(int x, int y, int z){
int m;
if(x == 0){
if(y == 0 || z == 0){
m = 0;
}else{
m = 1;
}
}else{
if(y == 1 || z == 1){
m = 1;
}else{
m = 0;
}
}
return m;
}
|