Attacks on Mining Protocol Yujin Kwon KAIST 2018.03.22 1 - - PowerPoint PPT Presentation

attacks on mining protocol
SMART_READER_LITE
LIVE PREVIEW

Attacks on Mining Protocol Yujin Kwon KAIST 2018.03.22 1 - - PowerPoint PPT Presentation

Attacks on Mining Protocol Yujin Kwon KAIST 2018.03.22 1 Cryptocurrencies Cryptocurrencies Increa rease! se! Cryptocurrencies Increa rease! se! 1 BTC $8.5K 1 ETH $180 Proof-of-Work Mining They use blockcha kchain to run


slide-1
SLIDE 1

Attacks on Mining Protocol

1

Yujin Kwon KAIST 2018.03.22

slide-2
SLIDE 2

Cryptocurrencies

slide-3
SLIDE 3

Cryptocurrencies

Increa rease! se!

slide-4
SLIDE 4

Cryptocurrencies

1 BTC≈ $8.5K 1 ETH≈ $180

Increa rease! se!

slide-5
SLIDE 5

Proof-of-Work Mining

 They use blockcha kchain to run without a trusted third party.  Miners generate blocks by spending their comp mputatio utationa nal power er.  If a miner generates a valid block, he earns re rewar ard d for t r the block.  This process is competi etiti tive ve.

12.5 5 BTC

Block

  • ckch

chain ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

Miner ner

slide-6
SLIDE 6

Proof-of-Work Mining

 Problem

