Merkle hash torrent extension says naive way is to compute sha-1 hash for every chunk for data integrity. And using Merkle tree you know need the correct root sha-1 hash, so the peer calculate sha-1 hashes of each chunk from leaves for the root hash. I don't understand why you can't just use the sha-1 hash of the whole file for verification. Peers need to first combine the chunks to a file, and calculate sha-1 hash of that file to verify.
BitTorrent why use Merkle Tree for data integrity
458 Views Asked by zoey1771 At
1
There are 1 best solutions below
Related Questions in HASH
- How can py tuple implicit cast to int?
- How to properly set hashes in script-src CSP policy header?
- Algorithm for finding the largest common substring for n strings using Rabin-Karp function
- Lua: is there a need to use hash of string as a key in lua tables
- When the key values are the same, the memory limit is exceeded when making a hash join
- Short for creating an array of hashes in powershell malfunction?
- LC347: Top K Frequent Elements; final result returns an extra element in list/array
- Hashing vertices of a Graph in C
- Is there a limit on the message size for SHA3?
- When hashing an API key, should I hash the suffix / prefix as well?
- Cmake error : Configuring incomplete, errors occurred
- murmur3 hashing function in postgres
- Hashing the password if it is not hashed in django
- Order of a set in Python
- Comparing the hash of a file, containing a list of hashes of multiple files instead of each file, is it good?
Related Questions in CRYPTOGRAPHY
- Secure Messaging Implementation in C#
- How to verify JWS (x5c chain) is signed by apple using Jose
- How to Safely Use Crypto.subtle Property for Local Testing Without Security Risks?
- OpenSSL3.0 RSA Signature Verification in C
- npm install tulind in my crypto server side
- how i need place arg in code for funtion send?
- Mbed TLS: in-place en-/decryption for OAEP doesn't seem to work
- Cannot test cryptographic performance using crypto_aesni_mb
- Installation Private Blockchain
- Encountered this error while implementing NTT cpp code: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
- Cryptography Notion - Diffie-Hellmann
- Hash password with another password
- How to convert CryptAcquireContext to .NET 8 using System.Security.Cryptography methods
- Error "Cannot find module 'crypto'" in WalletConnect module
- Why do some cryptographic signature npm packages (like superdilithium) convert text to an array of integers before signing?
Related Questions in P2P
- Unable to Retrieve External Public Address in libp2p Swarm Events
- How to avoid duplicates with the pull-based subscribe model?
- Wifi direct (Wifi P2P) connection between raspberry pi 4b and android device only possible after reboot
- Using tokio::time::timeout does not trap delayed response from TCPReadStream
- 'connections' is deprecated. The declaration was marked as deprecated here
- Twitch but practically free with p2p webRTC?
- How Can I Connect Using A WebRTC-Offer With PeerJS
- Choose between polling, websocket or P2P
- does webrtc use turn server if established p2p connection is failed?
- A p2p secure chat application need more ressources to establish the work
- how to allow mobile apps to communicate without a separate server
- aiortc can't receive video from server example
- P2P connection does not work on Android 11 and above
- Android device cannot detect others by flutter_nearby_connections
- Why is WebRTC peer.ontrack not being called in 1-1 peer connection?
Related Questions in BITTORRENT
- Is it possible to get hashes of individual 16KB blocks from a v2 torrent file? v1?
- Send the piece request to Udp peer using UDP Tracker Protocol
- Solve the packing error on peer handshake protocol
- Solve the socket error 10060 ,during making a peer handshake
- Problem in debugging custom python libtorrent client - How to add DHT router
- Unhandled Exception during Handshake in BitTorrent protocol implementation
- Error connecting to BitTorrent tracker: Requested download is not authorized for use with this tracker
- How can I index the bittorrent DHT properly for infohashes?
- 'WinError: The remote computer refused the network connection' is caused from BitTorrent project
- npm: cant import bencode module
- Torrent Trackers return port 0 in for peer in peer list
- Sequential downloading and playback of torrents on the server
- Change category of torrent using qBittorrent web API how?
- Trouble with URL encoding torrent's infoHash using JS
- How to download torrent specific files in python code?
Related Questions in MERKLE-TREE
- Merkle Tree that should handle both odd and even numbers of leaves
- I am trying to implement a python3 library to create IPFS-Merkle DAGs but I have been unable to figure out the correct way to specify links?
- Different result from merkletreejs and sha256
- How to query Certificate Transparency Logs Servers with your own API?
- Benefit of saving merkle root in bitcoin block headers
- Why is the Merkle tree proof for m1 (H2, H34, H5555) and not (H1, H12, H1234)?
- Merkle Tree Implementation in JS with keccak256
- How do we know a Merkle Proof contains legitimate hashes?
- I am getting invalid type ( struct ) error while interacting with the solidity smart contract
- My Merkle Tree calculation does not match the actual one
- Transform Hash in javascript (Buffer) to python SHA256
- BitTorrent why use Merkle Tree for data integrity
- Having troubles with smart pointers and vectors, constant crashing
- How to know if hash is part of merkle root?
- For a merkle proof, how can I pass a Hex value into my solidity contract when it is expecting a bytes32 array?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you have the whole file hash, you need the whole file to check that the hash is correct.
If you have a Merkle tree, then every time a peer sends you a chunk of the file, you can check that chunk, with only a little help from the peer. You can hash the chunk, and then go up the tree. At each tree node, you use the hash you have calculated so far, as well as the other hash from that node, which the peer sent to you because it knew you would do this. When you get to the root, if the root hash is the same as the expected one, you know the chunk is correct.