Skip to content

Check AES-GCM size against wolfCrypt options - #37

Merged
Frauschi merged 1 commit into
wolfSSL:masterfrom
padelsbach:gcm-tag
Oct 28, 2026
Merged

Frauschi merged 1 commit into
wolfSSL:masterfrom
padelsbach:gcm-tag

Conversation

@padelsbach

@padelsbach padelsbach commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Return error if GCM tag size is too big, based on wolfcrypt settings

Fixes F-10465

Copilot AI balanced review requested due to automatic review settings October 28, 2026 06:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PSA test excludes the valid rejection of a 12-byte tag when WOLFSSL_MIN_AUTH_TAG_SZ is set to 16, causing check_status() to fail instead of respecting the configured minimum.

1 open issue
What changed in this PR

This PR makes PSA AES-GCM tag validation respect wolfCrypt’s configured minimum authentication tag size.

Changes:

  • Distinguishes invalid PSA tag lengths from valid lengths unsupported by wolfCrypt.
  • Adds shortened-tag tests covering encryption, decryption, and unsupported-tag responses.
File Description
test/​psa_server/​psa_api_test.c Adds and registers shortened GCM tag tests.
src/​psa_aead.c Enforces wolfCrypt’s minimum tag size and propagates the appropriate PSA error.

Review effort: Balanced

Comment thread test/psa_server/psa_api_test.c Outdated

@Frauschi Frauschi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Frauschi
Frauschi merged commit 9e6d1aa into wolfSSL:master Oct 28, 2026
88 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