9-Amaliy ish Jurayev Toxir Javhar o‘g’li


Download 21.71 Kb.
bet2/2
Sana13.02.2023
Hajmi21.71 Kb.
#1195051
1   2
Bog'liq
9-AMALIY KIRIPTOGIRAFIYA 1

Ln = Rn-1
Rn = Ln-1 + f(Rn-1,Kn)
(1 - ROUND)
K1= 000000111100000110100101100101100001101001010000
L1 = R0 = 00000000000000000010010011110101
E BIT-SELECTION TABLE

32 1 2 3 4 5


4 5 6 7 8 9
8 9 10 11 12 13
12 13 14 15 16 17
16 17 18 19 20 21
20 21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
E(R0) = 100000000000000000000000000100001001011110101010
K1= 000000111100000110100101100101100001101001010000
K1+E(R0) = 100000111100000110100101100001101000110111111010

Kn + E(Rn-1) =B1B2B3B4B5B6B7B8
S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)

SATR USTUN
0 - 00 0 – 0000 8 - 1000
1 – 01 1 – 0001 9 - 1001
2 – 10 2 – 0010 10 - 1010
3 – 11 3 – 0011 11- 1011
4 – 0100 12 - 1100
5 – 0101 13 - 1101
6 – 0110 14 - 1110
7 – 0111 15 – 1111
K1 + E(R1-1) = 100000 111100 000110 100101 100001 101000 110111 111010
S1(B1) = (10)=(0000) = 0100
S2(B2) = (10) = (1110) = 0010
S3(B3) = (00) = (0011) = 1110
S4(B4) = (11) = (0010) = 1010
S5(B5) = (11) = (0000) = 1011
S6(B6) = (10) = (0100) = 0010
S7(B7) = (11) = (1011) = 1001
S8(B8) = (10) = (1101) = 0011

Endi,chiqqan natijani P – jadvalga solamiz :
P

16 7 20 21


29 12 28 17
1 15 23 26
5 18 31 10
2 8 24 14
32 27 3 9
19 13 30 6
22 11 4 25

f = P(S1(B1)S2(B2)...S8(B8))
S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8) = 0100 0010 1110 1010 1011001010010011
f = P(S1(B1)S2(B2)...S8(B8)) = 01100011011000111000100111000101
R1 = L0 + f(R0 , K1 ) = 11111111110000011110000000101010 + 01100011011000111000100111000101 = 10011101101000100110100111101111
Download 21.71 Kb.

Do'stlaringiz bilan baham:
1   2




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