This project is focused on understanding and implementing the fundamentals of a BitTorrent-like system. It involves creating a peer-to-peer file-sharing network that uses Merkle Trees for data integrity verification.
For more details on the concept and benefits of Merkle Trees, you can refer to this explanation:
Why Merkle Trees?
An audit path is a sequence of hashes that allows you to verify the integrity of a specific piece of data (a leaf) within a Merkle Tree.
- Choose a Leaf: Start with the specific data block (leaf) you want to verify.
- Get the Path: The server or a peer provides the hashes required to compute the path from the leaf to the root of the tree.
- Verify the Path: Use the provided hashes to calculate the root hash. If the computed root matches the known root, the data is verified as part of the tree and hasn't been tampered with.
The audit path ensures that:
- A data block belongs to the tree corresponding to a specific root.
- No changes or falsifications occurred in the data or its structure.
When downloading a file in chunks, the server provides an audit path for each chunk. The client computes hashes to verify the chunk against the root hash, ensuring the integrity of the downloaded data.
Merkle-tree: How to check data integrity without full access?
Wanna get freaky?.