Bitcoin Knowledge How Bitcoin Works at a Technical Level (Part 1) - - PowerPoint PPT Presentation

bitcoin knowledge
SMART_READER_LITE
LIVE PREVIEW

Bitcoin Knowledge How Bitcoin Works at a Technical Level (Part 1) - - PowerPoint PPT Presentation

Bitcoin Knowledge How Bitcoin Works at a Technical Level (Part 1) By Ryan Brewer @rhunbre v1 DISCLAIMER This content is intended to be used, and must be used, for informational purposes only. Always perform your own analysis before making


slide-1
SLIDE 1

Bitcoin Knowledge

How Bitcoin Works at a Technical Level (Part 1) By Ryan Brewer @rhunbre

v1

slide-2
SLIDE 2

DISCLAIMER

This content is intended to be used, and must be used, for informational purposes only. Always perform your own analysis before making any investment, and take your own personal circumstances into account during such analysis. Bitcoin is about individual empowerment, not hand-holding, and you should seek independent financial advice from a professional in connection with, or independently research and verify yourself, any of the following information which you wish to rely upon, whether for the purpose of making an investment decision or

  • therwise.

By Ryan Brewer (rhunbre) v1

slide-3
SLIDE 3

WHAT IS BITCOIN?

  • Bitcoin is a cryptocurrency that was launched January 3, 2009.
  • cryptocurrency: a digital asset, serving as a medium of exchange that uses

cryptography to secure transactions and control money supply

  • But… Bitcoin is so much more!
  • A Distributed, Global, Immutable Public Ledger
  • A Public Key Infrastructure (PKI)
  • A Smart Contracts Platform
  • A Timestamping Service
  • An Energy Arbitrage Method

v1 By Ryan Brewer (rhunbre)

slide-4
SLIDE 4

WHAT IS BITCOIN?

Bitcoin is…

  • Decentralized
  • Bitcoin nodes only connect to other peers.
  • Global
  • Bitcoin is borderless.
  • Immutable
  • Bitcoin transactions accumulate reversal difficulty over time.
  • Pseudonymous
  • Bitcoin payments are only identified with a cryptographic pseudonym.
  • Trustless
  • Bitcoin requires no trust in individual users, only in the protocol itself.

v1 By Ryan Brewer (rhunbre)

slide-5
SLIDE 5

WHAT IS A DECENTRALIZED NETWORK?

CENTRALIZED

  • ne node does

everything DISTRIBUTED nodes distribute work to subnodes DECENTRALIZED nodes are only connected to peers

client / peer subserver server Node Type Key

v1 By Ryan Brewer (rhunbre)

slide-6
SLIDE 6

WHAT IS BITCOIN?

  • Bitcoin is not yet fully anonymous. It is weakly pseudonymous by

default, and anonymity can be enhanced by following best practices and using developing privacy solutions (such as JoinMarket).

  • Better, and perhaps true, anonymity can be expected in the future as

additional features and improvements continue to be added to, and built on top of, Bitcoin.

  • Bitcoin uses a structure known as a “blockchain” to store

transaction data.

v1 By Ryan Brewer (rhunbre)

slide-7
SLIDE 7

WHAT IS BITCOIN?

  • Bitcoin has no central bank, or issuer. Instead, bitcoins are created

according to a predictable supply schedule that is controlled through a process known as “mining.”

  • This mining process ensures that a maximum of only 21 million

bitcoins can ever be created (but in practice, available supply will be lower).

  • Each bitcoin can be subdivided into one hundred million

subunits, which are called satoshis.

v1 By Ryan Brewer (rhunbre)

slide-8
SLIDE 8

WHAT IS BITCOIN?

  • Once a transaction has been added to a block, it is considered

“finalized”, which means irreversible up to some economic cost, which increases rapidly as blocks are added on top.

  • Bitcoin transactions have a strong guarantee of irreversibly after one

block, and a very strong guarantee after six blocks.

  • For comparison, credit card finalization time is measured

in months.

v1 By Ryan Brewer (rhunbre)

slide-9
SLIDE 9

WHAT IS BITCOIN?

  • Some of the techniques, or methods, that Bitcoin uses:
  • public key cryptography
  • cryptographic hash functions
  • a blockchain (shared public ledger)
  • a hashcash style proof-of-work (used for mining)
  • a peer-to-peer network for passing messages
  • consensus algorithm (or consensus rules), enforced

through mining AND by non-mining full nodes

  • a virtual machine (the Bitcoin script language)

v1 By Ryan Brewer (rhunbre)

slide-10
SLIDE 10

PUBLIC KEY CRYPTOGRAPHY

  • Public key cryptography, also called asymmetrical cryptography, uses

pairs of keys, a public key which may be disseminated widely, and a private key which is known only to the owner.

  • Each Bitcoin unspent output (UTXO) is associated with a public ECDSA

key.

  • When you send bitcoins, your Bitcoin software creates a

message, called a transaction, that assigns ownership to the specified public keys (as Bitcoin addresses).

  • Useful for authentication and encryption.

