keycache tweaks#400
Merged
Merged
Conversation
Contributor
bigbrett
commented
Jun 3, 2026
- Increase default keycache size for SHE mode to accomodate all SHE keys
- Increase default big cache size to facilitate new RSA test
- Adds missing key eviction to RSA test
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts wolfHSM’s server key-cache defaults to better support SHE mode and expanded RSA async testing, and updates the RSA async test to proactively free cache resources when intermediate keys are no longer needed.
Changes:
- Increase default
WOLFHSM_CFG_SERVER_KEYCACHE_COUNTto 16 whenWOLFHSM_CFG_SHE_EXTENSIONis enabled (matching SHE’s 0–15 key slots). - Increase default
WOLFHSM_CFG_SERVER_KEYCACHE_BIG_COUNTfrom 1 to 3 to accommodate larger-key workflows/tests. - Evict the cached RSA key earlier in
whTest_CryptoRsaAsync()after sign/verify to free cache space for subsequent steps.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
wolfhsm/wh_settings.h |
Raises default key-cache sizes (conditional for SHE, and larger “big key” cache) to support expected key slot usage and RSA testing needs. |
test/wh_test_crypto.c |
Adds an explicit mid-test key eviction in the RSA async test to avoid cache pressure before export-key steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #400
Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src
No new issues found in the changed files. ✅
AlexLanzano
approved these changes
Jun 3, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.