|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
A simple entropy source. More...
#include <entropy.h>
Public Types | |
| using | ValueType = uint64_t |
Public Member Functions | |
| TrivialInsecureEntropySource () | |
| Constructor, tries to generate an independent sequence of random numbers. | |
| void | reseed () |
| Reseed the PRNG. | |
| ValueType | operator() () |
| Get the next value from the PRNG. | |
Static Public Attributes | |
| static constexpr bool | IsSecure = false |
| Definitely not secure! | |
Protected Member Functions | |
| void | reseed (uint16_t jumps) |
| Reseed the PRNG with a provided set of jumps. | |
A simple entropy source.
This wraps a few weak entropy sources to seed a PRNG. It is absolutely not secure and should not be used for anything that depends on cryptographically secure random numbers! Unfortunately, there is nothing on the Sonata instantiation of CHERIoT SAFE that can be used as a secure entropy source.
This is provided as a generic implementation that can be used with an interrupt source to provide a slightly better version for testing on FPGA and simulation environments that don't have anything secure.
|
inline |
|
inline |
|
inline |
Reseed the PRNG.
Definition at line 85 of file entropy.h.
References reseed().
Referenced by reseed(), and TrivialInsecureEntropySource().
|
inlineprotected |
|
staticconstexpr |