iPXE
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...

Functions

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

Variables

struct random_bit_generator rbg
 The RBG.

Detailed Description

RBG mechanism.

Definition in file rbg.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
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.

Parameters:
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 9.1.2.2.

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().