0% found this document useful (0 votes)
36 views17 pages

Chuong 03

Uploaded by

vothanhvy12356
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views17 pages

Chuong 03

Uploaded by

vothanhvy12356
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

CRYPTOCURRENCY &

BLOCKCHAIN
Nguyen Trung Thong
thongnt@ueh.edu.vn

Blockchain Basics
and Cryptography
Bitcoin: A Peer-to-Peer Electronic Cash System

• From: Satoshi Nakamoto <satoshi <at> vistomail.com>


Subject: Bitcoin P2P e-cash paper
Newsgroups: gmane.comp.encryption.general
Date: Friday 31st October 2008 18:10:00 UTC

• “I've been working on a new electronic cash system


that's fully peer-to-peer, with no trusted third party.”

6
Blockchain Technology
timestamped
auditable database network consensus protocol
append-only log

Secured via cryptography Addresses ‘cost of trust’


• Hash functions for tamper (Byzantine Generals problem)
resistance and integrity • Permissioned
• Digital signatures for consent • Permissionless
Consensus for agreement
7
Bitcoin – Technical Features
• Cryptographic Hash Functions
• Timestamped Append-only Logs (Blocks)
• Block Headers & Merkle Trees
• Asymmetric Cryptography & Digital Signatures
• Addresses

• Consensus through Proof of Work


• Network of Nodes
• Native Currency

• Transaction Inputs & Outputs


• Unspent Transaction Output (UTXO)
• Scripting language 8
Cryptography:
Communications in the presence of adversaries

Scytale Cipher Enigma Machine Asymmetric Cryptography


Ancient Times 1920s - WWII 1976 to today
© Luringen on Wikimedia Commons.
License CC BY-SA. All rights reserved.
This content is excluded from our Image by the CIA and is in the public domain via Wikimedia Image is in the public domain via Wikipedia.
Creative Commons license. For more Commons. 9
information, see
https://ocw.mit.edu/help/faq-fair-use/
Cryptographic Hash Functions
Digital Fingerprints for Data
• General Properties
• Maps Input x of any size to an Output of fixed size – called a ‘Hash’
• Deterministic: Always the same Hash for the same x
• Efficiently computed

• Cryptographic Properties
• Preimage resistant (One way): infeasible to determine x from Hash(x)
• Collision resistant: infeasible to find and x and y where Hash(x) = Hash(y)
• Avalanche effect: Change x slightly and Hash(x) changes significantly
• Puzzle friendliness: knowing Hash(x) and part of x it is still very hard to
find rest of x 10
Cryptographic Hash Functions
Digital Fingerprints for Data

• Uses as
• Names
• References
• Pointers
• Commitments

• Bitcoin Hash Functions


• Headers & Merkle Trees – SHA 256
• Bitcoin Addresses – SHA 256 and RIPEMD160

11
‘How to Time-Stamp a Digital Document’
Habor & Stornetta (1991)
Surety 1995 - present

Courtesy of Ittai Abraham. Used with permission. 12


Timestamped Append-only Log - Blockchain

Image is in the public domain by National Institute of Standards and Technology. 13


Block Header

• Version
• Previous Block hash
• Merkle Root hash
• Timestamp
• Difficulty target
• Nonce

14
Merkle Tree – Binary Data Tree with Hashes

15
Image is in the public domain by National Institute Standards and Technology.
Asymmetric Cryptography & Digital Signatures

16
© Source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see https://ocw.mit.edu/help/faq-fair-use/
Asymmetric Cryptography & Digital Signatures
• Digital Signature Algorithms
• Generate Key Pair - Public Key (PK) & Private Key (sk) - from random number
• Signature – Creates Digital Signature (Sig) from message (m) and Private Key (sk)
• Verification – Verifies if a signature (Sig) is valid for a message (m) and a Public
Key (PK)

• Properties
• Infeasible to find Private Key (sk) from Public Key (PK)
• All valid signatures verify
• Signatures infeasible to forge

• Bitcoin Digital Signature Function


• Elliptic Curve Digital Signature Algorithm (EDCSA) … y2 = x3 + 7
17
Bitcoin Addresses

18
Deposits & Negotiable Orders

Images are in the public domain.


19
Transaction format

Input Output
In satoshis
Uniquely Previous transaction ID Value 108 = 1
identifies an Index bitcoin
output Public Key
(Bitcoin Address)
Signature

A “coin”

lock_time 20
Conclusions
Discussed Bitcoin Design Features
• Timestamped Append-only Logs (Blocks)
• Secured through Cryptographic Hash Functions & Digital Signatures
Consensus Protocol
• Consensus through Proof of Work
• Network of Nodes
• Native Currency
Transactions Ledgers
• Transaction Inputs & Outputs
• Unspent Transaction Output (UTXO)
• Scripting language 23

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy