Commit edfc93cf authored by Geoff Simmons's avatar Geoff Simmons

Correct the comments about security requirements for IVs and counters.

parent 9ebc3a5f
Pipeline #213 skipped
...@@ -772,19 +772,28 @@ Cryptographic good practice ...@@ -772,19 +772,28 @@ Cryptographic good practice
--------------------------- ---------------------------
Finally, make sure that you are using the cryptographic primitives Finally, make sure that you are using the cryptographic primitives
properly and safely. That subject is beyond the scope of this manual; properly and safely. libgcrypt provides cryptographic building blocks,
when in doubt, consult an expert. We want to emphasize the following and the VMOD makes some of these available in VCL. But neither the
points, but this list is by no means exhaustive: library nor the VMOD can prevent you from using those building blocks
improperly, thus undermining the security of your application.
The proper use of cryptography is a subject that is beyond the scope
of this manual; when in doubt, consult an expert. We want to emphasize
the following points, but this list is by no means exhaustive:
* The ECB mode of operation is included for testing purposes, but * The ECB mode of operation is included for testing purposes, but
should *never* be used to protect sensitive data in insecure should *never* be used to protect sensitive data in insecure
environments. environments.
* Initialization and counter vectors can be sent in the clear, and do * It is important to fulfill the uniqueness and predictability
not need to generated in a secure way; for example, they do not need requirements for the initialization and counter vectors used for
to be obtained from cryptographic random number generators. But an symmetric encryption, which depend in part on the mode of
IV or counter should never be used twice with the same key, so make operation. IVs and counters MUST be unique in all cases; they must
sure that they are generated uniquely. never be re-used with the same encryption key. For CBC mode, the IV
must also be unpredictable; for example, the ``STRONG`` quality
level should be used if the ``random()`` function is used to
generate IVs for CFB. For the other modes, unpredictability is not
required, and the ``NONCE`` level is sufficient.
* Make sure that you have a secure procedure in place for generating * Make sure that you have a secure procedure in place for generating
and storing cryptographic keys, and for changing the keys and storing cryptographic keys, and for changing the keys
......
...@@ -701,19 +701,28 @@ Cryptographic good practice ...@@ -701,19 +701,28 @@ Cryptographic good practice
--------------------------- ---------------------------
Finally, make sure that you are using the cryptographic primitives Finally, make sure that you are using the cryptographic primitives
properly and safely. That subject is beyond the scope of this manual; properly and safely. libgcrypt provides cryptographic building blocks,
when in doubt, consult an expert. We want to emphasize the following and the VMOD makes some of these available in VCL. But neither the
points, but this list is by no means exhaustive: library nor the VMOD can prevent you from using those building blocks
improperly, thus undermining the security of your application.
The proper use of cryptography is a subject that is beyond the scope
of this manual; when in doubt, consult an expert. We want to emphasize
the following points, but this list is by no means exhaustive:
* The ECB mode of operation is included for testing purposes, but * The ECB mode of operation is included for testing purposes, but
should *never* be used to protect sensitive data in insecure should *never* be used to protect sensitive data in insecure
environments. environments.
* Initialization and counter vectors can be sent in the clear, and do * It is important to fulfill the uniqueness and predictability
not need to generated in a secure way; for example, they do not need requirements for the initialization and counter vectors used for
to be obtained from cryptographic random number generators. But an symmetric encryption, which depend in part on the mode of
IV or counter should never be used twice with the same key, so make operation. IVs and counters MUST be unique in all cases; they must
sure that they are generated uniquely. never be re-used with the same encryption key. For CBC mode, the IV
must also be unpredictable; for example, the ``STRONG`` quality
level should be used if the ``random()`` function is used to
generate IVs for CFB. For the other modes, unpredictability is not
required, and the ``NONCE`` level is sufficient.
* Make sure that you have a secure procedure in place for generating * Make sure that you have a secure procedure in place for generating
and storing cryptographic keys, and for changing the keys and storing cryptographic keys, and for changing the keys
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment