2
$\begingroup$

I am trying to figure this one out: What would be the encrypted output for an input x if the same key K is used in all three boxes of 3DES?

The encryption scheme for 3DES with three different keys, and $k_3 = k_1$, is $y=ek_3(ek_2(ek_1(x)))$. So, if the key is the same 3 times, then the encrypted output of x would be $y = k(k(k(x))) = ?$

Can someone let me know if what I have done here is correct?

$\endgroup$
2
  • 6
    $\begingroup$ Actually, we typically do 3DES in an "EDE" configuration; that is, the middle DES box runs in decrypt mode. So, to encrypt, we would first DES encrypt with $k_1$, we then DES decrypt with $k_2$, and then DES encrypt with $k_3$. My question to you: how would this change the answer? $\endgroup$
    – poncho
    Commented Oct 20, 2015 at 16:06
  • $\begingroup$ Why Triple DES used in EDE Mode please have a look at this answer $\endgroup$
    – thepacker
    Commented Oct 20, 2015 at 18:05

1 Answer 1

0
$\begingroup$

Traditionally, 3DES is configured in a mode called EDE, which means "Encrypt, Decrypt, Encrypt". This means that your encryption operation looks like this: $c = E(D(E(m, k_1), k_2), k_3)$. As it turns out, if all three subkeys are independent, the security of the system is not impacted by the second operation being a decryption.

The reason for this construction is a historic one. When 3DES was being introduced, people wanted a way to fall back to a "legacy" mode which amounted to just plain DES. This is handled through keying modes, of which there are three:

  • Keying mode 1: All three subkeys are independent (which implies probabilistic inequality, though some implementations may enforce $k_1 \neq k_2 \neq k_3$ explicitly)
  • Keying mode 2: $k_1$ and $k_2$ are independent, but $k_1 = k_3$.
  • Keying mode 3: All three subkeys are equal, i.e.e $k_1 = k_2 = k_3$.

In keying mode 1, you get full 3DES with a 168-bit key (3 × 56-bit). In keying mode 2, you get a 112-bit version of 3DES (2 × 56-bit), though this keying mode is less commonly used in practice. In keying mode 3, the first two steps cancel out, leaving you with just DES:

$$\require{cancel}\cancel{a = E(m, k)}$$ $$\cancel{b = D(a, k)}$$ $$c = E(b, k)$$

$\endgroup$
1
  • $\begingroup$ I got the impression that the second mode is actually the most commonly used one.. $\endgroup$ Commented Aug 28, 2019 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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