3DES weak keys
3DES (Triple DES) is applying the old DES cipher three times: C = E(K3, D(K2, E(K1, P))). This is called the "EDE" (Encrypt-Decrypt-Encrypt) scheme and is still found in banking systems.
DES has 4 weak keys. The key schedule for them is so symmetric that all 16 round keys end up being the same, and as a result encryption is equal to decryption: E(K, E(K, P)) = P. That is, encryption becomes its own inverse operation (involution).
Now pay attention: if the 3DES key is of the form (Ka, Kb, Ka) and both Ka and Kb are weak keys, the entire 3DES also becomes an involution. Verify this:
E(Ka, D(Kb, E(Ka, E(Ka, D(Kb, E(Ka, P))))))
= E(Ka, E(Kb, E(Ka, E(Ka, E(Kb, E(Ka, P)))))) [zaif kalitda D = E]
= P [har bir E juft-juft yo'qoladi]
The following message was encrypted in 3DES-ECB mode with exactly such a key: kalit = Ka || Kb || Ka, where Ka and Kb are two of the four weak keys from the attached zaif_kalitlar.txt file (Ka != Kb).
Ciphertext (hex):
a178e73f832f799218637f717b248cca20816935864f6804e0a35a9eb2b9ad9d
97482c0fde213dce3d14e6d8618c5474
To find the key, it is enough to test 12 variants. For each variant, encrypt (do not decrypt!) the ciphertext and check if the result is readable text.