Interactive demo — progress through 6 sections to understand the concept
1 / 6
Vanity NPUB Grinding
Generate random secp256k1 keypairs until the NPUB contains your chosen word. This is "vanity mining" — anyone can do it.
Keys Generated
0
Keys / sec
0
Best Match
—
Key insight: Anyone can generate this same prefix. Same computational cost for everyone.
2 / 6
The Problem: No Asymmetry
Here are two keypairs, both with "sat" in their NPUB. Anyone can make these. There's no way to tell them apart.
4×45×56×67×7
Larger = harder to forge = more asymmetric. Smaller windows are too easy for an attacker to replicate.
Understanding the Metrics
The scanner uses two metrics to find the best fingerprint pattern. Here's what they mean and why we combine them.
Z-Score: How Rare Is This Pattern?
The z-score measures how unusual a window is compared to random expectation.
z = (expected_entropy − actual_entropy) ÷ σ
Where σ (standard deviation) measures how much entropy normally varies in random windows. Here's how it's calculated:
σ = √( (1/n) × Σ (Hᵢ − H̄)² )
Step by step:
Step 1: Generate thousands of random NPUBs Step 2: Measure each window's entropy Hᵢ Step 3: Calculate the average (mean) entropy H̄ = 3.57 bits for W=16 Step 4: For each window, compute how far it deviates from the mean: (Hᵢ − H̄) Step 5: Square each deviation: (Hᵢ − H̄)² — squaring makes all values positive and emphasizes outliers Step 6: Average all squared deviations, then take the square root: that's σ
For W=16: H̄ = 3.571 bits, σ = 0.187 bits
A random 16-character window has ~3.57 bits of entropy on average, with σ=0.187. If we find one with only 1.5 bits, that's (3.571 − 1.5) ÷ 0.187 = z=11.1 — eleven standard deviations below the mean.
z = 2 → 2σ below mean → top 2.3% of windows (1 in 43) z = 4 → 4σ below mean → top 0.003% (1 in 33,000) z = 8 → 8σ below mean → astronomically rare
Higher z = harder for an attacker to replicate by chance. This is our anti-forgery metric.
Unique Characters: How Recognizable Is This?
A 16-character window with only 3 unique characters looks like:
Same window size. Same z-score. But one is instantly recognizable and the other looks like noise. Fewer unique characters = bigger blocks of the same color = more recognizable to humans.
Quality: The Best of Both Worlds
quality = 10·log₁₀(z ÷ (unique_chars)³) dB
Logarithmic scale — like audio decibels. Every 10 dB is a 10× difference in raw quality. This spreads small values into a readable range:
Pattern
z
unique
quality
verdict
W=16, 3 chars
8.0
3
−5.3 dB
★ recognizable + rare
W=49, 8 chars
5.0
8
−20.1 dB
rare but unrecognizable
W=16, 2 chars
5.0
2
−2.0 dB
★ very recognizable
W=25, 7 chars
6.0
7
−17.6 dB
meh
The scanner optimizes for the highest quality score. This naturally selects patterns that are both rare (high z) and human-recognizable (few unique chars).
Key insight: Both have 'sat' in their NPUB. Both cost the same. Which is Alice's? You cannot tell. This is why vanity alone doesn't prevent phishing.
3 / 6
Low-Entropy Discovery
Now we scan the first NPUB from Section 2 with a multi-scale entropy scanner. We look for naturally-occurring low-entropy (repetitive) windows — outliers that were never designed, just discovered.
Key insight: This outlier was DISCOVERED, not constructed. It exists naturally. Finding it costs nothing beyond the initial key generation.
4 / 6
The Asymmetry
Alice's fingerprint (left) was discovered for free. An attacker (right) generates a new key with the same vanity prefix — but their fingerprint is completely different.
Key insight: Alice found her outlier for free among millions of candidates. An attacker must not just find ANY outlier — they must replicate ALICE'S EXACT outlier: same characters, same position, same window size. That costs millions of times more.
5 / 6
Vanity + Anti-Phish: Split Zones
The complete identity system combines a human-readable vanity prefix (green zone) with the machine-discovered anti-phish fingerprint (orange zone).
Key insight: An attacker can replicate the green zone cheaply, but not the orange zone. Together they form an asymmetric identity that's easy to verify and extremely hard to forge.
6 / 6
Offset Grinding: Trustless Service
A grinding service can find a vanity offset for your NPUB using ONLY your public key. It computes P + d·G for d=1,2,3... — never seeing your secret key.
Leave NPUB blank for a demo key, or paste a real npub1... to grind a vanity offset for it live.
Offsets Tried
0
Rate / sec
0
Key insight: The service NEVER saw your secret key. It only used your public key. The offset is useless to anyone who doesn't have your nsec.