Balloon hashing
Balloon hashing is a key derivation function presenting proven memory-hard password-hashing and modern design. It was created by Dan Boneh, Henry Corrigan-Gibbs and Stuart Schechter in 2016.
The authors claim that Balloon:
- has proven memory-hardness properties,
- is built from standard primitives: it can use any standard non-space-hard cryptographic hash function as a sub-algorithm,
- is resistant to side-channel attacks: the memory access pattern is independent of the data to be hashed,
- is easy to implement and matches the performance of similar algorithms.
Algorithm
There are three steps in the algorithm:- Expansion, where an initial buffer is filled with a pseudorandom byte sequence derived from the password and salt repeatedly hashed.
- Mixing, where the bytes in the buffer are mixed time_cost number of times.
- Output, where a portion of the buffer is taken as the hashing result.