S-DES with Key-Dependent S-Boxes

Here is a method to use 6 additional key bits to generate S-boxes that are different from the original:
  1. Rearrange the S-DES S-boxes so that S1 comes first and then S0.
  2. Select the first 2 of the additional key bits. If the first bit is 1, swap the first two rows of the new S0 with the last two rows of the new S0. If the second bit is 1, swap the first two columns of the new S1 with the last two columns of the new S1.
  3. Take the remaining 4 key bits. XOR the first two with every entry of the new S0 and the second two with every entry of the new S1.

DES with Key-Dependent S-Boxes

Here is a method (due to Eli Biham) to use 48 additional key bits to generate S-boxes that are resistant to both linear and differential cryptanalysis:
  1. Rearrange the DES S-boxes: 24673158.
  2. Select the first 16 of the additional key bits. If the first bit is 1, swap the first two rows of the new S-box 1 with the last two rows of the new S-box 1. If the second bit is 1, swap the first eight columns of the new S-box 1 with the last eight columns of the new S-box 1. Do the same thing with the new S-box 2 with the third and fourth key bits. Do the same with S-boxes 3 through 8.
  3. Take the remaining 32 key bits. XOR the first four with every entry of the new S-box 1, the second four with every entry of the new S-box 2, and so on.