Skip to content

JCE: fix Cipher.getOutputSize() for AES/GCM/NoPadding in DECRYPT mode#107

Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
cconlon:cipherAesGcmNoPaddingOutputSize
Mar 24, 2025
Merged

JCE: fix Cipher.getOutputSize() for AES/GCM/NoPadding in DECRYPT mode#107
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
cconlon:cipherAesGcmNoPaddingOutputSize

Conversation

@cconlon
Copy link
Member

@cconlon cconlon commented Mar 19, 2025

This PR fixes Cipher(AES/GCM/NoPadding) behavior for getOutputSize(int inputLen) to correctly strip off the tag length from the expected output size when in DECRYPT mode.

Adds JUnit tests to prevent regression.

We should revisit other algos/modes to see if they need similar adjustments. That will be part of follow up PRs if needed.

ZD 19367

@JacobBarthelmeh JacobBarthelmeh merged commit a47e24a into wolfSSL:master Mar 24, 2025
41 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.

3 participants