Re:Mathematician warns US spies may be weakening next-gen en...
by mananaysiempre on Friday October 13, 2023 @09:23AM
(#37870308)
(Not a cryptographer either.) Consider two different application areas for a “hash”:
- Message digest: compute a fixed-size summary of a (relatively) large amount of data, for things like content-addressable storage or signing. You want this to be fast. (Nobody is going to brute-force even a 1K chunk of unknown data.) Examples: SHA2, Blake2b, Keccak aka SHA3.
- Key derivation: compute a small chunk of randomy data from a still-quite-small amount of substantially nonrandom data, for things like turning a user-specified password into an encryption key or (with a random salt) something you could store. You want this to be slow, even on a massively parallel machine. (You aren’t going to be processing logins that quickly; on the other hand, everybody’s going to be all over your leaked passwords table with their GPUs.) Examples: PBKDF2, bcrypt, Argon2id.
- Message digest: compute a fixed-size summary of a (relatively) large amount of data, for things like content-addressable storage or signing. You want this to be fast. (Nobody is going to brute-force even a 1K chunk of unknown data.) Examples: SHA2, Blake2b, Keccak aka SHA3.
- Key derivation: compute a small chunk of randomy data from a still-quite-small amount of substantially nonrandom data, for things like turning a user-specified password into an encryption key or (with a random salt) something you could store. You want this to be slow, even on a massively parallel machine. (You aren’t going to be processing logins that quickly; on the other hand, everybody’s going to be all over your leaked passwords table with their GPUs.) Examples: PBKDF2, bcrypt, Argon2id.