Luffa
Hitachi's SHA-3 candidate: a sponge-like hash built from parallel 256-bit permutations
Experimental or unclassified. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Luffa
Luffa is a cryptographic hash function. It produces a 28–64-byte output. It takes the parameter out_len (default 32). Its registry entry cites Luffa (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
Luffa is a hash function designed by researchers at Hitachi and Katholieke Universiteit Leuven and submitted to the NIST SHA-3 competition, where it reached the second round. It uses multiple 256-bit permutations in parallel rather than one large one.
Luffa maintains three, four or five 256-bit blocks of state for the 224/256-, 384- and 512-bit versions respectively. Each 256-bit message block is injected into all state blocks through a linear message-injection function, after which each block is permuted independently by a 256-bit permutation built from a 4-bit S-box applied in bit-sliced form and a word-level mixing step. Output is extracted sponge-style.
NextSSL includes a sphlib-based Luffa entry and Luffa-256, Luffa-384 and Luffa-512 entries wired from benchmarking sources. Each version's state width is chosen so that the overall capacity exceeds twice the digest length, and the separate small permutations allow parallel hardware implementation. 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 competitionLuffa published by Christophe De Cannière, Hisayoshi Sato, Dai Watanabe
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
No practical attacks on full Luffa are known, though distinguishers on reduced-round permutations were published. It was not chosen as a finalist and is for research only.
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", "luffa", None, b"abc")[0]
nextssl_root_hash_with("luffa", NULL, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let digest = reg::hash_in(reg::all(), Policy::Any, "luffa", &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 Luffa?
Luffa is a hash in the Luffa family. Luffa is a hash function designed by researchers at Hitachi and Katholieke Universiteit Leuven and submitted to the NIST SHA-3 competition, where it reached the second round.
What are the Luffa sizes?
In NextSSL, Luffa uses: output 28 to 64 bytes.
Who designed Luffa and when?
Luffa belongs to the Luffa family, first published in 2008 by Christophe De Cannière, Hisayoshi Sato, Dai Watanabe. Its origin: NIST SHA-3 competition (round 2).
Which standards define Luffa?
Luffa is referenced by Luffa (SHA-3 round 2 candidate), sphlib implementation.
Is Luffa safe to use?
Luffa 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).