3
$\begingroup$

Someone I know showed this to me, and I can't put a finger to why it's happening. Am I missing something?

They encrypt the text, and the output is really guessable. $u\to t$, $i\to h$ (it's one letter behind), the $?$ are just spaces.

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Could you tell me the name of the software that is shown above? $\endgroup$ – Patriot Feb 20 at 0:47
  • $\begingroup$ This is GCHQ's CyberChef. $\endgroup$ – Mark Feb 20 at 3:01
  • $\begingroup$ For the sake of future references, could you write the encryption key completely? $\endgroup$ – kelalaka Feb 20 at 7:18
9
$\begingroup$

They trick you with the IV. The IV must be the same for encryption and decryption so that the encryption has the functionality that is;

$$ m = D_k(IV,E_k(IV,m))$$ To surprise you, they modify the IV according to their desire but you failed to see that. This is the more general case of the Bit-Flipping attack on the CBC mode.

This attack works because the message has only one block and the change on the IV only modifies the first block. Nothing special there.

$\endgroup$
1
$\begingroup$

Pick a key $K$. Pick a one-block message $m$ and the desired ciphertext $c$. Then compute the IV for CBC as follows:

$$c=E_K(IV\oplus m)\iff D_K(c)\oplus m=IV$$

where $E_K$ is AES encryption under the key $K$ and $D_K$ is the corresponding decryption and $\oplus$ is bitwise XOR.

Now you have the IV that maps $m$ to $c$ under the key $K$ with all three of them being freely choosable.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.