From 2dc41e7e9febdeb040ca91199609f32661bff9a2 Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Mon, 30 Sep 2024 12:17:20 -0400 Subject: [PATCH] Fix AEAD algorithm documentation to indicate when AuthenticationTagMismatchException is thrown --- xml/System.Security.Cryptography/AesCcm.xml | 6 ++++-- xml/System.Security.Cryptography/AesGcm.xml | 6 ++++-- xml/System.Security.Cryptography/ChaCha20Poly1305.xml | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/xml/System.Security.Cryptography/AesCcm.xml b/xml/System.Security.Cryptography/AesCcm.xml index 1bb682ad7d5..650fc2e313c 100644 --- a/xml/System.Security.Cryptography/AesCcm.xml +++ b/xml/System.Security.Cryptography/AesCcm.xml @@ -212,7 +212,8 @@ The parameter length is not permitted by parameter length is not permitted by . The , , , or parameter is . - The tag value could not be verified, or the decryption operation otherwise failed. + The decryption operation failed. Prior to .NET 8, indicates the tag value could not be verified. + .NET 8 and later versions: the tag value could not be verified. @@ -280,7 +281,8 @@ The parameter length is not permitted by parameter length is not permitted by . - The tag value could not be verified, or the decryption operation otherwise failed. + The decryption operation failed. Prior to .NET 8, indicates the tag value could not be verified. + .NET 8 and later versions: the tag value could not be verified. diff --git a/xml/System.Security.Cryptography/AesGcm.xml b/xml/System.Security.Cryptography/AesGcm.xml index bcb36da2db3..77374d66b2d 100644 --- a/xml/System.Security.Cryptography/AesGcm.xml +++ b/xml/System.Security.Cryptography/AesGcm.xml @@ -309,7 +309,8 @@ The parameter length is not permitted by parameter length is not permitted by . The , , , or parameter is . - The tag value could not be verified, or the decryption operation otherwise failed. + The decryption operation failed. Prior to .NET 8, indicates the tag value could not be verified. + .NET 8 and later versions: the tag value could not be verified. @@ -377,7 +378,8 @@ The parameter length is not permitted by parameter length is not permitted by . - The tag value could not be verified, or the decryption operation otherwise failed. + The decryption operation failed. Prior to .NET 8, indicates the tag value could not be verified. + .NET 8 and later versions: the tag value could not be verified. diff --git a/xml/System.Security.Cryptography/ChaCha20Poly1305.xml b/xml/System.Security.Cryptography/ChaCha20Poly1305.xml index 4ca962a21f7..19111b30ff6 100644 --- a/xml/System.Security.Cryptography/ChaCha20Poly1305.xml +++ b/xml/System.Security.Cryptography/ChaCha20Poly1305.xml @@ -187,7 +187,8 @@ The parameter length is not 12 bytes (96 bits). The parameter length is not 16 bytes (128 bits). The , , , or parameter is . - The tag value could not be verified, or the decryption operation otherwise failed. + The decryption operation failed. Prior to .NET 8, indicates the tag value could not be verified. + .NET 8 and later versions: the tag value could not be verified. @@ -242,7 +243,8 @@ The parameter length is not 12 bytes (96 bits). -or- The parameter length is not 16 bytes (128 bits). - The tag value could not be verified, or the decryption operation otherwise failed. + The decryption operation failed. Prior to .NET 8, indicates the tag value could not be verified. + .NET 8 and later versions: the tag value could not be verified.