Mod-II ( Introduction of Cryptography and Blockchain )
Mod-II ( Introduction of Cryptography and Blockchain )
Cryptography is the founda on of blockchain technology, ensuring secure communica on, data integrity, and trust in
a decentralized system. Blockchain combines cryptography with distributed systems to create a secure, immutable,
and decentralized ledger.
What is Blockchain?
A Blockchain is a distributed, immutable ledger that records transac ons in a sequence of blocks. It ensures data
integrity through cryptographic techniques and consensus mechanisms.
Key Features:
o Consensus: Agreement among network par cipants on the validity of transac ons (e.g., Proof of Work,
Proof of Stake).
o Cryptography: Ensures security and authen city (e.g., hashing, digital signatures).
2. Networks:
Blockchain Origins
Blockchain originated as the underlying technology for Bitcoin, introduced by the pseudonymous Satoshi Nakamoto in
2008. Its primary goal was to enable secure, peer-to-peer digital transac ons without a central authority.
Block: A group of transac ons bundled together and added to the blockchain. Each block contains:
Keys as Iden ty
Public Key: Acts as an address for receiving data or funds.
Private Key: Used to sign transac ons, proving ownership and authoriza on.
Digital Signatures
Digital signatures are a cri cal cryptographic component of blockchain technology. They provide a mechanism to
authen cate transac ons, ensure data integrity, and establish non-repudia on in a decentralized environment.
2. Ensure Integrity: Confirm that the data has not been altered during transmission.
3. Provide Non-repudia on: Prevent the sender from denying their involvement in signing the data.
Digital signatures rely on public key cryptography (asymmetric cryptography), where a pair of keys—private and
public—is used.
Hashing
Hashing is a cryptographic process that converts input data of any size into a fixed-size string of characters,
known as a hash. Hashing is a fundamental concept in blockchain technology, used to ensure data integrity,
link blocks together, and secure transac ons.
What is Hashing?
Hashing is performed using a hash func on, which is a mathema cal algorithm. A good hash func on has the following
proper es:
2. Fixed Output Length: Regardless of input size, the hash output is of a fixed length (e.g., 256 bits for SHA-256).
3. Pre-image Resistance: It’s infeasible to reverse-engineer the original input from its hash.
4. Collision Resistance: No two different inputs should produce the same hash.
5. Avalanche Effect: A small change in input dras cally changes the hash output.
1. Linking Blocks
Each block in the blockchain contains a hash of the previous block, crea ng a cryptographic link between them.
This chain ensures immutability: altering any block invalidates all subsequent blocks.
2. Data Integrity
Hashes verify that data hasn’t been tampered with. If even a single character in the input changes, the hash
output changes en rely.
In Proof of Work (PoW) blockchains (e.g., Bitcoin), miners solve a computa onal puzzle by finding a hash that
sa sfies certain criteria (e.g., starts with a specific number of zeros).
This process ensures that adding a block to the chain requires significant computa onal effort.
4. Transac on Security
Hashing is used to generate transac on IDs, ensuring that transac ons are uniquely iden fiable and
immutable.
5. Merkle Trees
Hashing is used in Merkle Trees, where transac ons in a block are hashed and combined into a single root
hash.
This structure allows efficient verifica on of individual transac ons without requiring the en re blockchain.
2. Keccak-256:
o Used in Ethereum.
3. RIPEMD-160:
Challenges
1. Quantum Compu ng Threats: Future advances in quantum compu ng could break current hash algorithms.
Blockchain Network
A blockchain network comprises nodes that interact to validate and propagate transac ons, maintaining the ledger's
integrity.
Mining Mechanism
Mining is the process of valida ng transac ons and crea ng new blocks. Miners solve cryptographic puzzles to:
Chain Policy
Chain policies govern:
1. Block size and frequency.
2. Consensus rules.