Kalit: Ravshanravs 10001000001010110010001110000001101100010000010101100100 bu 56 bitli kalit biz buni 64 bitli kalitga aylantiramiz


Download 60.43 Kb.
Sana20.12.2022
Hajmi60.43 Kb.
#1037917
Bog'liq
9-amalyot Yoldashev D TAHRIR

Ochiq matn: Yoldoshev doniyor 11000011100011000110111010010001110010010101000110 1110011010100


Kalit: Ravshanravs 10001000001010110010001110000001101100010000010101100100 bu 56 bitli kalit biz buni 64 bitli kalitga aylantiramiz

K= 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0





K= 1 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0
C0 = 1 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1
D0 = 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0



 C1= 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1
D1 = 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0 0

K1 = 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0 0
Bu K1 kalitni PC-2 jadvalga solamiz va yangi K1 hosil qilamiz


PC-2 jadvaldan olingan K1 kalit quydagiga teng
K1 = 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 1 0
Endi biz ochiq malumotimizni IP jadvalga solamiz

Ochiq matinimiz quydagi bitlardan iborat


1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 0 0 1 1 0 1 0 1 0 0


IP= 1100 1100 0000 0000 1100 1100 1111 1111 1111 0000 1010 1010 1111 0000 1010 1010
 iP kalitni L0va R0 qisimlarga ajratamiz
L0 = 1100 1100 0100 0110 1100 1100 1111 1111
R0= 1111 0000 1010 1010 1111 1010 1010 1010
R0= 1111 0000 1010 1010 1111 0000 1010 1011


R0= 11110100001010101010101011110100001010101010101
K1 =00011011000000101110111111111100011100000111001

K1+R0= 111101 111000 100100 100111 101100 011010 101011
B1 = 111101
B2 = 111000
B3 = 100100
B4 = 100111
B5 = 101100
B6 = 101100
B7 = 011010
B8 = 101011

00-0
01-1


10-2
11-3
0 0 0 0 -0
0 0 0 1-1
0 0 1 0-2
0 0 1 1 -3
0 1 0 0 -4
0 1 0 1 -5
0 1 1 0 -6
0 1 1 1 -7
1 0 0 0 -8
1 0 0 1 -9
1 0 1 0 -10
1 0 1 1 -11
1 1 0 0 -12
1 1 0 1 -13
1 1 1 0 -14
1 1 1 1 -15
S1(B1)= 0110
S2(B2)= 1001
S3(B3)=0100
S4(B4)= 0110
S5(B5)= 1011
S6(B6)= 0110
S7(B7)= 0101
S8(B8)= 1010


S= 01101001010001101011011001011010

Endi bu Sbox dan chiqqan kalitni L0 bilan xorlashdan oldin biz uni P jadvalga solamiz

f= 0010 1011 0111 1011 1101 0010 1000 1000
R1=L0+R0= 0010 1011 0111 1011 1101 0010 1000 1000
1100 1100 0100 0110 1100 1100 1111 1111 =
=1110 0111 0011 1101 0001 1110 0111 0111
L1=R0= 1110 0111 0011 1101 0001 1110 0111 0111
Download 60.43 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling