Chapter 2
Chapter 2
to BLOCKCHAIN
CHAPTER2: TECHNICAL
ARCHITECTURE AND BASIC
COMPONENTS
Dr. Noureddine Lasla
Objective:
Understanding the building blocks of blockchain systems.
Key Areas of Focus:
Introduction to Blockchain Architecture
Blockchain Architecture (Nodes, Ledgers, P2P Net.)
Block Structure (Merkle Trees and Hash Functions)
Public and Private Key Cryptography
Data Integrity, Security Mechanisms, and Attacks
Introduction to
Blockchain
Architecture
What is Blockchain Architecture?
Example:
SHA-256("Blockchain") =
4a8a08f09d37b73795649038408b5f33fba404ba622bfbb23b6ad13c6b5b1e1c
Hash Function in Practice
Importance in Blockchain:
Secures transactions.
Provides user identity through digital signatures.
Protects the integrity of the blockchain.
Public and Private Keys in Blockchain
Key Components:
Public Key: Shared openly, used for encryption.
Private Key: Kept secret, used for decryption and digital signatures.
How It Works:
Sender encrypts data with the recipient's public key.
Recipient decrypts the data using their private key.
Use in Blockchain:
Public keys are used as wallet addresses.
Private keys sign transactions to prove authenticity.
Digital Signatures in Blockchain
Is a cryptographic technique that ensures:
Authenticity: Verifies the sender.
Integrity: Confirms the data has not been altered.
How It Works:
Sender signs the data using their private key.
Receiver verifies the signature using the sender’s
public key.
Use in Blockchain:
Validates transactions.
Prevents unauthorized access.
Digital Signatures in Blockchain
Security Mechanisms in Blockchain
Ensuring Security in Blockchain
Consensus Mechanisms:
Proof of Work (PoW).
Proof of Stake (PoS).
Byzantine Fault Tolerance (BFT).
Encryption:
Public and Private Key Cryptography.
Secures transaction data.
Smart Contract Audits:
Prevents vulnerabilities in automated code execution
Common Security Threats to Blockchain
51% Attack:
Malicious actors gain majority control of network.
Sybil Attack:
Attackers create multiple fake identities to disrupt consensus.
Double Spending Attack:
Exploiting system to spend the same asset multiple times.
Eclipse Attack:
Isolating nodes to manipulate their view of the blockchain.
Preventing Blockchain Attacks