Remote Side-Channel Attacks on Anonymous Transactions In Zcash - - PowerPoint PPT Presentation

remote side channel attacks on anonymous transactions
SMART_READER_LITE
LIVE PREVIEW

Remote Side-Channel Attacks on Anonymous Transactions In Zcash - - PowerPoint PPT Presentation

Remote Side-Channel Attacks on Anonymous Transactions In Zcash & Monero Florian Tramr and Dan Boneh and Kenny Paterson USENIX Security Symposium Meet Alice the Anonymous Activist Blogger PK A anonymous 2 Alices Lack of Privacy Send


slide-1
SLIDE 1

Remote Side-Channel Attacks on Anonymous Transactions

Florian Tramèr and Dan Boneh and Kenny Paterson USENIX Security Symposium

In Zcash & Monero

slide-2
SLIDE 2

Meet Alice the Anonymous Activist Blogger

2

anonymous PKA

slide-3
SLIDE 3

3

The activist just received $5 from Bob

Alice’s Lack of Privacy

Send $5 to PKA Signed by SKBob

slide-4
SLIDE 4

4

Send $5 to PKBob Signed by SKA

Alice’s Lack of Privacy

This P2P node belongs to the activist!

slide-5
SLIDE 5

5

Alice’s Lack of Privacy

slide-6
SLIDE 6

6

???

The Solution: Anonymous Transactions

Send Enc($5) to Enc(PKA) Signed by Enc(SKBob) + zk-proof π

  • Bob received $5 from previous txs
  • These funds haven’t been spent yet
  • Bob knows SKbob

Zcash, Monero and others

slide-7
SLIDE 7

7

Our Attacks: Identifying Transaction Recipients

I know which node belongs to the transaction recipient Send Tx to Enc(PKA)

slide-8
SLIDE 8

8

Our Attacks: Linking an Address to a Node

I know which P2P node belongs to the activist Send Tx to Enc(PKA)

slide-9
SLIDE 9

Summary of Results

Remote side-channel attacks on various system components

  • f anonymous transactions
  • 1. A general attack framework for any anonymous transaction system
  • 2. Specific attack instantiations for Zcash and Monero
  • Determine the P2P node of any transaction recipient
  • Link a (diversified) public key to an IP address
  • 3. Attacks beyond de-anonymization (for Zcash):
  • Remotely crash user nodes

∼ Remotely extract a user’s secret viewing key ∼ Learn transaction amounts by timing a zk-proof generation

9

slide-10
SLIDE 10

Summary of Results

10

We have disclosed these vulnerabilities to Zcash and Monero and they have all been fixed! The general issues we found, and the lessons we learned, extend to other anonymous payment systems Þ Getting the cryptography right is not enough! Remote side-channel attacks on various system components

  • f anonymous transactions
slide-11
SLIDE 11

Summary of Results

11

Remote side-channel attacks on various system components

  • f anonymous transactions
  • 1. A general attack framework for any anonymous transaction system
  • 2. Specific attack instantiations for Zcash and Monero
  • Determine the P2P node of any transaction recipient
  • Link a (diversified) public key to an IP address
  • 3. Attacks beyond de-anonymization (for Zcash):
  • Remotely crash user nodes

∼ Remotely extract a user’s secret viewing key ∼ Learn transaction amounts by timing a zk-proof generation

slide-12
SLIDE 12

12

De-anonymizing Zcash Transactions

slide-13
SLIDE 13

13

OnReceive(Tx={Comm,C,...}): 1) Note = Decrypt(SKA, C) 2) if Note = ⊥, return 3) ($v, r) = Note 4) Check that Comm = Commit(PKA, $v; r) Commitment to a “coin” Commitment

  • pening encrypted

under the recipient’s public key This check ensures that the coin is spendable

(public key crypto)

Receiving Transactions in Zcash

slide-14
SLIDE 14

14

Send Tx to Enc(PKA) Ping That took a while... Tx Tx Pong Oh this one’s for me J let me check the commitment Wallet P2P Node

The PING Attack

slide-15
SLIDE 15

15

Adversary can use timing side-channel to infer receiver of any Tx

~1.5ms

London Zürich

The PING Attack

slide-16
SLIDE 16

P2P node and wallet are tightly decoupled Þ Node & wallet are in completely different layers of the protocol stack Þ The P2P node should just act as a DB for the wallet

Improved Design: (and now also in !)

16

Tx Tx

Give me all the new Txs P2P Node Wallet

Tx Tx Tx Tx Tx Tx Tx

Check if I got paid

What Went Wrong?

slide-17
SLIDE 17

So why was Monero also vulnerable?

17

slide-18
SLIDE 18

Timing of wallet’s requests leaks wallet’s processing time Monero P2P node acquires global mutex to process a request

18

while True: txs = request_txs() process(txs) sleep(60)

Time between requests = 60s + time to process txs Request Txs

Exploiting Leaks at Synchronization Points

Request Txs ...

F i x e d !

slide-19
SLIDE 19

Timing side channels in zkSNARK proof generation

19

Send Enc($5) to Enc(PKBob) Signed by Enc(SKA) + zk-proof π Cryptographic proof that the transaction is valid Zero-knowledge: proof leaks nothing about PKBob, SKA, $5, ..., right?

slide-20
SLIDE 20

Timing side channels in zkSNARK proof generation

20

Transaction generation time leaks (some) information about value!

slide-21
SLIDE 21

Anonymity is hard!

  • Flaws are not (only) in the complicated cryptography
  • Be careful when inheriting designs from non-anonymous

currencies (e.g., Bitcoin → Zcash)

  • Develop constant-time crypto implementations

Anonymity = good crypto + good systems design

21

https://crypto.stanford.edu/timings tramer@cs.stanford.edu

Conclusions and Lessons Learned