Bitcoin Proof of Work Require a unit of work to do a task Send - - PowerPoint PPT Presentation

bitcoin proof of work
SMART_READER_LITE
LIVE PREVIEW

Bitcoin Proof of Work Require a unit of work to do a task Send - - PowerPoint PPT Presentation

Bitcoin Proof of Work Require a unit of work to do a task Send email Access a website Process a Bitcoin transaction Why? Prevent spam Prevent denial of service attacks Rate-limit the network HashCash Find a partial


slide-1
SLIDE 1

Bitcoin

slide-2
SLIDE 2

Proof of Work

  • Require a unit of work to do a task
  • Send email
  • Access a website
  • Process a Bitcoin transaction
slide-3
SLIDE 3

Why?

  • Prevent spam
  • Prevent denial of service attacks
  • Rate-limit the network
slide-4
SLIDE 4

HashCash

  • Find a partial pre-image of a hashed value.
  • Hashcash: SHA-1
  • Bitcoin: SHA-256
  • Hashcash: at least the first 20 digits (out of 160) need to

be 0

  • Bitcoin: at least the first T digits (out of 256) need to be 0
  • Question: what security properties does this have?
slide-5
SLIDE 5

Merkle Tree

slide-6
SLIDE 6

From previous classes

  • Byzantine consensus
  • Hash function
slide-7
SLIDE 7
slide-8
SLIDE 8

8

slide-9
SLIDE 9

9

slide-10
SLIDE 10

10

slide-11
SLIDE 11

11

slide-12
SLIDE 12

Bitcoin

  • Bitcoin is a public, digital, decentralized currency.
  • Public
  • Every transaction (past or current) can be read by anybody.
  • Digital
  • There are no bills, only bits to represent transactions.
  • Decentralized
  • Bitcoins are mined, not minted, by a collection of actors, not a central bank.
  • Anybody can create an account and receive bitcoin.
  • Anybody can try to mine bitcoin.
  • Rules are set by computer code and changed upon a consensus of the

actors.

12

slide-13
SLIDE 13

Cash vs. Digital Cash

  • Properties of traditional cash
  • Anonymous
  • Transferable
  • No transaction fees
  • Total money supply expendable,

set by central bank

  • Properties of digital cash
  • Pseudo-anonymous
  • Transferable
  • Very low transaction fees
  • Total money supply fixed, set

by protocol.

13

slide-14
SLIDE 14

Why Scammers Use Bitcoin

  • Lower fees (more profit for criminals)
  • Large userbase (compared to other digital currencies)
  • Easy to get (can exchange Bitcoin for cash on the street)
  • Distributed system (no Bank of Bitcoin to forcibly shut down)
  • Less direct regulatory oversight (anti-money laundering

efforts only on some endpoints)

14

slide-15
SLIDE 15

Bitcoin

Give green 0.25 BTC

0.25 BTC

15

slide-16
SLIDE 16

Merkle Tree

slide-17
SLIDE 17

Blockchain

slide-18
SLIDE 18

Block Header

  • version
  • previous block header hash
  • merkle root hash
  • time when miner started hashing the header
  • nBits (representation of difficulty level)
  • nonce
slide-19
SLIDE 19

Mining

  • https://www.youtube.com/watch?v=GmOzih6I1zs
  • Hashcash
  • Difficulty set by speed of network
  • Once solution is found, broadcast block to network
  • If valid, mining begins on merkle root including the

block

  • Otherwise, everybody ignores it.
slide-20
SLIDE 20

Mining Pools

  • Miners group together to share rewards, divide the

work

  • Lowers the variance for revenue.
  • Centralization in a decentralized network
slide-21
SLIDE 21

51% attack

  • Attacker owns more than half of the miners
  • Doublespend: Reverse transactions that he sends

while he's in control.

  • Prevent some or all transactions from confirming
  • Prevent other miners from mining any blocks
slide-22
SLIDE 22

Block Withholding Attacks

  • if we gain a lead:
  • withhold blocks


mine on private chain

  • else if lead shrinks, but is still at least alpha:
  • reveal blocks to keep abreast with public chain
  • else if lead drops below alpha:
  • reveal all blocks


mine on public chain

slide-23
SLIDE 23
slide-24
SLIDE 24

Spam attack

  • Fill up the blockchain with small, insignificant

transactions

  • Prevent others from transacting
slide-25
SLIDE 25

Mempool

slide-26
SLIDE 26

Confirmed Transactions

slide-27
SLIDE 27

Blockchain Size

slide-28
SLIDE 28

Theft of Bitcoin

  • “Be your own Bank”
  • Steal the keys, steal the bitcoin forever
  • Bad passwords
  • Bad randomness
  • Bad security hygiene
slide-29
SLIDE 29

Sybil Attack

  • Single adversary controls a lot of nodes
  • From these nodes, can carry out a 51% attack
slide-30
SLIDE 30

Blacklisting

  • Stop transactions from being processed to/from a

node

slide-31
SLIDE 31

Fungibility

  • Each Bitcoin is worth the same amount as every
  • ther Bitcoin
  • Does this property hold?
slide-32
SLIDE 32

Questions

  • With the rise of 51% attacks:
  • why? to what end?
  • when will this stop?
  • What are the points of centralization in this

network?

  • Is this inevitable?