Skip to content

Conversation

vcsjones
Copy link
Member

Summary

Starting in .NET 8, AEAD algorithms throw AuthenticationTagMismatchException to indicate that decryption failed because of the authentication tag mismatch. This is a sub-type of CryptographicException, so it was not considered a breaking change.

This clarifies in the documentation that starting in .NET 8, users should expect this exception when the authentication tag does not match during decryption.

Fixes #10465

@vcsjones vcsjones requested a review from a team as a code owner September 30, 2024 16:19
@ghost ghost added the area-System.Security Issues related to security practices for .NET developers. label Sep 30, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link

Learn Build status updates of commit 2dc41e7:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Security.Cryptography/AesCcm.xml ✅Succeeded View
xml/System.Security.Cryptography/AesGcm.xml ✅Succeeded View
xml/System.Security.Cryptography/ChaCha20Poly1305.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@gewarren gewarren merged commit 6139eea into dotnet:main Sep 30, 2024
3 checks passed
@vcsjones vcsjones deleted the fix-10465 branch October 3, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security Issues related to security practices for .NET developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AesGcm.Decrypt() doesn't throw CryptographicException
2 participants