Threefish-512
The large-block tweakable ARX cipher underlying the Skein hash
About Threefish-512
Threefish-512 is one of 3 Threefish variants in the NextSSL registry, a block cipher. It uses a 64-byte (512-bit) key and a 64-byte (512-bit) block. It takes the parameter tweak. Its registry entry cites Skein 1.3 (Threefish). NextSSL lists it in the standard tier and exposes it through the safe API.
Overview
Threefish is a tweakable block cipher with 256-, 512- and 1024-bit blocks, designed as the core of the Skein hash function. It uses only 64-bit additions, rotations and XORs and accepts a 128-bit tweak alongside the key.
Threefish's MIX function adds two 64-bit words, rotates one by a constant and XORs it with the sum. Each round applies MIX to word pairs and then permutes the words; a subkey derived from the key and tweak is added every four rounds. Threefish-256 and -512 use 72 rounds, Threefish-1024 uses 80. The tweak makes each encryption a separate permutation, which Skein uses to encode block position and type.
NextSSL includes Threefish-256, Threefish-512 and Threefish-1024 as specified in Skein version 1.3. Its large block sizes and tweak input make it suitable for wide-block and tweakable constructions beyond hashing, though few have been standardised. The tweak is not a key, but it changes the permutation, and Skein uses it to encode position and block type.
History
2008–2008Threefish published
Security notes
No practical attacks on full Threefish are known; the best published results reach well under its full round count. It is rarely used outside Skein.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 64 | Secret key |
| block | 64 | Block |
Parameters
| Name | Type | Range | Default | Required |
|---|---|---|---|---|
| tweak | bytes | 16 – 16 | — | 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
ns = NextSSL() # safe API: safe and standard tiers
block = ns.call("blockcipher_encrypt", "threefish-512", None, key, plaintext_block)[0]
nextssl_blockcipher_encrypt("threefish-512", 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::Safe, "threefish-512", &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.
Other Threefish variants
2More block ciphers
All 84Frequently asked questions
What is Threefish-512?
Threefish-512 is a block cipher in the Threefish family. Threefish is a tweakable block cipher with 256-, 512- and 1024-bit blocks, designed as the core of the Skein hash function.
What are the Threefish-512 sizes?
In NextSSL, Threefish-512 uses: key 64 bytes, block 64 bytes.
Who designed Threefish-512 and when?
Threefish-512 belongs to the Threefish family, first published in 2008 by Niels Ferguson, Stefan Lucks, Bruce Schneier, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas, Jesse Walker. Its origin: Skein 1.3 specification.
Which standards define Threefish-512?
Threefish-512 is referenced by Skein 1.3 (Threefish).
Is Threefish-512 safe to use?
Threefish-512 is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.
What other Threefish variants are there?
NextSSL also registers threefish-1024, threefish-256 in the Threefish family.