An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new...

44
An introduction to Cryptocurrencies Giorgos Panagiotakos Computer Security Course Organizers: Myrto Arapinis and Kami Vaniea November 27, 2016

Transcript of An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new...

Page 1: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

An introduction to Cryptocurrencies

Giorgos Panagiotakos

Computer SecurityCourse Organizers: Myrto Arapinis and Kami Vaniea

November 27, 2016

Page 2: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Bartering

Trade through bartering:

Figure: http://www.forbes.com/

problem: meet of demand

Page 3: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Bartering

Trade through bartering:

Figure: http://www.forbes.com/

problem: meet of demand

Page 4: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Commodity money

Use an intermediate commodity as ‘store-of-value’

Figure: http://asia.nikkei.com

I in Japan rice

I in India cowry shells

Meet of demands problem solved!

Page 5: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Commodity money

Use an intermediate commodity as ‘store-of-value’

Figure: http://asia.nikkei.com

I in Japan rice

I in India cowry shells

Meet of demands problem solved!

Page 6: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Currency

Money as an abstract form of value.

I Metal coins ( ≈ 1000BC )

I Paper money ( ≈ 1100AD )

I Electronic payment systems

Page 7: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Currency

Money as an abstract form of value.

I Metal coins ( ≈ 1000BC )

I Paper money ( ≈ 1100AD )

I Electronic payment systems

Page 8: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Currency

Money as an abstract form of value.

I Metal coins ( ≈ 1000BC )

I Paper money ( ≈ 1100AD )

I Electronic payment systems

Page 9: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Double spending

How are users protected from double spending?

I centralized control: ask the bank whether to accept atransaction or not

I too much power in one actor e.g. Wikileaks

I Why not make this system decentralized?

Page 10: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Double spending

How are users protected from double spending?

I centralized control: ask the bank whether to accept atransaction or not

I too much power in one actor e.g. Wikileaks

I Why not make this system decentralized?

Page 11: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Double spending

How are users protected from double spending?

I centralized control: ask the bank whether to accept atransaction or not

I too much power in one actor e.g. Wikileaks

I Why not make this system decentralized?

Page 12: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Double spending

How are users protected from double spending?

I centralized control: ask the bank whether to accept atransaction or not

I too much power in one actor e.g. Wikileaks

I Why not make this system decentralized?

Page 13: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Cryptocurrency

A cryptocurrency is a medium of exchange using cryptography tosecure the transactions and to control the creation of new units.

Main properties

I Trust Distribution

I Verifiability

I Pseudonimity/Anonymity/Traceability

Page 14: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

BitcoinCurrently most popular cryptocurrency.

Figure: https://www.flickr.com/photos/btckeychain/

I Introduced by Satoshi Nakamoto in 2008.

I 1 Btc = 730$

I Distributed public ledger of transactions open to anyone

Page 15: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Distributed Ledger

Figure: http://blogs.wsj.com/cio/2016/02/02/cio-explainer-what-is-blockchain/

Page 16: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Different roles of Bitcoin participants

Figure: Rainer Bohme: The Bitcoin Economic Ecosystem

Page 17: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Transactions

Figure: Satoshi Nakamoto: Bitcoin: A Peer-to-Peer Electronic Cash System

I an account is a pair of cryptographic keys

I coins are send from a public key to another public key

I transaction needs to be signed by the sender

I order of transactions matters!

Page 18: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Transactions

Figure: Satoshi Nakamoto: Bitcoin: A Peer-to-Peer Electronic Cash System

I an account is a pair of cryptographic keys

I coins are send from a public key to another public key

I transaction needs to be signed by the sender

I order of transactions matters!

Page 19: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Blocks of transactions

Figure: Satoshi Nakamoto: Bitcoin: A Peer-to-Peer Electronic Cash System

I each block depends on the hash of the previous block

I a chain of blocks contains the whole history of transactions

Page 20: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Append-only log

