Skip to content

Support non-standard AES-GCM nonce and tag sizes when using the CNG and OpenSSL backends #1465

@qmuntal

Description

@qmuntal

We currently fall back to Go crypto if the AES-GCM nonce size is not 12 or when the tag size is not 16:

https://github.com/golang-fips/openssl/blob/eb155dada337b0de53873aa42e89724ad59aa768/cipher.go#L358-L363
https://github.com/microsoft/go-crypto-winnative/blob/b49854c00e37c07d57cec6983adbec6ae9a0aa73/cng/aes.go#L107-L112

Either CNG and OpenSSL support more nonce and tag sizes. We should avoid falling back whenever possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions