samuel-lucas6 / draft-lucas-bkdf

An Internet-Draft for the Balloon Key Derivation Function (BKDF), a memory-hard password hashing and password-based key derivation function.
Other
4 stars 1 forks source link

Support using HMAC #16

Closed samuel-lucas6 closed 2 months ago

samuel-lucas6 commented 2 months ago

Hash(message) can be replaced with PRF(key, message) to support the use of HMAC, which NIST would likely prefer. This then helps with only hashing the password once (discussed in #14) and adding a pepper (#7).

However, to support ordinary hash functions still, prefix MAC can be used, padding the key to the block size to induce a random IV. When the hash function supports a key parameter (e.g., keyed BLAKE2), that can be used instead, which basically does the same thing internally.

Generation of the pseudorandom bytes won't use the same key to stay password-independent.