Lightweight Cryptography Primitives
 All Data Structures Files Functions Variables Typedefs Macros Pages
Functions
aead-random.h File Reference

Utilities that help with the generation of random masking data. More...

#include <stdint.h>

Go to the source code of this file.

Functions

void aead_random_init (void)
 Initializes the system random number generator for the generation of masking material.
 
void aead_random_finish (void)
 Finishes using the random number source. More...
 
uint32_t aead_random_generate_32 (void)
 Generates a single random 32-bit word. More...
 
uint64_t aead_random_generate_64 (void)
 Generates a single random 64-bit word. More...
 
void aead_random_generate_32_multiple (uint32_t *out, unsigned count)
 Generates multiple random 32-bit words for masking purposes. More...
 
void aead_random_generate_64_multiple (uint64_t *out, unsigned count)
 Generates multiple random 64-bit words for masking purposes. More...
 

Detailed Description

Utilities that help with the generation of random masking data.

Function Documentation

void aead_random_finish ( void  )

Finishes using the random number source.

If the random API has internal state, then this function will destroy the internal state to protect forward secrecy.

uint32_t aead_random_generate_32 ( void  )

Generates a single random 32-bit word.

Returns
The random word.
void aead_random_generate_32_multiple ( uint32_t *  out,
unsigned  count 
)

Generates multiple random 32-bit words for masking purposes.

Parameters
outOutput buffer to receive the words.
countNumber of words to generate.
uint64_t aead_random_generate_64 ( void  )

Generates a single random 64-bit word.

Returns
The random word.
void aead_random_generate_64_multiple ( uint64_t *  out,
unsigned  count 
)

Generates multiple random 64-bit words for masking purposes.

Parameters
outOutput buffer to receive the words.
countNumber of words to generate.