TripleDES so many times but never thought about this. In
TripleDES it requires
168bit key in option 1. I don't enter three single
56bit keys while implementing instead I only enter
168bit key. So, I'm guessing
168bit breaks into three
56bit keys. What it process of this breaking mechanism? is it linear?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Yes. The keys are indeed used in a linear manner.
In particular, they are used in $E$-$D$-$E$ mode: encrypt using first 56 bits as key, decrypt using next 56 bits as key and then again encrypt using final 56 bits.
This way its possible to use triple DES (which is officially called TDEA) for the DES, 2-DES and 3-DES variations. The first would use $K_1$-$K_1$-$K_1$ as keys, the second would use $K_1$-$K_2$-$K_1$ as keys and the full 3-DES would use $K_3$-$K_2$-$K_1$ as keys. Sometimes the 2-DES and 3-DES keys are also called ABA and ABC keys respectively.
DES uses one bit of each byte as parity, but this bit is not always validated by implementations. So triple DES keys with parity use 64, 128 or 192 bits. This explains why some implementations allow the output of an MD5 hash - which is 128 bits - to be input as 2-DES key without any error.