Why do we use encrypt-decrypt-encrypt (EDE) in 3DES, rather than encrypting three times?

in this link, we use EDE Mode usually.

when we use one key, in this case, Encryption -> Decryption result will be Plain text. so as a result, we just do one DES encryption.

and other case, we use two key, (k1-k2-k1) or three keys, in this case each result of E D E will different, so there is no vulnerability use 'EDE' or 'EEE'.

http://des.online-domain-tools.com/ in this site we can do DES encryption or decryption, and i test all case refer above.

  1. encrypt test. it is EDE 's first 'E'. encrypt 'test'

  2. decrypt encrypted test. it is EDE 's middle 'D'. decrypt 'test' as you can see, the result is plain text.

I know that i am newbie and this article is wrong. but i can't understand why we use EDE and which part i missed.

thanks for your help :)

in single key, EEE mode. encrypt encrypted test. it is EEE 's middle 'E' enter image description here result of EEE's middle 'E' is not plaintext. so EEE isn't just do one time DES algorithm.

  • $\begingroup$ One single library to rule them all- no need to separate library if you need to support the DES. $\endgroup$
    – kelalaka
    Mar 12, 2019 at 11:35
  • $\begingroup$ Dear new user, we're saying that EDE with a single key for each E and D is single DES, not EEE. This is considered a good thing as you can deliberately get single DES. Of course, if you chose the 3 keys randomly than the chance of choosing such a EDE weak key are abysmally small (this on confusion in the edit description). $\endgroup$
    – Maarten Bodewes
    Mar 12, 2019 at 19:41
  • $\begingroup$ @MaartenBodewes hi, i'm completely understand this problem. but have one question. in EDE k1 k2 k1 mode(1,3 key is same), how can we make des structure? i think find reverse of encrypt key(because encrypt - decrypt is plaintext) is np problem. is it possible? $\endgroup$ Mar 14, 2019 at 9:54
  • $\begingroup$ You simply set k1 to the same value as k2? Then k1, k2 and k3 are the same as k2 = k3 is implied. $\endgroup$
    – Maarten Bodewes
    Mar 14, 2019 at 11:42


Browse other questions tagged or ask your own question.