[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
8.4 Random number generation
Access to the random number generator is provided using the gnutls_rnd function. It allows obtaining random data of various levels.
GNUTLS_RND_NONCE
Non-predictable random number. Fatal in parts of session if broken, i.e., vulnerable to statistical analysis.
GNUTLS_RND_RANDOM
Pseudo-random cryptographic random number. Fatal in session if broken.
GNUTLS_RND_KEY
Fatal in many sessions if broken.
Figure 8.1: The random number levels.
- Function: int gnutls_rnd (gnutls_rnd_level_t level, void * data, size_t len)
level: a security level
data: place to store random bytes
len: The requested size
This function will generate random data and store it to output buffer.
Returns: Zero or a negative error code on error.
Since: 2.12.0
This document was generated on May 31, 2014 using texi2html 5.0.