1
$\begingroup$

I got to this by experimentation, but can someone maybe provide an explanation for this?

$\endgroup$

1 Answer 1

5
$\begingroup$
  • The CBC mode processed as $c_i = E_k(p_i \oplus c_{i-1})$ with $c_0 = IV$

  • The ECB mode processed as $c_i = E_k(p_i)$

If you set the first block with $$c_o = IV = 0$$ in the CBC mode, than it is calculated as $$c_1 = E_k(p_1).$$ This is exactly as ECB mode.

The next blocks, however, will not be equal;

  • in ECB mode $$c_i = E_k(p_i)$$
  • whereas in CBC mode $$c_i = E_k(p_i \oplus c_{i-1}) \neq E_k(p_i) \text{ for } 1 < i \leq m$$ where $m$ is the number of blocks.

Therefore the equality is only valid for the first block.

$\endgroup$
1
  • $\begingroup$ Exactly as I suspected, thank you for a more formal explanation <3 $\endgroup$
    – bbozo
    Oct 15, 2018 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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