Nguyễn Công Minh

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 13

PC1 11110000110011001010101011110101010101100110011110001111

byte byte hexsan C0= 1111000011001100101010101111


1 11110000 F0 D0= 0101010101100110011110001111
2 11001100 CC
3 10101010 AA C1= 1110000110011001010101011111
4 11110101 F5
5 01010110 56 byte byte hexsan
6 01100111 67 1 11100001 E1
7 10001111 8F 2 10011001 99
3 01010101 55
4 1111 F
Tính khóa K1 = PC2(C1D1) 000110110000001011101111111111000111000001110010
C1D1= 11100001100110010101010111111010101011001100111100011110

STT PC2 bit


1 14 0 000110110000001011101111111111000111000001110010
2 17 0 00110110000001011101111111111000111000001110010
3 11 0 0110110000001011101111111111000111000001110010
4 24 1 110110000001011101111111111000111000001110010
5 11 10110000001011101111111111000111000001110010
6 50 0110000001011101111111111000111000001110010
7 31 110000001011101111111111000111000001110010
8 28 1 10000001011101111111111000111000001110010
9 15 0 0000001011101111111111000111000001110010
10 60 000001011101111111111000111000001110010
11 21 0 00001011101111111111000111000001110010
12 10 0 0001011101111111111000111000001110010
13 23 0 001011101111111111000111000001110010
14 19 0 01011101111111111000111000001110010
15 12 1 1011101111111111000111000001110010
16 40 011101111111111000111000001110010
17 26 1 11101111111111000111000001110010
18 81 1101111111111000111000001110010
19 16 1 101111111111000111000001110010
20 70 01111111111000111000001110010
21 27 1 1111111111000111000001110010
22 20 1 111111111000111000001110010
23 13 1 11111111000111000001110010
24 21 1111111000111000001110010
25 41 1 111111000111000001110010
26 52 1 11111000111000001110010
27 31 1 1111000111000001110010
28 37 1 111000111000001110010
29 47 1 11000111000001110010
30 55 1 1000111000001110010
31 30 0 000111000001110010
32 40 0 00111000001110010
33 51 0 0111000001110010
34 45 1 111000001110010
35 33 1 11000001110010
36 48 1 1000001110010
37 44 0 000001110010
38 49 0 00001110010
39 39 0 0001110010
40 56 0 001110010
41 34 0 01110010
42 53 1 1110010
43 46 1 110010
44 42 1 10010
45 50 0 0010
46 36 0 010
47 29 1 10
48 32 0
C1=ShiftLeft(C0,s1)
C1=ShiftLeft(D0,s1)

D1= 1010101011001100111100011110

byte byte hexsan


1 10101010 AA
2 11001100 CC
3 11110001 F1
4 1110 E

byte byte hexsan Cho bản rõ: 0123456789ABCDEF 00000001001000110100


1 00011011 1B Vị trí kí tự hexsan binary
2 00000010 02 10 0000 00000001001000110100
3 11101111 EF 21 0001 00010010001101000101
4 11111100 FC 32 0010 00100011010001010110
5 01110000 70 43 0011 00110100010101100111
6 01110010 72 54 0100 01000101011001111000
65 0101 01010110011110001001
76 0110 01100111100010011010
87 0111 01111000100110101011
98 1000 10001001101010111100
10 9 1001 10011010101111001101
11 A 1010 10101011110011011110
12 B 1011 10111100110111101111
13 C 1100 1100110111101111
14 D 1101 110111101111
15 E 1110 11101111
16 F 1111

STT IP bit
1 58 1 11001100000000001100
2 50 1 10011000000000011001
3 42 0 00110000000000110011
4 34 0 01100000000001100110
5 26 1 11000000000011001100
6 18 1 10000000000110011001
7 10 0 00000000001100110011
8 20 00000000011001100111
9 60 0 00000000110011001111
10 52 0 00000001100110011111
11 44 0 00000011001100111111
12 36 0 00000110011001111111
13 28 0 00001100110011111111
14 20 0 00011001100111111111
15 12 0 00110011001111111111
16 40 01100110011111111111
17 62 1 11001100111111111111
18 54 1 10011001111111111110
19 46 0 00110011111111111100
20 38 0 01100111111111111000
21 30 1 11001111111111110000
22 22 1 10011111111111100001
23 14 0 00111111111111000010
24 60 01111111111110000101
25 64 1 11111111111100001010
26 56 1 11111111111000010101
27 48 1 11111111110000101010
28 40 1 11111111100001010101

IP(M)= 11001100000000001100110011111111111100001

byte byte hexsan


1 11001100 CC
2 00000000 00
3 11001100 CC
4 11111111 FF
5 11110000 F0
6 10101010 AA
7 11110000 F0
8 10101010 AA

