You are on page 1of 13

Session Sections

❖ Section-1 (15 Mins)


❖ Q & A Session from Previous Lectures / Chapters
❖ Section-2 (2 Hours)

PIAIC Blockchain Specialist Program


❖ Lecture

Section-3 (15 Mins)


Blockchain Specialist

Program Lecture-3 ❖ Q & A Session from Today's Lecture

Triple Ledger
Q n A Session (15-Mins) ❖ Advancement of Ledgers

from
❖ Single Entry Ledger
❖ Benefits

Chapter Drawbacks


Advancement of Ledgers
Double Entry Ledger
1-4

❖ Benefits
❖ Drawbacks
❖ Triple Entry Ledger
❖ Benefits
Transactions Transactions

Course Objectives

❖ Types of Blockchain Types of Blockchain


❖ How Blocks are Created
❖ Cryptography and Hashing
Blockchain as History Types of Blockchains
❖ Immutable, cannot be changed ❖ Who are the participants in the Blockchain?

❖ Remember, each block contains the hash of the


❖ ANYONE with an important announcement to make can be a
Blockchain participant
previous block
❖ Personal data
❖ Append-only
❖ Groups of people can use the Blockchain to capture
❖ Data on the Blockchain cannot be deleted or edited, announcements that are important to them
only additions can be made ❖ Supply chain participants

❖ This provides a detailed history of ALL events, not ❖ Large groups of people can use Blockchain to capture important
data which support critical social and economic functions
just a snapshot of the current state!
❖ Voting records, land titles

Types of Blockchains Public or Private Blockchain


❖ Public vs Private ❖ Should the solution be a permissioned or permission-less Blockchain
❖ Are all participants considered equal, or should some have abilities
❖ Who can write data to the Blockchain?
that others do not?
❖ Public – everyone can add a record ❖ Election chairperson can add candidates to an election = permissioned
❖ Private – only certain participants can write data ❖ A digital currency which can exchanged and traded by
all = permissionless
❖ Open vs Closed
❖ Do customers understand the tech well enough to trust it with their data?
❖ Who can read data from the Blockchain? ❖ Great solutions may not be accepted until they have been socially
normalized
❖ Open – everyone can read Blockchain data
❖ Credit cards and early e-commerce
❖ Closed – only certain participants can read data
Public or Private Blockchain Hyperledger vs Ethereum
❖ Ethereum
❖ Music and content distribution
❖ Digital currency or asset-backed token
❖ Blockchain-enabled mobile data service
❖ On-line gaming
❖ Authoring, editing, and amending a piece of
legislation
❖ Group consensus is needed/required

Hyperledger vs Ethereum Blockchain Decision


❖ Currency
❖ Hyperledger ❖ Securities exchange

❖ Supply Chain ❖ Betting


❖ Video game
❖ Supplier / Manufacturer inventory management ❖ Voting records

Supply chain data


Managing internal business processes across


❖ Government financial records
geographically distributed locations
❖ Corporate earnings statements
❖ Allowing elected officials to vote on initiatives ❖ Construction tracking

without being present ❖ Defense programs


❖ Law enforcement agencies
❖ Others?
Blockchain Decision Matrix

How Blocks are


Created?

Blockchain Basics The “BLOCKS” of a Blockchain


❖ Think of a “Block” as a sheet of paper
with of 25 recorded Transactions.
❖ Each of the 25 lines has a complete
transaction record
❖ Each record is complete with time,
data, all transaction details.
❖ When a sheet is filled (25
transactions), the Nodes “validate”
the transactions on the current page
and post it on the Blockchain.
❖ All Nodes must agree (have
Consensus) on the transaction
content
Blockchain Blocks Blockchain Blocks
Transactions are grouped together into a Block ❖ Blocks store data, in Bitcoin, it’s the transactions, but it could be any digital data
❖ Blocks are created periodically (on average, 10mins for Bitcoin) by a process called
‘mining’
❖ A block represents a set of events that have occurred over a particular time frame
❖ Blocks are numbered in ascending order, 0 is first/oldest (usually, since the previous block)
❖ Blocks aren't identified by their height, but by their id
❖ The number is the ‘height’ of the block ❖ Block id is the hash of the data in the block
❖ Arrows only go from newer to older blocks - a block only ❖ 0=000000000019D6689C085AE165831E934FF763AE46A2A6C172B3F1B60A8
CE26F1=00000000839A8E6886AB5951D76F411475428AFC90947EE320161BB
directly links to the one immediately before it F18EB6048
2=000000006A625F06636B8BB6AC7B960A8D03705D1ACE08B1A19DA3FD
❖ Once a block is stored, it’s read-only (which is why it CC99DDBD
doesn’t link to the ones after it - that would require you to ❖ Block id is a digital fingerprint of that block
update it)

What is in a Block? What is in a Block?


