Bitcoin

Bitcoin can be viewed as a replication protocol tracking transactions. A log of operations defines the truth. Bitcoin uses no centralized authority, it’s permissionless. It must prevent,

  • Spending someone else’s money
  • Double spending

The system is now known as a blockchain. This is a ledger of transactions.

pub(user1) refers to the public key of user 1
H(prev) refers to the cryptographic hash of the previous transaction for this “coin”
sig(user2) is the signature over transaction by previous owner

If T7 is a payment from X to Y, the transaction consists of (pub(y), H(T6), sig(X))
The signature might look like a public key appended to the rest of the message, which is signed with the associated private key
All X needs from Y is their public key

Key management is a big issue here, since the scheme assumes that you have a way to secure your private-key, which is easier said than done

Double spending creates a fork in the transaction log, so we need a mechanism to keep a majority of peers in agreement

The Bitcoin peer network is a peer-to-peer network of computers participating in agreement. Transactions are batched into blocks which are flooded through the network to ensure agreement.

A block is made up of,

  • H(prev block)
  • Reward transaction
  • List of transactions
  • Nonce
  • Current time stamp

The aim is to make a new block every 10 minutes. The network accomplishes this by requiring the hash of the block to begin with an increasing number of 0s. This hash can be modified by appending to the nonce.

The reward transaction is motivation for peers to spend CPU on hash calculations (mining) and to upkeep the ledger.

Once a peer mines the block, it floods it through the network and valid peers will verify and accept it.