S & P SECURITY & PRIVACY GROUP Challenges and - - PowerPoint PPT Presentation

s p
SMART_READER_LITE
LIVE PREVIEW

S & P SECURITY & PRIVACY GROUP Challenges and - - PowerPoint PPT Presentation

FAKULTT FR !NFORMATIK Faculty of Informatics S & P SECURITY & PRIVACY GROUP Challenges and Cryptographic Solutions with Payment-Channel Networks Pedro Moreno-Sanchez RWC20 New York, Jan 10 th 2020 @pedrorechez Scalability


slide-1
SLIDE 1

FAKULTÄT FÜR !NFORMATIK

Faculty of Informatics

S&P

SECURITY & PRIVACY GROUP

Challenges and Cryptographic Solutions with Payment-Channel Networks Pedro Moreno-Sanchez

RWC’20 New York, Jan 10th 2020

@pedrorechez

slide-2
SLIDE 2
  • Decentralized data structure recording each

transaction in order to provide public verifiability

  • Global consensus: everyone checks the whole

blockchain

2

Scalability Issues

Bitcoin’s transaction rate: ~10 tx/sec Visa’s transaction rate: ~10K tx/sec

slide-3
SLIDE 3
  • On-chain (tweak consensus)

e.g., DAG Blockchain, sharding, ...

  • Off-chain (use blockchain only for disputes)

e.g., Payment Channel Networks Many other research projects (Bolt, Z-Channels, Perun, Liquidity Network, Plasma, COMIT ...)

Lightning Network (Bitcoin) Raiden Network (Ethereum)

3

Scalability Solutions?

slide-4
SLIDE 4
  • On-chain (tweak consensus)

e.g., DAG Blockchain, sharding, ...

  • Off-chain (use blockchain only for disputes)

e.g., Payment Channel Networks Many other research projects (Bolt, Z-Channels, Perun, Liquidity Network, Plasma, COMIT ...)

Lightning Network (Bitcoin) Raiden Network (Ethereum)

3

Scalability Solutions?

slide-5
SLIDE 5

4

Background on Payment Channel Networks

slide-6
SLIDE 6

5

Payment Channels: Open

Alice Bob Blockchain

5 1

slide-7
SLIDE 7

5

Payment Channels: Open

Alice Bob Blockchain

Multisig Contract Can be spent only with the signatures of both Alice and Bob

5 1

5 (Alice) 5 (Alice,Bob) Alice

  • Alice creates multisig contract to

deposit money on the channel

slide-8
SLIDE 8

5

Payment Channels: Open

Alice Bob Blockchain

Multisig Contract Can be spent only with the signatures of both Alice and Bob

5 1

5 (Alice) 5 (Alice,Bob) Alice 5 (Alice,Bob) 5 (Alice) Alice,Bob

  • Alice creates multisig contract to

deposit money on the channel

  • Alice lets Bob sign a refund

transaction to unlock the money

slide-9
SLIDE 9

6

Payment Channels: Open

Alice Bob Blockchain

5 1

5 (Alice) 5 (Alice,Bob) Alice

5 (Alice,Bob) 5 (Alice) Alice,Bob
  • Alice creates multisig contract to

deposit money on the channel

  • Alice lets Bob sign a refund

transaction to unlock the money

  • Alice places the multisig contract
  • nchain
slide-10
SLIDE 10

7

Payment Channels: Transactions

Blockchain

5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

4 1

Alice Bob

5 (Alice) 5 (Alice,Bob) Alice

slide-11
SLIDE 11

8

Payment Channels: Transactions

Blockchain

5 (Alice, Bob) 3 (Alice) 2 (Bob) Alice ?? Bob

3 2

Alice Bob

5 (Alice, Bob) 3 (Alice) 2 (Bob) Alice ?? Bob 5 (Alice) 5 (Alice,Bob) Alice Under the hood Mechanisms for bidirectional payments and for revocation of old states

slide-12
SLIDE 12

