Trivia0v2
Trivium-inspired stream cipher with an integrated hash for authentication
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 Trivia0v2
Trivia0v2 is an authenticated encryption (AEAD) scheme from the TriviA family. It uses a 16-byte (128-bit) key, an 8-byte nonce and a 16-byte (128-bit) authentication tag. 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
TriviA (Trivia-ck) is an authenticated cipher that combines a Trivium-style stream cipher with an algebraic hash for authentication. NextSSL includes two version 2 builds, trivia0 and trivia128.
The keystream generator is derived from Trivium, extended to a larger state, and authentication uses a field-multiplication-based hash over the ciphertext and associated data. The design targets efficient hardware with a modest software footprint.
The two NextSSL ids differ in their parameterisation within the version 2 specification. Both builds use a 128-bit key and 64-bit nonce. Trivium-derived designs are attractive in hardware because their state update is cheap and highly parallel, but their security depends heavily on the initialisation rounds.
History
2013–2019CAESAR competition for authenticated encryption announced
CAESAR competitionTriviA published by Avik Chakraborti, Mridul Nandi
57 first-round candidates published
CAESAR competitionSecond round announced
CAESAR competitionThird round announced
CAESAR competitionFinalists announced
CAESAR competitionFinal portfolio: Ascon, ACORN, AEGIS-128, Deoxys-II, COLM and OCB
CAESAR competition
Security notes
Requires unique nonces. Public analysis is limited; treat as research-only.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 16 | Secret key |
| nonce | 8 | Nonce / IV |
| tag | 16 | Authentication tag |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
key, nonce = root.random(16), root.random(8)
ct = root.call("aead_seal", "trivia0v2", None, key, nonce, b"header", b"secret")[0] # ct || tag
pt = root.call("aead_open", "trivia0v2", None, key, nonce, b"header", ct)[0]
nextssl_root_aead_seal("trivia0v2", NULL, key, nonce, aad, pt, out); /* writes ct || tag */
nextssl_root_aead_open("trivia0v2", NULL, key, nonce, aad, ct, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_aead_in(reg::all(), Policy::Any, "trivia0v2", &Params::new())?;
let ct = alg.seal(&key, &nonce, b"header", b"secret")?;
let pt = alg.open(&key, &nonce, b"header", &ct)?;
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 authenticated encryption
All 392Frequently asked questions
What is Trivia0v2?
Trivia0v2 is an AEAD in the TriviA family. TriviA (Trivia-ck) is an authenticated cipher that combines a Trivium-style stream cipher with an algebraic hash for authentication.
What are the Trivia0v2 sizes?
In NextSSL, Trivia0v2 uses: key 16 bytes, nonce 8 bytes, tag 16 bytes.
Who designed Trivia0v2 and when?
Trivia0v2 belongs to the TriviA family, first published in 2014 by Avik Chakraborti, Mridul Nandi. Its origin: TriviA-ck (CAESAR competition).
Is Trivia0v2 safe to use?
Trivia0v2 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).