# O’zbekiston respublikasi oliy va o’rta maxsus ta’lim vazirligi muhammad al-Xorazmiy nomidagi Toshkent Axborot Texnologiya universiteti

 Sana 06.12.2020 Hajmi 177.23 Kb.

O’ZBEKISTON RESPUBLIKASI

OLIY VA O’RTA MAXSUS TA’LIM VAZIRLIGI

Toshkent Axborot Texnologiya universiteti

2-amaliy ish

Bajardi:712_18-guruh tabasi Sharifjonov Humoyun

Qabul qildi: Mardiyev U

2-amaliy mashgulot

Mavzu: Bir qiymatli o’rniga qo’yishga asoslangan shifrlar taxlili

Affin shifrlash algoritmi;

## Affin shefrlash usulida quyidagi formuladan foydalanamiz:(ax+b)mod(n) Bu yerda a va b ixtiyoriy kalit hisoblanadi, n esa alifbo uzunligi.

Matn: Sharifjonovhumoyun Kalit:Humoyun
 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 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15 17 18 19 20 21 22 23 24 25

 Xabar S H A R I F J O N O V H U M O Y U N X 18 7 0 17 8 5 9 14 20 14 21 7 20 12 14 24 20 13 3x+4 58 25 4 55 28 19 31 46 64 46 67 25 64 40 46 76 64 43 (2x+4)mod26 6 25 4 3 2 19 5 20 12 20 13 25 12 14 20 24 12 17 Shefr matn g z e d c t f u m u n z m o u y m r

Deshifrlash jarayoni: Deshifrlash formulasi 𝐷(𝑦)=𝑎−1(𝑦−𝑏)𝑚𝑜𝑑𝑚 гаga teng bo’lib, 𝑎−1=9 , b=4 va m=26 ga teng bo'ladi.
 Shifr matn g z e d c t f u m u n z m o u y m r 6 25 4 3 2 19 5 20 12 20 13 25 12 14 20 24 12 17

Deshifrning umumiy ko’rinishi
 Shifr matn g z e d c t f u m u n z m o u y m r Y 6 25 4 3 2 19 5 20 12 20 13 25 12 14 20 24 12 17 9(y-4) 18 189 0 -9 -18 135 9 144 72 144 81 189 72 90 144 180 72 117 9(y-4)mod26 18 7 0 17 8 5 9 14 20 14 21 7 20 12 14 24 20 13

D=SharifjonovHumoyun;

2.Birlamchi akslantirish affin shifrlash yordamida;

Formulasi M=аm+b, m=26 (alfabit uzunligi), M=a*m+b;

M=Humoyu=7 20 12 14 24 20

M1=7*26+20=202

M1=12*26+14=326

M1=24*26+20=644

E(x)=аx+b (mod)m

A=157;b=580;m^2=676;

C=157М+580 (mod m2)=157*326+580 (mod676)=101688(mod 676) = 386

C1=522; C2=386; C3=288

C1=522=20*26+2;

20=u ; 2=c;

C2=386=14*26+22;

14= 0; 22=w ;

C3=288=11*26+2;

11=l ; 2=c;

C=20,2,14,22,11,2=u, c, o, w, l, c;

Deshifrlash jarayoni;Quyidagi formula orqali ifodalanadi.

М=𝑎^−1(С−𝑏)𝑚𝑜𝑑 𝑚2

M=157(-1)(522-580) mod m2=521(522-580) mod m2= -30218mod 676 = 202

M=202=7*26+20; ‘7=h’ ;20=u’;