Update section 2.7 Random Seed with comprehensive documentation #233
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update section 2.7 Random Seed with comprehensive documentation
Summary
Significantly expanded section 2.7 "Random Seed" in the wolfSSL-Porting guide from 9 lines to 220+ lines of comprehensive documentation. The update provides detailed guidance for developers porting wolfSSL to new platforms who need to customize random number generation and entropy sources.
Key additions:
NO_DEV_RANDOMandNO_DEV_URANDOMconfigurationWC_NO_HASHDRBGandCUSTOM_RAND_GENERATE_BLOCKCUSTOM_RAND_GENERATE_SEED- Direct seed functionCUSTOM_RAND_GENERATE- Iterative random value functionwc_SetSeed_Cb()- Runtime callback mechanismWC_ALGO_TYPE_SEED- HSM/TPM integrationWOLFSSL_GENSEED_FORTEST(with clear production warnings)PR feedback addressed:
//to/* */style to match wolfSSL coding conventionsmin()usage in crypto callback example (replaced with ternary operator for portability)Review & Testing Checklist for Human
CUSTOM_RAND_GENERATE,wc_SetSeed_Cb(), and crypto callbacks to ensure they're syntactically correct and functionally accurate. I sourced these from the wolfssl codebase but couldn't test them.WC_NO_HASHDRBGrequiringCUSTOM_RAND_GENERATE_BLOCK) are correct and complete../wolfcrypt/src/random.c,wolfssl-examples/tls/cryptocb-common.c, and other files are accurate and helpful without line numbers.Notes
min()for portabilityRequested by: David Garske (david@wolfssl.com)
Session: https://app.devin.ai/sessions/67b4aa827513458d874e0c957cdd223a