Transaction clustering using network traffic blockchains analysis - - PowerPoint PPT Presentation

transaction clustering using network traffic
SMART_READER_LITE
LIVE PREVIEW

Transaction clustering using network traffic blockchains analysis - - PowerPoint PPT Presentation

Transaction clustering using network traffic analysis for Bitcoin and derived Transaction clustering using network traffic blockchains analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Alex


slide-1
SLIDE 1

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 1/30

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains

Alex Biryukov, Sergei Tikhomirov

SnT, University of Luxembourg

29 April 2019 Cryblock Paris, France

slide-2
SLIDE 2

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 2/30

Outline

Introduction Network-level privacy of Bitcoin and derivatives Our transaction clustering method Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics Experimental results Discussion Future work

slide-3
SLIDE 3

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 3/30

Outline

Introduction Network-level privacy of Bitcoin and derivatives Our transaction clustering method Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics Experimental results Discussion Future work

slide-4
SLIDE 4

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 4/30

Privacy in cryptocurrencies

◮ Transactions not linked to ”real-world” identity ◮ False sense of privacy: blockchain can be analyzed ◮ Taint analysis, various heuristics ◮ Countermeasures: mixing, cryptography (Monero, Zcash, ...)

slide-5
SLIDE 5

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 5/30

Our focus: network-level privacy

◮ How do messages propagate through the network? ◮ What information does the traffic leak? ◮ Is it possible to link txs by the same user?

slide-6
SLIDE 6

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 6/30

Outline

Introduction Network-level privacy of Bitcoin and derivatives Our transaction clustering method Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics Experimental results Discussion Future work

slide-7
SLIDE 7

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 7/30

Transaction propagation in Bitcoin

◮ Alice: INV (I know an object with hash H) ◮ Bob: GETDATA (I want to get this object) ◮ Alice: TX (Here it is) Bob announces to his neighbors, etc.

slide-8
SLIDE 8

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 8/30

Broadcast randomization

Privacy issue: well-connected adversary infers the original IP. Countermeasures: ◮ trickling: send to a subset once a period ◮ diffusion: send to all after random delays

slide-9
SLIDE 9

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 9/30

Previous work

◮ Biryukov, Khovratovich, Pustogarov (2014) - ”Deanonymisation of clients in Bitcoin P2P network” proposed a method for linking Bitcoin txs to IPs ◮ Key idea: nodes connect to 8 random ”entry nodes”, the ”entry set” is a fingerprint

slide-10
SLIDE 10

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 10/30

Outline

Introduction Network-level privacy of Bitcoin and derivatives Our transaction clustering method Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics Experimental results Discussion Future work

slide-11
SLIDE 11

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 11/30

Understanding relationships between transactions

◮ Connect to many nodes ◮ Log timestamps of received tx announcements ◮ Intuition: we will hear of new txs from Alice or her entry nodes faster than from other nodes

slide-12
SLIDE 12

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 12/30

Parallel connections

◮ Nodes maintain 8 outgoing and 117 (optional) incoming connections ◮ Txs propagate to some neighbors with random delays ◮ If we connect to a node once, the probability of getting a new tx quickly is low ◮ Can we connect to nodes many times in parallel?

slide-13
SLIDE 13

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 13/30

Saturating connection slots

◮ bcclient tool connects to Bitcoin nodes with many parallel connections ◮ We occupy all available slots (avg 64 slots / peer on Bitcoin testnet) ◮ Nodes don’t distinguish incoming and outgoing connections for tx propagation! Occupy 50% of slots – 50% chance of getting a new txs first.

slide-14
SLIDE 14

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 14/30

Weighting timing vectors

◮ Earlier work only considered the first IP to relay a tx ◮ We consider the vector of the first 3 – 7 IPs to relay a tx, and assign them exponentially decreasing weights ◮ High correlation between vectors indicate the same

  • riginator
slide-15
SLIDE 15

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 15/30

Weighting formula

IPs pi get decreasing weights; median IP gets weight 0.5: w(pi) = e−(ti/k)2 where k = tmedian

  • − ln(0.5)
slide-16
SLIDE 16

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 16/30

Weighting timing vectors: example