Khóa K1
byte byte hexsan
1 00011011 1B 27
2 00000010 02 2
3 11101111 EF 239
4 11111100 FC 252
5 01110000 70 112
6 01110010 72 114

byte XOR(E(R0),K1) binary hexsan


1 97 01100001 61
2 23 00010111 17
3 186 10111010 BA
4 134 10000110 86
5 101 01100101 65
6 39 00100111 27

B1 = ER0 XOR K1 = 011000010001011110111010100001100110010100100111


cặp 6 bit hàng cột chỉ số mảng
1 011000 00 1100 001100 12
2 010001 01 1000 011000 24
3 011110 00 1111 001111 15
4 111010 10 1101 101101 45
5 100001 11 0000 110000 48
6 100110 10 0011 100011 35
7 010100 00 1010 001010 10
8 100111 11 0011 110011 51

chỉ số S1 S2 S3 S4 S5
0 14 15 10 7 2
1 4 1 0 13 12
2 13 8 9 14 4
3 1 14 14 3 1
4 2 6 6 0 7
5 15 11 3 6 10
6 11 3 15 9 11
7 8 4 5 10 6
8 3 9 1 1 8
9 10 7 13 2 5
10 6 2 12 8 3
11 12 13 7 5 15
12 5 12 11 11 13
13 9 0 4 12 0
14 0 5 2 4 14
15 7 10 8 15 9
16 0 3 13 13 14
17 15 13 7 8 11
18 7 4 0 11 2
19 4 7 9 5 12
20 14 15 3 6 4
21 2 2 4 15 7
22 13 8 6 0 13
23 1 14 10 3 1
24 10 12 2 4 5
25 6 0 8 7 0
26 12 1 5 2 15
27 11 10 14 12 10
28 9 6 12 1 3
29 5 9 11 10 9
30 3 11 15 14 8
31 8 5 1 9 6
32 4 0 13 10 4
33 1 14 6 6 2
34 14 7 4 9 1
35 8 11 9 0 11
36 13 10 8 12 10
37 6 4 15 11 13
38 2 13 3 7 7
39 11 1 0 13 8
40 15 5 11 15 15
41 12 8 1 1 9
42 9 12 2 3 12
43 7 6 12 14 5
44 3 9 5 5 6
45 10 3 10 2 3
46 5 2 14 8 0
47 0 15 7 4 14
48 15 13 1 3 11
49 12 8 10 15 8
50 8 10 13 0 12
51 2 1 0 6 7
52 4 3 6 10 1
53 9 15 9 1 14
54 1 4 8 13 2
55 7 2 7 8 13
56 5 11 4 9 6
57 11 6 15 4 15
58 3 7 14 5 0
59 14 12 3 11 9
60 10 0 11 12 10
61 0 5 5 7 4
62 6 14 2 2 5
63 13 9 13 14 3
0000000100100011010001010110011110001001101010111100110111101111

0000000100100011010001010110011110001001101010111100110111101111
000100100011010001010110011110001001101010111100110111101111
00100011010001010110011110001001101010111100110111101111
0011010001010110011110001001101010111100110111101111
010001010110011110001001101010111100110111101111
01010110011110001001101010111100110111101111
0110011110001001101010111100110111101111
011110001001101010111100110111101111
10001001101010111100110111101111
1001101010111100110111101111
101010111100110111101111
10111100110111101111
1100110111101111
110111101111

1100110000000000110011001111111111110000101010101111000010101010
100110000000000110011001111111111110000101010101111000010101010
00110000000000110011001111111111110000101010101111000010101010
0110000000000110011001111111111110000101010101111000010101010
110000000000110011001111111111110000101010101111000010101010
10000000000110011001111111111110000101010101111000010101010
0000000000110011001111111111110000101010101111000010101010
000000000110011001111111111110000101010101111000010101010
00000000110011001111111111110000101010101111000010101010
0000000110011001111111111110000101010101111000010101010
000000110011001111111111110000101010101111000010101010
00000110011001111111111110000101010101111000010101010
0000110011001111111111110000101010101111000010101010
000110011001111111111110000101010101111000010101010
00110011001111111111110000101010101111000010101010
0110011001111111111110000101010101111000010101010
110011001111111111110000101010101111000010101010
10011001111111111110000101010101111000010101010
0011001111111111110000101010101111000010101010
011001111111111110000101010101111000010101010
11001111111111110000101010101111000010101010
1001111111111110000101010101111000010101010
001111111111110000101010101111000010101010
01111111111110000101010101111000010101010
1111111111110000101010101111000010101010
111111111110000101010101111000010101010
11111111110000101010101111000010101010
1111111110000101010101111000010101010

1001111111111110000101010101111000010101010

Nửa trái L0= 11001100000000001100110011111111


Nửa phải R0= 11110000101010101111000010101010

E(R0)= 011110100001010101010101011110100001010101010101

byte byte hexsan


