Question 67. Should One Test for Weak Keys in DES?

DES has four weak keys k for which Ek(Ek(m)) = m (see Question 60). There are also twelve semi-weak keys which come in pairs k1 and k2 and are such that Ek1(Ek2(m)) = m.

Since there are 256 possible DES keys the chance of picking a weak or semi-weak key at random is 252. As long as the user-provided key is chosen entirely at random, they can be safely ignored when DES is used for encryption. Despite this, some users prefer to test whether a key to be used for DES encryption is in fact a weak key. Such a test will have no significant impact on the time required for encryption.