_PUBLIC_ void generate_random_buffer(uint8_t *out, int len)
{
- /* Thread and fork safe random number generator for temporary keys. */
+ /* Random number generator for temporary keys. */
gnutls_rnd(GNUTLS_RND_RANDOM, out, len);
}
_PUBLIC_ void generate_secret_buffer(uint8_t *out, int len)
{
- /* The key generator, will re-seed after a fixed amount of bytes is
+ /*
+ * Random number generator for long term keys.
+ *
+ * The key generator, will re-seed after a fixed amount of bytes is
* generated (typically less than the nonce), and will also re-seed
* based on time, i.e., after few hours of operation without reaching
* the limit for a re-seed. For its re-seed it mixes mixes data obtained
_PUBLIC_ void generate_nonce_buffer(uint8_t *out, int len)
{
/*
+ * Random number generator for nonce and initialization vectors.
+ *
* The nonce generator will reseed after outputting a fixed amount of
* bytes (typically few megabytes), or after few hours of operation
* without reaching the limit has passed.
*/
/**
- * Thread and fork safe random number generator for temporary keys.
+ * @brief Generate random values for session and temporary keys.
+ *
+ * @param[in] out A pointer to the buffer to fill with random data.
+ *
+ * @param[in] len The size of the buffer to fill.
*/
void generate_random_buffer(uint8_t *out, int len);
/**
- * @brief Generate random values for key buffers (e.g. session keys)
+ * @brief Generate random values for long term keys and passwords.
*
* @param[in] out A pointer to the buffer to fill with random data.
*