This question already has an answer here:

The normal way of using AES-CBC is to XOR the IV with the first plaintext block aes-cbc encryption aes-cbc decryption

This way you have to pass the IV along the ciphertext.

What if instead of XORing we just put a fixed size randomIV in front of the plaintext:

Encrypt(randomIV + plaintext) = C1

And we don't have to send/tansmit separatly the IV since it is inside C1. Decryption works similarly:

Decrypt(C1) = randomIV + plaintext

And we just remove the randomData (fixed size) to end up with the plaintext.

In essence, the first block of random data, when encrypted will work EXACTLY as a randomIV since it will be XORed with the second block

Except from performance loss (having to encrypt an additional block instead of XORing), can you think why this might not be secure.


marked as duplicate by Ilmari Karonen, otus, yyyyyyy, tylo, e-sushi Sep 20 '16 at 13:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


If I got you right, you propose to encrypt IV and then run the same CBC-mode encryption using the encrypted IV; it just gives an adversary one more ciphertext block.


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