-1
$\begingroup$

This question already has an answer here:

What is use of Initialization Vector in cipher? Initialization vector is being used in all the ciphers. What is the need of this initialization vector. Are we using standard initialization vector for each cipher or a user can define it.

$\endgroup$

marked as duplicate by e-sushi Nov 29 '16 at 19:22

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.

1
$\begingroup$

What is use of Initialization Vector in cipher?

The initialization vector is mainly used to make sure that the ciphertext is different even if (parts of) the plaintext are identical. This is required as a modern cipher is supposed to be IND_CPA secure.

That is: the ciphertext should be indistinguishable from random even if the adversary provides the plaintext. If the adversary would provide two times "yes" as plaintext the ciphertext would be identical if the same key is used, obviously breaking the principle.

Furthermore, the IV may also be required to provide specific security for particular modes of operation. For instance, CBC mode of operation requires an IV that is not predictable by the adversary.

Are we using standard initialization vector for each cipher or a user can define it?

We cannot use a standard initialization vector; it has at least to be unique. The sender can define it yes. It doesn't need to be confidential.

Initialization vector is being used in all the ciphers.

ECB mode does not require an IV, but ECB mode is usually not considered secure for the reasons provided above.


Note that IND_CPA (indistinguishability under chosen plaintext attack) level security is not always required. For instance, under specific conditions ECB could be used for wrapping a fully random key.

Also note that this answer handles modes of operation for ciphers. Asymmetric primitives - where the ciphertext can be larger than the plaintext - often uses random numbers as input to provide the same IND_CPA security.

$\endgroup$

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