What does a cryptographic hash function produce?
A cryptographic hash function maps an input of practical length to a fixed-length output called a hash or digest.
Study 3 Hashing, Password Storage, and Message Authentication with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What does a cryptographic hash function produce?
A cryptographic hash function maps an input of practical length to a fixed-length output called a hash or digest.
How long is a SHA-256 digest?
SHA-256 produces a 256-bit digest.
What does a preimage attack try to find?
A preimage attack tries to find an input that produces a given digest.
When can a hash help verify a file's integrity?
A hash can help detect changes when the expected digest is obtained through a trusted channel.
Does a plain hash authenticate who created a message?
No. An attacker who can replace both the file and its digest can calculate a new digest; a plain hash does not prove who created a message.
Why use an expensive KDF to store passwords?
Password storage uses an intentionally expensive password-hashing function or key-derivation function (KDF), making each guess more costly.
Name two common password-storage KDFs.
Common choices include Argon2id, scrypt, bcrypt, and PBKDF2.
What is a password salt, and must it be secret?
A salt is a unique, randomly generated value used with a password; it is stored alongside the verifier and is not secret.
What security benefits do unique password salts provide?
Unique salts make identical passwords produce different stored results and stop attackers from reusing one precomputed lookup table across many accounts.
How does a pepper differ from a salt?
A pepper is an additional secret kept separately from the password database. It does not replace a unique salt or a suitable KDF.
What does a message authentication code (MAC) provide?
A MAC is a tag calculated from a message and a shared secret key. A valid tag provides evidence of message integrity and that its creator knows the key.
What distinguishes HMAC from a simple hash of key plus message?
HMAC is a widely used MAC construction built from a cryptographic hash function; it uses a defined keyed construction, not simply a hash of the key concatenated with the message.