B++ Logo

Privacy Techniques

Bitcoin transactions are pseudonymous, not anonymous. Various techniques can improve privacy by breaking the linkability between transactions and making blockchain analysis more difficult.

Privacy Challenges

Blockchain Analysis

All transactions are public:

Public Information:
- Transaction amounts
- Input/output addresses
- Transaction graph
- Timing patterns

Common-Input-Ownership Heuristic

Analysts assume all inputs to a transaction belong to the same entity:

Transaction:
Input 1: Address A
Input 2: Address B
Input 3: Address C

Assumption: A, B, and C are all controlled by same person

Privacy Techniques

1. CoinJoin

CoinJoin combines multiple transactions into one:

Standard Transaction:
Alice → Bob: 1 BTC

CoinJoin Transaction:
Alice + Charlie + Dave → Bob + Eve + Frank: Mixed amounts

Benefits:

  • Breaks common-input-ownership heuristic
  • Hides individual transaction amounts
  • Makes analysis difficult

Implementations:

  • Wasabi Wallet: WabiSabi protocol
  • JoinMarket: Maker-taker model
  • Samourai Wallet: Whirlpool

2. Payjoin (P2EP)

Payjoin involves both sender and receiver:

Standard Transaction:
Alice (inputs) → Bob (output)

Payjoin Transaction:
Alice (inputs) + Bob (inputs) → Alice (change) + Bob (output)

Benefits:

  • Breaks common-input-ownership
  • Looks like normal transaction
  • No coordination overhead

3. Address Reuse Avoidance

Never reuse addresses:

Bad:
- Receive multiple payments to same address
- Links all payments together
- Reveals transaction history

Good:
- Generate new address for each payment
- HD wallets do this automatically
- Better privacy

4. Coin Selection

Privacy-aware coin selection:

Strategies:
- Avoid linking transactions
- Use smaller UTXOs when possible
- Don't consolidate unnecessarily
- Consider timing patterns

Code Examples

CoinJoin Implementation


Advanced Privacy

Silent Payments (BIP 352)

Silent Payments enable reusable addresses without address reuse:

Traditional:
- Recipient shares address
- Address reused → Privacy loss

Silent Payments:
- Recipient shares static identifier
- Sender derives unique address per payment
- No address reuse
- Better privacy

Taproot Privacy

Taproot provides better privacy:

Multisig Transaction:
- Key path: Looks like single-sig
- Script path: Only reveals used condition
- Other conditions hidden in MAST

Best Practices

For Users

  1. Use HD wallets: Automatic address generation
  2. Avoid address reuse: Generate new addresses
  3. Consider CoinJoin: For high privacy needs
  4. Use Taproot: Better privacy by default
  5. Be careful with change: Change outputs link transactions

For Developers

  1. Implement address rotation: Never reuse addresses
  2. Support privacy features: CoinJoin, Payjoin
  3. Privacy-aware coin selection: Don't link transactions
  4. Educate users: Explain privacy implications

Limitations

What Privacy Techniques Can't Do

  1. IP address: Network layer still reveals IP
  2. Timing analysis: Patterns can reveal links
  3. Amount analysis: Large amounts are distinctive
  4. Perfect anonymity: Not achievable on public blockchain

Trade-offs

  • Privacy vs. Convenience: More privacy = more complexity
  • Privacy vs. Cost: CoinJoin has fees
  • Privacy vs. Speed: Some techniques add delays


Resources