Repository navigation
Take AES-GCM TLS and IV-gen IVs from the wolfCrypt module counter - #531
Open
kaleb-himes wants to merge 3 commits into
Open
kaleb-himes wants to merge 3 commits into
kaleb-himes wants to merge 3 commits into
Conversation
kaleb-himes
requested review from
wolfSSL-Fenrir-bot
and
a balanced review from Copilot
November 20, 2026 21:16
kaleb-himes
requested review from
wolfSSL-Fenrir-bot
and
a balanced review from Copilot
November 20, 2026 21:45
kaleb-himes
dismissed
wolfSSL-Fenrir-bot’s stale review
November 20, 2026 22:10
Dismiss to re-request
kaleb-himes
requested review from
wolfSSL-Fenrir-bot
and
a balanced review from Copilot
November 20, 2026 22:29
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #531
Scan targets checked: none
Unchanged since last review (not re-run): wolfprovider-src, wolfprovider-bugs
Not reviewed (no scan target covers them): ChangeLog.md, test/unit.h
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
wolfSSL-Fenrir-bot
dismissed
their stale review
November 20, 2026 22:29
Fenrir's latest completed scan found no issues; clearing the prior automated change request.
kaleb-himes
marked this pull request as ready for review
November 20, 2026 22:52
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.
Take AES-GCM IVs from the wolfCrypt module counter
FIPS v7 locks the AES-GCM IV once wolfCrypt generates it (wolfSSL/wolfssl#12170,
FIPS 140-3 IG C.H). After
wc_AesGcmSetIV(), a caller IV passed towc_AesGcmInit()orwc_AesGcmSetExtIV()returnsBAD_STATE_Euntil the nextkey is set. wolfProvider incremented the IV itself and passed it back as a
caller IV, so TLS 1.2 GCM records and EVP IV-gen failed against v7.
Changes in
src/wp_aes_aead.c:SET_IV_FIXED). A new key, a caller IV, the-1restore of a full IV, andevery decrypt init clear it.
wc_AesGcmEncrypt_ex(). The 8-byte explicitnonce is copied from the IV the module used, so the wire format is
unchanged (RFC 5288 section 3).
IV_GENand streaming init usewc_AesGcmEncryptInit_ex()to take themodule's next IV, instead of incrementing it in the provider.
Test:
test_aes_gcm_iv_gen_multirunsSET_IV_FIXEDonce, thenIV_GENfor 8messages on one context. It checks that each IV keeps the fixed field, is
unique, and decrypts with OpenSSL. It fails on the current code against v7.
Tested: unit tests against FIPS v7 (only the known ECDSA failures), non-FIPS
wolfSSL master 250/250, FIPS v6.0.0 223/223, FIPS v5.2.1 208/208. TLS 1.2
ECDHE-RSA-AES128-GCM-SHA256 with EMS against OpenSSL 3.5.4, with the provider
as client and as server, completes and exchanges application data.