Trivium
A minimal hardware stream cipher in the eSTREAM portfolio, standardised in ISO/IEC 29192-3
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 Trivium
Trivium is a stream cipher. It uses a 10-byte (80-bit) key and a 10-byte nonce. 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
Trivium is a hardware-oriented stream cipher designed by Christophe De Cannière and Bart Preneel. It was selected for the eSTREAM hardware portfolio and is standardised in ISO/IEC 29192-3 as a lightweight stream cipher. It uses an 80-bit key and an 80-bit IV.
Trivium's 288-bit state is split into three nonlinear feedback shift registers of 93, 84 and 111 bits. On each clock, a few tapped bits from each register are XORed to give one output bit, and each register is fed by a combination of linear taps and one AND of two bits from another register. Initialisation clocks the state 1152 times without output. The design can produce up to 64 bits per clock in parallel hardware.
NextSSL includes Trivium from source without verification. Trivium's simplicity has made it one of the most analysed stream ciphers; cube and algebraic attacks have reached more than 800 of its 1152 initialisation rounds, but not the full cipher. It is a common benchmark in hardware cryptography research. Because the tier is unverified, outputs should be checked against independent reference values before they are relied on for anything beyond experimentation.
History
2004–2008ECRYPT launches eSTREAM to find new stream ciphers
eSTREAM projectTrivium published by Christophe De Cannière, Bart Preneel
34 designs submitted
eSTREAM projectFinal eSTREAM portfolio published
eSTREAM project
Security notes
No practical attacks on full Trivium are known; cube attacks break versions with fewer initialisation rounds. Its 80-bit key is below modern recommendations for long-term security. NextSSL's implementation is unverified.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 10 | Secret key |
| nonce | 10 | Nonce / IV |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
ct = root.call("stream_apply", "trivium", None, key, nonce, b"secret")[0] # same call decrypts
nextssl_root_stream_apply("trivium", NULL, key, nonce, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_streamcipher_in(reg::all(), Policy::Any, "trivium", &Params::new())?;
let ct = alg.apply_keystream(&key, &nonce, b"secret")?;
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 stream ciphers
All 37Frequently asked questions
What is Trivium?
Trivium is a stream cipher in the Trivium family. Trivium is a hardware-oriented stream cipher designed by Christophe De Cannière and Bart Preneel.
What are the Trivium sizes?
In NextSSL, Trivium uses: key 10 bytes, nonce 10 bytes.
Who designed Trivium and when?
Trivium belongs to the Trivium family, first published in 2005 by Christophe De Cannière, Bart Preneel. Its origin: eSTREAM portfolio (hardware); ISO/IEC 29192-3.
Is Trivium safe to use?
Trivium 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).