Skip to content

feat(097-M5): bind document metadata as AES-GCM AAD#4

Merged
ValidPay-io merged 1 commit into
mainfrom
fix/gcm-aad-binding
Jun 15, 2026
Merged

feat(097-M5): bind document metadata as AES-GCM AAD#4
ValidPay-io merged 1 commit into
mainfrom
fix/gcm-aad-binding

Conversation

@ValidPay-io

Copy link
Copy Markdown
Owner

Prompt 097 — Fix 5 (M-5). React Native SDK. Stacked on PR #3 (C-1) — base is `fix/commitment-hash-ciphertext`; retarget to `main` after #3 merges.

`CryptoProvider.encrypt/decrypt` gain an optional aad param; the crypto wrapper threads it through and `buildAad()` yields the canonical AAD byte-identical to the Python/Node SDKs + website. create paths bind it + send `encryption_version=2`; verify reconstructs it for v2 intents. The Jest provider honors AAD. Selective disclosure stays v1. 82 tests pass.

Note: provider implementations must honor the new `aad` arg for binding to take effect (the bundled Node test provider and any spec-compliant AES-GCM provider do).
🤖 Generated with Claude Code

@ValidPay-io
ValidPay-io changed the base branch from fix/commitment-hash-ciphertext to main June 15, 2026 01:12
CryptoProvider.encrypt/decrypt gain an optional aad param; the crypto wrapper
threads it through and buildAad() yields the canonical AAD (compact JSON
{document_type, valid_from, valid_until}, epoch-ms timestamps) — byte-identical
to the Python/Node SDKs and website verifier.

create paths bind the AAD and send encryption_version=2; verify reconstructs
it from server metadata for v2 intents. IntentApiResponse gains document_type
+ encryption_version. The Jest NodeCryptoProvider honors AAD. Selective
disclosure stays v1. Tests added/updated; full suite green.

Stacked on the C-1 commitment branch.

Co-authored-by: Mike <mtn.mh1.inv@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@ValidPay-io
ValidPay-io force-pushed the fix/gcm-aad-binding branch from a3ade20 to 26444f4 Compare June 15, 2026 01:12
@ValidPay-io
ValidPay-io merged commit 2f36afe into main Jun 15, 2026
@ValidPay-io
ValidPay-io deleted the fix/gcm-aad-binding branch June 15, 2026 01:12
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.

1 participant