How does the receiver of a cipher text know the IV used for encryption?

Posted by PatrickL on Stack Overflow See other posts from Stack Overflow or by PatrickL
Published on 2010-03-13T00:04:36Z Indexed on 2010/03/13 0:07 UTC
Read the original article Hit count: 231

Filed under:
|

If a random IV is used in encrypting plain text, how does the receiver of the cipher text know what the IV is in order to decrypt it?

This is a follow-up question to a response to the previous stackoverflow question on IVs here.

The IV allows for plaintext to be encrypted such that the encrypted text is harder to decrypt for an attacker. Each bit of IV you use will double the possibilities of encrypted text from a given plain text.

The point is that the attacker doesn't know what the IV is and therefore must compute every possible IV for a given plain text to find the matching cipher text. In this way, the IV acts like a password salt. Most commonly, an IV is used with a chaining cipher (either a stream or block cipher). ...

So, if you have a random IV used to encrypt the plain text, how do you decrypt it? Simple. Pass the IV (in plain text) along with your encrypted text.

Wait. You just said the IV is randomly generated. Then why pass it as plain text along with the encrypted text?

© Stack Overflow or respective owner

Related posts about encryption

Related posts about decryption