Skip to content

keycache tweaks#400

Merged
AlexLanzano merged 1 commit into
wolfSSL:mainfrom
bigbrett:default-key-expansion
Jun 3, 2026
Merged

keycache tweaks#400
AlexLanzano merged 1 commit into
wolfSSL:mainfrom
bigbrett:default-key-expansion

Conversation

@bigbrett
Copy link
Copy Markdown
Contributor

@bigbrett 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

Copilot AI review requested due to automatic review settings June 3, 2026 18:51
Copy link
Copy Markdown
Contributor

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

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_COUNT to 16 when WOLFHSM_CFG_SHE_EXTENSION is enabled (matching SHE’s 0–15 key slots).
  • Increase default WOLFHSM_CFG_SERVER_KEYCACHE_BIG_COUNT from 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.

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

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

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 AlexLanzano merged commit 70f36a0 into wolfSSL:main Jun 3, 2026
108 checks passed
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.

4 participants