Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
qmuntal opened this issue Jan 9, 2025 · 0 comments
Labels
Milestone

Comments

@qmuntal
Copy link
Member

qmuntal commented Jan 9, 2025

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.

@qmuntal qmuntal added this to the go1.25 milestone Jan 9, 2025
@dagood dagood added the fips label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants