Cryptographic hash function
A cryptographic hash function deterministically produces a digest and is designed to resist preimage, second-preimage and collision attacks.
Preimage search starts from a target digest; second-preimage search starts from a specified input; collision search may choose both distinct inputs. Designed resistance is not a promise that collisions do not exist. [1] An unkeyed digest does not authenticate its own origin: replacing both data and the expected digest can preserve a match. HMAC adds a shared secret to authentication; hashing is not encryption. [2]
Relations
- related
- checksum, hash-collision, merkle-tree, deduplication
Limitations
- Algorithm choice, output length and known attacks determine useful security; a matching digest is not proof of storage durability. [1, 3]