Skip to content

Expose AES-GCM-SIV AEAD algorithms - #591

Open
nox wants to merge 1 commit into
cloudflare:masterfrom
nox:nox/aes-gcm-siv-wrappers
Open

nox wants to merge 1 commit into
cloudflare:masterfrom
nox:nox/aes-gcm-siv-wrappers

Conversation

@nox

@nox nox commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

This adds Algorithm constructors for AES-128-GCM-SIV and AES-256-GCM-SIV backed by BoringSSL's EVP_AEAD implementations. Round-trip tests cover both key sizes. This change closes #58.

Both AES-128-GCM-SIV and AES-256-GCM-SIV are exposed through
`aead::Algorithm`, matching the corresponding BoringSSL `EVP_AEAD`
constructors. Round-trip coverage verifies both key sizes.

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Approved — No issues found: the two new constructors are straightforward FFI wrappers that match the existing constructors, and tests cover both key sizes.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

Each wrapper only returns a static BoringSSL EVP_AEAD pointer. No new inputs, pointers or lengths reach unsafe code.


📋 Code Quality: ✅ LGTM

The new constructors use the same attributes and the same unsafe { Self(ffi::...()) } shape as the existing AES-GCM constructors. The test round-trips seal and open for 16-byte and 32-byte keys, using nonce and tag sizes that are correct for AES-GCM-SIV.


📝 Documentation: ✅ LGTM

The doc comments reference RFC 8452, consistent with the existing constructors.


Reviewed commit: cc482261

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose the EVP_AEAD Interface

1 participant