feat(097-M5): bind document metadata as AES-GCM AAD#4
Merged
Conversation
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
force-pushed
the
fix/gcm-aad-binding
branch
from
June 15, 2026 01:12
a3ade20 to
26444f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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