Content deleted Content added
interwiki |
Reverting edit(s) by 2806:109F:14:21B8:9480:72D6:8905:4F1B (talk) to rev. 1220761310 by Boleyn: Disruptive editing (RW 16.1) |
||
(15 intermediate revisions by 14 users not shown) | |||
Line 1:
{{Unreferenced|date=March 2009}}
In [[computer science]], a '''hash list''' is typically a [[List (computing)|list]] of [[Hash function|hashes]] of the data blocks in a file or set of files. Lists of hashes are used for many different purposes, such as fast table lookup ([[hash table]]s) and distributed databases ([[distributed hash table]]s)
[[Image:Hash list.svg|thumb|350px|right|A hash list with a top hash]]
A hash list is an extension of the
==Root hash==
Hash lists can be used to protect any kind of data stored, handled and transferred in and between computers. An important use of hash lists is to make sure that data blocks received from other peers in a [[Peer-to-peer|peer-to-peer network]] are received undamaged and unaltered, and to check that the other peers do not "lie" and send fake blocks. ▼
Often, an additional hash of the hash list itself (a ''top hash'', also called ''root hash'' or ''master hash'') is used. Before downloading a file on a [[P2P network|p2p network]], in most cases the top hash is acquired from a trusted source, for instance a friend or a web site that is known to have good recommendations of files to download. When the top hash is available, the hash list can be received from any non-trusted source, like any peer in the p2p network. Then the received hash list is checked against the trusted top hash, and if the hash list is damaged or fake, another hash list from another source will be tried until the program finds one that matches the top hash.▼
Usually a [[cryptographic hash function]] such as [[SHA-1]] is used for the hashing. If the hash list only needs to protect against unintentional damage less secure [[checksum]]s such as [[Cyclic redundancy check|CRCs]] can be used.▼
In some systems (
Hash lists are better than a simple hash of the entire file since, in the case of a data block being damaged, this is noticed, and only the damaged block needs to be redownloaded. With only a hash of the file, many undamaged blocks would have to be redownloaded, and the file reconstructed and tested until the correct hash of the entire file is obtained. Hash lists also protect against nodes that try to sabotage by sending fake blocks, since in such a case the damaged block can be acquired from some other source.▼
==
▲Hash lists can be used to protect any kind of data stored, handled and transferred in and between computers. An important use of hash lists is to make sure that data blocks received from other peers in a [[Peer-to-peer|peer-to-peer network]] are received undamaged and unaltered, and to check that the other peers do not "lie" and send fake blocks.
▲Usually a [[cryptographic hash function]] such as [[SHA-
▲Often, an additional hash of the hash list itself (a ''top hash'', also called ''root hash'' or ''master hash'') is used. Before downloading a file on a p2p network, in most cases the top hash is acquired from a trusted source, for instance a friend or a web site that is known to have good recommendations of files to download. When the top hash is available, the hash list can be received from any non-trusted source, like any peer in the p2p network. Then the received hash list is checked against the trusted top hash, and if the hash list is damaged or fake, another hash list from another source will be tried until the program finds one that matches the top hash.
▲Hash lists are better than a simple hash of the entire file since, in the case of a data block being damaged, this is noticed, and only the damaged block needs to be redownloaded. With only a hash of the file, many undamaged blocks would have to be redownloaded, and the file reconstructed and tested until the correct hash of the entire file is obtained. Hash lists also protect against nodes that try to sabotage by sending fake blocks, since in such a case the damaged block can be acquired from some other source.
▲In some systems (like for example [[BitTorrent (protocol)|BitTorrent]]), instead of a top hash the whole hash list is available on a web site in a small file. Such a "[[torrent file]]" contains a description, file names, a hash list and some additional data.
== Protocols using hash lists ==
* [[Rsync]]
* [[Zsync]]
* [[Bittorrent]]
== See also ==
* [[Merkle tree|Hash tree]]
* [[Hash table]]
* [[Hash chain]]
Line 27 ⟶ 33:
* [[Cryptographic hash function]]
* [[List (computing)|List]]
==References==
{{reflist}}
{{Cryptography navbox}}
|