Search code examples
securityencryptioncryptographyaesdes

Find decryption formula with already known encryption formula in block cipher operation mode context


I have this formula for encryption phase of a block cipher mode of operation using AES or DES encoder:

encryption formula

So the question is how can find decryption formula for this. And what is the general workflow to solve problems like this?


Solution

  • There are two XOR operations here, one prior to encryption and one afterwards.

    enter image description here

    The decryption is the reversal of the encryption operation:

    enter image description here

    Which means you have to first XOR C1 with the same key (M0) to get the value to decrypt, and then XOR the decrypted value (with C0) to get the original plaintext value.

    M1 = D(C1 ⊕ M0, K) ⊕ C0