DuDucks
The Privacy-First Identity Layer for Indian Web3.
Created on 25th January 2026
•
DuDucks
The Privacy-First Identity Layer for Indian Web3.
The problem DuDucks solves
DUDUCKS: PRIVACY-PRESERVING AADHAAR VERIFICATION
- OVERVIEW
DuDucks is a privacy-first identity verification protocol. It allows users to prove Aadhaar ownership without revealing personally identifiable information (PII) on-chain. It utilizes TLS Notarization and Zero-Knowledge Proofs (ZK-SNARKs).
- KEY FEATURES
- Automated TLS Notarization: No manual entry required. Data is fetched securely from DigiLocker via a notarized TLS session.
- On-Chain ZK-Verification: Proofs are generated locally and verified by a smart contract on Ethereum Sepolia.
- Wallet Binding: Proofs are cryptographically tied to the user's wallet address (msg.sender) to prevent replay attacks.
- Privacy: No sensitive data (names, IDs) is stored on the blockchain.
- TECH STACK
- Frontend: Next.js, TailwindCSS, Ethers.js
- ZK-Circuits: Circom, SnarkJS (Groth16)
- Smart Contracts: Solidity ^0.8.19 (Hardhat)
- Notarization: TLSNotary-inspired secure proxy for DigiLocker
- PROTOCOL WORKFLOW
-
Connect Wallet: User connects their Ethereum wallet.
-
TLS Notarization: User logs into DigiLocker; the system automatically notarizes the Aadhaar status.
-
ZK Generation: A Groth16 proof is generated proving "hasAadhaar == 1" and binding it to the connected wallet.
-
On-Chain Verify: The proof is submitted to the AadhaarOwnershipZKP contract.
-
Success: The contract emits an 'AadhaarVerified' event.
-
ARCHITECTURE DETAILS
- Circuit: AadhaarVerification.circom
- Public Inputs: walletAddress, aadhaarStatusCommitment, documentHash
- Private Inputs: hasAadhaar, salt, docData
- Contract: AadhaarOwnershipZKP.sol
- verifier: Groth16Verifier (pA, pB, pC, signals)
- logic: Ensures signals[1] == msg.sender
- INSTALLATION & SETUP
-
Clone repo: git clone https://github.com/Dinesh231006/DuDucks_local
-
Install: npm install
-
Config: Set SEPOLIA_RPC_URL, PRIVATE_KEY, and ETHERSCAN_API_KEY in .env.local
-
Deploy: npx hardhat run scripts/deploy.js --network sepolia
-
Run: npm run dev
-
SECURITY
The system ensures data integrity via TLS proofs and user privacy via ZK-SNARKs. Wallet binding ensures that only the intended user can use the proof on-chain.
Challenges we ran into
The TLS (Transport Layer Security) notarization is perhaps the most advanced technical component of the DuDucks protocol. It solves the hardest problem in decentralized identity: "How do you prove a website said something to you without the website having to support Zero-Knowledge Proofs?"
Here is the deep dive into the TLS challenges and how we handled them:
-
The "Web Oracle" Problem
Normally, when you visit DigiLocker, the communication is encrypted between You and DigiLocker. If you tell a smart contract "DigiLocker told me I have an Aadhaar card," the contract has no way to verify that. You could have easily edited the HTML in your browser (inspect element). -
The Solution: Three-Party TLS Notarization
We use a Three-Party TLS handshake (inspired by the TLSNotary protocol).
The Client (User): Communicates with DigiLocker.
The Server (DigiLocker): Provides the Aadhaar data via HTTPS.
The Notary: A blinded auditor that sits in the middle.
The Challenge here was setting up the Notary so it could verify the cryptographic signatures of the TLS session (ensuring the data is authentic) without actually seeing the data.
- Selective Disclosure (Privacy)
A typical HTTPS response from DigiLocker contains a lot of "noise"—your full name, session cookies, tracking IDs, and perhaps your full Aadhaar number.
Challenge: We want to prove you have an Aadhaar, but we don't want the Notary or the Blockchain to see your full profile.
Solution: We implemented Selective Disclosure. The TLS proof allows the user to "redact" (black out) sensitive parts of the encrypted response. We only reveal the specific JSON field: {"has_aadhaar": true} and the document issuance timestamp.
4. Bridge to Zero-Knowledge (TLS → ZK)
One of the biggest hurdles was moving the data from the TLS Layer into the ZK Circuit.
