CCCrypt decrypting in AES CBC works even without IV

后端 未结 4 1120
小蘑菇
小蘑菇 2020-12-15 12:11

I have a confusing problem, where decrypting a file which was encrypted using CCCrypt\'s AES-CBC mode with a randomized, 16byte IV produces the exact same output whether I p

4条回答
  •  星月不相逢
    2020-12-15 12:39

    The iv is only used for the first block on decryption, further blocks use the cipher text from the previous block so it is somewhat self-synchronizing.

    Wikipedia image: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation

    From Wikipedia Block cipher mode of operation.

    So, picking up decryption in the middle of a CBC encrypted stream on a block boundary works except for the first block.

提交回复
热议问题