1 01111010 7A 122
2 00010101 15 21
3 01010101 55 85
4 01111010 7A 122
5 00010101 15 21
6 01010101 55 85

10010100100111
ỉ số mảng tra bảng S binary hex
5 0101 5
12 1100 C
8 1000 8
2 0010 2
11 1011 B
5 0101 5
9 1001 9
7 0111 7

S6 S7 S8
12 4 13
1 11 2
10 2 8
15 14 4
9 15 6
2 0 15
6 8 11
8 13 1
0 3 10
13 12 9
3 9 3
4 7 14
14 5 5
7 10 0
5 6 12
11 1 7
10 13 1
15 0 15
4 11 13
2 7 8
7 4 10
12 9 3
9 1 7
5 10 4
6 14 12
1 3 5
13 5 6
14 12 11
0 2 0
11 15 14
3 8 9
8 6 2
9 1 7
14 4 11
15 11 4
5 13 1
2 12 9
8 3 12
12 7 14
3 14 2
7 10 0
0 15 6
4 6 10
10 8 13
1 0 15
13 5 3
11 9 5
6 2 8
4 6 2
3 11 1
2 13 14
12 8 7
9 1 4
5 4 10
15 10 8
10 7 13
11 9 15
14 5 12
1 0 9
7 15 0
6 14 3
0 2 5
8 3 6
13 12 11
Khóa: 133457799BBCDFF1
Vị trí kí tự hexsan binary
11 0001 0001001100110100010101110111100110011011101111001101111111110001
23 0011 001100110100010101110111100110011011101111001101111111110001
33 0011 00110100010101110111100110011011101111001101111111110001
44 0100 0100010101110111100110011011101111001101111111110001
55 0101 010101110111100110011011101111001101111111110001
67 0111 01110111100110011011101111001101111111110001
77 0111 0111100110011011101111001101111111110001
89 1001 100110011011101111001101111111110001
99 1001 10011011101111001101111111110001
10 B 1011 1011101111001101111111110001
11 B 1011 101111001101111111110001
12 C 1100 11001101111111110001
13 D 1101 1101111111110001
14 F 1111 111111110001
15 F 1111 11110001
16 1 0001
PC1 11110000110011001010101011110101010101100110011110001111
STT Vị trí bit i
1 57 1 11110000110011001010101011110101010101100110011110001111
2 49 1 1110000110011001010101011110101010101100110011110001111
3 41 1 110000110011001010101011110101010101100110011110001111
4 33 1 10000110011001010101011110101010101100110011110001111
5 25 0 0000110011001010101011110101010101100110011110001111
6 17 0 000110011001010101011110101010101100110011110001111
7 90 00110011001010101011110101010101100110011110001111
8 10 0110011001010101011110101010101100110011110001111
9 58 1 110011001010101011110101010101100110011110001111
10 50 1 10011001010101011110101010101100110011110001111
11 42 0 0011001010101011110101010101100110011110001111
12 34 0 011001010101011110101010101100110011110001111
13 26 1 11001010101011110101010101100110011110001111
14 18 1 1001010101011110101010101100110011110001111
15 10 0 001010101011110101010101100110011110001111
16 20 01010101011110101010101100110011110001111
17 59 1 1010101011110101010101100110011110001111
18 51 0 010101011110101010101100110011110001111
19 43 1 10101011110101010101100110011110001111
20 35 0 0101011110101010101100110011110001111
21 27 1 101011110101010101100110011110001111
22 19 0 01011110101010101100110011110001111
23 11 1 1011110101010101100110011110001111
24 30 011110101010101100110011110001111
25 60 1 11110101010101100110011110001111
26 52 1 1110101010101100110011110001111
27 44 1 110101010101100110011110001111
28 36 1 10101010101100110011110001111
29 63 0 0101010101100110011110001111
30 55 1 101010101100110011110001111
31 47 0 01010101100110011110001111
32 39 1 1010101100110011110001111
33 31 0 010101100110011110001111
34 23 1 10101100110011110001111
35 15 0 0101100110011110001111
36 71 101100110011110001111
37 62 0 01100110011110001111
38 54 1 1100110011110001111
39 46 1 100110011110001111
40 38 0 00110011110001111
41 30 0 0110011110001111
42 22 1 110011110001111
43 14 1 10011110001111
44 60 0011110001111
45 61 0 011110001111
46 53 1 11110001111
47 45 1 1110001111
48 37 1 110001111
49 29 1 10001111
50 21 0 0001111
51 13 0 001111
52 50 01111
53 28 1 1111
54 20 1 111
55 12 1 11
56 41
111001101111111110001
01101111111110001
1111111110001
111110001

0011110001111

0011110001111 byte byte hexsan


011110001111 1 11110000 F0
11110001111 2 11001100 CC
1110001111 3 10101010 AA
110001111 4 11110101 F5
5 01010110 56
6 01100111 67
7 10001111 8F

You might also like