Cryptography
Cryptographic Hash Function
Also known as: Hash function, Message digest
Definition
A deterministic one-way function that maps arbitrary-length input to a fixed-length digest, designed to be collision-, preimage-, and second-preimage-resistant.
Examples
- Git uses SHA-1 (transitioning to SHA-256) to identify commits and objects.
- TLS certificate fingerprints are typically SHA-256 hashes.
Related terms
MD5
A 128-bit cryptographic hash function designed by Ron Rivest in 1992; now broken — practical collisions are trivial and it must not be used for any security-sensitive purpose.
HMAC
A keyed Message Authentication Code construction built on top of a cryptographic hash function, defined in RFC 2104 and FIPS 198-1.
Digital Signature
A public-key cryptographic mechanism that proves the authenticity, integrity and non-repudiation of a message or document.
Message Authentication Code (MAC)
A short symmetric-key tag that authenticates a message and detects tampering, computed and verified with the same shared secret.
Salt
A unique random value combined with a password before hashing to defeat rainbow tables and ensure each user's hash is distinct.
Key Derivation Function (KDF)
A cryptographic function that derives one or more strong cryptographic keys from a secret input such as a password, shared secret or master key.