0% found this document useful (0 votes)
49 views24 pages

P08 Blockchain

This document provides an overview of blockchain and related concepts. It begins with the general structure of blockchain as a growing list of cryptographically linked blocks. It then discusses the background and evolution of blockchain from earlier concepts in the 1980s to Bitcoin in 2008. Key definitions are provided for blockchain, distributed ledger, and related terms. The document outlines concepts like Byzantine faults, distributed system design, and different types of blockchains. It concludes with features of blockchain and its relationship to cryptocurrency.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views24 pages

P08 Blockchain

This document provides an overview of blockchain and related concepts. It begins with the general structure of blockchain as a growing list of cryptographically linked blocks. It then discusses the background and evolution of blockchain from earlier concepts in the 1980s to Bitcoin in 2008. Key definitions are provided for blockchain, distributed ledger, and related terms. The document outlines concepts like Byzantine faults, distributed system design, and different types of blockchains. It concludes with features of blockchain and its relationship to cryptocurrency.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

King Fahd University of Petroleum & Minerals

College of Computer Sciences & Engineering

Blockchain: An Overview

Cryptography and Blockchain Applications

Prepared by:
Sultan Almuhammadi
This lecture is based on:
Bashir: Mastering Blockchain (Ch 1. Blockchain 101)
Narayanan: Bitcoin and Cryptocurrency Technologies (Ch 1)
Outline

 Blockchain General Structure


 Background
 Definitions:
 Blockchain
 Tamper-evident vs Tamper-Proof
 Terminologies
 Byzantine Generals Problem
 Distributed System Design
 Types of Blockchain
 Features of Blockchain
 Blockchain and Cryptocurrency

2
Blockchain General Structure

 Blockchain: is a growing list of records (called blocks) linked


cryptographically using secure hashing.
 Each block contains a hash code of the previous block forming
a linked list built with hash pointers
 The use of cryptographic secure hashing makes the chain
tamper-evident.

3
Background
 In 1982, David Chaum proposed a structure “similar to
blockchain” with protocols to establish, maintain and trust a
system by mutually suspicious groups.
 In 1991, cryptographically secured chain of blocks was
introduced to implement a system with timestamped documents
that cannot be tampered. Then Merkle tree was added to the
design to improve efficiency in 1992.
 The term “blockchain” was first conceptualized with the
invention of Bitcoin in 2008.
 Bitcoin:
 A peer-to-peer electronic cash
 Built using chain of blocks and Merkle tree.

4
Definitions
 Blockchain:
 A peer-to-peer distributed ledger that is cryptographically-secure,
append-only, immutable and updateable only via consensus or
agreement among peers.
 Peer-to-peer:
 No central controller in the network
 Participant peers talk to each other directly
 Distributed ledger:
 The ledger is spread across the network among all peers.
 Each peer holds a copy of the whole ledger (or the blockchain).
 Cryptographically-secure:
 The security of the ledger is provided using cryptography (like secure
haching, digital signature, encryption, …etc.)

5
Definitions (Continue)
 Append-only:
 Data can be only added to the blockchain sequentially in time-ordered.
 Immutable:
 Once the data is added, it cannot be changed.
 Any change or modification can be detected (tamper-evident).
 Updateable via consensus:
 Any update is validated first then added to the blockchain only if a
consensus has been reached among all peers/nodes.
 The consensus is achieved using various consensus facilitation
algorithms.

6
Tamper-evident vs Tamper-Proof

 Tamper-evident:
 If Eve modifies any block in the chain, it will result in the hash pointer
in the following block being incorrect, and hence the modification is
detectable. The next hash code is used as an evidence of modification.

 Tamper-proof:
 It is hard to modify (or tamper) with the data in the first place.
 If Eve manages to modify the data, the modification may not
necessarily be detected.
7
Terminologies

 Distributed Systems:
 Two or more nodes work with each other in a coordinated
fashion to achieve a common outcome.
 The end users see it as a single logical platform.
 Eg. Google's search engine.
 Nodes:
 Individual players in a distributed system.
 Capable of sending and receiving messages to and from
each other.
 Have memory and a processor
 Can be honest, faulty, or malicious
 Byzantine node:
 A node that exhibits irrational behavior
 Named after the Byzantine Generals Problem.
8
Terminologies

 Byzantine Generals Problem:


 A group of generals who lead different battalions to attack
or retreat from a city.
 The only way of communication is via a messenger.
 They need to agree to strike at the same time to win.
 One or more generals might be traitors, and can send a
misleading message.

9
Terminologies

 Practical Byzantine Fault Tolerance (PBFT) Algorithm


 Introduced by Castro and Liskov in 1999
 To solve the Byzantine Generals Problem
 The consensus is reached after receiving a certain number
of messages containing the same signed content.
 Gossip protocol:
 A procedure or process of a peer-to-peer network
communication that is based on the way gossips spread.
 Distributed systems use peer-to-peer gossip to ensure that
data is reached to all members of the group.

