Reject aes-gcm/ccm encryption and decryption when no iv/nonce has been set #442
Open
gasbytes wants to merge 1 commit into
Open
Reject aes-gcm/ccm encryption and decryption when no iv/nonce has been set #442gasbytes wants to merge 1 commit into
gasbytes wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens AEAD safety in the wolfProvider AES-GCM and AES-CCM implementations by rejecting encryption/decryption attempts when the caller has not supplied an IV/nonce, and adds regression tests for “key-only” operation patterns.
Changes:
- Add IV/nonce presence checks for AES-GCM single-shot and streaming paths.
- Add nonce presence checks for AES-CCM encryption initialization.
- Register and implement new unit tests to ensure key-only encrypt flows are rejected (single-shot and streaming).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/wp_aes_aead.c |
Adds/adjusts IV/nonce validation checks in AES-GCM and AES-CCM AEAD code paths. |
test/test_aestag.c |
Adds new regression tests for AES-GCM/AES-CCM “key but no IV/nonce” encryption (single-shot + streaming for GCM). |
test/unit.h |
Declares the new test entry points. |
test/unit.c |
Registers the new tests in the unit test list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gasbytes
force-pushed
the
aes-ccm-gcm-iv-fixes
branch
from
July 13, 2026 16:50
b1f0fde to
a934c06
Compare
gasbytes
marked this pull request as ready for review
July 13, 2026 17:21
gasbytes
marked this pull request as draft
July 13, 2026 17:44
…n set and add tests covering key-only (single-shot and streaming) operations
gasbytes
force-pushed
the
aes-ccm-gcm-iv-fixes
branch
from
July 14, 2026 12:08
a934c06 to
61e7fcc
Compare
gasbytes
marked this pull request as ready for review
July 14, 2026 12:20
Contributor
Author
|
Jenkins retest this please (timeout) |
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.
Reject aes-gcm/ccm encryption and decryption when no iv/nonce has been set, and add regression tests covering key-only operations (single-shot, streaming, final-without-update for GCM and single-shot for CCM).