HomeFreeBSD

random: Treat writes to /dev/random as separate from /entropy

Description

random: Treat writes to /dev/random as separate from /entropy

RANDOM_CACHED is overloaded to refer both to entropy obtained from files
loaded by the boot loader, and entropy obtained via writes to
/dev/random. Introduce a new source, RANDOM_RANDOMDEV, to refer to the
latter. This is to enable treating RANDOM_CACHED as a special case in
the NIST health test implementation.

Update the default harvest_mask in rc.conf to include RANDOM_RANDOMDEV,
preserving the old behaviour of accepting writes to /dev/random.

Bump __FreeBSD_version for modules which register a pure source, since
all of their values have now shifted.

Reviewed by: cem
MFC after: 3 months
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D51155

Details

Provenance
markjAuthored on Jul 18 2025, 8:23 PM
Reviewer
cem
Differential Revision
D51155: random: Treat writes to /dev/random as separate from /entropy
Parents
rGf92ff79720fb: random: Add NIST SP 800-90B entropy source health test implementations
Branches
Unknown
Tags
Unknown