IV
also: initialization vector
IV (Initialization Vector) is a random value used in cryptographic algorithms to ensure that identical plaintext encrypted with the same key produces different ciphertexts.
An Initialization Vector is a fixed-size block of bits that cryptographic algorithms (particularly block ciphers) use as a starting point for encryption. By combining the IV with the encryption key and plaintext, encryption modes ensure that the same message encrypted multiple times produces different results, preventing pattern recognition attacks.
For example, without an IV, encrypting the word "password" twice with the same key would produce identical ciphertext both times. With an IV, the ciphertext would differ each time, even though the plaintext and key remain the same.
IVs are typically random or pseudo-random and transmitted alongside the ciphertext (they don't need to be secret). Common encryption modes like CBC (Cipher Block Chaining) and CTR (Counter) mode require IVs. Tools like openssl enc automatically generate and prepend IVs to encrypted data.