generated from decentralized-identity/template-for-work-items
-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP: examples section #10
Open
kimdhamilton
wants to merge
1
commit into
main
Choose a base branch
from
examples
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 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 |
---|---|---|
|
@@ -86,8 +86,63 @@ It is not assumed that Verifiers will: | |
- Handling of Aadhaar photo changes | ||
- Procedures for refreshing nullifiers | ||
- Management of invalid nullifier lists | ||
|
||
## 6. Example Implementations | ||
|
||
### Anon Aadhaar: Selective Disclosure Atop Government-Issued IDs | ||
|
||
#### Workflow | ||
|
||
**Inputs**: | ||
- `nullifierSeed` from Verifier (for application scoping) | ||
- UIDAI-signed QR code (e-Aadhaar PDF/mAadhaar app) containing user identity data | ||
|
||
**Proof Flow**: | ||
1. User scans QR code | ||
2. Prover verifies and generates proof | ||
- Extracts signed data bytes and RSA signature | ||
- Verifies signature on signed data and authenticates signing key against UIDAI's RSA public key from [governance endpoint](https://uidai.gov.in/publickey) | ||
- Generates `nullifier`, a function of `nullifierSeed`, photo bytes, and identity data fields (to prevent reuse). | ||
- Converts timestamp on signed data to UNIX UTC to include in output | ||
- Optionally reveals age >18, gender, state, or pincode. | ||
3. Proof Submission | ||
- Submits proof, nullifier, timestamp, and public inputs to verifier. | ||
|
||
 | ||
|
||
**Details on Role of Timestamp and Nullifiers** | ||
Anon Aadhaar mitigates specific threats as follows: | ||
|
||
1. Proof Freshness: Timestamp from Aadhaar QR Code | ||
- The UIDAI-signed timestamp in the QR code ensures the Aadhaar data is recent (e.g., ≤30 days old). | ||
- Verifiers enforce validity windows (e.g., reject proofs with timestamps older than 30 days). | ||
2. Prevent Proof Relay and Cross-Verifier Correlation: Nullifier and Nullifier Seed | ||
- Verifier-specific `nullifierSeed` ensures unique `nullifier = SHA-256(nullifierSeed || photoBytes)`. | ||
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. Maybe we can generalize here and specify |
||
- Reused proofs are detected/rejected by checking nullifier registry | ||
- Unique `nullifierSeed` per verifier ensures distinct nullifiers for the same user across apps; prevents tracking users across services (e.g., healthcare vs. finance apps). | ||
|
||
### OpenPassport: NFC-Based Identity Verification Without Live Issuer Endpoints | ||
OpenPassport verifies electronic passports’ NFC chip data. Unlike Aadhaar’s UIDAI endpoint, passports lack live issuer APIs, necessitating alternative freshness mechanisms. | ||
|
||
#### Workflow | ||
- User scans passport’s NFC chip, extracting signed datagroups (name, DOB, nationality) and the issuing authority’s RSA public key. | ||
- The ZKP circuit: | ||
- Checks passport signature validity using the country’s public key (from ICAO’s registry). | ||
- Selectively disclosures user-selected attributes (e.g., nationality, age) | ||
- Nullifier: Generated from immutable fields (DOB, passport number) to link proofs across sessions: | ||
- User Nullifier: Session-specific hash (e.g., random nonce) for one-time use11. | ||
|
||
**Freshness Enforcement**: | ||
- Passport Issuance Date: Circuits reject proofs from passports issued >10 years ago. | ||
- On-Chain Revocation: Integrates with Ethereum’s ERC-948 registries to check revocation status | ||
|
||
**Threat Mitigation**: | ||
- ZKP verifies RSA signatures against ICAO’s public key registry; revoked keys are excluded via governance votes. | ||
- Verifier-specific salts (e.g., per-verifier nonces) prevent correlation across verifiers | ||
- On-chain revocation checks and issuance-date filters compensate for lack of live issuer endpoints. | ||
|
||
## References | ||
|
||
1. [Anon Aadhaar Specification](https://github.com/zkspecs/zkspecs/blob/main/specs/2/README.md) | ||
2. [Aadhaar Secure QR Code](https://uidai.gov.in/en/ecosystem/authentication-devices-documents/qr-code-reader.html) | ||
2. [Anon Aadhaar - How does it work](https://documentation.anon-aadhaar.pse.dev/docs/how-does-it-work) | ||
3. [Aadhaar Secure QR Code](https://uidai.gov.in/en/ecosystem/authentication-devices-documents/qr-code-reader.html) |
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.
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.
It's a third parameter