feat:added pq-bridge#133
Open
vinaysingh8866 wants to merge 2 commits into
Open
Conversation
Signed-off-by: Vinay Singh <vinay@verid.id>
Signed-off-by: Vinay Singh <vinay@verid.id>
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.
Add PQ-Bridge 1.0 Protocol
Summary
This PR introduces the PQ-Bridge 1.0 protocol, which adds post-quantum (PQ) key exchange, hybrid encryption, and PQ signatures on top of any DIDComm v2 connection. It is a bridge — a stable, interoperable wire format for adding NIST FIPS 203 (ML-KEM) and FIPS 204 (ML-DSA) protection to DIDComm traffic until the DIDComm core specification adopts these primitives natively. The protocol runs after a DIDComm connection reaches
completed, negotiates a PQ suite via Discover Features, exchanges encapsulation keys, derives a session-bound shared secret, and optionally upgrades subsequent message bodies and attachments to hybrid encryption (classical + PQ) so that breaking the channel requires breaking both primitives.Motivation
DIDComm v2 today uses classical X25519/Ed25519 for authcrypt and signing. A sufficiently capable quantum adversary could break these primitives with Shor's algorithm, and the harvest-now-decrypt-later threat is already real: an attacker recording today's DIDComm traffic can decrypt it years later when quantum hardware matures.
Three options exist to address this:
This protocol is option 3. It does not modify DIDComm authcrypt or replace existing JOSE primitives; instead, it adds a second cryptographic layer sitting inside DIDComm message bodies. When DIDComm core eventually adopts ML-KEM and ML-DSA in JWE/JWS, this protocol can be deprecated cleanly.
Key Features
Suite Negotiation
propose-upgrade/accept-upgrade/decline-upgradeflowSuite Registry
pq-suite-p1pq-suite-p2pq-suite-p3pq-suite-h1pq-suite-h2pq-suite-x1Modes
pq-onlyhybrid-encrypthybrid-signhybrid-fullhybrid-encryptis the recommended default: body decryption requires breaking both classical and PQ primitives.Transcript Binding
transcript_hashover canonical proposed-suites/modes/nonces mixed into HKDFkem-confirmMAC catches MITM/transcript divergence before app data flowsReplay Protection
propose-upgrade32-bytenoncetranscript_hash+kidin seen-setKey Rotation
rotate-keywithgenerationcounterConcurrent Initiation Tie-Break
Mismatched byte lengths MUST be rejected before any cryptographic processing.
Security Highlights
Recommended Rollout
hybrid-encryptwithpq-suite-h1pq-signatureand signedpq-envelopepq-bridge/1.0, refuse non-standard predecessorsUse Cases
$refpointers wrapped inpq-envelope