Trivium is a synchronous
stream cipher
stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream ( keystream). In a stream cipher, each plaintext digit is encrypted one at a time with the corresponding digit of the keystream ...
designed to provide a flexible trade-off between speed and
gate count in hardware, and reasonably efficient software implementation.
Trivium was submitted to the Profile II (hardware) of the
eSTREAM
eSTREAM is a project to "identify new stream ciphers suitable for widespread adoption", organised by the EU ECRYPT network. It was set up as a result of the failure of all six stream ciphers submitted to the NESSIE project. The call for primi ...
competition by its authors, Christophe De Cannière and
Bart Preneel
Bart Preneel (born 15 October 1963 in Leuven, Belgium) is a Flemish cryptographer and cryptanalyst. He is a professor at Katholieke Universiteit Leuven, in the COSIC group.
He was the president of the International Association for Cryptologic ...
, and has been selected as part of the portfolio for low area hardware ciphers (Profile 2) by the eSTREAM project. It is not patented and has been specified as an International Standard under ISO/IEC 29192-3.
It generates up to 2
64 bit
The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented a ...
s of output from an 80-bit
key and an 80-bit
IV. It is the simplest eSTREAM entrant; while it shows remarkable resistance to cryptanalysis for its simplicity and performance, recent attacks leave the security margin looking rather slim.
Description
Trivium's 288-bit internal state consists of three
shift register
A shift register is a type of digital circuit using a cascade of flip-flops where the output of one flip-flop is connected to the input of the next. They share a single clock signal, which causes the data stored in the system to shift from one lo ...
s of different lengths. At each round, a bit is shifted into each of the three shift registers using a non-linear combination of taps from that and one other register; one bit of output is produced. To initialize the cipher, the key and IV are written into two of the shift registers, with the remaining bits starting in a fixed pattern; the cipher state is then updated 4 × 288 = 1152 times, so that every bit of the internal state depends on every bit of the key and of the IV in a complex nonlinear way.
No taps appear on the first 65 bits of each shift register, so each novel state bit is not used until at least 65 rounds after it is generated. This is the key to Trivium's software performance and flexibility in hardware.
Specification
Trivium may be specified very concisely using three recursive equations. Each variable is an element of
GF(2); they can be represented as
bit
The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented a ...
s, with "+" being
XOR
Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false).
It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , , ...
and "•" being
AND.
*''a''
''i'' = ''c''
''i''−66 + ''c''
''i''−111 + ''c''
''i''−110 • ''c''
''i''−109 + ''a''
''i''−69
*''b''
''i'' = ''a''
''i''−66 + ''a''
''i''−93 + ''a''
''i''−92 • ''a''
''i''−91 + ''b''
''i''−78
*''c''
''i'' = ''b''
''i''−69 + ''b''
''i''−84 + ''b''
''i''−83 • ''b''
''i''−82 + ''c''
''i''−87
The output bits ''r''
0 ... ''r''
264−1 are then generated by
*''r''
''i'' = ''c''
''i''−66 + ''c''
''i''−111 + ''a''
''i''−66 + ''a''
''i''−93 + ''b''
''i''−69 + ''b''
''i''−84
Given an 80-bit key ''k''
0 ... ''k''
79 and an ''l''-bit IV ''v''
0 ... ''v''
''l''−1 (where 0 ≤ ''l'' < 80), Trivium is initialized as follows:
*(''a''
−1245 ... ''a''
−1153) = (0, 0 ... 0, ''k''
0 ... ''k''
79)
*(''b''
−1236 ... ''b''
−1153) = (0, 0 ... 0, ''v''
0 ... ''v''
''l''−1)
*(''c''
−1263 ... ''c''
−1153) = (1, 1, 1, 0, 0 ... 0)
The large negative indices on the initial values reflect the 1152 steps that must take place before output is produced.
To map a stream of bits ''r'' to a stream of bytes ''R'', we use the little-endian mapping ''R''
''i'' = Σ
''j''=0 ... 7 2
j ''r''
8''i''+j.
Performance
A straightforward hardware implementation of Trivium would use 3488
logic gate
A logic gate is an idealized or physical device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic ga ...
s and produce one bit per clock cycle. However, because each state bit is not used for at least 64 rounds, 64 state bits can be generated in parallel at a slightly greater hardware cost of 5504 gates. Different tradeoffs between speed and area are also possible.
The same property allows an efficient bitslice implementation in software; performance testing by
eSTREAM
eSTREAM is a project to "identify new stream ciphers suitable for widespread adoption", organised by the EU ECRYPT network. It was set up as a result of the failure of all six stream ciphers submitted to the NESSIE project. The call for primi ...
give bulk encryption speeds of around 4
cycles/byte on some
x86 platforms, which compares well to the 19 cycles/byte of the
AES
AES may refer to:
Businesses and organizations Companies
* AES Corporation, an American electricity company
* AES Data, former owner of Daisy Systems Holland
* AES Eletropaulo, a former Brazilian electricity company
* AES Andes, formerly AES Gener ...
reference implementation on the same platform.
Security
, no cryptanalytic attacks better than
brute-force attack
In cryptography, a brute-force attack consists of an attacker submitting many passwords or passphrases with the hope of eventually guessing correctly. The attacker systematically checks all possible passwords and passphrases until the correct ...
are known, but several attacks come close. The
cube attack
The cube attack is a method of cryptanalysis applicable to a wide variety of symmetric-key algorithms, published by Itai Dinur and Adi Shamir in a September 2008 preprint.
Attack
A revised version of this preprint was placed online in January 2 ...
requires 2
68 steps to break a variant of Trivium where the number of initialization rounds is reduced to 799. Previously other authors speculate that these techniques could lead to a break for 1100 initialisation rounds, or "maybe even the original cipher". This builds on an attack due to Michael Vielhaber that breaks 576 initialization rounds in only 2
12.3 steps.
Another attack recovers the internal state (and thus the key) of the full cipher in around 2
89.5 steps (where each step is roughly the cost of a single trial in exhaustive search). Reduced variants of Trivium using the same design principles have been broken using an equation-solving technique. These attacks improve on the well-known time-space tradeoff attack on stream ciphers, which with Trivium's 288-bit internal state would take 2
144 steps, and show that a variant on Trivium which made no change except to increase the key length beyond the 80 bits mandated by eSTREAM Profile 2 would not be secure. Using optimised solving strategy, it is further possible to reduce the state-recovery complexity to 2
132 steps.
A detailed justification of the design of Trivium is given in.
References
External links
eSTREAM page on TriviumeSTREAM Implementation
{{DEFAULTSORT:Trivium (Cipher)
Stream ciphers