10
Distributed System Design

 The primary challenge in distributed system design:


 Coordination between nodes and fault tolerance.
 Even if some of the nodes become faulty or network links break,
the distributed system should be able to tolerate this and
continue to work to achieve the desired result.

 Example:
 N4 is a Byzantine node
 L2 is broken or a slow link

11
Types of Blockchain
 Public Blockchain:
 Not owned by anyone
 Open to the public
 Any peer can participate in the decision-making process
 All peers maintain a copy of the ledger locally
 Examples: Bitcoin, Ethereum

12
Types of Blockchain
 Private Blockchain:
 Open only to a group of individuals or organizations
 The group members share the ledger among themselves
 Example: HydraChain (an extension of the Ethereum providing
Permissioned Distributed Ledgers)

13
Types of Blockchain
 Semiprivate Blockchain:
 Part of the blockchain is private and part of it is public
 Can be used in scenarios where the private part remains
internal, while the public part is used by anyone.

14
Features of Blockchain

 Distributed consensus
 Transaction verification
 Platform for smart contracts
 Transferring value between peers
 Generation of cryptocurrency
 Smart property
 Provider of security
 Immutability
 Uniqueness

15
Blockchain and Cryptocurrency
 Bitcoin (BTC) is the first cryptocurrency built on the blockchain
technology. It was published in 2008, and first used in 2009.
 Over 8000 cryptocurrencies/altcoins have been introduced since then:
 Litecoin (LTC) and Namecoin (NMC) in 2011
 Peercoin (PPC) in 2012
 Ripple (XRP) in 2013
 Dash (DASH) and Monero (XMR) in 2014
 Ethereum or “Ether” (ETH) in 2015
 Zcash (ZEC), Bitcoin Cash (BCH), EOS, and Cardano (ADA) in 2017

16
Blockchain and Cryptocurrency
 Public Keys as Identities:
 Cryptocurrencies use public-key as identity of the coin owner.
 When the coin owner want to spend the coin, the transaction is signed
using the owner’s private key.
 The signature can be verified publicly.
 The transaction states the value of the spent coin and the new owner.
 In order to understand how Bitcoin and other cryptocurrencies
work, we will consider a simple cryptocurrency that may not
have enough security. Then we the security features gradually.
 A Simple cryptocurrency (Goofy-Coin)
 An improved cryptocurrency (Scrooge-Coin)

… Keep improving the coin features…


 Bitcoin

 Other altcoins

17
Blockchain and Cryptocurrency
 A Simple Cryptocurrency (Goofy-Coin)

 Rules of Goofy-Coin:
 Goofy can create new coins by simply signing a statement that he’s making a new
coin with a unique coin ID.
 Whoever owns a coin can pass it on to someone else by signing a statement that
saying, “Pass on this coin to X” (where X is specified as a public key)
 Anyone can verify the validity of a coin by following the chain of hash pointers
back to its creation by Goofy, verifying all of the signatures along the way.
18
Blockchain and Cryptocurrency
 Security issues of Goofy-Coin:
 Goofy controls the system (centralized)
 Double-Spending Problem

 Double-Spending Attack:
 One of the key challenge in digital cash
 Alice can spend the same coin twice.
 First she passes it to Bob, and sign the
transaction, then she passes it Charley and
sign the transaction.
 Both Bob and Charley can verify the
validity of these transactions following
the hash pointers to the creation of the
coin signed by Goofy.
19
Blockchain and Cryptocurrency
 An improved Cryptocurrency (Scrooge-Coin)
 To solve the double‐spending problem.
 Append‐only ledger containing all transactions.
 It will be publicly visible if coins were previously sent to a
different owner.
 Use a blockchain, were each block contains the transaction ID
and a hash code of the previous block.
 Types of Transactions: CreateCoins or PayCoins.

20
Blockchain and Cryptocurrency
 Coin creations in Scrooge-Coin:

 CreateCoins transaction creates multiple coins signed by Scrooge.


 Each coin has a serial number within the transaction (Coin ID).
 Each coin has a value.
 Each coin has a recipient (public key) who gets the created coin.

21
Blockchain and Cryptocurrency
 PayCoins Rules of Scrooge-Coin:
 The consumed coins are valid (correctly
created in previous transactions)
 The consumed coins were not already
consumed in some previous transaction.
(No double‐spend).
 The total value of the coins that come out
of this transaction is equal to the total
value of the coins that went in.
 The transaction is validly signed by the
owners of all of the consumed coins.

22
Blockchain and Cryptocurrency
 Security issues of Scrooge-Coin:
 Double-Spending problem is solve.
 Scrooge controls the system (centralization)

 Decentralization
 Nobody controls the system.
 Example: Bitcoin (and altcoins)

23
Cryptocurrency Market Cap.
 As of Aug 2018:

 As of Nov 2020:
 Over 3900 cryptocurrencies
 Market cap: $499 Billions
 See https://coinmarketcap.com/ for updates

24

You might also like