9.1 Privacy on the Blockchain: Techniques and Protocols
The $1.2 Billion Privacy Problem
On August 8, 2022, the U.S. Treasury Department sanctioned Tornado Cash—a blockchain privacy protocol. The reason? It had been used to launder over $7 billion in cryptocurrency, including $455 million stolen by North Korean hackers.
But here's the paradox: Tornado Cash was also used by 48,000+ legitimate users for privacy-preserving transactions:
- Whistleblowers protecting their identity
- Businesses hiding commercial transactions from competitors
- Individuals avoiding targeted attacks
- Privacy advocates exercising digital rights
The incident crystallized blockchain's fundamental tension:
Blockchains are designed to be transparent:
Every transaction publicly visible
Every address balance trackable
Every interaction permanently recorded
Complete financial history accessible to anyone
But transparency creates serious problems:
Privacy invasion: Your salary, spending, savings all public
Security risk: Attackers can target wealthy addresses
Competitive harm: Businesses reveal strategies
Discrimination: Addresses can be blacklisted
Surveillance: Governments can track everyone
This isn't hypothetical. Real consequences:
Case 1: The $600M Hack Traced (August 2021)
Poly Network hack: $600M stolen
Hackers' addresses immediately known
Every transaction tracked in real-time
Assets frozen when moved to exchanges
Hacker returned funds (nowhere to cash out)
Case 2: $50M+ Stolen via Privacy (2020-2022)
North Korean hackers (Lazarus Group):
Steal crypto from exchanges
Use Tornado Cash to break transaction links
Cash out through anonymous services
Billions laundered successfully
The dilemma:
- Transparency enables accountability but destroys privacy
- Privacy enables crime but protects individuals
- No obvious middle ground
This lesson explores blockchain privacy—both the problem and attempted solutions:
What we'll cover:
- Why Bitcoin isn't anonymous (despite early claims)
- How transaction graph analysis deanonymizes users
- Privacy technologies: mixing, ring signatures, zk-SNARKs
- Tornado Cash: How it works and why it was sanctioned
- Monero, Zcash, and other privacy coins
- The fundamental trade-offs between privacy and transparency
- Whether blockchain privacy is even achievable
Current state (2024):
Bitcoin privacy: Poor (95%+ of addresses eventually linked)
Ethereum privacy: Worse (smart contract interactions reveal more)
Privacy coin usage: <1% of crypto volume
Privacy mixers: Mostly sanctioned or shut down
ZK technology: Promising but complex and expensive
Understanding blockchain privacy matters because:
- Privacy is a human right (UN Declaration, Article 12)
- Commercial viability requires privacy (businesses can't reveal all transactions)
- Security requires privacy (public wealth makes you a target)
- But so does accountability (preventing crime, money laundering, terrorism)
The question isn't whether we need privacy—we do. The question is: Can we have privacy on a transparent blockchain? And at what cost?
The Bitcoin Pseudonymity Myth
Why Bitcoin Isn't Anonymous
The original claim (2008):
Satoshi Nakamoto's Bitcoin whitepaper, Section 10:
"The traditional banking model achieves a level of privacy by limiting access to information... The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone... a new key pair should be used for each transaction to keep them from being linked to a common owner."
The reality:
Bitcoin provides pseudonymity, not anonymity:
Pseudonymity (Bitcoin):
- Addresses are pseudonyms (like "Alice123")
- Transactions between pseudonyms are public
- But pseudonyms can be linked to real identities
Anonymity (what people assumed):
- No link between transactions and identity
- Complete privacy
- Untraceable transactions
Why the distinction matters:
Pseudonymous: Like posting on Reddit with username "CryptoUser42"
- Posts are public
- Username identity unclear initially
- But IP logs, writing style, cross-references reveal identity
- Once linked, entire history exposed
Anonymous: Like Tor browser + anonymous email
- No persistent identifier
- No connection between actions
- Identity revelation doesn't expose history
The Bitcoin Transparency Problem
Every Bitcoin transaction is permanently public:
Transaction example (simplified):
Inputs:
1A1z... : 0.5 BTC
1B2y... : 0.3 BTC
Outputs:
1C3x... : 0.7 BTC (recipient)
1D4w... : 0.1 BTC (change)
Publicly visible:
✓ Input addresses
✓ Input amounts
✓ Output addresses
✓ Output amounts
✓ Transaction time
✓ Fee paid
✓ Complete history of every input (recursive)
What this reveals:
For each address, anyone can see:
- Total balance (unspent outputs)
- Complete transaction history
- All addresses interacted with
- Timing patterns
- Amount patterns
- Connected addresses (transaction graph)
Example analysis:
Address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
(First Bitcoin address, Satoshi's)
Public information:
- Received: 68 transactions
- Total received: 72.48 BTC
- Current balance: 72.48 BTC
- First transaction: Jan 3, 2009 (Genesis block)
- Last transaction: Jan 2024 (recent donation)
- Connected to: 67 other addresses
- Likely owner: Satoshi Nakamoto (known)
All of this visible to ANYONE with internet access
Transaction Graph Analysis
Bitcoin creates a massive transaction graph:
Address A
↓ 2 BTC
Address B
↙ ↘
1 BTC 1 BTC
↓ ↓
Address C Address D
↓ ↓
0.5 BTC 0.8 BTC
↓ ↓
Address E Address F
↓ ↘ ↙ ↓
0.3 BTC
↓
Address G
Connections form massive directed acyclic graph (DAG)
Entire graph publicly queryable
Powerful analysis possible
Common analysis techniques:
1. Address clustering:
Heuristic 1: Common input ownership
If transaction has inputs from addresses A and B,
→ A and B likely controlled by same entity
(Need private keys for both to sign)
Example:
Transaction X:
Inputs: 1A1z..., 1B2y..., 1C3x...
Output: 1D4w... (3.5 BTC)
Conclusion: Addresses 1A1z, 1B2y, 1C3x same owner
Cluster them together
Repeat across entire blockchain
→ Reduces millions of addresses to thousands of entities
2. Change address detection:
Heuristic 2: One output is change
Most transactions have 2 outputs:
- Payment to recipient
- Change back to sender
Pattern:
Transaction from address A:
Input: A (1.0 BTC)
Output 1: B (0.3 BTC) ← Payment
Output 2: C (0.69 BTC) ← Change (probably)
If C is new address (first appearance):
→ C likely change address → owned by A's owner
If C then used as input with A:
→ Confirms C owned by A's owner
3. Temporal analysis:
Transactions from same entity often at similar times
- Same timezone
- Same day-of-week pattern
- Same hour-of-day pattern
Example:
Addresses A, B, C all transact:
- Monday-Friday, 9am-5pm Eastern
- Low activity weekends
→ Likely same U.S. business entity
4. Amount correlation:
Unusual amounts can be signatures:
- Round numbers → Retail purchases
- Specific decimals → Automated systems
- Matching patterns → Same entity
Example:
Multiple addresses sending 0.01234567 BTC
→ Likely same software wallet
→ Same user
5. Transaction fingerprinting:
Wallet software creates unique patterns:
- Fee calculation algorithms
- Output ordering
- Version fields
- Script types
Can identify wallet software:
→ "This is Electrum wallet"
→ "This is Bitcoin Core"
→ "This is Coinbase custody"
Real-World Deanonymization
Case Study: Silk Road (2013)
Silk Road was a darknet market (2011-2013) claiming Bitcoin anonymity. FBI traced anyway:
Silk Road Bitcoin address: 1DXxxx...
Total revenue: ~9.5M BTC over 2 years
FBI analysis:
1. Identified Silk Road's wallet clusters (common inputs)
2. Traced major deposits to exchanges
3. Exchanges provided KYC data (real identities)
4. Cross-referenced with other evidence
5. Connected transactions to Ross Ulbricht
Result: Operator arrested, convicted
Billions in Bitcoin seized
"Anonymous" marketplace traced
From "A Fistful of Bitcoins" paper (2013):
Researchers analyzed 344 Bitcoin services:
Results:
- 40% of services: Easily linked to real identities
- 20% of services: Linked with moderate effort
- 20% of services: Linked with significant effort
- 20% of services: Could not link (proper privacy practices)
Conclusion: 80% of Bitcoin services could be deanonymized
Methods used:
1. Public WHOIS records (domain registration)
2. Social media profiles
3. Email addresses in transactions (OP_RETURN data)
4. IP address logs
5. Transaction graph analysis
6. Timing correlations
Chainalysis and blockchain surveillance:
Modern blockchain analytics companies (Chainalysis, Elliptic, CipherTrace):
Services provided:
- Real-time transaction monitoring
- Address clustering (millions of addresses → entities)
- Entity identification (exchanges, darknet, hackers)
- Risk scoring (probability address is illicit)
- Sanctions screening (OFAC, other lists)
Customers:
- Law enforcement (FBI, Europol, etc.)
- Exchanges (compliance requirements)
- Banks (due diligence)
- Governments (tax enforcement)
Effectiveness:
- 95%+ of Bitcoin addresses can be clustered
- 60%+ can be linked to known entities
- Major hacks traced in real-time
- Criminal arrests increasing
Example:
2016 Bitfinex hack (120,000 BTC stolen)
Every movement tracked
2022: Arrests made, $3.6B recovered
Why Privacy Matters
Beyond criminal activity:
1. Personal security:
Problem: Public wealth is dangerous
Example:
You post Bitcoin address online (e.g., donation address)
Balance: 100 BTC (visible to everyone)
Current value: $4M
Result:
- Targeted for hacking, phishing, scams
- Physical security threat (kidnapping, extortion)
- Social engineering attacks on friends/family
Real incident (2020):
Youtuber posts Bitcoin address
Hackers discover $1M+ balance
SIM-swap attack → phone number stolen
Reset passwords, steal funds
2. Commercial privacy:
Problem: Business transactions public
Example:
Coffee shop accepts Bitcoin
All revenues public:
- Daily sales: $5,000 (50 transactions)
- Supplier payments: $2,000
- Employee salaries: $1,500
- Net profit: $1,500
Consequences:
- Competitors know exact business model
- Suppliers know profit margins (negotiate harder)
- Employees know each other's salaries
- Landlord knows how much you can pay
- Tax authority sees everything
Result: Uncompetitive, unsustainable
3. Financial privacy:
Problem: Personal finance is sensitive
Examples:
- Medical payments reveal health conditions
- Political donations reveal affiliation
- Online purchases reveal preferences
- Salary payments reveal income
- Loan applications reveal debt
With Bitcoin:
All visible permanently
To everyone
Forever
Imagine: Bank account transactions published on public website
No one would accept this
Yet blockchain does exactly this
4. Freedom and human rights:
Problem: Surveillance enables oppression
Use cases requiring privacy:
- Journalists receiving sensitive information
- Whistleblowers reporting corruption
- Dissidents in authoritarian regimes
- Activists organizing protests
- Humanitarian aid in conflict zones
Without privacy:
- Sources compromised
- Whistleblowers prosecuted
- Dissidents arrested
- Activists targeted
- Aid workers endangered
UN Declaration of Human Rights, Article 12:
"No one shall be subjected to arbitrary interference with his privacy..."
Ethereum's Privacy Problem is Worse
Why Ethereum privacy is harder:
Bitcoin:
- Simple transactions (send from A to B)
- Limited metadata
- Mostly payment use case
Ethereum:
- Smart contract interactions (complex)
- Function calls reveal intent
- More metadata (method names, parameters)
- Multiple use cases (DeFi, NFTs, tokens)
Result: More information leakage
Example: DeFi privacy breach:
User interacts with Aave:
0xUser... → Aave.deposit(ETH, amount=10)
→ Aave.borrow(USDC, amount=15000)
Publicly visible:
- User address: 0xUser...
- Action: Deposited 10 ETH (~$20k)
- Action: Borrowed $15k USDC
- Implied: User needs liquidity but bullish on ETH
- Health factor: ~1.33 (calculated from public data)
If ETH drops 20%:
- Anyone can see user is near liquidation
- Front-run with liquidation attempt
- Extract liquidation bonus
- User loses money publicly
Token transfers even worse:
ERC-20 token: All transfers public
USDC transfer: 0xAlice... → 0xBob... : 50,000 USDC
Additional leakage:
- If Bob is exchange: Alice cashing out
- If Bob is merchant: Alice bought something
- If Bob is Bob (known): Alice paying specific person
- If multiple payments: Business relationship
Cross-reference:
- Alice's address on multiple chains
- Alice's other token holdings
- Alice's DeFi positions
- Alice's NFT purchases
Result: Complete financial profile
Available to anyone
NFT purchases reveal even more:
Alice buys CryptoPunk #1234 for 100 ETH
Reveals:
- Wealth: Has 100 ETH
- Taste: Likes CryptoPunks
- Social: Part of NFT community
- Timing: Buying at peak/trough
- Future intent: Likely to buy more NFTs
If CryptoPunk #1234 is specific:
- Trait: "Zombie with Beanie"
- Personal: Might relate to real identity
- Cross-reference: Other zombie owners
- Social graph: Who transferred to Alice
Combined with:
- ENS domain (alice.eth → reveals name)
- Twitter (links address in bio)
- Discord (same address for verification)
Result: Pseudonymity broken
Real identity revealed
Privacy Technologies: Mixing and CoinJoin
The Mixing Concept
Basic idea: Break transaction links by pooling
Without mixing:
Alice → 1 BTC → Bob (direct link)
With mixing:
Alice → 1 BTC → Mixer Pool → 1 BTC → Bob
↓
(many users)
Observer sees:
- Alice sent 1 BTC to mixer
- Bob received 1 BTC from mixer
- But which of many users sent to Bob?
The anonymity set:
Anonymity Set = Number of possible senders
Example:
10 users deposit 1 BTC each
10 users withdraw 1 BTC each
For any withdrawal:
Could have come from any of 10 deposits
Anonymity set: 10
Probability of correct guess: 1/10 = 10%
Larger anonymity set = Better privacy
CoinJoin: Trustless Mixing
Problem with centralized mixers:
Users must trust mixer:
- Not to steal funds
- Not to log transactions
- Not to cooperate with authorities
- Not to be hacked
History: Many mixers stole funds or were compromised
CoinJoin solution (2013):
Proposed by Greg Maxwell, trustless mixing:
Multiple users create single transaction together:
Inputs (from different users):
Alice: 1 BTC from 1A1z...
Bob: 1 BTC from 1B2y...
Carol: 1 BTC from 1C3x...
Outputs (all same amount):
1X... : 1 BTC (one of Alice/Bob/Carol)
1Y... : 1 BTC (one of Alice/Bob/Carol)
1Z... : 1 BTC (one of Alice/Bob/Carol)
Result:
- Single transaction with multiple parties
- Unclear which input funded which output
- No need to trust anyone (atomic)
Why it's trustless:
Transaction only valid if ALL participants sign
If anyone tries to cheat, transaction fails
No funds lost (transaction doesn't go through)
Process:
1. Participants coordinate (off-chain)
2. Build transaction together
3. Everyone signs their input
4. If all sign: Broadcast
5. If anyone doesn't sign: Abort, try again
No trusted third party needed
Wasabi Wallet example:
Popular CoinJoin implementation:
Coordinator: Wasabi server (doesn't custody funds)
Minimum: 0.01 BTC
Fee: 0.3% coordinator fee
Rounds: Automated, every ~hour
Anonymity set: 50-150 per round
Process:
1. Users register inputs
2. Coordinator creates transaction template
3. Users verify and sign
4. Coordinator broadcasts
Users never reveal which output is theirs to coordinator
Zero-knowledge proof confirms they contributed
Limitations of Mixing
1. Timing correlation:
If Alice mixes 1 BTC at time T
And Bob withdraws 1 BTC at time T+5min
→ Likely Alice's funds went to Bob
Mitigation:
- Random delays
- Multiple rounds
- Large anonymity sets
2. Amount correlation:
If Alice mixes 1.23456789 BTC (unusual amount)
And Bob withdraws 1.23456789 BTC
→ Definitely Alice's funds
Mitigation:
- Fixed denominations (0.01, 0.1, 1 BTC)
- No custom amounts
3. Change addresses:
Alice mixes 1.5 BTC:
- Input: 1.5 BTC from 1A...
- Output: 1.0 BTC mixed
- Change: 0.5 BTC to 1B...
Change address links to original:
1A... and 1B... connected (same owner)
If change is later mixed with 1.0 BTC output:
→ Links unmixed change to mixed output
→ Privacy broken
Mitigation:
- Don't mix change with mixed outputs
- Multiple mixing rounds
- Careful UTXO management
4. Sybil attacks:
Attacker controls majority of participants in mix:
Example:
100 participants, attacker controls 90
Real users: Alice, Bob, Carol, ... (10 total)
Attacker: 90 addresses
Attacker sees:
Alice deposits to address X
Only 10 possible withdrawals are real users
→ Anonymity set reduced to 10, not 100
Worse: Attacker might control 99/100
→ Knows exactly which output is Alice's (process of elimination)
Mitigation:
- Reputation systems (hard)
- Proof of work per participant (expensive)
- Identity requirements (defeats purpose)
5. Blockchain heuristics still work:
Even after mixing, patterns remain:
- Wallet fingerprinting
- Temporal patterns
- Transaction graph analysis (broader)
Studies show:
- 20-30% of mixed coins can be re-linked
- Especially if only single mixing round
- Need multiple rounds + careful management
Regulatory Response
Legal status of mixing:
United States (2024):
- Centralized mixers: Considered money transmitters
- Require MSB license, FinCEN registration
- Most are illegal (operating without license)
- Several operators arrested
Tornado Cash (2022):
- Sanctioned by OFAC (Office of Foreign Assets Control)
- Using it became illegal for U.S. persons
- Developer arrested in Netherlands
Other countries:
- EU: Similar restrictions emerging
- China: All crypto transactions illegal
- Offshore: More permissive, but risky
The regulatory argument:
Legitimate uses exist (privacy)
But high percentage illicit:
Chainalysis data (2022):
Tornado Cash usage:
- $7.6B total volume
- $1.5B from illicit sources (20%)
- Major hacks, scams, stolen funds
Comparison:
Traditional finance illicit rate: 2-5%
Tornado Cash: 20%+
Regulators: "Too high to ignore"
Privacy advocates: "Still 80% legitimate use!"
The chilling effect:
After Tornado Cash sanctions:
- Other mixers shut down preemptively
- Developers afraid to work on privacy tools
- Users afraid to mix (even legitimately)
- Privacy research chilled
Result: Less privacy available
Centralizing control
Surveillance increases
Advanced Privacy: Ring Signatures and Monero
The Ring Signature Concept
Problem with mixing: Still shows transaction occurred, just obscures parties
Ring signature solution: Hide sender among a group
Traditional digital signature:
Alice signs message with private key
Anyone can verify: "Alice signed this"
Ring signature:
One of {Alice, Bob, Carol, ... , Zeke} signed message
Anyone can verify: "Someone in this group signed"
But impossible to tell who
Properties:
- Signer ambiguous (could be any group member)
- No setup needed (can include anyone's public key)
- Unconditional privacy (even quantum computers can't break)
Mathematical intuition (simplified):
Alice wants to sign message m
Picks group: {Alice, Bob, Carol}
Alice knows:
- Her private key: sk_A
- Bob's public key: pk_B (from blockchain)
- Carol's public key: pk_C (from blockchain)
Signing process:
1. Generate random values: r_B, r_C
2. Compute: c_B = Hash(m, pk_B, r_B)
c_C = Hash(m, pk_C, r_C)
3. Solve for r_A such that:
c_A = Hash(m, pk_A, r_A)
And: c_A ⊕ c_B ⊕ c_C = 0 (XOR to zero)
Signature: {c_A, c_B, c_C, r_A, r_B, r_C}
Verification:
- Check all hash equations valid
- Check XOR condition
- Don't know which party actually signed
Monero: Anonymous by Default
Monero architecture:
1. Ring Signatures (hide sender):
Every transaction references 10-16 decoy outputs
Looks like it could be spending any of them
Real output hidden among decoys
Transaction example:
Inputs (all appear equally likely):
Output 12345: 1 XMR (decoy)
Output 23456: 1 XMR (decoy)
Output 34567: 1 XMR (REAL, but hidden)
Output 45678: 1 XMR (decoy)
... (11 more decoys)
Observer cannot tell which is real spend
Anonymity set: 16 per transaction
2. Stealth Addresses (hide receiver):
Instead of reusing addresses:
- Recipient publishes "stealth address" (public)
- For each payment, sender generates new one-time address
- Only recipient can detect payment (scanning blockchain)
- Addresses never reused on blockchain
Example:
Alice's stealth address: 4A1z...
Bob sends 1 XMR to Alice
On blockchain:
Output: 1 XMR to 1X2Y3Z... (one-time address)
Only Alice can:
- Scan blockchain for outputs to her
- Compute matching private key
- Spend the funds
Observer sees:
- All addresses used once
- No address reuse
- Cannot tell who received funds
3. RingCT (hide amounts):
Transaction amounts encrypted
Only sender and receiver know amount
Transaction appears as:
Input: ??? XMR (encrypted)
Output: ??? XMR (encrypted)
Fee: 0.001 XMR (public, for miners)
Verification:
- Cryptographic proofs confirm:
* Inputs = Outputs + Fee (no money created)
* Amounts are positive (no negative amounts)
* No overflow errors
- But amounts remain hidden
Technology: Pedersen Commitments + Range Proofs
Combined effect:
Monero transaction reveals: