NEW
Also known as: Crypto Hash, Secure Hash Function
A function mapping input data to a fixed-length digest, designed to be collision-resistant and irreversible.
DESCRIPTION
A cryptographic hash function transforms data of arbitrary size into a fixed-length digest with strong security properties: preimage resistance, second preimage resistance, and collision resistance. Hashes underpin integrity checks, digital signatures, password storage, and blockchain. Modern standards include SHA-2 and SHA-3. Weak or broken hashes like MD5 and SHA-1 should be avoided for security-sensitive uses.
ALTERNATIVE DEFINITIONS
NIST
Function that maps a bit string of arbitrary length to a fixed-length bit string; designed to have the properties of preimage resistance, second preimage resistance and collision resistance.
Lists the three core security properties explicitly.
OWASP
A cryptographic hash function is a deterministic function that maps data of arbitrary size to a fixed-size value and is designed to be a one-way function.
Emphasizes determinism and one-way property for security.
IETF RFC 4949
cryptographic hash function: A hash function whose output is dependent on all its input bits and that is designed to resist cryptanalysis.
Highlights resistance to cryptanalysis and input dependency.
RELATED TERMS
SHA-256 SHA-3 MD5 HMAC Digital Signature Password Hashing MAC Blockchain
COMPETING TERMS
Non-cryptographic hash function Checksum
RELATIONS
- Broader: Hash Function
- Narrower: BLAKE BLAKE2 Hash Function BLAKE3
KNOWLEDGE AREAS
Data Security Software Engineering Data Integration & Interoperability
TARGET AUDIENCE
Cybersecurity Engineer Security Architect Software Developer Data Engineer Chief Information Security Officer DevOps Engineer
EXTERNAL SOURCES
- Wikipedia - Cryptographic hash function
- NIST - Secure Hash Standard (SHA)
- OWASP - Hashing guidance for passwords
- Keccak Team - SHA-3 design and docs
TOP QUESTIONS
What makes a Cryptographic Hash Function secure?
Preimage, second preimage, and collision resistance are essential. Robust design and peer-reviewed standards like SHA-2/SHA-3 are recommended.
Category: Requirements
Why is MD5 unsafe for security applications?
MD5 is vulnerable to collisions, enabling tampering and signature forgery; use SHA-256 or better alternatives.
Category: Risks
How are cryptographic hashes used in blockchain?
Hashes link blocks, ensure data integrity, and power proof-of-work, making tampering detectable and costly.
Category: Example
What is the difference between a hash and checksum?
Checksums detect accidental corruption; cryptographic hashes resist adversarial manipulation and provide stronger integrity guarantees.
Category: Misunderstanding
How does salting improve password hashing?
Salts make precomputed attacks (rainbow tables) ineffective and ensure unique hashes for identical passwords.
Category: HowTo
What are common mistakes with Cryptographic Hash Functions?
Using outdated algorithms, skipping salting/peppering, misusing hashes for encryption, or relying on homegrown designs.
Category: Mistakes
Is SHA-1 still acceptable?
No, SHA-1 has practical collision attacks; migrate to SHA-2 or SHA-3.
Category: Opinion
How does HMAC relate to hash functions?
HMAC combines a hash with a secret key for message authentication, preventing tampering and spoofing.
Category: Overview
Where to learn more about Cryptographic Hash Functions?
Study NIST standards, OWASP guidelines, and reputable cryptography textbooks or courses.
Category: Overview