ASCON Suite
|
Go to the source code of this file.
Functions | |
int | ascon_random (unsigned char *out, size_t outlen) |
Gets a block of random data from the system. More... | |
int ascon_random | ( | unsigned char * | out, |
size_t | outlen | ||
) |
Gets a block of random data from the system.
out | Buffer to fill with the random data. |
outlen | Number of bytes of random data to generate. |
In the case of a zero return, the returned data may be predictable so the application should probably avoid using it.
This function does not directly return the output of the system random number source. It will process the output with ASCON-XOF to remove any watermarks or bias from untrustworthy TRNG's. And it will spread the entropy uniformly throughout the returned data.
This function is suitable for relatively rare events such as the generation of session keys or password salts. If you need a large amount of continuous random data, then use ascon_random_init() instead.
Definition at line 27 of file ascon-random.c.