My Project
Loading...
Searching...
No Matches
random.h File Reference

Go to the source code of this file.

Data Structures

struct  OS_Seed
 
struct  WC_RNG
 

Typedefs

typedef unsigned long ProviderHandle
 
typedef struct OS_Seed OS_Seed
 

Functions

WOLFSSL_LOCAL int wc_GenerateSeed (OS_Seed *os, byte *seed, word32 sz)
 
WOLFSSL_API int wc_InitNetRandom (const char *, wnr_hmac_key, int)
 Init global Whitewood netRandom context.
 
WOLFSSL_API int wc_FreeNetRandom (void)
 Free global Whitewood netRandom context.
 
WOLFSSL_ABI WOLFSSL_API WC_RNGwc_rng_new (byte *, word32, void *)
 
WOLFSSL_ABI WOLFSSL_API void wc_rng_free (WC_RNG *)
 
WOLFSSL_API int wc_InitRng (WC_RNG *)
 Gets the seed (from OS) and key cipher for rng. rng->drbg (deterministic random bit generator) allocated (should be deallocated with wc_FreeRng). This is a blocking operation.
 
WOLFSSL_API int wc_InitRng_ex (WC_RNG *rng, void *heap, int devId)
 
WOLFSSL_API int wc_InitRngNonce (WC_RNG *rng, byte *nonce, word32 nonceSz)
 
WOLFSSL_API int wc_InitRngNonce_ex (WC_RNG *rng, byte *nonce, word32 nonceSz, void *heap, int devId)
 
WOLFSSL_ABI WOLFSSL_API int wc_RNG_GenerateBlock (WC_RNG *, byte *, word32 sz)
 Copies a sz bytes of pseudorandom data to output. Will reseed rng if needed (blocking).
 
WOLFSSL_API int wc_RNG_GenerateByte (WC_RNG *, byte *)
 Calls wc_RNG_GenerateBlock to copy a byte of pseudorandom data to b. Will reseed rng if needed.
 
WOLFSSL_API int wc_FreeRng (WC_RNG *)
 Should be called when RNG no longer needed in order to securely free drgb. Zeros and XFREEs rng-drbg.
 
WOLFSSL_LOCAL int wc_RNG_DRBG_Reseed (WC_RNG *rng, const byte *entropy, word32 entropySz)
 
WOLFSSL_API int wc_RNG_TestSeed (const byte *seed, word32 seedSz)
 
WOLFSSL_API int wc_RNG_HealthTest (int reseed, const byte *entropyA, word32 entropyASz, const byte *entropyB, word32 entropyBSz, byte *output, word32 outputSz)
 Creates and tests functionality of drbg.
 
WOLFSSL_API int wc_RNG_HealthTest_ex (int reseed, const byte *nonce, word32 nonceSz, const byte *entropyA, word32 entropyASz, const byte *entropyB, word32 entropyBSz, byte *output, word32 outputSz, void *heap, int devId)
 

Variables

 C