Challenges
CBC: IV recovery
Cryptography
Medium
Block modes
Solves: 7
CBC: IV recovery
Author: CyberSamSU
Points
45
In CBC (Cipher Block Chaining) mode, encryption proceeds as follows:
C_1 = E(K, P_1 XOR IV)
C_i = E(K, P_i XOR C_(i-1)), i > 1
And decryption is the reverse:
P_1 = D(K, C_1) XOR IV
P_i = D(K, C_i) XOR C_(i-1), i > 1
Look closely at these equations: if we know two of the three unknowns in them, we can find the third. We have both the key and the plaintext — but the IV is missing. Recover it!
Key (hex): eb8926a31c1e8486c58813d39defdcaf
Plaintext (exactly this string, UTF-8, padded with PKCS#7):
CBC rejimida birinchi blok IV bilan XOR qilinadi va shu sabab bir xil xabarlar turlicha shifrlanadi.
Ciphertext (hex):
1311a445a4b6c1dd905b1db2e2acea82b6a3beedcb2e897f84d507187c5dec27
eead73db4c413edbe45809ce9941b29aac98da57823bdca88d72375afa8520ca
40988900db64d5392513ccc5d5fdf751ac149b33073f7e4be03628f2273f650b
e3d6bdcf9f6f16e1e3be5b2bd9c739bc
The IV consists of 16 readable ASCII characters. Find it, and assemble the flag like this:
BAYROQ{A3S_<IV ning 16 belgisi>}
Note: D(K, C_1) is decrypting a single block with AES, that is, decrypting ct[:16] in ECB mode.
To submit a flag, log in.