I'm wondering why we use encrypt-decrypt-encrypt (EDE) sequence in 3DES (also known as DES-EDE, TDES or TDEA) with three keys instead of three times encryption (EEE) with three different keys?


Well, the standard answer is to preserve compatibility with DES; a hardware circuit that implemented 3DES (with EDE) could also be used to do DES as well (by, say, making all three subkeys the same).

Now, there is one slight problem with this straightforward argument; 3DES (EEE, that is, with three encrypt operations) would have this property as well; if we select the first two subkeys to be the same weak key, the second encrypt with the weak key would exactly undo the first, and the plaintext block will be operated on by the third subkey (which is the DES operation we really want).

However, it's not the case that whoever designed 3DES missed this point. Instead, they were also considering a third option as well, 2 key 3DES (which is normal 3DES except that the first and the third subkeys are the same).

Now, if we had a 3DES EEE implementation with three independent subkeys, we could support DES (using the weak key trick), 2 key 3DES (EEE), and 3 key 3DES (EEE). However, that wasn't the only situation they had in mind; they also considered the case where someone implemented 2 key 3DES in hardware (which the first and last subkeys were constrained to be the same). That's one thing EEE mode can't do; we can't use the weak subkey trick with 2 key 3DES (if we make two of the adjacent subkeys the same weak key, then all three subkeys are the same weak key). However, the EDE trick still works.

Hence, the full answer is so that one hardware circuit can support both DES and 2 key 3DES (where the hardware circuitry insists on using the same subkeys for both the first and third subkeys), and also one hardware circuit can support DES, 2 key 3DES, and 3 key 3DES.

  • $\begingroup$ I am pretty sure DES-EEE2 is exactly as feasible to implement as DES-EDE2. $\endgroup$ – Henrick Hellström Mar 9 '12 at 14:40
  • 1
    $\begingroup$ @Henrick Hellstrom: Yes, however, DES-EEE2 would not be backwards-compatible with DES; you could not arrange the DES-EEE2 subkeys in a way so that it would be exactly the same as a specific DES key. You can with DES-EDE2. $\endgroup$ – poncho Mar 9 '12 at 14:44
  • 9
    $\begingroup$ Another advantage is that you can support 3DES, both encryption and decryption, with just two encryptors and two decryrptors. If it was EEE, you'd need three encryptors to encrypt and three decryptors to decrypt. $\endgroup$ – David Schwartz Mar 10 '12 at 0:49
  • 1
    $\begingroup$ Are there any security related motives as well documented? Like maximizing the structural differences of the operations while sticking to the same algorithm? $\endgroup$ – eckes Apr 28 '17 at 1:47
  • 3
    $\begingroup$ @eckes: not really; DES encryption and DES decryption are actually essentially the same operation (except you process the subkeys in the opposite order) $\endgroup$ – poncho Apr 28 '17 at 12:34

Another reason is that EEE results in slightly reduced brute-force attack time. First step of DES is an initial permutation which is key independent and last step of DES is the inverse of this permutation. With EEE the inverse permutation at the end of the first encryption would be cancelled out by the initial permutation of the second encryption (same for inverse of second and initial of third encryption). This is not the case for EDE.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.