CBC CCA
CBC CCA works when we are given a decryption oracle. Suppose we have a ciphertext that contains 2 blocks (32 bytes). Let m1β,m2β,c1β,c2β denote plaintext block 1, plaintext block 2, ciphertext block 1, and ciphertext block 2, respectively. Feed this ciphertext into the decryption oracle, we get:
m1β=Dec(c1β)βIVm2β=Dec(c2β)βc1β
Here is the trick: if we choose a ciphertext containing only null bytes, in other word, c_1 = c_2 = b"\x00" * 16, we will have:
m1ββm2β=Dec(0)βDec(0)β0βIV=IV
And now the IV is recovered and we are done.
Last updated