5 (Alice, Bob) 3 (Alice) 2 (Bob) Alice,Bob

Payment Channels: Close

Blockchain Alice Bob

5 (Alice) 5 (Alice,Bob) Alice

slide-13
SLIDE 13

10

Payment Channel Networks (PCNs)

4 1 2 3

Alice Bob Carol

Send 1 BTC to Carol

One cannot open channels with everyone... exploit channel paths!

slide-14
SLIDE 14

10

Payment Channel Networks (PCNs)

4 1 2 3

Alice Bob Carol Bob

2 3 3 2

Carol Alice

1. Send 1 BTC Send 1 BTC to Carol

slide-15
SLIDE 15

10

Payment Channel Networks (PCNs)

4 1 2 3

Alice Bob Carol Bob

2 3 3 2

Carol Alice

1. Send 1 BTC Send 1 BTC to Carol

2 3 1 4

Alice Bob Carol

  • 2. Forward 1 BTC to

Carol

slide-16
SLIDE 16

Should happen atomically

10

Payment Channel Networks (PCNs)

4 1 2 3

Alice Bob Carol Bob

2 3 3 2

Carol Alice

1. Send 1 BTC Send 1 BTC to Carol

2 3 1 4

Alice Bob Carol

  • 2. Forward 1 BTC to

Carol

slide-17
SLIDE 17

11

The Lightning Network (LN)

slide-18
SLIDE 18

5

12

Hashtime Lock Contract (HTLC)

5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

4 1

Alice Bob y

5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

slide-19
SLIDE 19

5

12

Hashtime Lock Contract (HTLC)

5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

4 1 4 1

Alice Bob y

x

5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

y

With knowledge of x, Bob can “open” + publish the transaction on the blockchain for enforcing the payment

slide-20
SLIDE 20

5

12

Hashtime Lock Contract (HTLC)

5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

4 1 4 1

Alice Bob y

x

After time the transaction cannot be published anymore on the blockchain 5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

y

With knowledge of x, Bob can “open” + publish the transaction on the blockchain for enforcing the payment

slide-21
SLIDE 21

5

12

Hashtime Lock Contract (HTLC)

5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

4 1 4 1

Alice Bob y

x

HTLC (Alice, Bob, 1, y, ):

Alice pays Bob 1 BTC iff Bob shows some x such that H(x) = y before

After time the transaction cannot be published anymore on the blockchain 5 (Alice, Bob) 4 (Alice) 1 (Bob) Alice ?? Bob

y

With knowledge of x, Bob can “open” + publish the transaction on the blockchain for enforcing the payment

slide-22
SLIDE 22

3 2

13

HTLC for Multi-hop Payments

Alice Bob Carol

y:= H(x)

x

2 3

slide-23
SLIDE 23

3 2

13

HTLC for Multi-hop Payments

Alice Bob Carol

y:= H(x)

x

y 2 3

slide-24
SLIDE 24

3 2

13

HTLC for Multi-hop Payments

Alice Bob Carol

HTLC(Alice, Bob, 1.1, y, t) y:= H(x)

x

y 2 3

1.1 0.9

3 1

slide-25
SLIDE 25

3 2

13

HTLC for Multi-hop Payments

Alice Bob Carol

HTLC(Alice, Bob, 1.1, y, t) HTLC(Bob, Carol, 1, y, t’) 2 2 1 y:= H(x)

x

y 2 3

1.1 0.9

3 1

slide-26
SLIDE 26

3 2

13

HTLC for Multi-hop Payments

Alice Bob Carol

HTLC(Alice, Bob, 1.1, y, t) HTLC(Bob, Carol, 1, y, t’) 2 2 1 y:= H(x)

x

y x 2 3 2 3

1.1 0.9

3 1

slide-27
SLIDE 27

3 2

13

HTLC for Multi-hop Payments

Alice Bob Carol

