Skip to content

Add comment about using TPM based RNG for start auth nonce#478

Open
dgarske wants to merge 1 commit intowolfSSL:masterfrom
dgarske:zd21476
Open

Add comment about using TPM based RNG for start auth nonce#478
dgarske wants to merge 1 commit intowolfSSL:masterfrom
dgarske:zd21476

Conversation

@dgarske
Copy link
Copy Markdown
Contributor

@dgarske dgarske commented Apr 9, 2026

ZD 21476

@dgarske dgarske self-assigned this Apr 9, 2026
Copilot AI review requested due to automatic review settings April 9, 2026 17:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds security-focused documentation to discourage using TPM RNG output over SPI/I2C for session nonce generation unless the bus is physically protected, and makes the local wolfCrypt RNG the documented default for nonce generation.

Changes:

  • Expanded wolfTPM2_GetRng() documentation to warn about HW RNG data exposure on SPI/I2C.
  • Added rationale comment for defaulting to local wolfCrypt RNG (when available) instead of TPM2_GetRandom.
  • Updated TPM2_GenNonce() documentation to warn about nonce tampering risk when using WOLFTPM2_USE_HW_RNG.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
wolftpm/tpm2_wrap.h Adds Doxygen warning around using TPM RNG over an unprotected bus.
wolftpm/tpm2.h Documents default nonce RNG choice and updates nonce-generation API docs with a bus-tampering warning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants