Page MenuHomeFreeBSD

random: add RDSEED as a provably unique entropy source
ClosedPublic

Authored by obrien on Oct 17 2025, 5:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 21, 1:37 PM
Unknown Object (File)
Tue, Nov 11, 2:43 PM
Unknown Object (File)
Sat, Nov 8, 3:06 AM
Unknown Object (File)
Sat, Nov 8, 1:15 AM
Unknown Object (File)
Oct 27 2025, 8:43 PM
Unknown Object (File)
Oct 27 2025, 1:21 AM
Unknown Object (File)
Oct 26 2025, 11:00 PM
Unknown Object (File)
Oct 26 2025, 10:48 PM
Subscribers

Details

Summary

NIST SP800-90B allows for only a single entropy source to be claimed
in a FIPS-140-3 certificate. In addition, only hardware sources that
have a NIST Entropy Source Validation (ESV) certificate, backed by
a SP800-90B Entropy Assessment Report, are usable. Intel has obtained
ESV certificates for several of their processors, so RDSEED is a
FIPS-140-3 suitable entropy source.

However, even though RDRAND is seeded by RDSEED internally, RDRAND
would need a RBG certificate and CAVP testing run on the DRBG in order
to use it for FIPS-140-3 (SP800-90B) purposes. So we need to know
down in the CSPRNG-subsystem which source the entropy came from.

In light of the potential issues surrounding AMD Zen 5 CPU's RDSEED
implementation[*], allow RDSEED to be disabled in loader.conf.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67848
Build 64731: arc lint + arc unit

Event Timeline

cem added a subscriber: cem.

Unobjectionable. Mechanical changes LGTM.

sys/dev/random/ivy.c
2

Might be nice to rename "ivy" to "rdrand" while you're at it.

103–118

I think you can kill the IFUNC in both, given each module only has one happy path now.

You'd need to move the cpu feature checks somewhere else; modevent() is probably fine.

sys/dev/random/random_harvestq.c
669

Also ABI breaking, for whatever that's worth

sys/dev/random/rdseed.c
89–98

Ditto

This revision is now accepted and ready to land.Oct 20 2025, 3:35 PM
obrien added inline comments.
sys/dev/random/ivy.c
2

I'd rather just leave the filename alone for now.

sys/dev/random/random_harvestq.c
669

I'm adding bumping __FreeBSD_version. Though I'm not really worried about it. I don't know of any out-of-tree modules that provide entropy to /dev/random. Mixing new kernel w/out-of-date in-tree modules seems very fragile and something I double anyone tries to do.

embelish based on review comments

This revision now requires review to proceed.Oct 21 2025, 9:38 PM
This revision was not accepted when it landed; it landed in state Needs Review.Oct 22 2025, 7:07 AM
This revision was automatically updated to reflect the committed changes.