HTLC(Alice, Bob, 1.1, y, t) HTLC(Bob, Carol, 1, y, t’) 2 2 1 y:= H(x)

x

y x x 2 3 2 3

1.1 0.9

3 1

0.9

4.1

slide-28
SLIDE 28

3 2

13

HTLC for Multi-hop Payments

Alice Bob Carol

HTLC(Alice, Bob, 1.1, y, t) HTLC(Bob, Carol, 1, y, t’) 2 2 1 y:= H(x)

x

y Requirement: t > t’ (after Carol revealed x to Bob, there must still be time for Bob to reveal x to Alice) x x 2 3 2 3

1.1 0.9

3 1

0.9

4.1

slide-29
SLIDE 29

3 2

13

HTLC for Multi-hop Payments

Alice Bob Carol

HTLC(Alice, Bob, 1.1, y, t) HTLC(Bob, Carol, 1, y, t’) 2 2 1 y:= H(x)

x

y Requirement: t > t’ (after Carol revealed x to Bob, there must still be time for Bob to reveal x to Alice) x x 2 3 2 3

1.1 0.9

3 1

0.9

4.1 Requirement: 1.1 = 1 + fee (Alice forwards payment amount plus fee for the intermediaries)

slide-30
SLIDE 30

3 2

Alice Bob Carol HTLC(Alice, Bob, 1.1, y, t) HTLC(Bob, Carol, 1, y, t’)

2 2 1

y:= H(x) x y x x 2 3

2 3

1 0.

3 1

0.9 4.1
  • Lightning Network work allow us to perform payments offchain
  • fast, no confirmation delay
  • little fees
  • secure and privacy-preserving (at a first glance...)

14

LN: Take Home

HTLC (Alice, Bob, 1.1, y, t):

Alice pays Bob 1.1 BTC iff Bob shows some x such that H(x) = y before t days

slide-31
SLIDE 31

15

Security + Privacy in PCNs

Are off-chain payments in PCNs privacy-preserving by default?

(individual payments are not recorded on the blockchain)

Are off-chain payments in PCNs secure?

(No honest participant looses money)

slide-32
SLIDE 32

15

Security + Privacy in PCNs

Are off-chain payments in PCNs privacy-preserving by default?

(individual payments are not recorded on the blockchain)

Are off-chain payments in PCNs secure?

(No honest participant looses money)

NO! NO!

slide-33
SLIDE 33

16

Security and Privacy Challenges in Existing PCNs

ACM CCS 2017 NDSS 2019

slide-34
SLIDE 34

17

Security Issue: The Wormhole Attack

A C E1 E2

HTLC(A, E1,1.3,y, t1) HTLC(E1, B,1.2,y, t2) HTLC(B, E2,1.1,y, t3) HTLC(E2, C,1,y, t4)

y:= H(x)

x

B

slide-35
SLIDE 35

17

Security Issue: The Wormhole Attack

A C E1 E2

HTLC(A, E1,1.3,y, t1) HTLC(E1, B,1.2,y, t2) HTLC(B, E2,1.1,y, t3) HTLC(E2, C,1,y, t4)

y:= H(x)

x

x B

slide-36
SLIDE 36

17

Security Issue: The Wormhole Attack

A C E1 E2

HTLC(A, E1,1.3,y, t1) HTLC(E1, B,1.2,y, t2) HTLC(B, E2,1.1,y, t3) HTLC(E2, C,1,y, t4)

y:= H(x)

x

x x B

slide-37
SLIDE 37

17

Security Issue: The Wormhole Attack

A C E1 E2

HTLC(A, E1,1.3,y, t1) HTLC(E1, B,1.2,y, t2) HTLC(B, E2,1.1,y, t3) HTLC(E2, C,1,y, t4)

y:= H(x)

x

x x x B

slide-38
SLIDE 38

17

Security Issue: The Wormhole Attack

A C E1 E2

HTLC(A, E1,1.3,y, t1) HTLC(E1, B,1.2,y, t2) HTLC(B, E2,1.1,y, t3) HTLC(E2, C,1,y, t4)

