1
$\begingroup$

I'm studying at the moment the CBC Encryption method,and I was asked in an excercise how many bits would be wrong after decryption if during the transmission 2 bits are interchanged. My guess is that the whole bits are wrong due to how CBC works, am I correct?

$\endgroup$
2
  • 1
    $\begingroup$ Are the 2 bits side by side? Can they cross a block boundary? Can the bits have the same value (in which case there would be effectively no change), or are you guaranteed that the two bits that are interchanged have different values (one is a 0, the other is a 1)? Overall, however, you are not correct. Swapping 2 bits would not make all bits of the plaintext incorrect. $\endgroup$
    – mikeazo
    Commented Apr 27, 2016 at 14:29
  • $\begingroup$ Yeah I saw that while reading the paragraph again,it says the error on 1 block is propagated through the consecutive 2 blocks,so yes I'm wrong about my last statement. Btw the 2 bits are indeed different,and they are on 2 blocks that are consecutive. EDIT: let's say I have 8 blocks ,and during transmission 1 bit on the third block and 1 on the fourth block are interchanged,would wrong bits be in the 2nd, 3rd and 4th block? $\endgroup$
    – vc73
    Commented Apr 27, 2016 at 14:50

1 Answer 1

2
$\begingroup$

It depends on the position of the two interchanged bits. Assume they have different values, i.e. one is $0$ and the other is $1$. Indeed, if they had the same value, interchanging would not affect plaintext decryption.

Let's say $n$ is the length of every block.


CBC decryption

In CBC, every ciphertext block is involved in two plaintext blocks decryption: its own and subsequent one, therefore if one CT is corrupted only two PT will be so.


To move back to your question:

If $b_0$ and $b_1$ fall in the same block

CBC decryption failure 1 2 plaintext blocks will be corrupted, $n+2$ bits will be corrupted.


If $b_0$ and $b_1$ fall in two adjacent blocks

CBC decryption failure 2 3 plaintext blocks will be corrupted, $2n+1$ bits affected.


If $b_0$ and $b_1$ fall in two separate blocks

CBC decryption failure 3 4 plaintext blocks will be corrupted, $2n+2$ bits affected.

$\endgroup$
0

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.