Support GnuPG AEAD password entries

This commit is contained in:
Hermes Agent
2026-08-10 08:57:57 +00:00
parent d66d9b0f08
commit 977eb236da
10 changed files with 319 additions and 13 deletions

View File

@@ -22,6 +22,14 @@ secrets. The generator reuses the checked-in identities and produces:
- valid loose-object Git repository templates, including an automatic-commit
history and nested-repository boundaries.
`gnupg-aead/` is a separate, non-generated compatibility case. Its synthetic
Alice entry was encrypted by GnuPG 2.4.8 with AES-256 and `--force-ocb`, yielding
GnuPG AEAD packet type 20 addressed to Alice's encryption subkey. The directory
contains the exact producer profile and ciphertext digest, a normal
password-store tree, and the expected plaintext. It deliberately lives outside
the reproducible generator's `stores/`, `expected/`, and `repositories/`
directories so a refresh cannot silently replace genuine GnuPG producer output.
Rust tests parse keys, verify signatures, decrypt every entry, compare exact
plaintext bytes, validate ciphertext digests, validate Git objects and refs,
and materialize isolated stores and repositories. They never invoke `pass`,
@@ -43,6 +51,11 @@ then make that rotation intentionally non-reproducible. Review all binary
changes and the generated fingerprints, digests, and Git object IDs before
committing them.
When rotating the checked-in synthetic identities, regenerate the packet-20
case explicitly with the producer profile in `gnupg-aead/fixture.toml`, update
both recorded fingerprints and the digest, and independently inspect it with
GnuPG's packet listing before review.
An optional developer interoperability audit may import the generated keys
into a disposable GnuPG home, decrypt the `.gpg` entries, and point an
upstream `pass` 1.7.4 checkout at a materialized store. That audit is never a

View File

@@ -0,0 +1,3 @@
synthetic-aead-password
login: alice@example.test
url: https://paypal.example.test

View File

@@ -0,0 +1,12 @@
format = 1
producer = "GnuPG 2.4.8"
command_profile = "--batch --trust-model always --compress-algo none --cipher-algo AES256 --force-ocb --set-filename '' --encrypt"
packet_tag = 20
cipher = "AES256"
aead_mode = "OCB"
recipient_primary_fingerprint = "7E5C5241B25F6FFAAD717EBFA132DCB2DC23AE30"
recipient_encryption_subkey_fingerprint = "10208D0B84AD13D2157795D5EB55885EC93C0A26"
store = "store"
entry = "gnupg-aead/store/paypal.gpg"
plaintext = "gnupg-aead/expected/paypal.txt"
ciphertext_sha256 = "4dc0eae06afa822739f41a296cd61a9bd1af91057c2ab1d61e4441874250eaf7"

View File

@@ -0,0 +1 @@
7E5C5241B25F6FFAAD717EBFA132DCB2DC23AE30