week 2

Cards (25)

  • Byzantine Generals' Problem
    One commander and 3 generals, one traitor, a 'problem' with consensus, how to avoid a catastrophe, what if there are 2 traitors, no more than 30% of the generals can be traitors for the algorithm to work
  • The application of the Byzantine Generals' problem are substantial, from nuclear power plants, space stations, ICBMs, espionage to aspects of Accounting and Finance
  • Blockchain
    A continuously growing list of records or blocks that are linked and secured with cryptography
  • The concept (not the term) of blockchain was introduced in 1991 by Dr Staurt Haber and W. Scott Stonetta in the article How to time-stamp a digital document
  • Block
    Contains data, previous hash, and a hash
  • The first block is called a Genesis block and will remain the first block 'forever'
  • Blockchain
    • Peer-to-peer networks (transaction capacity)
    • Public key cryptography (transaction legitimacy)
    • Consensus protocol (transaction consensus)
  • Peer-to-peer network (P2P network)
    All participants have same privileges, any participant with a computer can join the network and engage in exchanges, connections are usually chosen randomly, to exchange messages/facilitate exchanges, we create a transaction message containing a list of the changes, and send it to the network participants
  • Transaction legitimacy
    Public and private keys are used to decrypt and make changes respectively, losing the private key means losing the ability to make changes
  • Transaction consensus
    Consensus protocol is needed to ensure an agreement is reached when there are too many blocks for the network to process the information fast enough
  • Decentralised databases are costly but harder to tamper with
  • Applications of blockchain
    • Portfolio diversification
    • No need to trust any external entity's promises
    • Transactions cannot be blocked by external entities
    • No permission required (for now) to own blockchain assets
  • Proof-of-existence
    A certain document/data existed at a specific time, hash value lets us store a cryptographic 'version' of the data to be retrieved as desired, anyone with the access can verify the integrity and timestamp of the data, without access no one can extract the corresponding source data
  • Bitcoin
    A digital currency which uses blockchain technology, described by Satoshi Nakamoto in 2008
  • There are 3 items which make a block of Bitcoin: a batch of transactions (typically 1k–2k), hash from the previous block, and a Nonce (random number)
  • SHA256 algorithm

    Secure Hash Algorithm 256 Bits, the chances of the fingerprints of 2 people being identical is 1 in 60m, it can be used to protect digital files (docs, software) with fingerprints
  • Characteristics of Hash algorithms
    • One-way: you cannot restore the document from Hash
    • Deterministic results: same results from the same input (no typos please!)
    • Fast computation
    • Avalanche effect
    • Anti-collision: 1 in 60m not infinite! Same hash leads to forgery. Therefore, it must withstand collision.
  • Immutable ledger
    Data stored in a blockchain, if someone wants to seize an asset by tampering with the blocks, they will have to change not one but all the blocks, and the more time passes the harder it gets
  • Distributed P2P network
    Thousands of computers interconnected through the same network, being decentralised, the blockchain is copied across all computers, all these users can update (add blocks) the blockchain and the blockchain will be updated in all the computers, in case of a (hypothetically successful) hacking of one computer, all the other users (computers) will be alerted as the blockchains will not match, hackers will have to attack at least 50% of the computers at the same time and tamper with the blocks extremely fast
  • Mining
    The process of putting the block number, the data and the previous hash in the 'hashing algorithm' to get the new hash, the NONCE helps to generate the hash, miners try to get close to the hash by varying the NONCE
  • Consensus protocol: Proof of Work (PoW)
    When 2 miners mine a block at the same time, the longest chain wins i.e. the part of the network with highest (>50% not 30%) hashing power (assuming all of them has same power) will generate the longest chain, the consensus protocol is more powerful than the Byzantine Generals' problem
  • How to add a new block to the blockchain
    Via the Consensus Protocol – Proof of Work (PoW), the miner have to solve a mathematical problem by randomly trying (trial & error only) different nonces so that the block is sufficiently small (sufficient number of zeroes), once the miner solves the 'problem', they immediately inform the rest of the network about the solution i.e. the winning block, the network verifies it and the block goes live on the blockchain
  • Strengths and weaknesses of blockchain
    • Strengths: Difficult to tamper, Decentralised (addresses the issue of trust on one party), Distributed (removes a single point of failure)
    Weaknesses: Expensive, Low transaction frequencies (e.g. Visa 24,000 transactions/sec, Bitcoin 7 transactions/sec), High electricity costs of mining (more miners more electricity consumption and only one succeeds in finding the block)
  • The list of applications of blockchain goes on, for exam purposes, focus on the impact of Blockchain in Accounting and Finance
  • References, reading and useful links are provided for further information