2023-06-28 17:25:56 +02:00
|
|
|
==== Use unique IVs
|
|
|
|
|
2023-08-21 09:55:20 +02:00
|
|
|
To ensure high security, initialization vectors must meet two important
|
|
|
|
criteria:
|
2023-06-28 17:25:56 +02:00
|
|
|
|
2023-08-21 09:55:20 +02:00
|
|
|
* IVs must be unique for each encryption operation.
|
|
|
|
* For CBC and CFB modes, a secure FIPS-compliant random number generator should be used to generate unpredictable IVs.
|
|
|
|
|
|
|
|
The IV does not need be secret, so the IV or information sufficient to determine the
|
|
|
|
IV may be transmitted along with the ciphertext.
|
2023-06-28 17:25:56 +02:00
|
|
|
|
2023-08-21 09:55:20 +02:00
|
|
|
In the previous non-compliant example, the problem is not that the IV is
|
|
|
|
hard-coded. +
|
|
|
|
It is that the same IV is used for multiple encryption attempts.
|