When I used a function in PHP, called openssl_encrypt
, which encrypts data, I came across the term iv
, which is Initialization Vector .
I'd like to understand a little bit about this;
I saw this in an example like this:
$iv = openssl_random_pseudo_bytes(16);
openssl_encrypt($texto, $cipher, $password, $options, $iv)
I understood that this initialization vector has to do with a random value, but it was just a little perception.
I would like to know more in detail:
- What is Initialization Vector ?
- What does it have to do with encryption? Why is it necessary?