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)
Tue, Oct 13, 6:41 PM
Unknown Object (File)
Wed, Oct 7, 1:22 AM
Unknown Object (File)
Tue, Oct 6, 9:25 PM
Unknown Object (File)
Tue, Oct 6, 6:57 PM
Unknown Object (File)
Sat, Oct 3, 12:03 PM
Unknown Object (File)
Thu, Oct 1, 5:47 AM
Unknown Object (File)
Wed, Sep 30, 7:57 PM
Unknown Object (File)
Wed, Sep 30, 5:47 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