y:= H(x)

x

x x x B considers the payment to be failed and unlocks his funds after the timeout B

slide-39
SLIDE 39

17

Security Issue: The Wormhole Attack

A C E1 E2

HTLC(A, E1,1.3,y, t1) HTLC(E1, B,1.2,y, t2) HTLC(B, E2,1.1,y, t3) HTLC(E2, C,1,y, t4)

y:= H(x)

x

x x x B considers the payment to be failed and unlocks his funds after the timeout B gets 1.3 (no payment to B) pays 1 (no payment from B) Attacker earns 0.3 BTC (own fees + B’s fee)

slide-40
SLIDE 40

17

Security Issue: The Wormhole Attack

A C E1 E2

HTLC(A, E1,1.3,y, t1) HTLC(E1, B,1.2,y, t2) HTLC(B, E2,1.1,y, t3) HTLC(E2, C,1,y, t4)

y:= H(x)

x

x x x B considers the payment to be failed and unlocks his funds after the timeout B gets 1.3 (no payment to B) pays 1 (no payment from B) Attacker earns 0.3 BTC (own fees + B’s fee) Bob funds are locked (preventing the use in other payments) Bob cannot blame the adversary

slide-41
SLIDE 41

18

Privacy Issues in HTLC Payments

A C E1 E2

HTLC(A,E1,v1,y,t1) HTLC(E1,B,v2,y,t2) HTLC(B,E2,v3,y,t3) HTLC(E2,C,v4,y,t4)

B A’ C’ Relationship Anonymity: On-path adversaries do not learn who pays to whom

HTLC(A,E1,v1,y’,t1) HTLC(E1,B,v2,y’,t2) HTLC(B,E2,v3,y’,t3) HTLC(E2,C,v4,y’,t4)

slide-42
SLIDE 42

18

Privacy Issues in HTLC Payments

A C E1 E2

HTLC(A,E1,v1,y,t1) HTLC(E1,B,v2,y,t2) HTLC(B,E2,v3,y,t3) HTLC(E2,C,v4,y,t4)

B A’ C’

pays to pays to

pays to pays to

Relationship Anonymity: On-path adversaries do not learn who pays to whom

HTLC(A,E1,v1,y’,t1) HTLC(E1,B,v2,y’,t2) HTLC(B,E2,v3,y’,t3) HTLC(E2,C,v4,y’,t4)

slide-43
SLIDE 43

18

Privacy Issues in HTLC Payments

A C E1 E2

HTLC(A,E1,v1,y,t1) HTLC(E1,B,v2,y,t2) HTLC(B,E2,v3,y,t3) HTLC(E2,C,v4,y,t4)

B A’ C’

pays to pays to

pays to pays to

Relationship Anonymity: On-path adversaries do not learn who pays to whom

HTLC(A,E1,v1,y’,t1) HTLC(E1,B,v2,y’,t2) HTLC(B,E2,v3,y’,t3) HTLC(E2,C,v4,y’,t4)

slide-44
SLIDE 44

18

Privacy Issues in HTLC Payments

A C E1 E2

HTLC(A,E1,v1,y,t1) HTLC(E1,B,v2,y,t2) HTLC(B,E2,v3,y,t3) HTLC(E2,C,v4,y,t4)

B A’ C’

pays to pays to

pays to pays to

Relationship Anonymity: On-path adversaries do not learn who pays to whom

HTLC(A,E1,v1,y’,t1) HTLC(E1,B,v2,y’,t2) HTLC(B,E2,v3,y’,t3) HTLC(E2,C,v4,y’,t4)

slide-45
SLIDE 45

18

Privacy Issues in HTLC Payments

A C E1 E2

HTLC(A,E1,v1,y,t1) HTLC(E1,B,v2,y,t2) HTLC(B,E2,v3,y,t3) HTLC(E2,C,v4,y,t4)

