Hash function
A function mapping inputs of any length to fixed-size digests. Cryptographic hash functions are designed to resist preimage, second-preimage and collision attacks; they are not encryption and, used alone, do not authenticate a message.
- Also called
- cryptographic hash
- Defined in
- NIST glossary: hash function
Covered in
Guide
Password storage: hashing parameters and rehash on login
Choose Argon2id, scrypt, PBKDF2 or bcrypt with current minimum parameters, store a versioned hash, and upgrade old hashes after a successful login without overwriting a reset.
Reference
Hash collisions and digital signatures: MD5, SHA-1 and what to use
Distinguish collisions from preimages, follow a colliding pair through signing and verification, and retire MD5 and SHA-1 from the verifiers that still accept them.
Practice: Password hashing lab: Verify and upgrade an Argon2 password hash on login