CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
IsEntropySource Concept Reference

Concept definition

template<typename T>
concept IsEntropySource = requires(T source) {

Must export a flag indicating whether this is a cryptographically secure random number.

{ T::IsSecure } -> std::convertible_to<const bool>;

Must return a random number. All bits of the value type are assumed to be random, this should use a narrower type if it guarantees less entropy.

{ source() } -> std::same_as<typename T::ValueType>;

Must provide a method that reseeds the entropy source. If this is a hardware whitening engine that is continuously fed with entropy, this may be an empty function. There are no constraints on the return type of this.

{ source.reseed() };
}

Detailed Description

Definition at line 13 of file entropy.h.