✨ Add gcm cipher mode to --aes/--camellia options#3193
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces support for the GCM cipher mode (AES-GCM and Camellia-GCM) across the CLI and library, complete with integration tests, compatibility tests, and new fuzz targets. The feedback recommends improving test robustness by asserting on the Display representation of errors (err.to_string()) rather than their Debug representation, which can be unstable.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
5c7e102 to
fd5a0ff
Compare
fe488f4 to
245251b
Compare
fd5a0ff to
372bb9c
Compare
245251b to
3ebe16d
Compare
f9d35b7 to
fad79d5
Compare
3ebe16d to
b5a7c57
Compare
Add zstd_aes_gcm.pna, zstd_camellia_gcm.pna, solid_zstd_aes_gcm.pna, solid_zstd_camellia_gcm.pna, generated from the same resources/test/raw input and "password" passphrase as the existing CBC/CTR fixtures, and wire them into extract_compatibility.rs / extract_solid_compatibility.rs. Generated with this branch's CLI, from resources/test/: pna create -f zstd_aes_gcm.pna --no-keep-dir --zstd --aes gcm --password password raw pna create -f zstd_camellia_gcm.pna --no-keep-dir --zstd --camellia gcm --password password raw pna create -f solid_zstd_aes_gcm.pna --no-keep-dir --solid --zstd --aes gcm --password password raw pna create -f solid_zstd_camellia_gcm.pna --no-keep-dir --solid --zstd --camellia gcm --password password raw
Extracting a GCM-encrypted entry without --keep-permission must not restore the archived mode, including the setuid bit.
fad79d5 to
7057a8b
Compare
b5a7c57 to
30a8fe9
Compare
Stacked on #3192.
Summary
Expose cipher mode 2 (GCM) in the CLI as a
gcmvalue for--aes/--camellia, with fuzz targets and compatibility test archives. The default cipher mode remainsctr; switching the default togcmis a follow-up PR.Notes
resources/test/*_gcm.pna; generation commands are recorded in the commit message. If ✨ Add Cipher mode 2 (AEAD, STREAM-based GCM) support to libpna #3192 changes the on-wire format during review, the fixtures must be regenerated.