– Miners must solve cryptographic problems to generate a valid block. – What is the valid nonce such that 𝐼(𝑑𝑝𝑜𝑢𝑓𝑜𝑢𝑡| 𝑜𝑝𝑜𝑑𝑓 < TARGET𝐺 ? – 𝐼(∙) is a hash function based on SHA-256 in Bitcoin.

Nonce

slide-7
SLIDE 7

Step (Miner)

 New transactions are broadcast to all nodes.  Each node collects new transactions into a block.  Each node works on finding a difficult proof-of-work for its block.  When a node finds a proof-of-work, it broadcasts the block to all nodes.  Nodes express their acceptance of the block by working on creating the next chain, using the hash of the accepted block as the previous hash.

slide-8
SLIDE 8

Forks

slide-9
SLIDE 9

Forks

slide-10
SLIDE 10

Forks

slide-11
SLIDE 11

Forks

slide-12
SLIDE 12

Forks

slide-13
SLIDE 13

Forks

 Only one head is accepted as a valid one among heads.  An attacker can generate forks intentionally by holding his found block for a while.

slide-14
SLIDE 14

Forks

 Only one head is accepted as a valid one among heads.  An attacker can generate forks intentionally by holding his found block for a while.

slide-15
SLIDE 15

Mining Difficulty

Ti Time Di Diffic iculty ulty

Inc ncrease! rease!

From “https://blockchain.info”

slide-16
SLIDE 16

Mining Pool

AntPool

  • l

23% 23% F2Pool 11% 11% BitFury 11% 11% BTCC 11% 11% Slush 7% 7%

BW.COM COM

7% 7%

BTC.COM C.COM

7% 7% Others rs 23% 23%

 Miners organize pools and prefer to mine together to reduce the variance of reward.  Currently, major players are pools.

Bitcoin Ethereum Litecoin

Ethpool

  • ol

27% 27% F2Pool 23% 23% nano 11% 11% MPH 10% 10% Ethfans ans 8% 8% Others rs 21% 21% AntPool

  • l

30% 30% F2Pool 30% 30% LTC.top 10% 10% ViaBTC 10% 10%

BW.COM COM

6% 6% Litecoi

  • in

6% 6% Others rs 8% 8%

slide-17
SLIDE 17

Mining Pool

Workers

  • 1. Give the problem.

Pool manager

PPoW: 𝐼(𝑑𝑝𝑜𝑢𝑓𝑜𝑢𝑡| 𝑜𝑝𝑜𝑑𝑓 < target𝑄 ? FPoW: 𝐼(𝑑𝑝𝑜𝑢𝑓𝑜𝑢𝑡| 𝑜𝑝𝑜𝑑𝑓 < TARGET𝐺 ? (target𝑄 ≫ TARGET𝐺)

slide-18
SLIDE 18

Mining Pool

Workers Pool manager

  • 2. Submit shares.

463 125 352 432

PPoW FPoW

slide-19
SLIDE 19

Mining Pool

Workers Pool manager

  • 3. Pay the reward.
slide-20
SLIDE 20

Several Mining Attacks

 The 51 % Attack

  • “The Economics of Bitcoin Mining, or Bitcoin in the Presence of Adversaries”, WEIS 2013

 Selfish mining

– Generate forks intentionally

  • “Majority Is Not Enough: Bitcoin Mining Is Vulnerable”, FC 2014

 Block withholding (BWH) attack

– Exploit the pools’ protocol

  • “The Miner’s Dilemma”, IEEE S&P 2015
  • “On Power Splitting Games in Distributed Computation: The Case of Bitcoin Pooled

Mining”, CSF 2016

 Fork after withholding (FAW) attack

– Generate forks intentionally through pools

  • “Be Selfish and Avoid Dilemmas: Fork After Withholding (FAW) Attacks on Bitcoin”,

ACM CCS 2017

slide-21
SLIDE 21

Selfish Mining

21

slide-22
SLIDE 22

Selfish Mining

Forks

– Due to the nonzero block propagation delay, nodes can have different views. – When a fork occurs, only one block becomes valid.

(N (N-1) 1)-th th Block (N+1)-th th Bl Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

Fork

Which of two blocks should I choose as a main chain?

slide-23
SLIDE 23

Selfish Mining

 Generate intentional forks adaptively.

– An attacker finds a valid block and propagates the block when en anot

  • ther

her bloc

  • ck

k is found d by an honest est node.

Force the honest miners into wasting victims’ computations on the stale public branch.

slide-24
SLIDE 24

Selfish Mining

 𝛿: An attacker’s network capability  When an attacker possesses more than 33% computational power, the attacker can always earn extra rewards.

slide-25
SLIDE 25

Selfish Mining

slide-26
SLIDE 26

Selfish Mining

Im Impra practical! ctical!

slide-27
SLIDE 27

Impractical

 The value of γ cannot be 1 because when the intentional fork occurs, the honest miner who generated a block will select his block, not that of the selfish miner.  Honest miners can easily detect that their pool manager is a selfish mining attacker.

– If the manager does not propagate blocks immediately when honest miners generate FPoWs, the honest miners will know that their pool manager is an attacker. – The blockchain has an abnormal shape when a selfish miner exists.

slide-28
SLIDE 28

Block Withholding Attack

28

slide-29
SLIDE 29

Block Withholding (BWH) Attack

An Attacker Pool manager Submit only PPoWs.

463 125 352 432

Withhold

slide-30
SLIDE 30

Block Withholding (BWH) Attack

 An attacker joins the victim pool.  She should split her computational power into solo mining and malicious pool mining (BWH attack).  She receives unearned wages while only pretending to contribute work to the pool.

Solo Pool Pool

BWH Attack Mining Attacker

slide-31
SLIDE 31

Block Withholding (BWH) Attack

slide-32
SLIDE 32

Result

Infiltration mining power Attacker relative reward Victim relative reward

 The BWH attack is always profitable.

slide-33
SLIDE 33

The Miners’ dilemma (S&P 2015)

 Pools can launch the BWH attack each other through infiltration.

Po Pool

  • l 1

Po Pool

  • l 2

Infiltration from Pool 1 into Pool 2 Infiltration from Pool 2 into Pool 1

slide-34
SLIDE 34

Result

When they execute the BWH attack each other, both of them make a loss.

slide-35
SLIDE 35

The Miners’ dilemma (S&P 2015)

The equilibrium reward of the pool is inferi nferior

  • r compared to the no-attack scenario.

The fact that the BWH attack is not

  • t co

commo mmon n may be explained.

From “The Miner’s Dilemma”

slide-36
SLIDE 36

Fork After Withholding Attack

36

slide-37
SLIDE 37

FAW Attack Against One Pool

Tar arge get t poo

  • ol

Pool Pool Solo

Mining Submit an FPoW to the pool only if others generate another block. Otherwise, throw away her FPoW. Attacker Others rs

slide-38
SLIDE 38

FAW Attack Against One Pool

Tar arge get t poo

  • ol

Pool Pool Solo

Mining Attacker Others rs

 An attacker generates forks intentionally through a pool!

Submit an FPoW to the pool only if others generate another block. Otherwise, throw away her FPoW.

slide-39
SLIDE 39

FAW vs BWH

Case 1) When an attacker finds an FPoW through solo mining…

Blockch

  • ckchain

ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

FAW/ W/ BWH Attack acker er Victim ctim Othe hers rs

slide-40
SLIDE 40

FAW vs BWH

Case 1) When an attacker finds an FPoW through solo mining…

Blockch

  • ckchain

ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

FAW/ W/ BWH Attack acker er

The attacker earns the block reward.

Victim ctim Othe hers rs

slide-41
SLIDE 41

FAW vs BWH

Case 2) When an honest miner in the victim pool finds an FPoW…

