Hash list definition
A hash list is a list of hash values corresponding to individual data pieces. It’s commonly used in data verification, integrity checking, and digital forensics.
How a hash list works
- Breakdown. You break down a large file into smaller blocks.
- Calculation. You calculate a unique hash value using a hash function for each block.
- Hash functions. These functions, for example, SHA-256, MD5, take an input and return a fixed-size string of bytes, which typically looks random. The output (hash value or digest) is the same regardless of the input length.
- List creation. Hash values are then compiled into the hash list.
- Verification. When you want to verify if the data hasn’t been tampered with, you recompute the hash values for each block and compare them with the original hash list. If the newly computed hashes match the ones in the hash list, the data is assumed to be unchanged. If there’s a mismatch, it suggests that the corresponding block was modified.
Where are hash lists used?
- File transfer. When you download a file, a hash list ensures that each piece of the file you receive is correct and that the entire file is intact once the download completes.
- Digital forensics. When examining digital evidence, a hash list confirms that it hasn’t been altered since its collection.
- Content-addressable storage. In systems that use content as the key for storage, a hash of the content can be used as the address. This way, duplicate pieces of content aren’t stored multiple times, saving space.
- Peer-to-peer (P2P) networks. In networks like BitTorrent, hash lists (or ‘torrent files’) are distributed so that downloaders can verify the pieces of a file they receive from various peers.