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

Variables

struct random_bit_generator rbg
 The RBG. More...
 

Detailed Description

RBG mechanism.

Definition in file rbg.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ rbg_generate()

static int rbg_generate ( const void *  additional,
size_t  additional_len,
int  prediction_resist,
void *  data,
size_t  len 
)
inlinestatic

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.

38  {
39  return drbg_generate ( &rbg.state, additional, additional_len,
40  prediction_resist, data, len );
41 }
uint16_t additional
Additional sense code and qualifier.
Definition: scsi.h:28
uint32_t len
Length.
Definition: ena.h:14
struct random_bit_generator rbg
The RBG.
Definition: rbg.c:63
struct arbelprm_port_state_change_st data
Message.
Definition: arbel.h:12
struct drbg_state state
DRBG state.
Definition: rbg.h:18
int drbg_generate(struct drbg_state *state, const void *additional, size_t additional_len, int prediction_resist, void *data, size_t len)
Generate pseudorandom bits using DRBG.
Definition: drbg.c:283

References additional, data, drbg_generate(), len, rbg, and random_bit_generator::state.

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

Variable Documentation

◆ rbg

The RBG.

Definition at line 63 of file rbg.c.

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