Loading...
Searching...
No Matches
Zero Entropy Source

Zero Entropy Source for testing. More...

Detailed Description

Zero Entropy Source for testing.

This module produces zeros only and should be used for testing purposes only.

Files

file  zero_entropy.h
 

Functions

int entropy_source_zero_init (void)
 Initializes test structures, if tests are enabled.
 
int entropy_source_zero_get (uint8_t *buf, size_t len)
 Generates zeros.
 
#define CONFIG_ENTROPY_SOURCE_ZERO_HEALTH_TEST   1
 Enable health test by default.
 
#define CONFIG_ENTROPY_SOURCE_ZERO_COND   0
 Disable conditioning by default.
 

Macro Definition Documentation

◆ CONFIG_ENTROPY_SOURCE_ZERO_COND

#define CONFIG_ENTROPY_SOURCE_ZERO_COND   0

Disable conditioning by default.

Conditioning is useless for zeros only. The von Neumann extractor would never finish and wait for the stop criterion given by CONFIG_ENTROPY_SOURCE_NEUMANN_ABORT.

Definition at line 64 of file zero_entropy.h.

◆ CONFIG_ENTROPY_SOURCE_ZERO_HEALTH_TEST

#define CONFIG_ENTROPY_SOURCE_ZERO_HEALTH_TEST   1

Enable health test by default.

Testing is the only purpose of this module.

Definition at line 53 of file zero_entropy.h.

Function Documentation

◆ entropy_source_zero_get()

int entropy_source_zero_get ( uint8_t *  buf,
size_t  len 
)

Generates zeros.

Parameters
[out]bufpointer to write zeros to
[in]lennumber of bytes to generate
Returns
ENTROPY_SOURCE_OK on success
negative entropy_source_error_t code on error

◆ entropy_source_zero_init()

int entropy_source_zero_init ( void  )

Initializes test structures, if tests are enabled.

Returns
ENTROPY_SOURCE_OK always