Next: , Up: Random Numbers


9.1 Quality of random numbers

Libgcypt offers random numbers of different quality levels:

— Data type: enum gcry_random_level

The constants for the random quality levels are of this type.

GCRY_WEAK_RANDOM
This should not anymore be used. It has recently been changed to an alias of GCRY_STRONG_RANDOM. Use gcry_create_nonce instead.
GCRY_STRONG_RANDOM
Use this level for e.g. session keys and similar purposes.
GCRY_VERY_STRONG_RANDOM
Use this level for e.g. key material.