❖ A ‘magic number’ (0xD9B4BEF9) to show it’s a Bitcoin block
❖ A size number to specify how much data is coming next
❖ Some metadata:
❖ A version number of the block format
❖ A link to the previous block that came immediately before it
❖ Merkle root of all the transactions in the block
❖ Timestamp of when the block was created
❖ Mining difficulty (more about this later)
The connection between blocks means that the Blockchain is much
❖ Nonce for proof-of-work (more about this later)
more tamper-proof than standard database structures. Since
❖ All the data of the 25 transactions recorded in this block Blockchain is a ledger of records, this tamper-proof record of assets is
known as an “Immutable Ledger”.
MERKLE TREE -HASH OF HASHES The “chain” of Blockchain
❖ What creates the chain?
❖ Multiple blocks of data,
in a certain order, into a ❖ Block header
single hash ❖ Contains information about the block
❖ Allows you to work out ❖ Platform version, timestamp, difficulty level, nonce, etc.
which block has changed ❖ Also contains the hash output of the previous block data
❖ All data from the current block, including its header is hashed
❖ The hash output for the current block will be stored in the
header of the next block
❖ All data from that block, including the header, will be hashed

The Lifecycle of a Blockchain

Cryptography and
Hashing
Cryptography Cryptographic Function
❖ What is a cryptographic function?
❖ Cryptography can be used to address the issue of privacy
❖ A function for encoding or encrypting data to protect the
❖ What is cryptography? contents from adversaries
❖ The study of how to send information back and forth ❖ Simple example function:
securely in the presence of adversaries ❖ The Secret - “PIAIC”
❖ The Function – Swap each letter in the secret with a new
letter according to the Key
❖ The Key - “+2”
❖ The Cipher = “RKCKE”

Cryptographic Function Public Key Cryptography


❖ Provides identity & transaction approval
❖ Real World Example: Rose Greenhow ❖ Public Key
❖ Renowned confederate spy during US Civil War ❖ Verify the digital signature of a given key pair

❖ Socialite in Washington D.C. ❖ Private Key


❖ Sign/approve any transaction/action that might be made by the holder of the key pair
❖ Used cryptography to communicate
PUBLIC/PRIVATE KEY CRYPTO Public and Private Keys
❖ 2 uniquely related cryptographic keys
❖ Data encrypted with the public key can only decrypted
with the private one (and vice versa)
❖ The mathematical computation behind it is complex
❖ Main aim is confidentiality (in messaging)
❖ Also used for digital signatures (the bit we’re interested
in)

DIGITAL SIGNATURES Important Terms

❖ The Secret – The data which we are trying to protect


❖ Verify the messages came from the correct person
❖ The Key – A piece of data used for encrypting and
❖ Verify the messages hasn’t been changed or tampered decrypting the secret
with
❖ The Function – The process or function used to encrypt
❖ Can be used to prove that you have the private key the secret
❖ Main aim is confidence in identity (in messaging) ❖ The Cipher – The encrypted secret data, output of the
function
Cipher Cryptographic Hash
❖ The Secret and the Key are passed into the Function to ❖ A hash is a one-way function, encrypted information
create the Cipher CANNOT be decrypted
❖ Each unique input generates a unique output

Why would I want to use a hash? Cryptographic Hashing Demo


❖ Address privacy concerns by making net worth private with a “digital
thumbprint”
❖ This would NOT be acceptable:
❖ Sally - $418,013.45
❖ John - $93,247.89
❖ https://anders.com/blockchain/hash
❖ This WOULD be acceptable:
❖ 0376189a740845f75bde8260416b3812ab6d4377 - $418,013.45
❖ 5753A498f025464d72e088a9d5d6e872592d5f91 - $93,247.89
❖ Nobody knows Sally’s net worth, but Sally can always prove which account
is hers
Blockchain Basics The “chain” of Blockchain
❖ If I hash the data of any block, and the output matches
the hash value from the header of the next block, I can
trust the data has not been tampered with

Using Multi-signatures Putting a BLOCK on the Blockchain


❖ Digital signatures are heavily used in the blockchain
❖ Once the page has been
❖ Some transactions may need to be authorized by validated, it is added to a stack
multiple parties of previously validated sheets
❖ High value transactions, signing contracts, etc. ❖ Each sheet on the stack can be
assumed to be trustworthy
❖ ECDSA Algorithms exist that require multiple secret
keys to generate a digital signature ❖ Once a sheet is validated it
can’t be changed, because of
❖ Security Assumptions:
group consensus. i.e.
❖ Secret keys are appropriately protected Immutability!
Data Blocks of Blockchain Mechanics of Blockchain
❖ Changing the data on any block will result in a different hash
❖ How are blocks “chained” together?
❖ The new hash will not match the hash in the next block
❖ Use of computers & cryptography header
❖ All data in a block is run through a cryptographic ❖ If you try to change the next block header, it will change
hash the hash of that block

❖ Hashes create a unique output for a specific input


❖ Chain is established by embedding the last block’s
data into the header of the current block

The “chain” of Blockchain Blockchain Basics - recap


❖ The hash output will be stored in the header of the next
block, etc.…
❖ Changing the data in any block will result in the hash of
that block not matching the hash value stored in the
header of the next block
❖ The next block will need to be changed too…...and the
block after that, and the block after that, and the block
after that…
Blockchain Basics - recap

Thanks a lot

End of Lecture-3

You might also like