in cryptography, an initialization vector (iv) or starting variable (sv)iso/iec 10116:2006 information technology â security techniques â modes of operation for an n-bit block cipher is a fixed-size input to a cryptographic primitive that is typically required to be random or pseudorandom. randomization is crucial for encryption schemes to achieve semantic security, a property whereby repeated usage of the scheme under the same key does not allow an attacker to infer relationships between segments of the encrypted message. for block ciphers, the use of an iv is described by so-called modes of operation. randomization is also required for other primitives, such as universal hash functions and message authentication codes based thereon. some cryptographic primitives require the iv only to be non-repeating, and the required randomness is derived internally. in this case, the iv is commonly called a nonce (number used once), and the primitives are described as stateful as opposed to randomized. this is because the iv need not be explicitly forwarded to a recipient but may be derived from a common state updated at both sender and receiver side. (in practice, a short nonce is still transmitted along with the message to consider message loss.) an example of stateful encryption schemes is the counter mode of operation, which uses a sequence number as a nonce. the size of the iv is dependent on the cryptographic primitive used; for block ciphers, it is generally the cipher's block size. ideally, for encryption schemes, the unpredictable part of the iv has the same size as the key to compensate time-memory-data trade-off attacks. when the iv is chosen at random, the probability of collisions due to the birthday problem must be taken into account. traditional stream ciphers such as rc4 do not support an explicit iv as input, and a custom solution for incorporating an iv into the cipher's key or internal state is needed. some designs realized in practice are k
Block_cipher_modes_of_operation