I\'m currently working on crypto tools to encrypt/decrypt 4 blocks of messages u
ID: 648598 • Letter: I
Question
I'm currently working on crypto tools to encrypt/decrypt 4 blocks of messages using Triple-DES with 2 keys. So, I've reached the final cipher text, but now I have to do the reverse and get the plaintext message. However I'm sort of confused with the decryption process.
For the Encryption, I encrypted using K1, decrypted used K2 and encrypted again using K1, then I XOR-ed the result with the 2nd block of plaintext message and so on, until I reached the last one. Now I want to decrypt and I'm sort of confused on where the XOR-ing comes in.
Explanation / Answer
Your problem is which part of the algorithm has to be transmitted (and you are missing an actual IV).
Your encryption algorithm of using TDEA(m)=EK1(DK2(EK1(m))) is fine for encrypting a single block, and it can be used in CBC.
However, in CBC with a message of 4 blocks m=(m1,m2,m3,m4), you calculate this:
The ciphertext then is c=(c1,c2,c3,c4), and you have to transmit the iv. If you just transmit c4, you can not extract any information. Decryption starts with reversing the TDEA algorithm and then XOR the result with the previous ciphertext block or the iv.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.