DES supplementary material

For reference, this article details the various tables referenced in the Data Encryption Standard (DES) block cipher.

All bits and bytes are arranged in big endian order in this document. That is, bit number 1 is always the most significant bit.

Initial permutation (IP)

IP
585042342618102
605244362820124
625446383022146
645648403224168
57494133251791
595143352719113
615345372921135
635547393123157

This table specifies the input permutation on a 64-bit block. The meaning is as follows: the first bit of the output is taken from the 58th bit of the input; the second bit from the 50th bit, and so on, with the last bit of the output taken from the 7th bit of the input.

This information is presented as a table for ease of presentation; it is a vector, not a matrix.

Final permutation (IP−1)

IP−1
408481656246432
397471555236331
386461454226230
375451353216129
364441252206028
353431151195927
342421050185826
33141949175725

The final permutation is the inverse of the initial permutation; the table is interpreted similarly.

Expansion function (E)

E
3212345
456789
8910111213
121314151617
161718192021
202122232425
242526272829
28293031321

The expansion function is interpreted as for the initial and final permutations. Note that some bits from the input are duplicated at the output; e.g. the fifth bit of the input is duplicated in both the sixth and eighth bit of the output. Thus, the 32-bit half-block is expanded to 48 bits.

Permutation (P)

P
167202129122817
11523265183110
282414322739
19133062211425

The P permutation shuffles the bits of a 32-bit half-block.

Permuted choice 1 (PC-1)

PC-1
Left
5749413325179
1585042342618
1025951433527
1911360524436
Right
63554739312315
7625446383022
1466153453729
211352820124

The "Left" and "Right" halves of the table show which bits from the input key form the left and right sections of the key schedule state. Note that only 56 bits of the 64 bits of the input are selected; the remaining eight (8, 16, 24, 32, 40, 48, 56, 64) were specified for use as parity bits.

Permuted choice 2 (PC-2)

PC-2
1417112415
3281562110
2319124268
1672720132
415231374755
304051453348
444939563453
464250362932

This permutation selects the 48-bit subkey for each round from the 56-bit key-schedule state.

Substitution boxes (S-boxes)

S-boxes
S1 x0000x x0001x x0010x x0011x x0100x x0101x x0110x x0111x x1000x x1001x x1010x x1011x x1100x x1101x x1110x x1111x
0yyyy0 1441312151183106125907
0yyyy1 0157414213110612119538
1yyyy0 4114813621115129731050
1yyyy1 1512824917511314100613
S2 x0000x x0001x x0010x x0011x x0100x x0101x x0110x x0111x x1000x x1001x x1010x x1011x x1100x x1101x x1110x x1111x
0yyyy0 1518146113497213120510
0yyyy1 3134715281412011069115
1yyyy0 0147111041315812693215
1yyyy1 1381013154211671205149
S3 x0000x x0001x x0010x x0011x x0100x x0101x x0110x x0111x x1000x x1001x x1010x x1011x x1100x x1101x x1110x x1111x
0yyyy0 1009146315511312711428
0yyyy1 1370934610285141211151
1yyyy0 1364981530111212510147
1yyyy1 1101306987415143115212
S4 x0000x x0001x x0010x x0011x x0100x x0101x x0110x x0111x x1000x x1001x x1010x x1011x x1100x x1101x x1110x x1111x
0yyyy0 7131430691012851112415
0yyyy1 1381156150347212110149
1yyyy0 1069012117131513145284
1yyyy1 3150610113894511127214
S5 x0000x x0001x x0010x x0011x x0100x x0101x x0110x x0111x x1000x x1001x x1010x x1011x x1100x x1101x x1110x x1111x
0yyyy0 2124171011685315130149
0yyyy1 1411212471315015103986
1yyyy0 4211110137815912563014
1yyyy1 1181271142136150910453
S6 x0000x x0001x x0010x x0011x x0100x x0101x x0110x x0111x x1000x x1001x x1010x x1011x x1100x x1101x x1110x x1111x
0yyyy0 1211015926801334147511
0yyyy1 1015427129561131401138
1yyyy0 9141552812370410113116
1yyyy1 4321295151011141760813
S7 x0000x x0001x x0010x x0011x x0100x x0101x x0110x x0111x x1000x x1001x x1010x x1011x x1100x x1101x x1110x x1111x
0yyyy0 4112141508133129751061
0yyyy1 1301174911014351221586
1yyyy0 1411131237141015680592
1yyyy1 6111381410795015142312
S8 x0000x x0001x x0010x x0011x x0100x x0101x x0110x x0111x x1000x x1001x x1010x x1011x x1100x x1101x x1110x x1111x
0yyyy0 1328461511110931450127
0yyyy1 1151381037412561101492
1yyyy0 7114191214206101315358
1yyyy1 2114741081315129035611

This table lists the eight S-boxes used in DES. Each S-box replaces a 6-bit input with a 4-bit output. Given a 6-bit input, the 4-bit output is found by selecting the row using the outer two bits, and the column using the inner four bits. For example, an input "011011" has outer bits "01" and inner bits "1101"; noting that the first row is "00" and the first column is "0000", the corresponding output for S-box S5 would be "1001" (=9), the value in the second row, 14th column. (See S-box).

Rotations in the key-schedule

Rotations
Round
number
Number of
left rotations
11
21
32
42
52
62
72
82
91
102
112
122
132
142
152
161

Before the round subkey is selected, each half of the key schedule state is rotated left by a number of places. This table specifies the number of places rotated.

References

External links

This article is issued from Wikipedia - version of the 9/9/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.