B A’ C’

pays to pays to

pays to pays to

Relationship Anonymity: On-path adversaries do not learn who pays to whom

HTLC(A,E1,v1,y’,t1) HTLC(E1,B,v2,y’,t2) HTLC(B,E2,v3,y’,t3) HTLC(E2,C,v4,y’,t4)

slide-46
SLIDE 46

19

Cryptographic Solutions for Security and Privacy in Payment Channel Networks

slide-47
SLIDE 47

20

Solving Security + Privacy Issues

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

Randomised conditions at each hop that can only be released by (exactly) the right neighbour’s key

slide-48
SLIDE 48

20

Solving Security + Privacy Issues

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

k3 k1 k2 k4

Setup phase for the distribution of individual “randomisation factors” for users at each hop Randomised conditions at each hop that can only be released by (exactly) the right neighbour’s key

slide-49
SLIDE 49

20

Solving Security + Privacy Issues

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

k3 k1 k2 k4

Setup phase for the distribution of individual “randomisation factors” for users at each hop

Desired Properties

No coin loss 1.Atomicity: If a user’s right lock gets

  • pened, he can open his

left lock 2.Consistency: A user can open his left lock only if his right lock was released 3.Relationship Anonymity: A user learns about no

  • ther participant of the

payment path than his direct neighbours No Wormhole Attacks Privacy Randomised conditions at each hop that can only be released by (exactly) the right neighbour’s key

slide-50
SLIDE 50

21

Anonymous Multi-hop Locks (AMHL)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2 B

(k1 + k2 + k3 + k4)*G

(k1, C1)

slide-51
SLIDE 51

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2 B

(k1 + k2 + k3 + k4)*G

(k1, C1)

slide-52
SLIDE 52

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2 B

(k1 + k2 + k3 + k4)*G

(k1, C1)

slide-53
SLIDE 53

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2 B

(k1 + k2 + k3 + k4)*G

(k1, C1)

slide-54
SLIDE 54

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2 B

(k1 + k2 + k3 + k4)*G

(k1, C1)

slide-55
SLIDE 55

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2

(k1 + k2 + k3 + k4)

B

(k1 + k2 + k3 + k4)*G

(k1, C1)

slide-56
SLIDE 56

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2

(k1 + k2 + k3 + k4)

B

(k1 + k2 + k3 + k4)*G

(k1 + k2 + k3)

  • k4

(k1, C1)

slide-57
SLIDE 57

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2

(k1 + k2 + k3 + k4)

B

(k1 + k2 + k3 + k4)*G

(k1 + k2 + k3) (k1 + k2)

  • k3
  • k4

(k1, C1)

slide-58
SLIDE 58

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2

(k1 + k2 + k3 + k4)

B

(k1 + k2 + k3 + k4)*G

(k1 + k2 + k3) (k1 + k2) k1

  • k2
  • k3
  • k4

(k1, C1)

slide-59
SLIDE 59

21

Anonymous Multi-hop Locks (AMHL)

Lock(A, E1,1.3,C1,t1) Lock(E1,B,1.2,C2,t2) Lock(B,E2,1.1,C3,t3) Lock(E2,C,1,C4, t4)

(k4, C4) (k2, C2) (k3, C3) (k1 + k2 + k3 + k4)

k1*G (k1 + k2)*G (k1 + k2 + k3)*G

A C E1 E2

(k1 + k2 + k3 + k4)

B

(k1 + k2 + k3 + k4)*G

(k1 + k2 + k3) (k1 + k2) k1

A valid key can only be extracted from a valid key for the right lock

  • k2
  • k3
  • k4

(k1, C1)

Conditions look random (as they differ by a secret random factor)

slide-60
SLIDE 60

5

22

Lock Contract

Alice (skA) Bob (skB) y AB

hypothetical “shared identity” skAB = skA * skB

Blockchain

slide-61
SLIDE 61

5

22

Lock Contract

4 1