Blockch

  • ckchain

ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

FAW/ W/ BWH Attack acker er Victim ctim Othe hers rs

slide-42
SLIDE 42

FAW vs BWH

Case 2) When an honest miner in the victim pool finds an FPoW…

Blockch

  • ckchain

ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

The victim earns the block reward and shares the reward with the attacker.

FAW/ W/ BWH Attack acker er Victim ctim Othe hers rs

slide-43
SLIDE 43

FAW vs BWH

Case 3) When only others find an FPoW…

Blockch

  • ckchain

ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

FAW/ W/ BWH Attack acker er Victim ctim Othe hers rs

slide-44
SLIDE 44

FAW vs BWH

Case 3) When only others find an FPoW…

Blockch

  • ckchain

ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

Others earn the block reward.

FAW/ W/ BWH Attack acker er Victim ctim Othe hers rs

slide-45
SLIDE 45

FAW vs BWH

Case 4) When the attacker finds an FPoW in the victim pool, and others also find another FPoW…

Blockch

  • ckchain

ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

BWH Attack acker er Victim ctim Othe hers rs

slide-46
SLIDE 46

BWH Attack acker er

FAW vs BWH

Case 4) When the attacker finds an FPoW in the victim pool, and others also find another FPoW…

Blockch

  • ckchain

ain New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

(N+1)-th th Block

Others earn the block reward.

Victim ctim Othe hers rs

slide-47
SLIDE 47

FAW vs BWH

Case 4) When the attacker finds an FPoW in the victim pool, and others also find another FPoW…

Blockch

  • ckchain

ain Attacker’s Ne New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

Others’ Ne New Block

  • ck

(N+1)-th th Block

FAW Attack acker er Victim ctim Othe hers rs

slide-48
SLIDE 48

FAW vs BWH

Case 4) When the attacker find an FPoW in the victim pool, and others also find another FPoW…

Blockch

  • ckchain

ain Attacker’s Ne New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

If others’ block is selected as the main chain,

  • thers earn the block reward.

Others’ Ne New Block

  • ck

(N+1)-th th Block

FAW Attack acker er Victim ctim Othe hers rs

slide-49
SLIDE 49

FAW vs BWH

Case 4) When the attacker find an FPoW in the victim pool, and others also find another FPoW…

Blockch

  • ckchain

ain Attacker’s Ne New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

If the attacker’s block is selected as the main chain, the victim earns the block reward and shares the reward with the attacker.

Others’ Ne New Block

  • ck

(N+1)-th th Block

FAW Attack acker er Victim ctim Othe hers rs

slide-50
SLIDE 50

FAW vs BWH

Case 4) When the attacker find an FPoW in the victim pool, and others also find another FPoW…

Blockch

  • ckchain

ain Attacker’s Ne New Block

  • ck

(N (N-1) 1)-th th Block

N-th th Bloc

  • ck

k

To increase the probability to win this race, the attacker can plant many Sybil nodes in the Bitcoin network.

