BMW
A wide-pipe ARX hash from the SHA-3 competition that reached the second round
Experimental or unclassified. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About BMW
BMW is a cryptographic hash function from the Blue Midnight Wish family. It produces a 28–64-byte output. It takes the parameter out_len (default 32). Its registry entry cites Blue Midnight Wish (SHA-3 round 2 candidate), sphlib implementation. NextSSL lists it in the research tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
Blue Midnight Wish (BMW) is a hash function submitted to the NIST SHA-3 competition by a team led by Danilo Gligoroski. It was among the fastest second-round candidates in software but was not selected as a finalist.
BMW is a wide-pipe design: the internal chaining state is twice the output size, which protects against generic multi-collision and length-extension style attacks on narrow Merkle–Damgård chains. Its compression function combines the message with the chaining value through three functions f0, f1 and f2 built from additions, rotations, shifts and XORs, and a final output transformation folds the double-width state down to the digest.
The 256-bit family uses 32-bit words and the 512-bit family uses 64-bit words. NextSSL includes a sphlib-based BMW entry and separate BMW-256 and BMW-512 entries wired from benchmarking sources. The design was tweaked between rounds one and two to address early cryptanalytic observations. Like the other non-selected candidates, its main value today is as a reference point for understanding the designs NIST evaluated and the cryptanalysis the competition produced.
History
2007–2015NIST announces a public competition for a new hash standard, SHA-3
NIST SHA-3 competitionBlue Midnight Wish published by Danilo Gligoroski et al.
64 designs submitted; 51 accepted into round 1
NIST SHA-3 competition14 designs advance to round 2
NIST SHA-3 competitionFive finalists named: BLAKE, Grøstl, JH, Keccak and Skein
NIST SHA-3 competitionKeccak selected as SHA-3
NIST SHA-3 competitionSHA-3 published as FIPS 202
NIST SHA-3 competition
Security notes
Distinguishers and pseudo-collision results on the BMW compression function were published during the competition, which contributed to it not advancing to the final round. No practical collision on the full hash is known, but it is a research artefact rather than a recommended hash.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| out | 28 – 64 | Output |
Parameters
| Name | Type | Range | Default | Required |
|---|---|---|---|---|
| out_len | u64 | 28 – 64 | 32 | 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 'research' is reachable from the root API only
digest = root.call("hash_with", "bmw", None, b"abc")[0]
nextssl_root_hash_with("bmw", NULL, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let digest = reg::hash_in(reg::all(), Policy::Any, "bmw", &Params::new(), b"abc")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Similar names
Looking for something else?More hash functions
All 424Frequently asked questions
What is BMW?
BMW is a hash in the Blue Midnight Wish family. Blue Midnight Wish (BMW) is a hash function submitted to the NIST SHA-3 competition by a team led by Danilo Gligoroski.
What are the BMW sizes?
In NextSSL, BMW uses: output 28 to 64 bytes.
Who designed BMW and when?
BMW belongs to the Blue Midnight Wish family, first published in 2008 by Danilo Gligoroski et al.. Its origin: NIST SHA-3 competition (round 2).
Which standards define BMW?
BMW is referenced by Blue Midnight Wish (SHA-3 round 2 candidate), sphlib implementation.
Is BMW safe to use?
BMW is in the research tier. Experimental or unclassified. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).
Related families
A quasigroup-based wide-pipe hash submitted to the first round of the SHA-3 competition
SHA-2The NIST Merkle–Damgård hash family behind most of today's TLS, signatures and software
SHA-3 and KeccakThe Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2
SHA-3 and KeccakThe Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2