Data Structures | Functions | Variables
rbg.h File Reference

RBG mechanism. More...

#include <stdint.h>
#include <ipxe/drbg.h>

Go to the source code of this file.

Data Structures

struct  random_bit_generator
 An RBG. More...


static int rbg_generate (const void *additional, size_t additional_len, int prediction_resist, void *data, size_t len)
 Generate bits using RBG.


struct random_bit_generator rbg
 The RBG.

Detailed Description

RBG mechanism.

Definition in file rbg.h.

Function Documentation

static int rbg_generate ( const void *  additional,
size_t  additional_len,
int  prediction_resist,
void *  data,
size_t  len 
) [inline, static]

Generate bits using RBG.

additionalAdditional input
additional_lenLength of additional input
prediction_resistPrediction resistance is required
dataOutput buffer
lenLength of output buffer
Return values:
rcReturn status code

This is the RBG_Generate function defined in ANS X9.82 Part 4 (April 2011 Draft) Section

Definition at line 36 of file rbg.h.

References drbg_generate(), rbg, and random_bit_generator::state.

Referenced by get_random_nz(), tls_generate_random(), and wpa_handle_1_of_4().

        return drbg_generate ( &rbg.state, additional, additional_len,
                               prediction_resist, data, len );

Variable Documentation

The RBG.

Definition at line 63 of file rbg.c.

Referenced by rbg_generate(), rbg_shutdown(), and rbg_startup().