Introduction
In symmetric cryptography, stream ciphers like Trivium and its variant Trivia-SC rely on an initialization phase to mix the secret key and public initialization vector (IV) into a complex internal state. A critical metric for security is the security margin: the number of initialization rounds required before the output becomes statistically indistinguishable from a truly random sequence. This paper presents improved cryptanalytic distinguishers for these ciphers, significantly pushing the boundaries of known non-random behavior.
The Challenge of Security Margins
If an attacker can find a "distinguisher"—a statistical test identifying non-randomness—for a high number of rounds, the security margin shrinks. Prior to this work, finding distinguishers for Trivium beyond 800 rounds using small "cubes" (sets of IV bits) was a significant challenge. Furthermore, Trivia-SC, designed for the CAESAR competition, was claimed by its designers to be secure after 896 rounds. This research aims to test those claims and extend the analysis of Trivium.
Methodology: Optimized Cube Testers
The authors utilize Cube Testers, where an attacker sums the cipher's output over all $2^v$ possible values of a subset of IV bits (the "cube"). In a perfectly random cipher, this sum should be 0 or 1 with equal probability. Any significant bias indicates a distinguisher.
To improve the search for effective cubes, the authors introduced two new heuristics building on the "GreedyBitSet" algorithm:
- Maximum Last Zero: Selecting IV bits that keep the output bit sum at zero for the highest possible number of rounds.
- Maximum Frequency of Zero: Selecting bits that result in the highest total count of zero-sums across all initialization rounds.
Additionally, the authors exploited internal state biases. By applying the Piling-up Lemma to the six internal state bits XORed to create the output, they detected non-randomness even when the final output bit appeared unbiased. Computational feasibility was achieved through bit-sliced parallel implementations on high-performance clusters.
Key Results and Impact
The research successfully identified non-random behavior in both ciphers at higher round counts than previously recorded, effectively reducing the perceived security margin.
Trivium
The authors obtained new distinguishers for Trivium up to 829 rounds using a cube size of 27. As shown in the comparison with prior literature, this represents a significant advancement in the number of rounds analyzed for these cube sizes.
Trivia-SC
Surprisingly, Trivia-SC—despite its larger state and key—proved weaker against cube testers than Trivium. The authors found a distinguisher for 900 rounds using a cube size of only 21. This empirical evidence directly refutes the designers' claim that the output polynomial behaves randomly after 896 rounds.
Conclusion
While these results demonstrate a reduced security margin, it is important to note that the full versions of both ciphers (1152 rounds) remain secure. However, the identification of relatively small, practical cubes (size 13 to 27) highlights the power of optimized search heuristics. Future work may involve automating these search tools further or attempting to convert these distinguishers into full key-recovery attacks.
Summary updated