Shifrlash:
BESH so’zini ASCII jadvali yordamida bit ko’rinishga o’tkazamiz:
01000010 01000101 01010011 01001000.
Bitlardan iborat matnni 8 bitdan bloklarga ajratamiz va har bir blokni o’nlik sanoq sistemasiga o’tkazamiz: M1=66, M2=69, M3=83, M4=72.
Ci= mod n. formula yordamida shifrlanadi:
C1= mod n = 6611 mod 1517 = (66*(665nod1517)2) mod 1517 = =(66*5322mod1517) mod 1517 = (66*862)mod1517=763,
C2= mod n = 6911 mod 1517 =1441,
C3= mod n = 8311 mod 1517 =821,
C4= mod n = 7211 mod 1517 =1097.
Hosil bo’lgan shifrtekst quyidagicha:C={763,1441,821,1097} Shifrni ochish: Modul son n=p*q=1517, (p-1)*(q-1) ko’paytma bilan o’zaro tub bo’lgan e=11 ochiq kalit, matn uzunligi L=8 bit va C={763,1441,821,1097}bizga ma‘lum.
e sonining (p-1)*(q-1)modul bo’yicha teskarisini topamiz:
d=e-1mod((p-1)*(q-1))=11-1mod1440=11383mod1440=131
Mi= mod n. formula yordamida shifrni ochamiz:
M1= mod n=763131mod1517=66, M2= mod n=1441131mod1517=69,
M3= mod n=821131mod1517=83, M4= mod n=1097131mod1517=72.
3. Mi larni o’nlikdan ikkilikka o’tkazib, ASCII jadval yordamida harflarga o’tamiz va natijada M=BESH so’zi paydo bo’ladi.
Mustaqil ish uchun misollar.
n=1517, e=11, C={ 413, 665, 620, 30 }, L=8 bit, M=?
n=1517, e=11, C={ 593, 27, 763, 30 } L=8 bit, M=?
n=1517, e=11, C={ 763, 30, 593, 27 }, L=8 bit, M=?
n=1517, e=11, C={ 1270, 1408, 902, 665 }, L=8 bit, M=?
n=1517, e=11, C={ 902, 1408, 620, 30 }, L=8 bit, M=?
n=1517, e=11, C={ 13, 665, 1408, 1390 }, L=8 bit, M=?
n=1517, e=11, C={ 1437, 1408, 902, 285 }, L=8 bit, M=?
n=1147, e=11, C={162,881,767,753,162,516,881,753,139,881,894, 162,1109,894,229,881,162,894,890,162,1109}, L=8 bit, M=?
n=1147, e=11, C={778,890,753,890,946,778,881,946,1109,139,881, 231,881,778,516,162,881,778}, L=8 bit, M=?
n=1189, e=11,C={1071,416,529,50,368,1096,801,55,368,368,1096, 148,55,575,646,628,1096,495,50,529,352}, L=8 bit, M=?
n=1189, e=11,C={220,1096,451,416,529,352,416,801,449,86,1096, 575,416,628,575,50,801,220,1096,451,368,50}, L=8 bit, M=? 12. n=341, e=13, L=6 bit, C={ 335, 161, 130, 276} M=?
n=407, e=13, L=6 bit, C={ 280, 334, 235, 315} M=?
n=341, e=13, L=6 bit, C={ 335, 232, 282, 226} M=?
n=407, e=13, L=6 bit, C={ 280, 165, 261, 348} M=?
n=341, e=13, L=6 bit, C={ 246, 112, 1, 293} M=?
n=407, e=13, L=6 bit, C={ 280, 23, 185, 94} M=?
n=341, e=13, L=6 bit, C={ 246, 198, 1, 226} M=?
n=407, e=13, L=6 bit, C={ 288, 334, 235, 310} M=?
n=341, e=13, L=6 bit, C={ 246, 161, 168, 130} M=?
n=407, e=13, L=6 bit, C={ 280, 165, 312, 310} M=?
n=341, e=13, L=6 bit, C={ 178, 161, 191, 151 } M=?
n=407, e=13, L=6 bit, C={ 174, 23, 258, 382 } M=?
n=341, e=13, L=6 bit, C={ 208, 208, 80, 132 } M=?
n=187, e=13, L=6 bit, C={ 21, 21, 25, 33 } M=?
n=209, e=13, L=6 bit, C={ 98, 98, 25, 154 } M=?
n=209, e=7, L=6 bit, C={ 36, 19, 4, 2 } M=?
n=209, e=13, L=6 bit, C={ 81, 98, 25, 204 } M=?
n=187, e=13, L=6 bit, C={ 169, 21, 25, 6 } M=?
n=341, e=7, L=6 bit, C={ 181, 145, 192, 271 } M=?
n=187, e=7, L=6 bit, C={ 104, 47, 181, 7 } M=?
Do'stlaringiz bilan baham: |