I am doing an error propagation experiment with the CBC mode.I have encrypted a 100 byte text file with openssl. I made the 55th bytes of my encrypted file corrupted.As per theory the corresponding block of 49-64 bytes and the subsequent block of 65-80 bytes should be affected on decryption.But I am only getting the 49-63 bytes impacted in the result.Any help to let me understand this contradiction will be appreciated.

  • 1
    $\begingroup$ Does this answer your question? Why does error propagation in CBC mode encryption affect two blocks?. Because you modified the ciphertext after the encryption. During decryption ciphertext effects only at most two blocks. $\endgroup$ – kelalaka Dec 7 '19 at 20:05
  • $\begingroup$ Well, not exactly.Instead of two I am getting error propagated only in one block. $\endgroup$ – Aneek Dec 7 '19 at 20:36
  • $\begingroup$ Did you try with different plaintext? $\endgroup$ – kelalaka Dec 7 '19 at 20:42
  • $\begingroup$ If you are using one-origin (which most programmers don't) all of block 49-64 should be changed but only one byte in the next block, namely byte 71. $\endgroup$ – dave_thompson_085 Dec 8 '19 at 3:03
  • $\begingroup$ @Aneek I think this answer indicates your missing point as dave_thompson said. https://crypto.stackexchange.com/q/66085/18298 $\endgroup$ – kelalaka Dec 8 '19 at 7:36