EXPERIMENT NO: 1
Aim: To study Cryptography in Blockchain and the Merkle Root Tree Hash concept.
Theory:
Introduction
Cryptography is the backbone of blockchain security, enabling safe data storage, transaction validation,
and protection from tampering. The Merkle Tree summarizes transactions into a single Merkle Root,
enabling efficient verification.
What is a Merkle Tree?
A binary tree where each leaf node contains the hash of transaction data and non-leaf nodes contain
the hash of their child nodes. The process continues until a single Merkle Root is obtained.
Structure of a Merkle Tree
Leaf nodes contain transaction hashes, non-leaf nodes contain intermediate hashes, and the root node
represents all transactions. Odd numbers of leaves are duplicated to make pairs.
Cryptographic Hash Functions
Hash functions map input data to fixed-size outputs. Properties include determinism, pre-image
resistance, collision resistance, irreversibility, and fast computation. SHA-256 is commonly used.
How Merkle Trees Work in Blockchain
Transactions are hashed individually, paired, and re-hashed until one root remains. Verification uses
Merkle proofs, requiring only partial data.
Benefits of Merkle Trees
They ensure data integrity, require low storage, enable efficient verification, and improve network
efficiency.
Importance in Blockchain
Without Merkle Trees, nodes must store all transactions for verification. With them, lightweight and fast
verification is possible.
Conclusion: Merkle Trees combine cryptography with tree structures to create compact, secure
transaction summaries essential for scalable blockchain verification.