Page MenuHomeFreeBSD

tpm20: Preserve all harvested random bytes
Needs ReviewPublic

Authored by kbowling on Aug 28 2026, 1:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 27, 8:15 PM
Unknown Object (File)
Sun, Sep 27, 7:54 AM
Unknown Object (File)
Sat, Sep 26, 7:00 PM
Unknown Object (File)
Sat, Sep 26, 4:23 AM
Unknown Object (File)
Fri, Sep 25, 7:33 PM
Unknown Object (File)
Wed, Sep 23, 9:56 AM
Unknown Object (File)
Mon, Sep 21, 7:31 PM
Unknown Object (File)
Sat, Sep 19, 7:48 PM
Subscribers

Details

Reviewers
markj
kevans
seuros
Group Reviewers
csprng
Summary
The TPM requests 16 random bytes every ten seconds, but a random
harvest event retains at most eight bytes.  random_harvest_queue()
reduces a larger input to one 32-bit Jenkins hash, so each successful
TPM request contributed only four bytes to the entropy accumulator.

Split the response into harvest-event-sized chunks.  This preserves all
16 random bytes without increasing the TPM command rate or changing its
high-quality source classification.

MFC after:      2 weeks

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped