Uh oh!
There was an error while loading. Please reload this page.
Reject aes-gcm/ccm encryption and decryption when no iv/nonce has been set - #442
Reject aes-gcm/ccm encryption and decryption when no iv/nonce has been set #442gasbytes 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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
b1f0fde to
a934c06Compare…n set and add tests covering key-only (single-shot and streaming) operations
a934c06 to
61e7fccComparegasbytes
commented
Jul 14, 2026
Jenkins retest this please (timeout) |
gasbytes
commented
Aug 6, 2026
Jenkins retest this please (timeout) |
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).