# Number of shifts in DES key schedule

In DES key schedule some rounds use one left shift while others use two left shifts. What is the reason behind this?

• The 2nd part of your question should be separate, and you will want to reword it so it makes sense to people, I have no idea what you are actually asking. – Richie Frame Mar 5 '16 at 1:04
• so can we change the shift of rounds..means 1 shift to other and 2 shifts to other is it possible ? – Aamir Mar 5 '16 at 6:16

## 1 Answer

For the first part of the question regarding DES subkey generation, the reason there is a difference in the rotation amount is so that each subkey is different, and that all bits of the original key are used, and that there is a fairly equal probability that a bit will be in a subkey.

The rotations occur on the equal sized 28-bit halves of the 56-bit permuted key (after PC1), and are then sent to PC2 and reduced to 48-bits.

Because of the rotation constant, all 16 subkeys are different. If the rotation constant was 2, the subkeys would start to repeat after 14 rounds.

The combination of PC2 and the rotation constant means that each bit of the 56-bit key is used in approximately 14 of the subkeys. Bit 1 of 56 for example is used 15 times, whereas bit 2 is used 13 times. A complete list of bits (prior to PC2) used in the subkey generation are shown in this answer.

• The 16 values of the key schedule add up to 28, matching the length of C or D allowing cyclic operation. The program keytab referenced in the linked answer has a -c option that shows the number of key bits in common between rounds. Any two adjacent rounds have 40 key bits in common. Non-adjacent rounds have either 41, 42 or 43 key bits in common. You can modify the key schedule in keytab.c as long as the number of shifts add up to 28 and use the -c option to see what happens. (It alters the distribution slightly). – user1430 Mar 5 '16 at 1:34