Shacal2
A 256-bit block cipher built from the SHA-256 compression function, from the NESSIE project
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 Shacal2
Shacal2 is a block cipher from the SHACAL-2 family. It uses a 16–64-byte key and a 32-byte (256-bit) block. Its registry entry cites SHACAL-2 (Handschuh, Naccache; NESSIE), Crypto++ implementation. 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
SHACAL-2 is a block cipher with a 256-bit block and a 128 to 512-bit key, built on the SHA-256 compression function. It was proposed by Handschuh and Naccache for the NESSIE project. NextSSL carries it as an unverified Crypto++ implementation.
SHACAL-2 was proposed by Helena Handschuh and David Naccache for the NESSIE European project. It reuses the round function of the SHA-256 hash, so a single set of components supports both hashing and encryption. Its block is 256 bits, the largest among the block ciphers in this group.
NextSSL carries shacal2 with a key from 16 to 64 bytes and a 32-byte block, following a Crypto++ implementation. The large block raises the birthday bound to about 2 to the power of 128 blocks, so volume limits are not an issue for typical use.
The unverified tier reflects the archive's review status. Reduced-round analyses have appeared in the literature, so the full cipher should be treated as research material for new designs.
History
2000–2003SHACAL-2 published by Helena Handschuh, David Naccache
European NESSIE project opens its call for primitives
NESSIE projectNESSIE portfolio published
NESSIE project
How it works
- The key is expanded into round constants and subkey words used by the SHA-256 round function.
- The 256-bit block is split into eight 32-bit words, which pass through the SHA-256 style rounds.
- Decryption runs the inverse round function in reverse order using the same key schedule.
Security notes
Unverified in NextSSL. Reduced-round attacks are documented in the literature, so the full construction is research material rather than a settled choice.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 16 – 64 | Secret key |
| block | 32 | Block |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
block = root.call("blockcipher_encrypt", "shacal2", None, key, plaintext_block)[0]
nextssl_root_blockcipher_encrypt("shacal2", NULL, key, block, out); /* exactly one block */
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_blockcipher_in(reg::all(), Policy::Any, "shacal2", &Params::new())?;
let out = alg.encrypt_block(&key, &block)?;
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 block ciphers
All 84Frequently asked questions
What is Shacal2?
Shacal2 is a block cipher in the SHACAL-2 family. SHACAL-2 is a block cipher with a 256-bit block and a 128 to 512-bit key, built on the SHA-256 compression function.
What are the Shacal2 sizes?
In NextSSL, Shacal2 uses: key 16 to 64 bytes, block 32 bytes.
Who designed Shacal2 and when?
Shacal2 belongs to the SHACAL-2 family, first published in 2000 by Helena Handschuh, David Naccache. Its origin: NESSIE project.
Which standards define Shacal2?
Shacal2 is referenced by SHACAL-2 (Handschuh, Naccache; NESSIE), Crypto++ implementation.
Is Shacal2 safe to use?
Shacal2 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).
Related families
The Advanced Encryption Standard: the world's default 128-bit block cipher
SerpentThe conservative AES finalist with 32 rounds of bit-sliced 4-bit S-boxes
SquareDaemen, Knudsen and Rijmen's 1997 128-bit substitution-permutation cipher, a precursor to Rijndael
TwofishSchneier and colleagues' AES finalist with key-dependent S-boxes
SHA-2The NIST Merkle–Damgård hash family behind most of today's TLS, signatures and software