MPHELL
4.0.0
|
Definition of MPHELL initialisation function. More...
Go to the source code of this file.
Functions | |
void | init_mphell (const uint16_t security_strength, const random_type type, const entropy_type entropy) |
Initialise MPHELL with security_strength bits of security (for random number only). More... | |
uint32_t | rand32 () |
Return a 32 bits random number using MPHELL random process. More... | |
int | mphell_rng (void *param, unsigned char *res, size_t n) |
Set res to n random bytes. More... | |
void | free_mphell () |
Free MPHELL memory, especially the big amount of temporary memory. | |
Variables | |
random_state_t * | random_working_state |
uint16_t | random_security_strength |
Definition of MPHELL initialisation function.
Definition in file mphell-init.c.
void init_mphell | ( | const uint16_t | security_strength, |
const random_type | type, | ||
const entropy_type | entropy | ||
) |
Initialise MPHELL with security_strength bits of security (for random number only).
security_strength | Minimum security strength required in bits for random number |
type | Random process to use |
entropy | Entropy source to use |
Definition at line 35 of file mphell-init.c.
int mphell_rng | ( | void * | param, |
unsigned char * | res, | ||
size_t | n | ||
) |
Set res to n random bytes.
param | For compatibility, set NULL |
res | Result byte string |
n | Size (in byte) of res |
Definition at line 84 of file mphell-init.c.
uint64_t rand32 | ( | ) |
Return a 32 bits random number using MPHELL random process.
Definition at line 70 of file mphell-init.c.