Cannot replace an earlier block due to collision resistance!

Page 21: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Permissionless

Anyone can be a miner!

I problem: Sybil attack

I solution: spend some kind of limited resource to be eligible

Page 22: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Permissionless

Anyone can be a miner!

I problem: Sybil attack

I solution: spend some kind of limited resource to be eligible

Page 23: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Permissionless

Anyone can be a miner!

I problem: Sybil attack

I solution: spend some kind of limited resource to be eligible

Page 24: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Proof of Work [Dwork,Naor ’92]

A proof that an amount of computational work has been done.

I Hash (SHA-256) must be less than 268

I 1 block is generated every 10 minutes.

I Difficulty is adjusted every 2016 blocks.

Page 25: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Agreement

problem: more than one chains can be created

I solution: pick the longest one

I Honest majority provably leads to consensus on transactionhistory! [Garay, Kiayias, Leonardos 2015]

Page 26: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Agreement

problem: more than one chains can be created

I solution: pick the longest one

I Honest majority provably leads to consensus on transactionhistory! [Garay, Kiayias, Leonardos 2015]

Page 27: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Agreement

problem: more than one chains can be created

I solution: pick the longest one

I Honest majority provably leads to consensus on transactionhistory! [Garay, Kiayias, Leonardos 2015]

Page 28: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Block rewards

problem: Why should anyone be a miner?

I solution: miners are rewarded for the blocks they mine.

I Rewards are halved every 4 years, currently 12.5Btc ≈ 8000$

Page 29: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Block rewards

problem: Why should anyone be a miner?

I solution: miners are rewarded for the blocks they mine.

I Rewards are halved every 4 years, currently 12.5Btc ≈ 8000$

Page 30: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Block rewards

problem: Why should anyone be a miner?

I solution: miners are rewarded for the blocks they mine.

I Rewards are halved every 4 years, currently 12.5Btc ≈ 8000$

Page 31: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized
Page 32: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized
Page 33: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Sounds good! Many open challenges...

Page 34: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Transactions rate

problem: transaction rate on Bitcoin is too slow...

Figure: http://believeinplace.com

I Bitcoin: 7 tps

I Paypal: 115 tps

I VISA: 47000 tps

solution: Make block generation faster! Security deteriorates...

Page 35: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Transactions rate

problem: transaction rate on Bitcoin is too slow...

Figure: http://believeinplace.com

I Bitcoin: 7 tps

I Paypal: 115 tps

I VISA: 47000 tps

solution: Make block generation faster! Security deteriorates...

Page 36: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Difficulty through time

Page 37: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Energy Consumption

Finding small hashes requires energy.

By 2020 bitcoin is expected to need as much energy as Denmark!

solution: Proof-of-Stake

Page 38: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Energy Consumption

Finding small hashes requires energy.

By 2020 bitcoin is expected to need as much energy as Denmark!solution: Proof-of-Stake

Page 39: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Privacy issues

Certain coins may have been used in ‘illegal’ transactions

I problem: fungibility, not all coins are equal

I solution: full anonymity! (see Zerocash and NIZK)

Page 40: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Privacy issues

Certain coins may have been used in ‘illegal’ transactions

I problem: fungibility, not all coins are equal

I solution: full anonymity! (see Zerocash and NIZK)

Page 41: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Privacy issues

Certain coins may have been used in ‘illegal’ transactions

I problem: fungibility, not all coins are equal

I solution: full anonymity! (see Zerocash and NIZK)

Page 42: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Altcoins

Many variants of Bitcoin offering exciting new possibilities

I Ethereum: Turing complete transaction system

I Namecoin: Decentralized DNS

Page 43: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Future

Can or should bitcoin replace national currencies?

Page 44: An introduction to Cryptocurrencies · Altcoins Many variants of Bitcoin o ering exciting new possibilities I Ethereum: Turing complete transaction system I Namecoin: Decentralized

Price history