-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.txt
214 lines (176 loc) · 14.5 KB
/
example.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
Decryption of
cipher text = C0B7A8D05F3A829C
using key = AABB09182736CCDD
Given key = AABB09182736CCDD = 1010101010111011000010010001100000100111001101101100110011011101
Given key after PC1 = C3C033A33F0CFA = 11000011110000000011001110100011001111110000110011111010
Left half = C3C033A = 1100001111000000001100111010
Right half = 33F0CFA = 0011001111110000110011111010
Key Generation Round 1 Left half = 8780675 = 1000011110000000011001110101
Key Generation Round 1 Right half = 67E19F4 = 0110011111100001100111110100
Key Generation Round 1 Combined key = 878067567E19F4 = 10000111100000000110011101010110011111100001100111110100
Key Generation Round 1 Compressed key = 194CD072DE8C = 000110010100110011010000011100101101111010001100
Key Generation Round 2 Left half = F00CEB = 0000111100000000110011101011
Key Generation Round 2 Right half = CFC33E8 = 1100111111000011001111101000
Key Generation Round 2 Combined key = F00CEBCFC33E8 = 00001111000000001100111010111100111111000011001111101000
Key Generation Round 2 Compressed key = 4568581ABCCE = 010001010110100001011000000110101011110011001110
Key Generation Round 3 Left half = 3C033AC = 0011110000000011001110101100
Key Generation Round 3 Right half = 3F0CFA3 = 0011111100001100111110100011
Key Generation Round 3 Combined key = 3C033AC3F0CFA3 = 00111100000000110011101011000011111100001100111110100011
Key Generation Round 3 Compressed key = 6EDA4ACF5B5 = 000001101110110110100100101011001111010110110101
Key Generation Round 4 Left half = F00CEB0 = 1111000000001100111010110000
Key Generation Round 4 Right half = FC33E8C = 1111110000110011111010001100
Key Generation Round 4 Combined key = F00CEB0FC33E8C = 11110000000011001110101100001111110000110011111010001100
Key Generation Round 4 Compressed key = DA2D032B6EE3 = 110110100010110100000011001010110110111011100011
Key Generation Round 5 Left half = C033AC3 = 1100000000110011101011000011
Key Generation Round 5 Right half = F0CFA33 = 1111000011001111101000110011
Key Generation Round 5 Combined key = C033AC3F0CFA33 = 11000000001100111010110000111111000011001111101000110011
Key Generation Round 5 Compressed key = 69A629FEC913 = 011010011010011000101001111111101100100100010011
Key Generation Round 6 Left half = CEB0F = 0000000011001110101100001111
Key Generation Round 6 Right half = C33E8CF = 1100001100111110100011001111
Key Generation Round 6 Combined key = CEB0FC33E8CF = 00000000110011101011000011111100001100111110100011001111
Key Generation Round 6 Compressed key = C1948E87475E = 110000011001010010001110100001110100011101011110
Key Generation Round 7 Left half = 33AC3C = 0000001100111010110000111100
Key Generation Round 7 Right half = CFA33F = 0000110011111010001100111111
Key Generation Round 7 Combined key = 33AC3C0CFA33F = 00000011001110101100001111000000110011111010001100111111
Key Generation Round 7 Compressed key = 708AD2DDB3C0 = 011100001000101011010010110111011011001111000000
Key Generation Round 8 Left half = CEB0F0 = 0000110011101011000011110000
Key Generation Round 8 Right half = 33E8CFC = 0011001111101000110011111100
Key Generation Round 8 Combined key = CEB0F033E8CFC = 00001100111010110000111100000011001111101000110011111100
Key Generation Round 8 Compressed key = 34F822F0C66D = 001101001111100000100010111100001100011001101101
Key Generation Round 9 Left half = 19D61E0 = 0001100111010110000111100000
Key Generation Round 9 Right half = 67D19F8 = 0110011111010001100111111000
Key Generation Round 9 Combined key = 19D61E067D19F8 = 00011001110101100001111000000110011111010001100111111000
Key Generation Round 9 Compressed key = 84BB4473DCCC = 100001001011101101000100011100111101110011001100
Key Generation Round 10 Left half = 6758780 = 0110011101011000011110000000
Key Generation Round 10 Right half = 9F467E1 = 1001111101000110011111100001
Key Generation Round 10 Combined key = 67587809F467E1 = 01100111010110000111100000001001111101000110011111100001
Key Generation Round 10 Compressed key = 2765708B5BF = 000000100111011001010111000010001011010110111111
Key Generation Round 11 Left half = 9D61E01 = 1001110101100001111000000001
Key Generation Round 11 Right half = 7D19F86 = 0111110100011001111110000110
Key Generation Round 11 Combined key = 9D61E017D19F86 = 10011101011000011110000000010111110100011001111110000110
Key Generation Round 11 Compressed key = 6D5560AF7CA5 = 011011010101010101100000101011110111110010100101
Key Generation Round 12 Left half = 7587806 = 0111010110000111100000000110
Key Generation Round 12 Right half = F467E19 = 1111010001100111111000011001
Key Generation Round 12 Combined key = 7587806F467E19 = 01110101100001111000000001101111010001100111111000011001
Key Generation Round 12 Compressed key = C2C1E96A4BF3 = 110000101100000111101001011010100100101111110011
Key Generation Round 13 Left half = D61E019 = 1101011000011110000000011001
Key Generation Round 13 Right half = D19F867 = 1101000110011111100001100111
Key Generation Round 13 Combined key = D61E019D19F867 = 11010110000111100000000110011101000110011111100001100111
Key Generation Round 13 Compressed key = 99C31397C91F = 100110011100001100010011100101111100100100011111
Key Generation Round 14 Left half = 5878067 = 0101100001111000000001100111
Key Generation Round 14 Right half = 467E19F = 0100011001111110000110011111
Key Generation Round 14 Combined key = 5878067467E19F = 01011000011110000000011001110100011001111110000110011111
Key Generation Round 14 Compressed key = 251B8BC717D0 = 001001010001101110001011110001110001011111010000
Key Generation Round 15 Left half = 61E019D = 0110000111100000000110011101
Key Generation Round 15 Right half = 19F867D = 0001100111111000011001111101
Key Generation Round 15 Combined key = 61E019D19F867D = 01100001111000000001100111010001100111111000011001111101
Key Generation Round 15 Compressed key = 3330C5D9A36D = 001100110011000011000101110110011010001101101101
Key Generation Round 16 Left half = C3C033A = 1100001111000000001100111010
Key Generation Round 16 Right half = 33F0CFA = 0011001111110000110011111010
Key Generation Round 16 Combined key = C3C033A33F0CFA = 11000011110000000011001110100011001111110000110011111010
Key Generation Round 16 Compressed key = 181C5D75C66D = 000110000001110001011101011101011100011001101101
--------------------------------
Cipher text = C0B7A8D05F3A829C = 1100000010110111101010001101000001011111001110101000001010011100
Cipher text after IP = 90B892A6B334C15F = 1001000010111000100100101010011010110011001101001100000101011111
Left half = 90B892A6 = 10010000101110001001001010100110
Right half = B334C15F = 10110011001101001100000101011111
Cipher Round 1 Right expanded = DA69A9602AFF = 110110100110100110101001011000000010101011111111
Cipher Round 1 S-box input = C275F415EC92 = 110000100111010111110100000101011110110010010010
Cipher Round 1 S-box output = F1E32BF9 = 11110001111000110010101111111001
Cipher Round 1 Left Half = B334C15F = 10110011001101001100000101011111
Cipher Round 1 Right Half = A497D21 = 00001010010010010111110100100001
Cipher Round 1 Key = 181C5D75C66D = 000110000001110001011101011101011100011001101101
Cipher Round 2 Right expanded = 854252BFA902 = 100001010100001001010010101111111010100100000010
Cipher Round 2 S-box input = B67297660A6F = 101101100111001010010111011001100000101001101111
Cipher Round 2 S-box output = 113C391D = 00010001001111000011100100011101
Cipher Round 2 Left Half = A497D21 = 00001010010010010111110100100001
Cipher Round 2 Right Half = 8D34B9B9 = 10001101001101001011100110111001
Cipher Round 2 Key = 3330C5D9A36D = 001100110011000011000101110110011010001101101101
Cipher Round 3 Right expanded = C5A9A95F3DF3 = 110001011010100110101001010111110011110111110011
Cipher Round 3 S-box input = E0B222982A23 = 111000001011001000100010100110000010101000100011
Cipher Round 3 S-box output = 3266B1C1 = 00110010011001101011000111000001
Cipher Round 3 Left Half = 8D34B9B9 = 10001101001101001011100110111001
Cipher Round 3 Right Half = 6B1847A6 = 01101011000110000100011110100110
Cipher Round 3 Key = 251B8BC717D0 = 001001010001101110001011110001110001011111010000
Cipher Round 4 Right expanded = 3568F020FD0C = 001101010110100011110000001000001111110100001100
Cipher Round 4 S-box input = ACABE3B73413 = 101011001010101111100011101101110011010000010011
Cipher Round 4 S-box output = 9B7F2E35 = 10011011011111110010111000110101
Cipher Round 4 Left Half = 6B1847A6 = 01101011000110000100011110100110
Cipher Round 4 Right Half = 5BDDE557 = 01011011110111011110010101010111
Cipher Round 4 Key = 99C31397C91F = 100110011100001100010011100101111100100100011111
Cipher Round 5 Right expanded = AF7EFBF0AAAE = 101011110111111011111011111100001010101010101110
Cipher Round 5 S-box input = 6DBF129AE15D = 011011011011111100010010100110101110000101011101
Cipher Round 5 S-box output = 59E2B3B9 = 01011001111000101011001110111001
Cipher Round 5 Left Half = 5BDDE557 = 01011011110111011110010101010111
Cipher Round 5 Right Half = 4071AA21 = 01000000011100011010101000100001
Cipher Round 5 Key = C2C1E96A4BF3 = 110000101100000111101001011010100100101111110011
Cipher Round 6 Right expanded = A003A3D54102 = 101000000000001110100011110101010100000100000010
Cipher Round 6 S-box input = CD56C37A3DA7 = 110011010101011011000011011110100011110110100111
Cipher Round 6 S-box output = B1B89387 = 10110001101110001001001110000111
Cipher Round 6 Left Half = 4071AA21 = 01000000011100011010101000100001
Cipher Round 6 Right Half = 7E7F8E30 = 01111110011111111000111000110000
Cipher Round 6 Key = 6D5560AF7CA5 = 011011010101010101100000101011110111110010100101
Cipher Round 7 Right expanded = 3FC3FFC5C1A0 = 001111111100001111111111110001011100000110100000
Cipher Round 7 S-box input = 3DB5A8CD741F = 001111011011010110101000110011010111010000011111
Cipher Round 7 S-box output = 197CFE32 = 00011001011111001111111000110010
Cipher Round 7 Left Half = 7E7F8E30 = 01111110011111111000111000110000
Cipher Round 7 Right Half = 775EFEEF = 01110111010111101111111011101111
Cipher Round 7 Key = 2765708B5BF = 000000100111011001010111000010001011010110111111
Cipher Round 8 Right expanded = BAEAFD7FD75E = 101110101110101011111101011111111101011101011110
Cipher Round 8 S-box input = 3E51B90C0B92 = 001111100101000110111001000011000000101110010010
Cipher Round 8 S-box output = 1AECBCE9 = 00011010111011001011110011101001
Cipher Round 8 Left Half = 775EFEEF = 01110111010111101111111011101111
Cipher Round 8 Right Half = 76693FF = 00000111011001101001001111111111
Cipher Round 8 Key = 84BB4473DCCC = 100001001011101101000100011100111101110011001100
Cipher Round 9 Right expanded = 80EB0D4A7FFE = 100000001110101100001101010010100111111111111110
Cipher Round 9 S-box input = B4132FBAB993 = 101101000001001100101111101110101011100110010011
Cipher Round 9 S-box output = 13F885D5 = 00010011111110001000010111010101
Cipher Round 9 Left Half = 76693FF = 00000111011001101001001111111111
Cipher Round 9 Right Half = 304F9780 = 00110000010011111001011110000000
Cipher Round 9 Key = 34F822F0C66D = 001101001111100000100010111100001100011001101101
Cipher Round 10 Right expanded = 1A025FCAFC00 = 000110100000001001011111110010101111110000000000
Cipher Round 10 S-box input = 6A888D174FC0 = 011010101000100010001101000101110100111111000000
Cipher Round 10 S-box output = 9A6024CD = 10011010011000000010010011001101
Cipher Round 10 Left Half = 304F9780 = 00110000010011111001011110000000
Cipher Round 10 Right Half = 4FFF9B50 = 01001111111111111001101101010000
Cipher Round 10 Key = 708AD2DDB3C0 = 011100001000101011010010110111011011001111000000
Cipher Round 11 Right expanded = 25FFFFCF6AA0 = 001001011111111111111111110011110110101010100000
Cipher Round 11 S-box input = E46B71482DFE = 111001000110101101110001010010000010110111111110
Cipher Round 11 S-box output = AE8951F8 = 10101110100010010101000111111000
Cipher Round 11 Left Half = 4FFF9B50 = 01001111111111111001101101010000
Cipher Round 11 Right Half = DAD3B0D1 = 11011010110100111011000011010001
Cipher Round 11 Key = C1948E87475E = 110000011001010010001110100001110100011101011110
Cipher Round 12 Right expanded = EF56A7DA16A3 = 111011110101011010100111110110100001011010100011
Cipher Round 12 S-box input = 86F08E24DFB0 = 100001101111000010001110001001001101111110110000
Cipher Round 12 S-box output = F20A4920 = 11110010000010100100100100100000
Cipher Round 12 Left Half = DAD3B0D1 = 11011010110100111011000011010001
Cipher Round 12 Right Half = 1F3B3D12 = 00011111001110110011110100010010
Cipher Round 12 Key = 69A629FEC913 = 011010011010011000101001111111101100100100010011
Cipher Round 13 Right expanded = FE9F69FA8A4 = 000011111110100111110110100111111010100010100100
Cipher Round 13 S-box input = D5C4F5B4C647 = 110101011100010011110101101101001100011001000111
Cipher Round 13 S-box output = 35852628 = 00110101100001010010011000101000
Cipher Round 13 Left Half = 1F3B3D12 = 00011111001110110011110100010010
Cipher Round 13 Right Half = 52F3E74B = 01010010111100111110011101001011
Cipher Round 13 Key = DA2D032B6EE3 = 110110100010110100000011001010110110111011100011
Cipher Round 14 Right expanded = AA57A7F0EA56 = 101010100101011110100111111100001110101001010110
Cipher Round 14 S-box input = ACBA035C1FE3 = 101011001011101000000011010111000001111111100011
Cipher Round 14 S-box output = 9288AAC1 = 10010010100010001010101011000001
Cipher Round 14 Left Half = 52F3E74B = 01010010111100111110011101001011
Cipher Round 14 Right Half = 4E8B34D1 = 01001110100010110011010011010001
Cipher Round 14 Key = 6EDA4ACF5B5 = 000001101110110110100100101011001111010110110101
Cipher Round 15 Right expanded = A5D4569A96A2 = 101001011101010001010110100110101001011010100010
Cipher Round 15 S-box input = E0BC0E802A6C = 111000001011110000001110100000000010101001101100
Cipher Round 15 S-box output = 32BA411E = 00110010101110100100000100011110
Cipher Round 15 Left Half = 4E8B34D1 = 01001110100010110011010011010001
Cipher Round 15 Right Half = 1CB5C42D = 00011100101101011100010000101101
Cipher Round 15 Key = 4568581ABCCE = 010001010110100001011000000110101011110011001110
Cipher Round 16 Right expanded = 8F95ABE0815A = 100011111001010110101011111000001000000101011010
Cipher Round 16 S-box input = 96D97B925FD6 = 100101101101100101111011100100100101111111010110
Cipher Round 16 S-box output = 84D712CE = 10000100110101110001001011001110
Cipher Round 16 Left Half = E27825E0 = 11100010011110000010010111100000
Cipher Round 16 Right Half = 1CB5C42D = 00011100101101011100010000101101
Cipher Round 16 Key = 194CD072DE8C = 000110010100110011010000011100101101111010001100
Round 16 left and right combined = E27825E01CB5C42D = 1110001001111000001001011110000000011100101101011100010000101101
Combined after FP = 4B32F4A469AF9201 = 0100101100110010111101001010010001101001101011111001001000000001
Plain Text : 4B32F4A469AF9201
Decrypted text == plain text? False