Interactive cryptography education for the quantum age
Open ZK Lab โ
XDC ZK Lab is an educational platform for learning about two critical areas of modern cryptography:
Prove something is true without revealing WHY it's true. Used for privacy, voting, and scalability.
Cryptographic algorithms that remain secure against attacks from quantum computers.
Current blockchain cryptography (ECDSA, BLS) relies on mathematical problems that quantum computers can solve efficiently using Shor's Algorithm.
When large-scale quantum computers arrive, they could:
Hash functions (Keccak-256, SHA-3) remain relatively secure. Quantum computers only reduce their effective security by half (Grover's algorithm).
Experts estimate "Q-Day" (when quantum computers break ECDSA) could arrive between 2030-2040. However, blockchain data is permanentโan attacker could store encrypted data now and decrypt it later.
A commitment scheme lets you "lock in" a value without revealing it. Later, you can prove you committed to that exact value.
commitment = hash(secret + salt)
// Later, to reveal:
verify: hash(revealed_secret + salt) == commitment
Type any value (e.g., your vote, a number, a password)
A random salt is auto-generated. Save itโyou'll need it to reveal later.
Click to generate. Share the commitment hash (it reveals nothing about your secret).
To prove what you committed, provide the secret + salt. Anyone can verify.
Unlike ECDSA, hash-based signatures rely only on the security of hash functionsโwhich remain quantum-safe.
// Key Generation
private_key = random_bytes()
public_key = hash(private_key)
// Signing
signature = hash(private_key + message)
// Verification
verify: hash(derived_key + message) == signature
Creates a quantum-safe public/private key pair
Enter any message and generate a signature
Anyone with the public key can verify the signature is valid
Merkle trees let you prove an item belongs to a set without revealing the entire set. Foundation of ZK-rollups, airdrops, and state proofs.
[Root Hash]
/ \
[Hash AB] [Hash CD]
/ \ / \
[A] [B] [C] [D]
To prove "B" is in the tree, you only need:
This is O(log n) data instead of O(n)โvery efficient for large sets!
Enter items (one per line) and build the Merkle tree
Enter an item to get its inclusion proof
Given root + item + proof, verify inclusion
| Algorithm | Type | Classical | Quantum | Used In |
|---|---|---|---|---|
| ECDSA | Signature | โ Safe | โ Broken | BTC, ETH, XDC |
| BLS | Signature | โ Safe | โ Broken | ETH Validators |
| Keccak-256 | Hash | โ Safe | โ 128-bit* | ETH Addresses |
| SPHINCS+ | Signature | โ Safe | โ Safe | NIST Standard |
| Dilithium | Signature | โ Safe | โ Safe | NIST Standard |
| STARKs | ZK Proof | โ Safe | โ Safe | StarkNet |
| SNARKs | ZK Proof | โ Safe | โ Pairing-based | Zcash, zkSync |
* Grover's algorithm halves effective hash security
The Ethereum Foundation is actively researching post-quantum solutions:
As an EVM-compatible chain, XDC will benefit from Ethereum's post-quantum research. Key considerations:
Blockchain data is permanent. "Harvest now, decrypt later" attacks mean sensitive transactions today could be exposed decades from now. Early preparation is essential.