Conversation
At the EVP level, for AEADs EVP_Cipher(ctx, out, NULL, 0) performs finalization. For consistency across AEADs (GCM, etc.), on decrypt it must check the tag. OCB and ChaCha20-Poly1305 took an early exit on the empty message (with or without AAD) and returned success without checking, so a forged tag (with or without AAD) was accepted before this change. Follow-up to openssl#31555 Assisted-by: Claude:claude-opus-4-8
Contributor
Author
|
The SIV change is mostly unrelated, but I rolled it in since I was mucking with that test anyway. Hope it's OK. |
fwh-dc
requested changes
Aug 4, 2026
fwh-dc
left a comment
Contributor
There was a problem hiding this comment.
minor nit, changes looks good!
Collaborator
|
This pull request is ready to merge |
Contributor
|
Merged to master. Thank you Billy! |
openssl-machine
pushed a commit
that referenced
this pull request
Aug 7, 2026
At the EVP level, for AEADs EVP_Cipher(ctx, out, NULL, 0) performs finalization. For consistency across AEADs (GCM, etc.), on decrypt it must check the tag. OCB and ChaCha20-Poly1305 took an early exit on the empty message (with or without AAD) and returned success without checking, so a forged tag (with or without AAD) was accepted before this change. Follow-up to #31555 Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Frederik Wedel-Heinen <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> MergeDate: Fri Aug 7 13:34:35 2026 (Merged from #32173)
This was referenced Aug 9, 2026
Closed
Invalid tags can be accepted for empty ChaCha20-Poly1305 and OCB ciphertexts via EVP_Cipher()
#32258
Closed
Closed
This was referenced Aug 18, 2026
Closed
rickyringler
pushed a commit
to rickyringler/openssl
that referenced
this pull request
Aug 21, 2026
At the EVP level, for AEADs EVP_Cipher(ctx, out, NULL, 0) performs finalization. For consistency across AEADs (GCM, etc.), on decrypt it must check the tag. OCB and ChaCha20-Poly1305 took an early exit on the empty message (with or without AAD) and returned success without checking, so a forged tag (with or without AAD) was accepted before this change. Follow-up to openssl#31555 Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Frederik Wedel-Heinen <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> MergeDate: Fri Aug 7 13:34:35 2026 (Merged from openssl#32173)
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.
At the EVP level, for AEADs
EVP_Cipher(ctx, out, NULL, 0)performs finalization. For consistency across AEADs (GCM, etc.), on decrypt it must check the tag. OCB and ChaCha20-Poly1305 took an early exit on the empty message (with or without AAD) and returned success without checking, so a forged tag (with or without AAD) was accepted before this change.Follow-up to #31555
Assisted-by: Claude:claude-opus-4-8
Checklist