High values indicate higher probability of an IP to be the

  • riginator or one of its entry nodes.

Figure: Weight function for 3 vectors of timestamps

slide-17
SLIDE 17

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 17/30

Clustering of vectors

◮ For each pair of txs, calculate correlation of weight vectors ◮ Hypothesis: correlation matrix has a block-diagonal structure ◮ Related transactions form clusters along the main diagonal

slide-18
SLIDE 18

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 18/30

Measuring clustering quality

Clustering algorithms decides for each pair of txs whether to put them in one cluster. Rand score reflects the share of right decisions: R = SS + DD SS + SD + DS + DD where ◮ SS: same category, same cluster ◮ DD: different category, different cluster ◮ SD: same category, different cluster ◮ DS: different category, same cluster

slide-19
SLIDE 19

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 19/30

Measuring anonymity

Anonymity degree measures the amount of information an attacker gains compared to perfect anonymity: d = − N

i=1 pilog2(pi)

log2(N) ◮ d = 1: each user has an equal probability of being the

  • riginator of a given message

◮ d = 0: the attacker knows exactly the originators of all messages

slide-20
SLIDE 20

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 20/30

Outline

Introduction Network-level privacy of Bitcoin and derivatives Our transaction clustering method Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics Experimental results Discussion Future work

slide-21
SLIDE 21

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 21/30

Putting the pieces together

◮ Connect to many nodes in parallel, log tx announcements (use geographically distributed servers for better view of the network) ◮ Assign weights to vectors of timestamps ◮ Calculate correlations between pairs of weight vectors ◮ Apply a spectral clustering algorithm (sklearn) ◮ Choose best parameters from ”learning set” of txs ◮ Calculate anonymity degree on ”control set” of txs

slide-22
SLIDE 22

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 22/30

Experiment (Bitcoin testnet)

Black lines: control txs. d: 0.63, precicion: 0.75, recall: 0.8.

slide-23
SLIDE 23

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 23/30

Outline

Introduction Network-level privacy of Bitcoin and derivatives Our transaction clustering method Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics Experimental results Discussion Future work

slide-24
SLIDE 24

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 24/30

Discussion

◮ Tx announcement timings reveal relationships between transactions, even with diffusion ◮ The technique works on testnet, worse on mainnet (though we didn’t try to perform a full-scale attack) ◮ Cryptographic defenses (ZKPs, etc) don’t work: we don’t consider tx content

slide-25
SLIDE 25

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 25/30

Countermeasures

◮ For users

◮ Don’t issue many txs in the same session ◮ Run nodes with increased number of connection

◮ For cryptocurrency developers

◮ Implement stronger broadcast randomization ◮ Periodically drop and re-establish connections randomly ◮ Increase the default number of connections

Of course, there are performance trade-offs.

slide-26
SLIDE 26

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 26/30

New propagation mechanism for Bitcoin

◮ Dandelion: a proposal for new propagation mechanism for Bitcoin (BIP 156) ◮ Defeats our attack by distinguishing incoming and

  • utgoing connections (it’s hard to force a remote node

to connect to us)

slide-27
SLIDE 27

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 27/30

Outline

Introduction Network-level privacy of Bitcoin and derivatives Our transaction clustering method Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics Experimental results Discussion Future work

slide-28
SLIDE 28

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 28/30

Alternative cryptocurrencies

◮ In this work, we only consider Bitcoin. ◮ Does our technique apply to coins other than Bitcoin? Some coins are based on Bitcoin’s codebase (Zcash), some are not (Monero). ◮ How good is network-level privacy in other coins?

slide-29
SLIDE 29

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 29/30

Mobile wallets

◮ In our experiments, txs were issues from a full node. ◮ Does the technique apply to transactions issued from mobile wallets? ◮ How are mobile wallets different in terms of networking?

slide-30
SLIDE 30

Transaction clustering using network traffic analysis for Bitcoin and derived blockchains Biryukov, Tikhomirov Introduction Network privacy Our transaction clustering method

Parallel connections Weighting timestamp vectors Clustering the correlation matrix Metrics

Experimental results Discussion Future work 30/30

Questions?

◮ cryptolux.org ◮ s-tikhomirov.github.io