Others’ Ne New Block

  • ck

(N+1)-th th Block

FAW Attack acker er Victim ctim Othe hers rs

slide-51
SLIDE 51

FAW vs BWH

 The FAW Attack  The BWH Attack

slide-52
SLIDE 52

FAW vs BWH

 The FAW Attack  The BWH Attack

slide-53
SLIDE 53

FAW vs BWH

At Attac acker ker Victi tim Others ers FAW AW BWH

slide-54
SLIDE 54

Numerical Analysis

 An attacker possesses 20% power (0.2).  A variable 𝑑 represents a probability that an attacker’s FPoW will be selected as the main chain.

Attacker Victim Always positive Always negative

slide-55
SLIDE 55

Numerical Analysis

The case is equivalent to the case of the BWH attack. Increasing An attacker’s power We can see that the FAW attack is more profitable than the BWH attack numerically.

𝒅 𝜷 0.1 0.2 0.3 0.4 0.53 (%) 1.14 (%) 1.85 (%) 2.7 (%) 0.25 25 0.65 (%) 1.38 (%) 2.2 (%) 3.1 (%) 0.5 0.85 (%) 1.74 (%) 2.7 (%) 3.75 (%) 0.75 75 1.21 (%) 2.37 (%) 3.52 (%) 4.69 (%) 1 2.12 (%) 3.75 (%) 5.13 (%) 6.37 (%)

Increasing

slide-56
SLIDE 56

FAW Attack Against Multiple Pools

56

Pool 1 Pool 3 Pool 2 Solo

Tar arge get t poo

  • ol

l 1 Others rs Submit FPoWs to pools only if

  • thers propagate a block.

Otherwise, throw her FPoWs. Mining Tar arge get t poo

  • ol

l 2 Tar arge get t poo

  • ol

l 3 Attacker

slide-57
SLIDE 57

FAW Attack Against Two Pools

 When the attacker finds an FPoW in each of pools, a fork with three branches

  • ccurs.

 In general, when 𝑜 pools are targeted, a fork with 𝑜 + 1 branches can occur.  When considering the power distribution, the attacker can earn the extra reward 56% more than the BWH attacker.

slide-58
SLIDE 58

FAW Attack Game

 Pools can launch the FAW attack each other through infiltration.

Po Pool

  • l 1

Po Pool

  • l 2

Infiltration from Pool 1 to Pool 2 Infiltration from Pool 2 to Pool 1

slide-59
SLIDE 59

Dilemma? Not Always

 Pool 1 possesses 0.2 computational power.  The bigger pool can earn the extra reward unlike the miner’s dilemma. Pool 1 Pool 2 Pool 1 can earn the extra reward in the Nash equilibrium. Pool 2 can earn the extra reward in the Nash equilibrium.

slide-60
SLIDE 60

Break Dilemma

Poo

  • ol 1 c

can earn the extra a reward rd in Nash h equilibri rium. um. FAW attacks between two pools lead to a pool size game: the larger pool can always earn the extra reward.

slide-61
SLIDE 61

Detection of FAW Attack

 The FAW attack causes high fork rate.  The FAW attacker leaves a trace of the only victim pools’ identities but not the attacker’s identity unlike selfish mining.  The manager can identify the miner who submits the FPoW causing the fork.  The FAW attacker can use many Sybil il nod

  • des

es in the victim pool. The e FAW AW attacker acker can n make ake the e detec ecti tion

  • n useles

less.

slide-62
SLIDE 62

No Silver Bullet

 New reward systems for mining pools

– High variance of rewards

 Change Bitcoin protocol

– Two-phase proof-of-work – Not backward compatibility

 There ere is no

  • on
  • ne sil

ilver ver bull llet. et.

slide-63
SLIDE 63

Conclusion

 Currently, the most main coins have the proof-of-work mechanism.  The proof-of-work mechanism is vulnerable to several attacks.  There are still open problems.

slide-64
SLIDE 64

Yu Yujin jin Kwon

  • n

dbwls872 wls8724@kaist 4@kaist.ac .ac.kr .kr