Shark
A 1996 substitution-permutation block cipher by Rijmen, Daemen and colleagues, carried at six rounds
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 Shark
Shark is a block cipher. It uses a 16-byte (128-bit) key and an 8-byte (64-bit) block. Its registry entry cites SHARK (Rijmen et al., 1996), Crypto++ implementation, 6 rounds. 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
SHARK is a substitution-permutation block cipher proposed in 1996 by Rijmen, Daemen, Preneel, Bosselaers and De Win. It uses 64-bit blocks and a 128-bit key, and NextSSL carries a six-round version from Crypto++. It is an early design in the line that led to Square and Rijndael.
SHARK was proposed in 1996 by Vincent Rijmen, Joan Daemen, Bart Preneel, Antoon Bosselaers and Erik De Win. It is a substitution-permutation network in which each round combines a keyed step with an S-box layer and a linear diffusion layer. The design influenced Square and later Rijndael.
NextSSL carries shark with a 16-byte key and an 8-byte block, following a Crypto++ implementation that uses six rounds. The round count is a reduced version of the design, so the entry is not the full-round cipher the authors proposed in their own setting.
The 64-bit block sets a birthday bound of about 2 to the power of 32 blocks per key. The unverified tier reflects the archive's review status and does not describe the design as broken.
History
1996–1996SHARK published by Vincent Rijmen, Joan Daemen, Bart Preneel, Antoon Bosselaers, Erik De Win
How it works
- A 128-bit key is expanded into round keys for the six rounds.
- Each round XORs a round key, applies an S-box layer and a linear diffusion layer across the block.
- Decryption applies the inverse layers in reverse order with the same keys.
Security notes
Unverified in NextSSL, and this entry is a six-round version. The 64-bit block limits safe data per key, so use a modern cipher for new designs.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 16 | Secret key |
| block | 8 | 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", "shark", None, key, plaintext_block)[0]
nextssl_root_blockcipher_encrypt("shark", 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, "shark", &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 Shark?
Shark is a block cipher in the SHARK family. SHARK is a substitution-permutation block cipher proposed in 1996 by Rijmen, Daemen, Preneel, Bosselaers and De Win.
What are the Shark sizes?
In NextSSL, Shark uses: key 16 bytes, block 8 bytes.
Who designed Shark and when?
Shark belongs to the SHARK family, first published in 1996 by Vincent Rijmen, Joan Daemen, Bart Preneel, Antoon Bosselaers, Erik De Win. Its origin: Proposed in 1996.
Which standards define Shark?
Shark is referenced by SHARK (Rijmen et al., 1996), Crypto++ implementation, 6 rounds.
Is Shark safe to use?
Shark 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
A 1993 Daemen block cipher with a 96-bit block and 96-bit key, kept for historical comparison
AESThe Advanced Encryption Standard: the world's default 128-bit block cipher
IDEAThe International Data Encryption Algorithm: a Lai–Massey cipher mixing three groups
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