-
Notifications
You must be signed in to change notification settings - Fork 10
Add SD-JWT selective disclosure guidance for credential privacy #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chongkan
wants to merge
1
commit into
w3c-ccg:main
Choose a base branch
from
chongkan:sd-jwt-credential-guidance
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -235,13 +235,52 @@ where all supported dids are assumed to be capable of deactivation. | |||||||||||||
|
|
||||||||||||||
| ### Key Derivation Lacks Proof | ||||||||||||||
|
|
||||||||||||||
| Some implementations might utlize a key derivation function, e.g., when | ||||||||||||||
| converting from an ed25519 public key to a Curve25519 ECDH key, used in the | ||||||||||||||
| Some implementations might utlize a key derivation function, e.g., when | ||||||||||||||
| converting from an ed25519 public key to a Curve25519 ECDH key, used in the | ||||||||||||||
| keyAgreement verification method (in did-key, and perhaps in future CAIP-based | ||||||||||||||
| pkh implementations). It is expected that this is a relatively safe operation, | ||||||||||||||
| but implementers might consider that there exists no mathematical proof that | ||||||||||||||
| pkh implementations). It is expected that this is a relatively safe operation, | ||||||||||||||
| but implementers might consider that there exists no mathematical proof that | ||||||||||||||
| confirms this assumption. | ||||||||||||||
|
Comment on lines
+241
to
243
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| ### Credential Privacy and Selective Disclosure | ||||||||||||||
|
|
||||||||||||||
| Since `did:pkh` identifiers are derived from public blockchain addresses, they | ||||||||||||||
| are inherently correlatable — the same address is visible on-chain and used as | ||||||||||||||
| the DID. This makes credential privacy particularly important. | ||||||||||||||
|
|
||||||||||||||
| Credentials issued to `did:pkh` holders SHOULD use | ||||||||||||||
| [SD-JWT](https://datatracker.ietf.org/doc/html/rfc9449) (Selective Disclosure | ||||||||||||||
| for JWTs) to minimize data exposure during presentation: | ||||||||||||||
|
|
||||||||||||||
| 1. **Issuance:** The issuer creates an SD-JWT credential with per-claim salts | ||||||||||||||
| and hashes, bound to the `did:pkh` holder's key via Key Binding. | ||||||||||||||
| 2. **Storage:** The holder stores the full SD-JWT off-chain (wallet, device). | ||||||||||||||
| No credential data is stored on-chain. | ||||||||||||||
| 3. **Presentation:** The holder discloses only the claims required by the | ||||||||||||||
| verifier's presentation definition. For example, proving `age >= 18` | ||||||||||||||
| without revealing date of birth or name. | ||||||||||||||
| 4. **Verification:** The verifier resolves the `did:pkh`, retrieves the | ||||||||||||||
| holder's public key from the DID Document, and verifies the SD-JWT | ||||||||||||||
| signature and Key Binding proof. | ||||||||||||||
|
|
||||||||||||||
| **Key Binding algorithms by network:** | ||||||||||||||
|
|
||||||||||||||
| | Network | Key Binding Algorithm | | ||||||||||||||
| |---|---| | ||||||||||||||
| | Ethereum, Polygon, Celo, Bitcoin, Dogecoin | `ES256K` (secp256k1) | | ||||||||||||||
| | Solana | `EdDSA` (Ed25519) | | ||||||||||||||
| | Tezos (tz1) | `EdDSA` (Ed25519) | | ||||||||||||||
|
|
||||||||||||||
| Key Binding prevents credential replay — a stolen SD-JWT cannot be presented | ||||||||||||||
| by an attacker who does not control the holder's private key. | ||||||||||||||
|
|
||||||||||||||
| **Correlation mitigation:** Since `did:pkh` maps 1:1 to a blockchain address | ||||||||||||||
| and cannot be rotated or aliased, holders concerned about cross-verifier | ||||||||||||||
| correlation SHOULD use the `alsoKnownAs` link to a DID method that supports | ||||||||||||||
| pairwise identifiers (e.g., ENS subdomains via `did:ens`, or `did:peer` for | ||||||||||||||
| ephemeral sessions). The `did:pkh` remains the cryptographic anchor; the | ||||||||||||||
| pairwise DID is what gets shared with verifiers. | ||||||||||||||
|
|
||||||||||||||
| ## Ref Impl | ||||||||||||||
|
|
||||||||||||||
| |Author|name of implementation|link to pkh libraries|date registered| | ||||||||||||||
|
|
||||||||||||||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.