|
Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
OS Abstraction Layer - Cryptographically secure random bytes. More...
Go to the source code of this file.
Macros | |
| #define | RTE_RANDOM_MAX_REQUEST 256U |
| Largest request rte_random_fill() accepts in one call (bytes). | |
Functions | |
| rte_status_t | rte_random_fill (uint8_t *out, size_t len) |
Fills out with len cryptographically secure random bytes from the registered OSAdapter. | |
OS Abstraction Layer - Cryptographically secure random bytes.
The seam through which application code obtains unpredictable random bytes (e.g. the EuroRadio responder random RB, Subset-037-2) without naming an OSAdapter or calling the OS itself (ADR-005). What backs it is OSAdapter-defined: a POSIX OSAdapter uses the kernel CSPRNG; a bare-metal one would use a hardware TRNG.
REQ-OAL-RANDOM-001: the registered OSAdapter shall return bytes from a cryptographically secure source, or fail; it shall never fall back to a predictable generator.
Definition in file rte_random.h.