iPXE
Macros | Functions
linux_entropy.h File Reference

/dev/random-based entropy source More...

Go to the source code of this file.

Macros

#define ENTROPY_PREFIX_linux   __linux_
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static __always_inline min_entropy_t ENTROPY_INLINE (linux, min_entropy_per_sample)(void)
 min-entropy per sample More...
 

Detailed Description

/dev/random-based entropy source

Definition in file linux_entropy.h.

Macro Definition Documentation

◆ ENTROPY_PREFIX_linux

#define ENTROPY_PREFIX_linux   __linux_

Definition at line 15 of file linux_entropy.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ ENTROPY_INLINE()

static __always_inline min_entropy_t ENTROPY_INLINE ( linux  ,
min_entropy_per_sample   
)
inlinestatic

min-entropy per sample

Return values
min_entropymin-entropy of each sample

Definition at line 24 of file linux_entropy.h.

24  {
25 
26  /* linux_get_noise() reads a single byte from /dev/random,
27  * which is supposed to block until a sufficient amount of
28  * entropy is available. We therefore assume that each sample
29  * contains exactly 8 bits of entropy.
30  */
31  return MIN_ENTROPY ( 8.0 );
32 }
#define MIN_ENTROPY(bits)
Construct a min-entropy fixed-point value.
Definition: entropy.h:71

References MIN_ENTROPY.