Alice (skA) Bob (skB) y AB

hypothetical “shared identity” skAB = skA * skB

Blockchain

5 (AB) 4 (Alice) 1 (Bob)

y

AB ??k 5 (Alice) 5 (AB) Alice

slide-62
SLIDE 62

5

22

Lock Contract

4 1

Alice (skA) Bob (skB) y

Alice can retrieve secret k from full signature Bob gets sufficient information for checking that the “half signature” produced by Alice and Bob can be completed to a valid signature given k

AB

hypothetical “shared identity” skAB = skA * skB

Blockchain

5 (AB) 4 (Alice) 1 (Bob)

y

AB ??k 5 (Alice) 5 (AB) Alice

slide-63
SLIDE 63

23

Lock Contract Implementations

  • Construction from homomorphic one-way functions
  • Schnorr-based construction
  • ECDSA-based construction
  • Compatible with Bitcoin, Ethereum, etc.
slide-64
SLIDE 64

23

Lock Contract Implementations

  • Construction from homomorphic one-way functions
  • Schnorr-based construction
  • ECDSA-based construction
  • Compatible with Bitcoin, Ethereum, etc.
slide-65
SLIDE 65

24

Discussion

  • Security and Privacy proven formally (in the UC Framework)
  • PoC implementation in

✓Lightning Network (https://github.com/cfromknecht/tpec) ✓Kzen Network (https://github.com/KZen-networks/multi-

hop-locks)

