Slide 1

Slide 1 text

in Bitcoin Cryptography by U-Zyn Chua for Singapore CryptoParty 15 April 2013

Slide 2

Slide 2 text

U-Zyn Chua is not Cryptographer Economist

Slide 3

Slide 3 text

U-Zyn Chua is IT Consultant @ Security enthusiast Bitcoiner

Slide 4

Slide 4 text

How many... ? Bitcoiner? Knows about Bitcoin? Have no idea about Bitcoin?

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

What is Bitcoin? Distributed electronic cash protocol and a unit of currency

Slide 7

Slide 7 text

What is Bitcoin? Satoshi Nakamoto Genesis block on 3 Jan 2009 “Gone for good” since late 2010

Slide 8

Slide 8 text

What is Bitcoin?

Slide 9

Slide 9 text

1m44s

Slide 10

Slide 10 text

What makes a currency? Scarce Predictable growth Secure Valuable

Slide 11

Slide 11 text

Production is halved every 4 years Never more than 21 million

Slide 12

Slide 12 text

~USD 100/Bitcoin

Slide 13

Slide 13 text

Problems Currency creation Keeps value stable Fraud prevention

Slide 14

Slide 14 text

Cryptography No central bank No watchdog only No authority

Slide 15

Slide 15 text

How does Bitcoin work? Public-key cryptography Peer-to-peer network Proof-of-work

Slide 16

Slide 16 text

Public-key crypto 160-bit hash (SHA-256) 18YCR8bvxLaVCmbgY6eCavF733QDs1sQDT Base58-encoded Generate as many as you want 215,000,000,000,000,000,000,000,000,0 00,000,000,000 addresses per capita.

Slide 17

Slide 17 text

Public-key crypto

Slide 18

Slide 18 text

Transaction Public & broadcasted http://blockchain.info

Slide 19

Slide 19 text

Transaction 499335.01317523 1DkyBEKt5S2GDtv7aQw6rQepAvnsRyHoYM 105555.03133700 1933phfhK3ZgFQNLGSDXvqCn32k2buXY8a 79957.03133700 1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF 53000.03133700 16cou7Ht6WjTzuFyDBnht9hmvXytg6XdVT 50259.03133700 1CfPAfVDe1Br11SkNrk2bEMmMP3bAA5wRr 50130.03133700 13vJZKHKBirruXwmjMaRtakzPQRRHQit1S 50000.03133700 1P3S1grZYmcqYDuaEDVDYobJ5Fx85E9fE9 50000.03133700 1DEpjpftLbsGiCJvJDp2F2quVRnymV8U5Q 47458.03133700 1BBqjKsYuLEUE9Y5WzdbzCtYzCiQgHqtPN 44914.03133700 1MR6pXDZ6gpBVN8n61SqCNF61vU8ZzRu8Y 44512.03133700 1BVA88962SxcymHSfqXSy9F7cgXefi3zgt 40000.03133700 16Ls6azc76ixc9Ny7AB5ZPPq6oiEL9XwXy 40000.03133700 12HddUDLhRP2F8JjpKYeKaDxxt5wUvx5nq 40000.03133700 1cXNTyXj4xPGopfYZNY5xfSM1EPJJvBZV 38058.03133700 1FngtAcZsLfK89MNe7TqzyqVtSype8TiVD 38000.03133700 18Hsgq92AUB1PYLU6MUMQXiwdebaDRo9oQ 35000.00000000 1DAmsh8tHUtH2cVUDMxnDkKr8SaPNkb36h 31000.03133700 12ib7dApVFvg82TXKycWBNpN8kFyiAN1dr 30000.03133700 1MyGwFAJjVtB5rGJa32M6Yh46cGirUta1K Bitcoin richest

Slide 20

Slide 20 text

Transaction 499335.01317523 1DkyBEKt5S2GDtv7aQw6rQepAvnsRyHoYM 105555.03133700 1933phfhK3ZgFQNLGSDXvqCn32k2buXY8a 79957.03133700 1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF 53000.03133700 16cou7Ht6WjTzuFyDBnht9hmvXytg6XdVT 50259.03133700 1CfPAfVDe1Br11SkNrk2bEMmMP3bAA5wRr 50130.03133700 13vJZKHKBirruXwmjMaRtakzPQRRHQit1S 50000.03133700 1P3S1grZYmcqYDuaEDVDYobJ5Fx85E9fE9 50000.03133700 1DEpjpftLbsGiCJvJDp2F2quVRnymV8U5Q 47458.03133700 1BBqjKsYuLEUE9Y5WzdbzCtYzCiQgHqtPN 44914.03133700 1MR6pXDZ6gpBVN8n61SqCNF61vU8ZzRu8Y 44512.03133700 1BVA88962SxcymHSfqXSy9F7cgXefi3zgt 40000.03133700 16Ls6azc76ixc9Ny7AB5ZPPq6oiEL9XwXy 40000.03133700 12HddUDLhRP2F8JjpKYeKaDxxt5wUvx5nq 40000.03133700 1cXNTyXj4xPGopfYZNY5xfSM1EPJJvBZV 38058.03133700 1FngtAcZsLfK89MNe7TqzyqVtSype8TiVD 38000.03133700 18Hsgq92AUB1PYLU6MUMQXiwdebaDRo9oQ 35000.00000000 1DAmsh8tHUtH2cVUDMxnDkKr8SaPNkb36h 31000.03133700 12ib7dApVFvg82TXKycWBNpN8kFyiAN1dr 30000.03133700 1MyGwFAJjVtB5rGJa32M6Yh46cGirUta1K Bitcoin richest 500k BTC ~ USD 50 million stored in a PUBLIC string!

Slide 21

Slide 21 text

Mining Adding tx records to ledger Confirm transactions Profit (50 25 BTC / block) ???

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Block chain Broadcasted transaction database since Day 1 (Jan 3 2009) 1 block every 10 minutes (how?) Currently at >6GB

Slide 25

Slide 25 text

Block Field Purpose Version Client version Previous hash Hash of previous block Merkle root Hash of transactions Timestamp Current UNIX time Target Target hash Nonce 32-bit number

Slide 26

Slide 26 text

Target 1 block every 10 minutes (this is how!) A (max) target hash output Generate lower hash than the target The higher the target is, the harder it is

Slide 27

Slide 27 text

Target Let’s look back at block’s component and assume that we want to make a hash with the following output 0x0000000000000fffffffff.....

Slide 28

Slide 28 text

Target Difficulty is adjusted every 2016 blocks (2 weeks) Based on time it takes for the last 2016 blocks Current chance to find a block: 0.0000000000000000303436847859644281966140511030971538275

Slide 29

Slide 29 text

Block generation

Slide 30

Slide 30 text

Block generation

Slide 31

Slide 31 text

Cryptography is the authority! is the watchdog! Many other clever features of Bitcoin

Slide 32

Slide 32 text

Security incidents

Slide 33

Slide 33 text

Security incidents

Slide 34

Slide 34 text

Security incidents

Slide 35

Slide 35 text

Is Bitcoin safe? https://github.com/bitcoin/bitcoin Reward: USD 140 million

Slide 36

Slide 36 text

Is Bitcoin safe? https://github.com/bitcoin/bitcoin Reward: USD 140 million Reward: USD 1.1 billion!

Slide 37

Slide 37 text

Bitcoin vs Bank Bitcoin Bank Trust no one Trust bank Open source Closed source Proven & known security Obscured security

Slide 38

Slide 38 text

Questions? @uzyn [email protected]