Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/virjilakrum/merkle_proof_file_transfer
merkle_proof_file_transfer is an open-source project designed to demonstrate the use of Merkle proofs for secure and efficient file transfer.
https://github.com/virjilakrum/merkle_proof_file_transfer
data-structures file-transfer merkle-hash-trees merkle-proof merkle-tree move
Last synced: 4 days ago
JSON representation
merkle_proof_file_transfer is an open-source project designed to demonstrate the use of Merkle proofs for secure and efficient file transfer.
- Host: GitHub
- URL: https://github.com/virjilakrum/merkle_proof_file_transfer
- Owner: virjilakrum
- License: mit
- Created: 2024-07-26T19:11:24.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-26T19:20:00.000Z (7 months ago)
- Last Synced: 2024-10-08T02:53:33.371Z (4 months ago)
- Topics: data-structures, file-transfer, merkle-hash-trees, merkle-proof, merkle-tree, move
- Language: Move
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Merkle Proof Move
First of all, Merkle tree is a data structure used to securely verify and transfer large data sets. This tree structure creates a tree using the hash values of data blocks and the root hash value represents all the data in the tree. Thanks to this structure, it can be quickly and securely verified whether any block of data has changed or not.
### Project Description
This project uses the Merkle tree to provide a secure and efficient file transfer on the blockchain network. The project uses Merkle tree proofs (Merkle proofs) to ensure security and integrity when transferring and verifying large data sets.
#### How to Produce a Merkle Tree Proof?
1. **Hashing Data Blocks:** In the first step, all data blocks are hashed. Each data block is hashed using a specific hash function. For example, a hash function like `SHA-256` can be used.
2. **Binary Tree Structure:** The hashed data blocks are organized in a binary tree structure. The hash values of both data blocks are combined and hashed again. This process continues from the lowest level upwards and each level forms the nodes in the next level.
3. **Calculation of Merkle Root:** All hash values are combined to create a single hash value, the Merkle root, at the top level. This root represents all the data of the tree.
4. **Creating Merkle Proofs:** In order to verify a particular block of data, Merkle proofs are created. These proofs contain the path of the data block you want to verify up to the root. It contains the hash values of all sibling nodes along this path.
#### What are Merkle Proofs Used for?
1. **Data Integrity and Security:** Merkle proofs ensure data integrity and security. It is used to quickly and reliably verify whether any block of data has changed. This is especially important in blockchain and distributed systems.
2. **Efficient Data Verification:** Thanks to the Merkle tree, the verification of large data sets becomes more efficient. It is sufficient to verify only a specific block of data using the proofs of that block along with the root hash.
3. **Secure File Transfer:** During file transfer on blockchain networks, it is used to verify that files are transferred securely and with integrity. This is especially important in cross-chain file transfers.
This contract demonstrates the process of creating a Merkle tree and generating a Merkle proof for a given block of data. It also includes the process of verifying whether this proof is correct.