1. | K is extended with eigth parity bits on every 8th position to 64 bits and then passed to PC-1. | |||||||
2. | The permutation PC-1 (PC = permuted choice) exchanges these bits in the following scheme to 56 bits, in which process the parity bits are removed again: | 57 | 49 | 41 | 33 | 25 | 17 | 9 |
1 | 58 | 50 | 42 | 34 | 26 | 18 | ||
10 | 2 | 59 | 51 | 43 | 35 | 27 | ||
19 | 11 | 3 | 60 | 52 | 44 | 36 | ||
63 | 55 | 47 | 39 | 31 | 23 | 15 | ||
7 | 62 | 54 | 46 | 38 | 30 | 22 | ||
14 | 6 | 61 | 53 | 45 | 37 | 29 | ||
21 | 13 | 5 | 28 | 20 | 12 | 4 | ||
3. | The result (PC-1)(K) is divided up in C0 and D0 of 28 bits each. | |||||||
4. | Ci and Di with
i = 1,...,16 are then calculated with Ci = LSi (Ci-1) or Di = LSi (Di-1) , where LSi is a circular left-shift by the number of positions from the following table: |
Iteration i | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | |
# Shifts | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 | 1 | 2 | 2 | 2 | 2 | 2 | 2 | 1 |
5. | The keys Ki
with i = 1,...,16 are then determied by Ki = (PC-2)(Ci ,Di ), where the permutation PC-2 is depicted in the table on the right: | 14 | 17 | 11 | 24 | 1 | 57 |
3 | 28 | 15 | 6 | 21 | 10 | ||
23 | 19 | 12 | 4 | 26 | 8 | ||
16 | 7 | 27 | 20 | 13 | 2 | ||
41 | 52 | 31 | 37 | 47 | 55 | ||
30 | 40 | 51 | 45 | 33 | 48 | ||
44 | 49 | 39 | 56 | 34 | 53 | ||
46 | 42 | 50 | 36 | 29 | 32 |
AES |