Balloon
A memory-hard password hash with provable bounds and data-independent access
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Balloon
Balloon is a password hashing function from the Balloon hashing family. It uses a 32-byte (256-bit) output and a 0–64-byte salt. It takes the parameters s_cost (default 65536) and t_cost (default 3). Its registry entry cites Balloon hashing (Boneh, Corrigan-Gibbs, Schechter 2016). NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
Balloon hashing is a memory-hard password hashing function proposed in 2016 by Dan Boneh, Henry Corrigan-Gibbs and Stuart Schechter. It is built from any standard hash function and has a proof of memory-hardness in the random-oracle model.
Balloon has three phases. Expand fills a buffer of blocks sequentially by hashing each previous block. Mix then makes several rounds over the buffer; each block is updated by hashing it with its predecessor and with a small number of other blocks chosen pseudo-randomly from the salt, not from the password, so memory access is independent of secret data. Extract outputs the final block.
Because it uses only a standard hash such as SHA-256 or BLAKE2b, Balloon can be implemented with approved primitives in regulated environments. NextSSL includes a Balloon entry wired from source, not yet verified against reference outputs. Variants can use multiple threads for parallelism. Its proofs assume an ideal hash function, which standard hashes are believed to approximate.
History
2016–2016Balloon hashing published by Dan Boneh, Henry Corrigan-Gibbs, Stuart Schechter
Security notes
Balloon's proofs give it strong theoretical support, and no practical attacks are known, but it has seen little deployment compared with Argon2. NextSSL's implementation is unverified.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| out | 32 | Output |
| salt | 0 – 64 | Salt |
Parameters
| Name | Type | Range | Default | Required |
|---|---|---|---|---|
| s_cost | u32 | 1 – 1048576 | 65536 | no |
| t_cost | u32 | 1 – 64 | 3 | no |
Parameters are passed as a string, for example nextssl_mac("hmac", "hash=sha512", …). Omitted parameters take their declared default.
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
phc = root.call("pwhash", "balloon", None, b"correct horse")[0] # PHC string, fresh salt
ok = root.check("pwhash_verify", "balloon", None, b"correct horse", phc)
nextssl_root_pwhash("balloon", NULL, password, out);
nextssl_root_pwhash_verify("balloon", NULL, password, phc);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_pwhash_in(reg::all(), Policy::Any, "balloon", &Params::new())?;
let phc = alg.hash(b"correct horse")?; // PHC string
let ok = alg.verify(b"correct horse", &phc)?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
More password hashing
All 30Frequently asked questions
What is Balloon?
Balloon is a password hash in the Balloon hashing family. Balloon hashing is a memory-hard password hashing function proposed in 2016 by Dan Boneh, Henry Corrigan-Gibbs and Stuart Schechter.
What are the Balloon sizes?
In NextSSL, Balloon uses: output 32 bytes.
Who designed Balloon and when?
Balloon belongs to the Balloon hashing family, first published in 2016 by Dan Boneh, Henry Corrigan-Gibbs, Stuart Schechter. Its origin: Balloon hashing paper (2016).
Which standards define Balloon?
Balloon is referenced by Balloon hashing (Boneh, Corrigan-Gibbs, Schechter 2016).
Is Balloon safe to use?
Balloon is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).