Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

AN INTRODUCTION TO

BLOCKCHAIN

Christos Profentzas

1/19
TODAY’S OUTLINE

• Background (Cryptography Basics)


• Blockchain
• Cryptocurrencies
• Distributed Ledger Technology (DLT)
• Smart contracts
• General applications

2/19
CRYPTOGRAPHY BASICS

• Public key cryptography


• Digital signatures
• Hash functions
• Merkle Tree
• More at cryptography course: TDA 352 - DIT 250

3/19
PUBLIC KEY CRYPTOGRAPHY

• The public key is known to everyone


• The private key is secret and only the owner can use it
• Anyone can use the public key
• Only the owner can use the private key

4/19
DIGITAL SIGNATURES

• Only the owner of the private key can sign a message


• The sender sign the message using the private key
• Anyone can verify the signature using the public key
• Remember public key is public

5/19
CRYPTOGRAPHIC HASH FUNCTIONS

• Take big or small messages as input


• The output is fix e.g., 256 bits
• Is hard* to find the input of a given output
• Is hard* to find two inputs with the same
outputs, even though there exist

*Hard: Computational infeasible


6/19
MERKLE TREE

Root Hash

Crypto
Hash Hash CD
Hash AB
pointers
Digital
Signatures
Hash A Hash B Hash C Hash D

A B C D

Signed Transactions
7/19
BLOCKCHAIN

Linked-List using crypto hash pointers

Genesis Block Block 1 Block 2

Previous Block: Previous Block :


“Generate
000000abcd 000000efgh
10 billion
Bitcoins” Merkle root Merkle root
Hash of
the whole
H( ) H( ) H( ) Block

000000abcd 000000efgh 000000jklm

8/19
TIME
THE BIG PICTURE
Block 1 Block 2 Block 3

Previous Block:
Previous Block: Previous Block:
H( ) 000000efgh
000000xxxx 000000abcd
v
Merkle root
Merkle root Merkle root 000000efgh

Root Hash Tampering just one transaction


change the hash of the whole block
Crypto
Hash Hash AB Hash CD
pointers
Digital
Signatures
Hash A Hash B Hash C Hash D

A B C D
9/19
Signed Transactions
BLOCKCHAIN TAMPERING

Computational feasible to tamper


and
Forks may appear here

BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK

More Secure Less Secure

10/19
TIME
BLOCKCHAIN FORKS

Consensus rule: continue with the longer available Chain


Original Chain

Forked Chain

s is tenc y
ua l con
Forked Chain Event
11/19
BLOCKCHAIN CONSESNUS

Two types of blockchain Public & Private

• Public blockchain: Anyone with a public key can participate


• Miners: try to find the hash pointer of the next block - Proof of Work (PoW)
• Golden rule: mining the longest chain

• Private blockchain: Access list of participants, no need of PoW


• Consensus is a typical byzantine failure problem

12/19
PEER TO PEER NETWORK

13/19
CRYPTOCURRENCIES

• Blockchain as money
• Public blockchain
• No Central Authority
(Distributed!)
• Primely depends on PoW

14/19
DISTRIBUTED LEDGER TECHNOLOGY

• Multiple parties keep a global log of records


• Multiple copies of the log
• Multiple writers not fully trust each other
• Avoid to use the central authority but we need consensus mechanism

15/19
BLOCKCHAIN FLOWCHART

16/19
SMART CONTRACTS

• Storing programming script in the blockchain


• When the conditions fulfilled miners execute the code
• Miners get a reward according the code size

17/19
GENERAL APPLICATIONS

• Financial contracts and derivates


• Decentralized governance
• Decentralized digital voting systems
• Distributed record keeping
• Electricity consumption
• Healthcare records
• Intellectual property

18/19
THANK YOU FOR THE ATTENTION!

19/19

You might also like