Random number generation.
More...
|
|
#define | SYS_TRNG_SEED_SIZE (IRNG_RANDOM_SEED_SIZE_BYTES) |
| | The size of TRNG seed in bytes.
|
| |
|
#define | SYS_TRNG_MEMORY_BLOCKS (IRNG_MINIMUM_SRAM_PUF_BLOCKS + 4) |
| | The number of memory blocks passed as entropy source. The size of the block is 16 bytes, as defined by IRNG_BLOCK_SIZE_BYTES.
|
| |
Random number generation.
◆ sys_trng_can_run()
| bool sys_trng_can_run |
( |
void |
| ) |
|
Checks whether the TRNG module can generate a seed or not.
- Returns
- if true the sys_trng_init() can be called, otherwise not.
◆ sys_trng_init()
Runs a software algorithm which generates a random seed. Random memory data are used to feed the software algorithm.
- Note
- It must be ensured that random memory data (it is assumed that a RAM cell contains random values when it powers-up) are fed to the software algorithm, otherwise the sys_trng_init() will return an error code. The sys_trng_can_run() assures that the software algorithm will be fed with random data.
- Returns
- error code. SYS_TRNG_ERROR_NONE if the seed was successfully generated, otherwise an error code.