BCT INSEM
Unit 1
1. Explain Merkle Tree with neat diagram. (5 Marks)
A Merkle Tree is a tree-like data structure used in Blockchain to store and verify large amounts of transaction data
quickly and securely.
Instead of checking every transaction one by one, a Merkle Tree allows us to verify a transaction by checking only a
few hashes.
Merkle Root
H(H12 + H34)
/ \
H12 H34
H(T1+T2) H(T3+T4)
/ \ / \
H1 H2 H3 H4
| | | |
T1 T2 T3 T4
T = Transaction
H = Hash
How Merkle Tree Works
Suppose a block contains 4 transactions:
T1 = A pays B
T2 = C pays D
T3 = E pays F
T4 = G pays H
Step 1: Hash each transaction.
H1 = Hash(T1)
H2 = Hash(T2)
H3 = Hash(T3)
H4 = Hash(T4)
Step 2: Combine two hashes and hash them again.
H12 = Hash(H1 + H2)
H34 = Hash(H3 + H4)
Step 3: Combine the two parent hashes.
BCT INSEM
Merkle Root = Hash(H12 + H34)
This final hash is called the Merkle Root, which is stored in the block header.
Why is it Used?
It ensures that no transaction has been changed.
If even one transaction changes, its hash changes, which changes the Merkle Root.
This immediately shows that the block has been tampered with.
2. Benefits of Merkle Tree (5 Marks)
1. Fast Verification
Transactions can be verified quickly without checking the entire block.
2. Saves Time
Only a few hashes are checked instead of all transactions.
3. Ensures Data Integrity
If even one transaction changes, the Merkle Root changes, making tampering easy to detect.
4. Reduces Storage
Nodes do not need to store every transaction to verify data. They can verify using hashes.
5. Improves Security
Since hashes are used, changing data without detection is extremely difficult.
6. Efficient for Large Data
Merkle Trees work well even when a block contains thousands of transactions.
3. Explain SHA-256 Algorithm (5 Marks)
SHA-256 (Secure Hash Algorithm-256) is a cryptographic hash function that converts any input (text, file,
transaction, etc.) into a fixed 256-bit (32-byte) hash value.
It is used in Blockchain to securely store and verify transaction data.
Simple Definition (Exam)
SHA-256 is a cryptographic hash algorithm that takes data of any size as input and produces a unique 256-bit hash
value. It is used in Blockchain to ensure data security and integrity.
Working of SHA-256
Step 1: Take the Input
The input can be:
Text
File
Transaction
Password
BCT INSEM
Example:
Hello
Step 2: Convert Input into Binary
The input is converted into binary (0s and 1s) so that the computer can process it.
Hello
01001000 01100101 01101100 ...
Step 3: Padding
Extra 0s and 1s are added so that the message length becomes a multiple of 512 bits.
This is called padding.
Step 4: Divide into 512-bit Blocks
The padded message is divided into blocks of 512 bits.
Input
Block 1
Block 2
Block 3
...
Step 5: Perform Hash Computation
Each block is processed using:
Logical operations (AND, OR, XOR, NOT)
Bitwise shifts and rotations
Mathematical calculations
The algorithm performs 64 rounds of processing on each block.
Step 6: Generate Final Hash
After processing all blocks, SHA-256 produces a 256-bit hash value.
Example:
Input:
Hello
Output:
185F8DB32271FE25F561A6FC938B2E264306EC304EDA518007D1764826381969
This output is always 64 hexadecimal characters (256 bits).
4. Explain the Role of Hashing in Blockchain (5 Marks)
BCT INSEM
Hashing is the process of converting any input data (text, file, or transaction) into a fixed-length unique code, called
a hash value.
In Blockchain, hashing is used to protect data, verify transactions, and connect blocks securely.
Simple Definition (Exam)
Hashing is a technique that converts data of any size into a fixed-length hash value. In Blockchain, it is used to
secure data, verify transactions, and link blocks together.
Role of Hashing in Blockchain
1. Maintains Data Integrity
Hashing ensures that the data has not been changed.
If the data changes, the hash also changes.
This makes it easy to detect tampering.
Example:
Original Data:
A pays B ₹500
Hash:
ABC123
If the data changes to:
A pays B ₹700
The hash becomes:
XYZ789
➡️Since the hash changes completely, everyone knows the data was modified.
2. Connects Blocks Together
Every block stores:
Its own hash
The previous block's hash
Block 1
Hash = H1
Block 2
Previous Hash = H1
Hash = H2
BCT INSEM
│
Block 3
Previous Hash = H2
Hash = H3
This creates a chain of blocks, which is why it is called a Blockchain.
3. Provides Security
If someone changes the data in one block:
The block's hash changes.
The next block still contains the old hash.
The chain breaks.
This makes tampering easy to detect.
4. Verifies Transactions Quickly
Instead of checking the entire transaction data, blockchain compares the hash values.
If the hashes match, the transaction is valid.
This saves time and improves efficiency.
5. Supports Merkle Tree
Hashes are used to build the Merkle Tree.
The Merkle Root helps verify thousands of transactions quickly without checking every transaction.
6. Prevents Data Tampering
Hash functions are one-way functions.
It is easy to generate a hash from data.
It is almost impossible to get the original data back from the hash.
This keeps blockchain data secure.
5. Properties of Hash Functions (5 Marks)
Definition
A hash function is a mathematical function that converts data of any size into a fixed-length hash value (hash
code).
A good hash function has several important properties that make it secure and reliable for Blockchain.
Simple Definition (Exam)
Hash function properties are the characteristics that make hashing secure, unique, and suitable for Blockchain
applications.
Properties of Hash Functions
BCT INSEM
1. Deterministic
The same input always produces the same hash value.
Example
Input : Hello
Hash : ABC123
If you hash "Hello" again, the output will still be:
ABC123
✅ Same input → Same output
2. Fixed-Length Output
No matter how big or small the input is, the output hash is always the same length.
For SHA-256, the output is always 256 bits (64 hexadecimal characters).
Example
Input: Hi
Output: 256-bit hash
Input: This is a very long paragraph...
Output: 256-bit hash
✅ Different input sizes → Same output length
3. Fast Computation
A hash value should be generated quickly, even for large files or transactions.
This helps Blockchain verify transactions efficiently.
4. One-Way Function (Irreversible)
It is easy to create a hash from data, but almost impossible to get the original data back from the hash.
Example
Data → Hash ✔ Easy
Hash → Data ✘ Nearly impossible
This property keeps passwords and blockchain data secure.
5. Avalanche Effect
A small change in the input produces a completely different hash value.
Example
Input:
Hello
Hash:
BCT INSEM
ABC123
Change one letter:
Hella
Hash:
XYZ789
✅ Even one character change creates a completely different hash.
6. Collision Resistant
It is very difficult for two different inputs to produce the same hash value.
Example
Input 1 → Hash A
Input 2 → Hash A
This situation is called a collision, and a good hash function makes it extremely rare.
7. Sensitive to Input Changes
Even a tiny change (one letter, one number, or one symbol) changes the entire hash.
This helps detect if data has been modified.
6. Explain Elliptic Curve Cryptography (ECC) (5 Marks)
Definition
Elliptic Curve Cryptography (ECC) is a type of asymmetric (public key) cryptography that uses mathematical
equations of elliptic curves to provide secure communication.
It provides the same level of security as RSA but with much smaller key sizes, making it faster and more
efficient.
Simple Definition (Exam)
Elliptic Curve Cryptography (ECC) is a public-key cryptography technique that uses elliptic curve mathematics to
encrypt data and generate digital signatures. It provides high security with smaller keys.
Why is ECC Used?
ECC is used because it:
Provides strong security.
Uses smaller key sizes.
Is faster than RSA.
Saves memory, storage, and power.
How ECC Works
ECC uses two keys:
1. Private Key
Secret key.
BCT INSEM
Known only to the owner.
Example:
Private Key = 25
2. Public Key
Generated from the private key.
Shared with everyone.
Example:
Private Key
Elliptic Curve Mathematics
Public Key
The sender encrypts data using the public key, and only the receiver can decrypt it using the private key.
Working of ECC
Step 1
The receiver generates:
Private Key
Public Key
Step 2
The receiver shares the public key.
Step 3
The sender encrypts the message using the receiver's public key.
Step 4
The encrypted message is sent.
Step 5
The receiver decrypts it using the private key.
7. Explain Digital Signature Algorithm (DSA) – Key Generation & Verification (5 Marks)
Definition
A Digital Signature is an electronic signature used to prove that a message or document is genuine and has not
been changed.
The Digital Signature Algorithm (DSA) is a cryptographic algorithm used to create and verify digital signatures.
BCT INSEM
Simple Definition (Exam)
Digital Signature Algorithm (DSA) is an asymmetric cryptographic algorithm used to generate and verify digital
signatures. It provides authentication, integrity, and non-repudiation.
Why is DSA Used?
DSA ensures:
✅ The sender is genuine (Authentication).
✅ The message has not been changed (Integrity).
✅ The sender cannot deny sending the message (Non-Repudiation).
Working of DSA
DSA has three main phases:
1. Key Generation
2. Signature Generation
3. Signature Verification
1. Key Generation
The sender creates two keys.
Private Key
Secret
Kept only by the sender
Used to create the digital signature
Public Key
Shared with everyone
Used to verify the signature
Diagram
Key Generation
┌───────┴────────┐
│ │
Private Key Public Key
(Secret) (Shared)
2. Signature Generation
The sender signs the message.
Steps
Step 1: Write the message.
BCT INSEM
Message:
"Pay ₹500"
Step 2: Apply a hash function (such as SHA-256).
Message
Hash Value
Step 3: Encrypt the hash using the private key.
Hash
Private Key
Digital Signature
Step 4: Send:
Message
Digital Signature
to the receiver.
Diagram
Message
Hash Function
Hash Value
Private Key
▼
BCT INSEM
Digital Signature
Send Message + Signature
3. Signature Verification
The receiver checks whether the signature is valid.
Steps
Step 1: Receive:
Message
Digital Signature
Step 2: Generate a new hash from the received message.
Received Message
Hash Function
Hash-1
Step 3: Use the sender's public key to verify the received signature and obtain the original hash.
Digital Signature
Public Key
Hash-2
Step 4: Compare both hashes.
Hash-1 = Hash-2
If both hashes are the same → ✅ Signature is Valid.
If different → ❌ Message has been changed or the signature is invalid.
BCT INSEM
Symmetric Cryptography Asymmetric Cryptography
Uses one key for encryption and decryption. Uses two keys (Public Key and Private Key).
Same key is shared between sender and receiver. Public key is shared, private key is kept secret.
Faster encryption and decryption. Slower than symmetric encryption.
Less secure because the secret key must be shared. More secure because the private key is never shared.
Suitable for secure communication and digital
Suitable for encrypting large amounts of data.
signatures.
Key management is difficult because the same key must be Key management is easier because only the public
shared securely. key is shared.
Examples: AES, DES, 3DES Examples: RSA, ECC, DSA
Unit 2
1. Explain Consensus Layer (5 Marks)
The Consensus Layer is a layer in Blockchain that helps all computers (nodes) in the network agree on the
same data before adding a new block to the blockchain.
It ensures that only valid transactions are added to the blockchain.
Simple Definition (Exam)
BCT INSEM
Consensus Layer is the blockchain layer that allows all nodes in the network to agree on the validity of transactions
before a new block is added.
Why is Consensus Layer Needed?
In blockchain, there is no central authority (like a bank).
Many computers (nodes) store the blockchain.
So, all nodes must agree that a transaction is valid before it is added.
This agreement is called Consensus.
Working of Consensus Layer
Step 1: User Creates a Transaction
Example:
A pays B ₹500
Step 2: Transaction is Sent to All Nodes
The transaction is broadcast to all computers in the blockchain network.
Step 3: Nodes Verify the Transaction
The nodes check:
Is the sender valid?
Does the sender have enough balance?
Is the transaction genuine?
Step 4: Consensus Algorithm Runs
The blockchain uses a consensus algorithm (such as Proof of Work or Proof of Stake) to decide whether the
transaction is valid.
Step 5: New Block is Added
If most nodes agree, the block is added to the blockchain.
2. Explain Consensus Algorithms (5 Marks)
A Consensus Algorithm is a set of rules used by blockchain nodes to agree on which transactions are valid and
which block should be added next.
Simple Definition (Exam)
A Consensus Algorithm is a method that helps all blockchain nodes agree on the same version of the blockchain.
Why are Consensus Algorithms Needed?
Without a consensus algorithm:
Different nodes may store different data.
Fake transactions could be added.
Double spending may occur.
Consensus algorithms solve these problems.
BCT INSEM
Types of Consensus Algorithms
1. Proof of Work (PoW)
Used by Bitcoin.
Computers (miners) solve difficult mathematical puzzles.
The first miner to solve the puzzle adds the block.
Receives a reward.
2. Proof of Stake (PoS)
Validators are selected based on the amount of cryptocurrency they own (stake).
No complex calculations are needed.
3. Delegated Proof of Stake (DPoS)
Users vote to elect a small number of validators.
The elected validators create new blocks.
4. Practical Byzantine Fault Tolerance (PBFT)
Nodes communicate with each other and vote.
If the majority agree, the block is accepted.
3. Explain Evolution of Blockchain (5 Marks)
Evolution of Blockchain means the development and improvement of blockchain technology over time.
Blockchain has evolved from digital currency (Bitcoin) to smart contracts, decentralized applications, and many
other real-world uses.
Simple Definition (Exam)
Evolution of Blockchain is the journey of blockchain technology from Blockchain 1.0 (Cryptocurrency) to
Blockchain 4.0 (Business and Industry Applications).
Stages of Blockchain Evolution
1. Blockchain 1.0 – Cryptocurrency (2009)
Introduced by Satoshi Nakamoto.
Main purpose was digital currency.
Used for Bitcoin transactions.
Focused on secure peer-to-peer money transfer.
Example
Bitcoin (BTC)
Features
Digital currency
Secure transactions
BCT INSEM
Decentralized network
2. Blockchain 2.0 – Smart Contracts
Introduced the concept of Smart Contracts.
Smart contracts are self-executing agreements that automatically perform actions when conditions are
met.
Reduced the need for intermediaries.
Example
Ethereum
Features
Smart contracts
Faster transactions
Decentralized applications (DApps)
3. Blockchain 3.0 – Decentralized Applications (DApps)
Blockchain expanded beyond finance.
Used in many sectors like:
o Healthcare
o Education
o Supply Chain
o Voting
o Banking
Features
DApps
Better scalability
Improved performance
Wider adoption
4. Blockchain 4.0 – Business & Industry
Blockchain integrated with technologies such as:
o Artificial Intelligence (AI)
o Internet of Things (IoT)
o Cloud Computing
o Big Data
Focuses on solving real-world business problems.
BCT INSEM
Features
Automation
Enterprise solutions
High security
Smart industries
Centralized System Decentralized System
Controlled by one central authority. Controlled by many nodes (computers).
Single point of failure. No single point of failure.
More secure because data is distributed across many
Less secure because one server can be attacked.
nodes.
Faster decision-making since one authority controls Decision-making is slower because many nodes must
everything. agree.
Trust is built through consensus; no need for a central
Users must trust the central authority.
authority.
Data is stored in one central server. Data is stored on multiple computers (distributed ledger).
Examples: Banks, Facebook, Google. Examples: Bitcoin, Ethereum, Blockchain networks.
7. Explain Features of Blockchain (5 Marks)
Definition
Blockchain is a distributed digital ledger that stores data in the form of blocks. These blocks are connected together
using cryptography, making the data secure and difficult to modify.
Simple Definition (Exam)
Blockchain is a secure and decentralized digital ledger that stores transactions in linked blocks.
Features of Blockchain
1. Decentralization
There is no central authority (such as a bank or government).
Data is shared among many computers (nodes).
Every node has a copy of the blockchain.
Example: Bitcoin network.
2. Transparency
All transactions are visible to all authorized participants in the network.
Anyone in the blockchain network can verify transactions.
This increases trust.
BCT INSEM
3. Immutability
Once data is added to the blockchain, it cannot be changed or deleted.
If someone tries to modify a block, its hash changes.
The network detects the change immediately.
4. Security
Blockchain uses:
Cryptography
Hashing
Digital Signatures
These technologies protect data from hacking and unauthorized changes.
5. Distributed Ledger
Every node in the network stores the same copy of the blockchain.
If one node fails, the data is still available on other nodes.
6. Consensus Mechanism
Before adding a new block, all nodes must agree that the transaction is valid.
Examples:
Proof of Work (PoW)
Proof of Stake (PoS)
This prevents fake transactions.
7. Traceability
Every transaction is permanently recorded.
It is easy to trace the history of a transaction.
Example:
Tracking products in a supply chain.
8. Faster and Efficient
Blockchain removes intermediaries.
Transactions become:
Faster
More efficient
Less expensive
Importance of Blockchain
1. Improves Security
BCT INSEM
Uses hashing and cryptography.
Protects data from hacking and unauthorized changes.
2. Increases Transparency
All transactions are recorded and can be verified.
Builds trust among users.
3. Removes Middlemen
Blockchain allows users to transact directly.
This reduces:
Time
Cost
Dependency on third parties
4. Prevents Fraud
Once data is stored, it cannot be modified easily.
This helps prevent fraud and fake transactions.
5. Faster Transactions
Transactions can be completed more quickly because there is no central authority to approve them.
6. Reduces Cost
By eliminating intermediaries, blockchain reduces transaction and operational costs.
7. Better Data Management
Data is stored across many nodes.
Even if one node fails, the data remains available.
8. Supports Many Industries
Blockchain is used in:
Banking
Healthcare
Supply Chain
Education
Voting
Real Estate
Cryptocurrency
10. Explain Distributed Ledger (5 Marks)
A Distributed Ledger is a digital database that is shared and synchronized across multiple computers (nodes)
in a network.
BCT INSEM
Instead of storing data on one central server, every node keeps a copy of the ledger.
Simple Definition (Exam)
Distributed Ledger is a digital record of transactions that is shared and maintained by all the computers (nodes) in a
blockchain network.
Why is Distributed Ledger Needed?
In a traditional system:
Data is stored on one central server.
If the server fails, data may become unavailable.
In a distributed ledger:
Data is stored on many computers.
If one computer fails, the others still have the data.
This makes the system more secure and reliable.
Working of Distributed Ledger
Step 1: A Transaction is Created
Example:
A pays B ₹500
Step 2: Transaction is Sent to All Nodes
The transaction is broadcast to every computer in the network.
Step 3: Nodes Verify the Transaction
All nodes check whether the transaction is valid.
Step 4: Consensus is Reached
If the majority of nodes agree, the transaction is approved.
Step 5: Ledger is Updated
The new transaction is added to the blockchain, and every node updates its copy of the ledger.
Blockchain Layers (Easy Explanation)
A Blockchain is divided into different layers. Each layer has a specific job. Together, these layers make the
blockchain work smoothly and securely.
The layers commonly taught in Blockchain Technology are:
1. Data Layer
2. Network (Propagation) Layer
3. Consensus Layer
4. Application Layer
5. Semantic Layer
BCT INSEM
1. Data Layer
The Data Layer stores all blockchain data such as transactions, blocks, hashes, Merkle Trees, and digital
signatures.
Simple Definition (Exam)
The Data Layer stores all the transaction data in blocks and links them together using cryptographic hashes.
Functions
Stores transaction records.
Stores blocks.
Uses hashing for security.
Uses Merkle Tree to verify transactions.
Links blocks together.
Diagram
Transaction
Hashing
Merkle Tree
Block
Blockchain
Example
When you send ₹500 to your friend:
The transaction is stored in a block.
The block is linked with the previous block using a hash.
2. Network Layer (Propagation Layer)
The Network Layer (also called the Propagation Layer) is responsible for communication between blockchain
nodes.
Simple Definition (Exam)
BCT INSEM
The Network Layer allows all computers (nodes) in the blockchain network to communicate and share transactions
and blocks.
Functions
Connects all nodes.
Broadcasts new transactions.
Shares new blocks.
Synchronizes blockchain data.
Working
User Creates Transaction
Broadcast to All Nodes
Nodes Receive Transaction
Transaction Verified
Example
If Alice sends Bitcoin to Bob:
The transaction is sent to all nodes.
Every node receives the information.
3. Consensus Layer
The Consensus Layer helps all nodes agree before adding a new block.
Simple Definition (Exam)
The Consensus Layer ensures that all nodes agree on valid transactions before a block is added.
Functions
Validates transactions.
Prevents double spending.
Maintains agreement.
Uses consensus algorithms.
Examples of Algorithms
Proof of Work (PoW)
BCT INSEM
Proof of Stake (PoS)
Diagram
Transaction
Nodes Verify
Consensus
(PoW / PoS)
Block Added
4. Application Layer
The Application Layer is the top layer where users interact with blockchain through applications.
Simple Definition (Exam)
The Application Layer provides blockchain services to users through applications such as wallets, smart contracts,
and decentralized applications (DApps).
Functions
Provides user interface.
Runs smart contracts.
Supports DApps.
Connects users to blockchain.
Examples
Cryptocurrency Wallets
Ethereum DApps
NFT Applications
Online Voting
Supply Chain Systems
Diagram
User
▼
BCT INSEM
Wallet / DApp
Blockchain
5. Semantic Layer
The Semantic Layer gives meaning to blockchain data and defines business rules for applications.
Simple Definition (Exam)
The Semantic Layer defines how blockchain data is interpreted and how business rules and smart contracts are
applied.
Functions
Defines business logic.
Interprets data.
Executes smart contracts.
Supports real-world applications.
Example
In a supply chain application:
The Semantic Layer decides when ownership changes after payment is confirmed.