v1 By Ryan Brewer (rhunbre)

slide-11
SLIDE 11

CRYPTOGRAPHIC HASH FUNCTIONS

  • A hash function can be used to map data of an arbitrary size to data
  • f a fixed size. The output value is called a hash value, hash code,

digest, or simply hash.

  • A cryptographic hash function is designed to also be a one-way

function that is infeasible to reverse. An ideal cryptographic hash function can only be reversed via brute-force search or prior knowledge.

  • Bitcoin currently uses SHA-256 and RIPEMD-160.
  • SHA-256 Examples
  • In: hello, Out: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
  • In: Hello, Out: 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969

v1 By Ryan Brewer (rhunbre)

slide-12
SLIDE 12

THE BITCOIN BLOCKCHAIN

  • A blockchain (originally written as block chain) is a constantly growing

set of blocks (sets of transactions) which are linked and secured using cryptography (specifically, cryptographic hash functions).

  • In Bitcoin, each block contains the double SHA-256 hash of the

previous block.

  • The first version of Bitcoin simply counted block height to

determine the longest valid chain. Bitcoin now counts the cumulative work instead.

v1 By Ryan Brewer (rhunbre)

slide-13
SLIDE 13

THE BITCOIN BLOCKCHAIN

Block “Type” Key

genesis main

  • rphan

v1 By Ryan Brewer (rhunbre)

slide-14
SLIDE 14

PROOF-OF-WORK

  • Hashcash is a proof-of-work algorithm which requires a tunable

amount of work to calculate, but for which the proof can be easily and quickly verified.

  • Hash for Bitcoin Block 496900:

000000000000000000862f936c57d9c4df596fa50408017511c763f66677ccad

v1 By Ryan Brewer (rhunbre)

slide-15
SLIDE 15

PEER-TO-PEER NETWORK

  • A peer-to-peer (P2P) network is a distributed application architecture

that allows communication and coordination between peers.

  • Peers are equally privileged participants in the network.
  • Some Message Types in Bitcoin: version, verack, addr, inv, getdata,

notfound, getblocks, getheaders, tx, block, headers, getaddr, mempool, checkorder, submitorder, reply, ping, pong, reject, filterload, filteradd, filterclear, merkleblock, alert, sendheaders, feefilter, sendcmpct, cmpctblock, getblocktxn, blocktxn

v1 By Ryan Brewer (rhunbre)

slide-16
SLIDE 16

CONSENSUS RULES

  • There is a set of network level consensus rules for block validation

that full nodes MUST follow to stay in consensus with other full nodes.

  • Nodes can tighten these rules, such as refusing to relay otherwise

valid transactions.

  • But if they attempt to loosen the rules, such as broadcasting

invalid transactions or blocks, the rest of the network will ignore them.

v1 By Ryan Brewer (rhunbre)

slide-17
SLIDE 17

BITCOIN SCRIPT, AKA VIRTUAL MACHINE Pay To Public Key Hash (P2PKH) Example

OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <sig> <pubKey>

v1 By Ryan Brewer (rhunbre)

slide-18
SLIDE 18

BITCOIN SCRIPT, AKA VIRTUAL MACHINE Pay To Public Key Hash (P2PKH) Example

OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <pubKey>

<sig> v1 By Ryan Brewer (rhunbre)

slide-19
SLIDE 19

BITCOIN SCRIPT, AKA VIRTUAL MACHINE Pay To Public Key Hash (P2PKH) Example

OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

<sig> <pubKey> v1 By Ryan Brewer (rhunbre)

slide-20
SLIDE 20

BITCOIN SCRIPT, AKA VIRTUAL MACHINE Pay To Public Key Hash (P2PKH) Example

OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

<sig> v1 By Ryan Brewer (rhunbre)

slide-21
SLIDE 21

BITCOIN SCRIPT, AKA VIRTUAL MACHINE Pay To Public Key Hash (P2PKH) Example

OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

<sig> <pubKey> <pubKey> v1 By Ryan Brewer (rhunbre)

slide-22
SLIDE 22

BITCOIN SCRIPT, AKA VIRTUAL MACHINE Pay To Public Key Hash (P2PKH) Example

<pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

<sig> <pubKey> <pubKeyHash> v1 By Ryan Brewer (rhunbre)

slide-23
SLIDE 23

BITCOIN SCRIPT, AKA VIRTUAL MACHINE Pay To Public Key Hash (P2PKH) Example

OP_EQUALVERIFY OP_CHECKSIG

<sig> <pubKey> <pubKeyHash> <pubKeyHash> v1 By Ryan Brewer (rhunbre)

slide-24
SLIDE 24

BITCOIN SCRIPT, AKA VIRTUAL MACHINE Pay To Public Key Hash (P2PKH) Example

OP_CHECKSIG

<sig> <pubKey> v1 By Ryan Brewer (rhunbre)

slide-25
SLIDE 25

PRICE HISTORY OF ONE BITCOIN

v1 By Ryan Brewer (rhunbre)