Skip to content

feat(vrl): add AES-GCM support to encrypt/decrypt functions#1641

Open
dodo0822 wants to merge 5 commits into
vectordotdev:mainfrom
dodo0822:dodo0822/aes-gcm
Open

feat(vrl): add AES-GCM support to encrypt/decrypt functions#1641
dodo0822 wants to merge 5 commits into
vectordotdev:mainfrom
dodo0822:dodo0822/aes-gcm

Conversation

@dodo0822

Copy link
Copy Markdown

Summary

Add support for AES-GCM with various key and nonce sizes to the encrypt/decrypt functions. Addresses #1636.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

  • Added unit test cases to encrypt.rs/decrypt.rs
  • Ran ./scripts/checks.sh to ensure test cases passes

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on
    our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Our CONTRIBUTING.md is a good starting place.
  • If this PR introduces changes to LICENSE-3rdparty.csv, please
    run dd-rust-license-tool write and commit the changes. More details here.
  • For new VRL functions, please also create a sibling PR in Vector to document the new function.

References

@dodo0822 dodo0822 requested a review from a team as a code owner February 15, 2026 20:45
Signed-off-by: Chih-Wei Fang <dodo0822@gmail.com>
@pront

pront commented Mar 20, 2026

Copy link
Copy Markdown
Member

Please fix merge conflicts and we will take a look.

@dodo0822

Copy link
Copy Markdown
Author

@pront I have merged with the latest main branch. Please take another look, thanks!

Comment thread src/stdlib/encrypt.rs
* AES-128-CBC-ISO10126 (key = 16 bytes, iv = 16 bytes)
* CHACHA20-POLY1305 (key = 32 bytes, iv = 12 bytes)
* XCHACHA20-POLY1305 (key = 32 bytes, iv = 24 bytes)
* XSALSA20-POLY1305 (key = 32 bytes, iv = 24 bytes)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add an entry here. Same in decrypt.rs

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done!

@pront pront requested a review from thomasqueirozb May 12, 2026 21:38
@pront pront added stdlib: decrypt VRL stdlib function: decrypt stdlib: encrypt VRL stdlib function: encrypt labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stdlib: decrypt VRL stdlib function: decrypt stdlib: encrypt VRL stdlib function: encrypt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants