Skip to content

AesGcm.Decrypt() doesn't throw CryptographicException #10465

@samuel-lucas6

Description

@samuel-lucas6

Type of issue

Typo

Description

This page says a CryptographicException is thrown if the tag couldn't be verified, but the function actually throws AuthenticationTagMismatchException.

This error may apply to other AEAD pages as well, but I haven't tested those.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.aesgcm.decrypt?view=net-8.0#system-security-cryptography-aesgcm-decrypt(system-readonlyspan((system-byte))-system-readonlyspan((system-byte))-system-readonlyspan((system-byte))-system-span((system-byte))-system-readonlyspan((system-byte)))

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Security.Cryptography/AesGcm.xml

Document Version Independent Id

4ea1eb00-71c7-149a-d174-b44f3b9b91a4

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.SecurityIssues related to security practices for .NET developers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions