cryptocurrencies - tik · cryptocurrencies. what is bitcoin? + + = technology. the bank of bitcoin...

104
ETH Zurich – Distributed Computing Group Roger Wattenhofer Cryptocurrencies bitcoin, blockchain & beyond

Upload: others

Post on 17-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

ETHZurich – DistributedComputingGroup

RogerWattenhofer

Cryptocurrenciesbitcoin,blockchain &beyond

Page 2: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B
Page 3: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Cryptocurrencies

Page 4: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B
Page 5: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

What is Bitcoin?

+ + =

Page 6: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Technology

Page 7: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Bank of Bitcoin

User Balance

A 2

B 5

C 8

TXB �! A

User Balance

A 2 4

B 5 3

C 8

Page 8: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Bank of Bitcoin

User Balance

A 2

B 5

C 8

TXB �! A

User Balance

A 2 4

B 5 3

C 8

Page 9: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Bank of Bitcoin

User Balance

A 2

B 5

C 8

TXB �! A

User Balance

A 2 4

B 5 3

C 8

Page 10: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Bank of Bitcoin

User Balance

A 2

B 5

C 8

TXB �! A

User Balance

A 2 4

B 5 3

C 8

Page 11: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Opening an Account in Bitcoin

Private Key Public Key Address

Page 12: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transferring Bitcoins

TX: 41b221

B

0.1

A

4.798

A

4.899

Inputs OutputsFee

0.001

Prev. TX:

a1a53743

4.899

0

C

...

1

|Outputs

Page 13: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transferring Bitcoins

TX: 41b221

B

0.1

A

4.798

A

4.899

Inputs OutputsFee

0.001

Prev. TX:

a1a53743

4.899

0

C

...

1

|Outputs

Page 14: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transferring Bitcoins

TX: 41b221

B

0.1

A

4.798

A

4.899

Inputs OutputsFee

0.001

Prev. TX:

a1a53743

4.899

0

C

...

1

|Outputs

Page 15: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transferring Bitcoins

TX: 41b221

B

0.1

A

4.798

A

4.899

Inputs OutputsFee

0.001

Prev. TX:

a1a53743

4.899

0

C

...

1

|Outputs

Page 16: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transferring Bitcoins

TX: 41b221

B

0.1

A

4.798

A

4.899

Inputs Outputs

Fee

0.001

Prev. TX:

a1a53743

4.899

0

C

...

1

|Outputs

Page 17: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transferring Bitcoins

TX: 41b221

B

0.1

A

4.798

A

4.899

Inputs OutputsFee

0.001

Prev. TX:

a1a53743

4.899

0

C

...

1

|Outputs

Page 18: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transferring Bitcoins

TX: 41b221

B

0.1

A

4.798

A

4.899

Inputs OutputsFee

0.001

Prev. TX:

a1a53743

4.899

0

C

...

1

|Outputs

Page 19: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Distributing the Bank

User Balance

A 2

B 5

C 8

TX

TX

Page 20: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Distributing the Bank

TX

Page 21: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Distributing the Bank

TX

Page 22: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Distributing the Bank

TX

Page 23: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Distributing the Bank

TX

Page 24: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Distributing the Bank

TX

Page 25: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Let’s Buy a Snack

[Bamert, Decker, Elsen, W, Welten, 2013]

Page 26: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Doublespending

TX B

1

A

1

1

Inputs

Outputs

TX’ A

1

1

Page 27: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Doublespending

TX B

1

A

1

1

Inputs

Outputs

TX’ A

1

1

Page 28: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Doublespending

TX B

1

A

1

1

Inputs

Outputs

TX’ A

1

1

Page 29: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Conflicts

TX

TX

Page 30: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Conflicts

TX

TX

Page 31: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Conflicts

TX

TX

Page 32: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Conflicts

TX

TX

Page 33: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Resolving Conflicts

Green!

Page 34: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Resolving Conflicts

Green!

Page 35: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Resolving Conflicts

Green!

Page 36: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

How to Choose a Leader?

Page 37: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Proof-of-Work

Block

H(Previous Block)

TX TX TX TX

I H(Block|0) ! 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) ! f2496854af8bf989171587a9259f634f. . .

I H(Block|2) ! aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) ! 777f75b2a8ecfdc8026c236fc1d2↵a0. . ....

I H(Block|961127) ! 0000014823419622d4c133672a7d657e. . .

Page 38: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Proof-of-Work

Block

H(Previous Block)

TX TX TX TX

I H(Block|0) ! 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) ! f2496854af8bf989171587a9259f634f. . .

I H(Block|2) ! aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) ! 777f75b2a8ecfdc8026c236fc1d2↵a0. . ....

I H(Block|961127) ! 0000014823419622d4c133672a7d657e. . .

Page 39: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Proof-of-Work

Block

H(Previous Block) TX TX TX TX

I H(Block|0) ! 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) ! f2496854af8bf989171587a9259f634f. . .

I H(Block|2) ! aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) ! 777f75b2a8ecfdc8026c236fc1d2↵a0. . ....

I H(Block|961127) ! 0000014823419622d4c133672a7d657e. . .

Page 40: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Proof-of-Work

Block

H(Previous Block) TX TX TX TX

I H(Block) ! fd2e2055f117bfa261b5a6c7e11df367. . .

I H(Block|0) ! 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) ! f2496854af8bf989171587a9259f634f. . .

I H(Block|2) ! aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) ! 777f75b2a8ecfdc8026c236fc1d2↵a0. . ....

I H(Block|961127) ! 0000014823419622d4c133672a7d657e. . .

Page 41: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Proof-of-Work

Block

H(Previous Block) TX TX TX TX Nonce

I H(Block|0) ! 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) ! f2496854af8bf989171587a9259f634f. . .

I H(Block|2) ! aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) ! 777f75b2a8ecfdc8026c236fc1d2↵a0. . ....

I H(Block|961127) ! 0000014823419622d4c133672a7d657e. . .

Page 42: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Proof-of-Work

Block

H(Previous Block) TX TX TX TX Nonce

I H(Block|0) ! 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) ! f2496854af8bf989171587a9259f634f. . .

I H(Block|2) ! aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) ! 777f75b2a8ecfdc8026c236fc1d2↵a0. . ....

I H(Block|961127) ! 0000014823419622d4c133672a7d657e. . .

Page 43: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Proof-of-Work

Block

H(Previous Block) TX TX TX TX Nonce

I H(Block|0) ! 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) ! f2496854af8bf989171587a9259f634f. . .

I H(Block|2) ! aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) ! 777f75b2a8ecfdc8026c236fc1d2↵a0. . ....

I H(Block|961127) ! 0000014823419622d4c133672a7d657e. . .

Page 44: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Proof-of-Work

Block

H(Previous Block) TX TX TX TX Nonce

I H(Block|0) ! 094d66aa7c844a9dbb516a41259b5877. . .

I H(Block|1) ! f2496854af8bf989171587a9259f634f. . .

I H(Block|2) ! aec87c0ca2e5eb3f23111092f1089ada. . .

I H(Block|3) ! 777f75b2a8ecfdc8026c236fc1d2↵a0. . ....

I H(Block|961127) ! 0000014823419622d4c133672a7d657e. . .

Page 45: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Blockchain

Time

Page 46: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Blockchain

Time

Page 47: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Is Bitcoin stable?

Page 48: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Blockchain

Time

Page 49: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Blockchain

Time

Page 50: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Propagation Speed

[Decker, W, 2013]http://bitcoinstats.com

Page 51: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Propagation Speed

[Decker, W, 2013]http://bitcoinstats.com

Page 52: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Blockchain Forks

1.69%

[Decker, W, 2013]

Page 53: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Aside: Mining Evolution

Page 54: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Aside: Mining Evolution

Page 55: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Aside: Mining Evolution

Page 56: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

500 MW

Page 57: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Summary

TX

Green!

Block

H(Previous Block) TX TX TX TX Nonce

Time

Page 58: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Stories

Page 59: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

How to Lose 500M

Page 60: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Addressing Transaction Malleability: MtGox has detected

unusual activity on its Bitcoin wallets and performed

investigations during the past weeks.

Page 61: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The MtGox Incident

I July 2010: First trade on MtGox

I May 2011: Transaction malleability identified as low priority issue

I February 7, 2014: MtGox halts withdrawals

I February 10, 2014: MtGox announces loss of 850,000 bitcoins (620millio USD) and cites transaction malleability as root cause

I February 28, 2014: MtGox files for bankruptcy

I March 7 2014: MtGox finds 200,000 bitcoins

I August 2015: MtGox CEO is arrested

Page 62: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Signatures

00 00

61 af bb 4d e9 f8 b8 74 86 1e

There are multiple ways to serialize a signature:

I Multiple push operations (1 byte, 2 byte, 4 byte)

I Non-canonical DER encodings

I Padding

I . . .

Page 63: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Signatures

00 00 61 af bb 4d e9 f8 b8 74 86 1e

There are multiple ways to serialize a signature:

I Multiple push operations (1 byte, 2 byte, 4 byte)

I Non-canonical DER encodings

I Padding

I . . .

Page 64: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?Refund

Page 65: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?Refund

Page 66: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?Refund

Page 67: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?Refund

Page 68: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?

Refund

Page 69: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Transaction Malleability Attack

TX

TX

TX

TX

TX

Red!

TX?

Refund

Page 70: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Incident Timeline

386 BTC

[Decker, W, 2014]

Page 71: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Incident Timeline

386 BTC

[Decker, W, 2014]

Page 72: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B
Page 73: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Is Bitcoin Secure?

Page 74: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Securing Your Bitcoins

[Bamert, Decker, W, 2013]

Page 75: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Does Bitcoin Scale?

Page 76: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

The Bitcoin Ecosystem is Growing

Page 77: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 78: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 79: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 80: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 81: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Scalability Limits

I Disk space: < 500 transactions per second

I Processing power: < 200 transactions per second

I Network bandwidth: < 100 transactions per second

I Artificial 1MB limit: < 3 transactions per second

Today:

I Bitcoin: 1 transaction per second

I Credit Cards: > 10, 000 transactions per second

Page 82: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Payment Network

Page 83: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Payment Network

Page 84: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Payment Network

Page 85: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5

5

T=100 5

5

0

4

1

3

2

Page 86: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 87: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 88: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 89: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 90: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 91: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 92: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 93: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Micropayment Channels

5 5

T=100 5

5

0

4

1

3

2

Page 94: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Duplex Micropayment Channels

Setup Invalidation Tree Micropayment Channels

T = 100 T = 100 T = 100

T = 99 T = 100 T = 100

T = 99 T = 100

T = 99

Page 95: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Summary

Red!

TX?Refund

T = 100 T = 100 T = 100

T = 99 T = 100 T = 100

T = 99 T = 100

T = 99

Page 96: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Economy

Page 97: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

BTC in USD

Page 98: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Inflation

Page 99: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Fungibility

=?

Page 100: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Improving Bitcoin?

saver miner

payer payee

relay

Page 101: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

What is Money?

Page 102: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

What is Money?

Page 103: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Summary

Page 104: Cryptocurrencies - TIK · Cryptocurrencies. What is Bitcoin? + + = Technology. The Bank of Bitcoin User Balance A 2 B 5 C 8 TX B ! A 24 53. The Bank of Bitcoin User Balance A 2 B

Thank You!Questions & Comments?

www.disco.ethz.ch

Thanks to my co-authorChristian Decker