# Decrypting 3-DES with DES

I have a ciphertext, that is encrypted using 3-DES. I wondered, why is it possible to decrypt it using 1-DES. 1-DES key is shorter than 3-DES that is used. How does it work like that?

• Your question is very unclear. 3DES is a composition of 3 DES operations. why would it not be possible to decrypt by performing those operations separately? Feb 15, 2018 at 15:06
• Could you have a look at the given answer and indicate if it answers your question? You can indicate this by accepting the answer, or by leaving a comment if your question has not been answered by it. Feb 28, 2018 at 23:54

Triple DES (Wikipedia) is simply DES used three times, usually ciphertext = E(k3,D(k2,E(k1,plaintext))), although I have seen other arrangements such as E(k1,E(k2,E(K3,plaintext). So just split the 3-DES key into three (sometimes two) parts k1, k2, and k3, and run 1-DES three times, using the appropriate key each time.

So, for example, if my 3-DES key is aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbcccccccccccccccc (hex), then the 1-DES keys would typically be aaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbb, and cccccccccccccccc, with the system documentation letting us know which one is k1, k2, and k3. So assuming we encrypted using ciphertext = E(k3,D(k2,E(k1,plaintext))), then we can decrypt using 1-DES as follows:

• temp1 = D(k3,ciphertext)
• temp2 = E(k2,temp1)
• plaintext = D(k1,temp2)

And of course if we are using something like Cipher Block Chaining, the whole sequence above would be considered one block cipher decryption.

Edit: 1. If only two keys are used (the ABA mentioned in the comments), the general approach is the same, except instead of having a separate k3, we just set k3=k1 and do the same as before.

1. Just to be clear, E(k,p) is enciphering the plaintext p using the key k, and D(k,c) is decrypting the ciphertext c using the key k. For this example, we are using plain DES for both E() and D().