Repository navigation
Add opt-in single-update AES-GCM for non-streaming builds - #529
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
A rejected tag replacement can leave strict decryption using invalid tag bytes, and the interoperability tests may fail to obtain an independent OpenSSL reference or silently compare wolfCrypt against itself.
2 open issues
What changed in this PR
Adds an opt-in single-update AES-GCM contract to avoid payload-prefix replay in nonstreaming wolfCrypt builds, while preserving the ordinary EVP path.
Changes:
- Adds capability discovery, authenticated single-update processing, and operation-state guards.
- Registers interoperability and ordinary split-update, reuse, and TLS regression tests.
- Documents the contract, test modes, and release-validation limits.
| File | Description |
|---|---|
test/test_gcm_single_update.c |
Adds interoperability vectors and contract-edge checks. |
test/test_gcm_ordinary_compat.c |
Adds ordinary GCM reuse, split-update, and TLS regressions. |
test/include.am |
Registers both test programs with make check. |
src/wp_aes_aead.c |
Implements the optional nonstreaming GCM contract. |
docs/GCM_SINGLE_UPDATE.md |
Documents usage, exclusions, and validation requirements. |
Review effort: Balanced
ColtonWilley
force-pushed
the
colton/gcm-single-update-optin-20261110
branch
from
November 10, 2026 20:03
4c3164f to
c44ab88
Compare
Callers that set wolfprov-gcm-single-update pass the complete payload in one Update, with the expected tag set first when decrypting. wolfProvider then calls wolfCrypt one-shot instead of caching and replaying the payload. Ordinary callers are unchanged.
ColtonWilley
force-pushed
the
colton/gcm-single-update-optin-20261110
branch
from
November 10, 2026 20:04
c44ab88 to
5d613c3
Compare
padelsbach
reviewed
Nov 10, 2026
Move WP_PARAM_GCM_SINGLE_UPDATE to wp_wolfprov.h, follow the ok/WOLFPROV_LEAVE pattern without early returns, document the new fields and function, and test an empty Final and decrypt without a tag on a reused context.
MarkAtwood
approved these changes
Nov 10, 2026
padelsbach
approved these changes
Nov 10, 2026
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.

Adds an opt-in
wolfprov-gcm-single-updatecontext parameter for non-streaming AES-GCM builds such as FIPS v5. A caller that opts in passes the complete payload in one Update, setting the expected tag first when decrypting, so wolfProvider calls wolfCrypt one-shot instead of caching and replaying the payload. Existing callers are unchanged.