Shabal
A SHA-3 second-round candidate from France's Saphir project, built on a keyed permutation
Experimental or unclassified. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Shabal
Shabal is a cryptographic hash function. It produces a 28–64-byte output. It takes the parameter out_len (default 32). Its registry entry cites Shabal (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
Shabal is a hash function submitted to the NIST SHA-3 competition by the French Saphir research project. It reached the second round and is notable for its security proof in an ideal-cipher model.
Shabal's mode keeps three registers: A (12 words), B and C (16 words each). Each 512-bit message block is added to B, XORed with a counter into A, and processed by a keyed permutation that updates A and B using nonlinear shift-register-style rounds of 32-bit additions, rotations and multiplications by small constants. The block is then subtracted from C and B and C are swapped. Three final rounds without new input produce the output.
One function covers all output lengths, from 192 to 512 bits, by truncation. NextSSL includes a sphlib-based Shabal entry and Shabal-256 and Shabal-512 entries wired from benchmarking sources. Shabal was one of the few candidates with an explicit indifferentiability proof for its mode. 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 competitionShabal published by Saphir project (France)
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 on Shabal's internal permutation were published, though they did not translate into practical attacks on the hash. It was not chosen as a finalist and is for research use.
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", "shabal", None, b"abc")[0]
nextssl_root_hash_with("shabal", NULL, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let digest = reg::hash_in(reg::all(), Policy::Any, "shabal", &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 Shabal?
Shabal is a hash in the Shabal family. Shabal is a hash function submitted to the NIST SHA-3 competition by the French Saphir research project.
What are the Shabal sizes?
In NextSSL, Shabal uses: output 28 to 64 bytes.
Who designed Shabal and when?
Shabal belongs to the Shabal family, first published in 2008 by Saphir project (France). Its origin: NIST SHA-3 competition (round 2).
Which standards define Shabal?
Shabal is referenced by Shabal (SHA-3 round 2 candidate), sphlib implementation.
Is Shabal safe to use?
Shabal 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
The Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2
SkeinA SHA-3 finalist built from the Threefish tweakable block cipher in the UBI chaining mode
SHA-3 and KeccakThe Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2