✓COMIT Network (https://github.com/coblox/ss-ecdsa-poc)

  • Reduces transaction size for conditional payments

✓Encoding of condition within signature

AB ??k

slide-66
SLIDE 66
  • AMHLs are suitable for cross-currency usage
  • even with different primitive instantiations

✓ Inter-currency payment channels ✓ Atomic swaps

25

Interoperability

E C D S A DLOG

slide-67
SLIDE 67

26

Collateral Challenge in Bitcoin-Compatible PCNs

ACM CCS 2019

slide-68
SLIDE 68
  • Each payment of k coins along an n-channel path requires to put

aside at least kn coins

  • Also, each user i has to lock her coins for a time ∆(n-i) where ∆ is

the time to safely close a channel

  • Coins locked too long!

27

Collateral

k+fees coins nΔ time k coins Δ time ... n-2 channels ...

slide-69
SLIDE 69
  • The adversary has a time amplification factor of n-2
  • ∆ is 1 day in the Lightning network!
  • The attacker can use several paths

28

Griefing attack

... n-2 channels ... k+fees coins nΔ time k coins Δ time

slide-70
SLIDE 70

29

Goal: Constant Collateral

... n-2 channels ... k+fees coins nΔ time k coins Δ time

slide-71
SLIDE 71
  • Constant collateral: Coins are locked only for ∆ time,

independently of the number of channels

29

Goal: Constant Collateral

... n-2 channels ... k+fees coins nΔ time k coins Δ time k+fees coins Δ time

slide-72
SLIDE 72
  • Constant collateral: Coins are locked only for ∆ time,

independently of the number of channels

  • Reduces the overall time that coins are locked

29

Goal: Constant Collateral

... n-2 channels ... k+fees coins nΔ time k coins Δ time k+fees coins Δ time

slide-73
SLIDE 73
  • Constant collateral: Coins are locked only for ∆ time,

independently of the number of channels

  • Reduces the overall time that coins are locked
  • Feasible in Ethereum-based PCNs: Sprites1

29

Goal: Constant Collateral

... n-2 channels ... k+fees coins nΔ time k coins Δ time k+fees coins Δ time

1 A. Miller et al. Sprites and State Channels: Payment Networks that Go Faster than Lightning.

slide-74
SLIDE 74

30

Our Solution

slide-75
SLIDE 75

30

Our Solution

slide-76
SLIDE 76

30

Our Solution

slide-77
SLIDE 77

30

Our Solution

  • We propose AMCU (Atomic Multi-Channel Update)
  • Backwards compatible with Bitcoin
  • Synchronization of N channels with constant locktime
  • New applications: Crowdfunding, netting, channel

rebalancing

slide-78
SLIDE 78

31

Atomic Multi-Channel Updates (ACMU)

8 (out of 10) 7 (out of 30)

(A1,B1): 10 (A2,B2): 2 (A3,B3): 8 A1 B1

Phase 1 (Setup for A,B)

Split the channel so that 2 coins are still available

slide-79
SLIDE 79

31

Atomic Multi-Channel Updates (ACMU)

8 (out of 10) 7 (out of 30)

(A1,B1): 10 (A2,B2): 2 (A3,B3): 8 A1 B1

Phase 1 (Setup for A,B) Phase 2 (Lock for A,B)

(A3,B3): 8 (A4,B4): 8 A3 B3 After some Δ you get back the money (in case of failure in the next phases)

slide-80
SLIDE 80

31

Atomic Multi-Channel Updates (ACMU)

8 (out of 10) 7 (out of 30)

(A1,B1): 10 (A2,B2): 2 (A3,B3): 8 A1 B1

Phase 1 (Setup for A,B) Phase 2 (Lock for A,B) Phase 3 (Consume for A,B)

(A3,B3): 8 (A4,B4): 8 A3 B3 (A5,B5): 8 B6: 8 A5 B5 To spend you need money in a fresh account, which does not have money yet, key towards atomicity

slide-81
SLIDE 81

31

Atomic Multi-Channel Updates (ACMU)

8 (out of 10) 7 (out of 30)

(A1,B1): 10 (A2,B2): 2 (A3,B3): 8 A1 B1

Phase 1 (Setup for A,B) Phase 2 (Lock for A,B) Phase 3 (Consume for A,B) Phase 4 (Enable)

(A3,B3): 8 (A4,B4): 8 A3 B3 (A5,B5): 8 B6: 8 A5 B5 (A3,B3): 8 (A5,B5): 8 A3 (B’3,C3): 7 (B’5,C5): 7 B3 B’3 C3 A Multi-In Multi-Out (MIMO) transaction creates all fresh addresses in one shot

slide-82
SLIDE 82

31

Atomic Multi-Channel Updates (ACMU)

8 (out of 10) 7 (out of 30)

(A1,B1): 10 (A2,B2): 2 (A3,B3): 8 A1 B1

Phase 1 (Setup for A,B) Phase 2 (Lock for A,B) Phase 3 (Consume for A,B) Phase 4 (Enable) Phase 5 (Disable)

(A3,B3): 8 (A4,B4): 8 A3 B3 (A5,B5): 8 B6: 8 A5 B5 (A3,B3): 8 (A5,B5): 8 A3 (B’3,C3): 7 (B’5,C5): 7 B3 B’3 C3 (A7,B7): 8 (A5,B5): 8 A5 (B’7,C7): 7 (B’5,C5): 7 B5 B’5 C5 Solves ambiguous state between Enable and Lock

slide-83
SLIDE 83
  • PCNs mitigate scalability issues in cryptocurrencies
  • They present several challenges:
  • Security: Wormhole attack
  • Privacy: Relationship anonymity does not hold
  • Collateral: Griefing attack
  • We propose cryptographic protocols to mitigate them
  • New functionalities (e.g., crowdfunding, netting)
  • More challenges and solutions required (e.g., scalable and

interoperable routing)

32

Conclusions

slide-84
SLIDE 84
  • PCNs mitigate scalability issues in cryptocurrencies
  • They present several challenges:
  • Security: Wormhole attack
  • Privacy: Relationship anonymity does not hold
  • Collateral: Griefing attack
  • We propose cryptographic protocols to mitigate them
  • New functionalities (e.g., crowdfunding, netting)
  • More challenges and solutions required (e.g., scalable and

interoperable routing)

32

Conclusions

THANKS!

@pedrorechez