MUXAMMAD AL- XORAZMIY NOMIDAGI
TOSHKENT AXBOROT TEXNOLOGIYALARI
UNIVERSITETI
Kriptografiya kafedrasi
Kiberxavfsizlik fani
Amaliy ish
Mavzu: Kriptografik himoyalash.
Bajardi: Ergashev Jasurbek
Tekshirdi: Shirinov Laziz
Toshkent – 2019
Topshiriq: Quyida keltirilgan usullar yordamida shifrlash va dishifrlash;
1. Sezir;
2. Polibiya kvadrati;
3. Vernam usuli;
4. Gamelton marshruti;
5. RSA;
1. Sezir usuli:
T = ERGASHEV K=8.
E 1 2 3 4 5 6 7 8=M
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
R 1 2 3 4 5 6 7 8=Z
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
G 1 2 3 4 5 6 7 8=O
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
A 1 2 3 4 5 6 7 8=I
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
S 1 2 3 4 5 6 7 8 = A
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A
H 1 2 3 4 5 6 7 8=P
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
E 1 2 3 4 5 6 7 8=M
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
V 1 2 3 4 5 6 7 8 = D
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
Javob: ERGASHEV MZOIAPMD.
2. Polibiya kvadrati: T=ERGASHEV K=8.
Bu usulda olingan harf bo’yicha berilgan kalit orqali pastga birin ketin sanab harfga tegishli bo’lgan shifr harf topiladi.
|
1
|
2
|
3
|
4
|
5
|
1
|
A
|
B
|
C
|
D
|
E
|
2
|
F
|
G
|
H
|
I/J
|
K
|
3
|
L
|
M
|
N
|
O
|
P
|
4
|
Q
|
R
|
S
|
T
|
U
|
5
|
V
|
W
|
X
|
Y
|
Z
|
ERGASHEV UGWQHXUL.
3. Vernam usuli: T=ERGASHEV K=SALOM.
17
|
Q
|
10000
|
18
|
R
|
10001
|
19
|
S
|
10010
|
20
|
T
|
10011
|
21
|
U
|
10100
|
22
|
V
|
10101
|
23
|
W
|
10110
|
24
|
X
|
10111
|
25
|
Y
|
11000
|
26
|
Z
|
11001
|
27
|
#
|
11010
|
28
|
!
|
11011
|
29
|
-
|
11100
|
30
|
@
|
11101
|
31
|
?
|
11110
|
32
|
*
|
11111
|
1
|
A
|
00000
|
2
|
B
|
00001
|
3
|
C
|
00010
|
4
|
D
|
00011
|
5
|
E
|
00100
|
6
|
F
|
00101
|
7
|
G
|
00110
|
8
|
H
|
00111
|
9
|
I
|
01000
|
10
|
J
|
01001
|
11
|
K
|
01010
|
12
|
L
|
01011
|
13
|
M
|
01100
|
14
|
N
|
01101
|
15
|
O
|
01110
|
16
|
P
|
01111
|
R
|
+
|
A
|
=
|
R
|
1
|
+
|
0
|
=
|
1
|
0
|
+
|
0
|
=
|
0
|
0
|
+
|
0
|
=
|
0
|
0
|
+
|
0
|
=
|
0
|
1
|
+
|
0
|
=
|
1
|
G
|
+
|
L
|
=
|
N
|
0
|
+
|
0
|
=
|
0
|
0
|
+
|
1
|
=
|
1
|
1
|
+
|
0
|
=
|
1
|
1
|
+
|
1
|
=
|
0
|
0
|
+
|
1
|
=
|
1
|
E
|
+
|
S
|
=
|
W
|
0
|
+
|
1
|
=
|
1
|
0
|
+
|
0
|
=
|
0
|
1
|
+
|
0
|
=
|
1
|
0
|
+
|
1
|
=
|
1
|
0
|
+
|
0
|
=
|
0
|
S
|
+
|
M
|
=
|
?
|
1
|
+
|
0
|
=
|
1
|
0
|
+
|
1
|
=
|
1
|
0
|
+
|
1
|
=
|
1
|
1
|
+
|
0
|
=
|
1
|
0
|
+
|
0
|
=
|
0
|
H
|
+
|
S
|
=
|
V
|
0
|
+
|
1
|
=
|
1
|
0
|
+
|
0
|
=
|
0
|
1
|
+
|
0
|
=
|
1
|
1
|
+
|
1
|
=
|
0
|
1
|
+
|
0
|
=
|
1
|
V
|
+
|
L
|
=
|
?
|
1
|
+
|
0
|
=
|
1
|
0
|
+
|
1
|
=
|
1
|
1
|
+
|
0
|
=
|
1
|
0
|
+
|
1
|
=
|
1
|
1
|
+
|
1
|
=
|
0
|
Javob : ERGASHEV WRNO?VE?.
4. Gamelton marshruti: T = ERGASHEV.
S
5
6
H
1
2
E
R
3
4
A
G
V
E
7
8
C = H V E G A R E S
K = 6 8 7 3 4 2 1 5
4. RSA algoritmi T = ERGASHEV
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
J
|
K
|
L
|
M
|
N
|
O
|
P
|
Q
|
R
|
S
|
T
|
U
|
V
|
W
|
X
|
Y
|
Z
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
Тub bo’lgan р=3 vа q=11 sonlarini tanlab olamiz.
Ushbu n=pq=3*11=33 sonini aniqlaymiz.
So’ngra, sonini topamiz, hamda bu son bilan 1 dan farqli biror umumiy bo;luvchiga ega bo’lmagan e sonini, misol uchun e=3 sonini, olamiz.
Yuqoridfa keltirilgan e*d(mod)=1 shartni qanoatlantiruvchi d sonini 3d=1 (mod 20) tenglikdan topamiz. Bu son d=7.
U holda ma’lumot {ERGASHEV}{5,18,7,1,19,8,5,22} ko’rinishda bo’ladi va uni {e;n}={3;33} ochiq kalit bilan bir tomonli funksiya bilan shifrlaymiz:
х=5 da ShM1=(53)(mod33)=26,
х=18 da ShM2=(183)(mod33)=24,
х=7 da ShM3=(73)(mod33)=13,
х=1 da ShM4=(13)(mod33)=1,
х=19 da ShM5=(193)(mod33)=28,
х=8 da ShM6=(83)(mod33)=17,
х=5 da ShM7=(53)(mod33)=26,
х=22 da ShM8=(223)(mod33)=22,
C = {26, 24, 13, 1, 28, 17, 26, 22}
Bu olingan shifrlangan {26, 24, 13, 1, 28, 17, 26, 22} ma’lumotni maxfiy {d;n}={7;33} kalit bilan ifoda orqali deshifrlaymiz:
у=26 dа ОМ1=(267) (mod33)=5,
у=24 dа ОМ1=(247) (mod33)=18, {5, 18, 7, 1, 19, 8, 5, 22}
у=13 dа ОМ1=(267) (mod33)=7,
у=1 dа ОМ1=(267) (mod33)=1,
у=28 dа ОМ1=(267) (mod33)=19,
у=17 dа ОМ1=(267) (mod33)=8,
у=26 dа ОМ1=(267) (mod33)=5,
у=22 da ОМ1=(267) (mod33)=22,
Do'stlaringiz bilan baham: |