0% found this document useful (0 votes)
4 views

Mod-II ( Introduction of Cryptography and Blockchain )

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Mod-II ( Introduction of Cryptography and Blockchain )

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Introduc on to 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:

1. Decentralized: Operates without a central authority.

2. Immutable: Data once recorded cannot be altered.

3. Secure: Transac ons are encrypted and validated by a consensus mechanism.

Blockchain Technology Mechanisms and Networks


1. Mechanisms:

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).

o Smart Contracts: Automated, self-execu ng contracts coded into the blockchain.

2. Networks:

o Public Blockchain: Open to anyone (e.g., Bitcoin, Ethereum).

o Private Blockchain: Restricted to authorized par cipants (e.g., Hyperledger).

o Consor um Blockchain: Controlled by a group of organiza ons.

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.

Objec ves of Blockchain


1. Transparency: All par cipants can view the ledger.

2. Security: Protect data against tampering.

3. Efficiency: Reduce intermediaries and streamline processes.

4. Decentraliza on: Eliminate the need for centralized control.

5. Trust less Environment: Operate without relying on trust in par cipants.


Blockchain Challenges
1. Scalability: Limited transac on throughput.

2. Energy Consump on: High energy usage in Proof of Work systems.

3. Regulatory Uncertainty: Lack of global regulatory clarity.

4. Privacy: Balancing transparency and confiden ality.

5. Interoperability: Compa bility across different blockchain pla orms.

Transac ons and Blocks


 Transac on: A record of data exchange (e.g., transferring cryptocurrency).

 Block: A group of transac ons bundled together and added to the blockchain. Each block contains:

o Hash of the Previous Block: Links blocks together.

o Timestamp: Ensures chronological order.

o Merkle Root: Hash of all transac ons in the block.

Peer-to-Peer (P2P) Systems


Blockchain operates on a P2P network, where all nodes are equal par cipants. This ensures:

1. Decentraliza on: No single point of failure.

2. Redundancy: Copies of the ledger are stored on all nodes.

3. Consensus: Nodes validate and agree on transac ons.

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.

What is a Digital Signature?

A digital signature is a mathema cal scheme used to:

1. Authen cate: Verify the iden ty of the sender.

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:

1. Determinis c: The same input always produces the same output.

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.

Hashing in Blockchain Technology


Hashing serves mul ple purposes in blockchain systems:

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.

3. Mining and Proof of Work

 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.

Common Hash Func ons in Blockchain


1. SHA-256 (Secure Hash Algorithm 256-bit):

o Used in Bitcoin and other blockchains.

o Produces a 256-bit hash, ensuring high security.

2. Keccak-256:

o Used in Ethereum.

o A variant of the SHA-3 algorithm.

3. RIPEMD-160:

o O en used in combina on with SHA-256 for Bitcoin address genera on.

Advantages of Hashing in Blockchain

1. Security: Protects data and ensures authen city.

2. Immutability: Prevents tampering with blockchain data.

3. Efficiency: Fast computa on for large datasets.

4. Data Compression: Hashes condense large datasets into fixed-size outputs.

Challenges

1. Quantum Compu ng Threats: Future advances in quantum compu ng could break current hash algorithms.

2. Collision Resistance: While unlikely, finding collisions could compromise security.

Public Key Cryptosystems


 Public and private key pairs are used for encryp on and authen ca on.

 Public Key: Shared openly to encrypt data or verify signatures.

 Private Key: Kept secret to decrypt data or create signatures.

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:

1. Add a block to the chain.

2. Earn rewards (e.g., Bitcoin).

Chain Policy
Chain policies govern:
1. Block size and frequency.

2. Consensus rules.

3. Transac on fee structures.

Life of a Blockchain Applica on


1. Ini aliza on: Set up the blockchain, nodes, and network rules.

2. Development: Build smart contracts and user interfaces.

3. Deployment: Launch the applica on on the blockchain.

4. Opera on: Maintain and scale the applica on as needed.

You might also like