<s>
Trivium	B-Algorithm
is	O
a	O
synchronous	O
stream	B-Algorithm
cipher	I-Algorithm
designed	O
to	O
provide	O
a	O
flexible	O
trade-off	O
between	O
speed	O
and	O
gate	B-Algorithm
count	I-Algorithm
in	O
hardware	O
,	O
and	O
reasonably	O
efficient	O
software	O
implementation	O
.	O
</s>
<s>
Trivium	B-Algorithm
was	O
submitted	O
to	O
the	O
Profile	O
II	O
(	O
hardware	O
)	O
of	O
the	O
eSTREAM	O
competition	O
by	O
its	O
authors	O
,	O
Christophe	O
De	O
Cannière	O
and	O
Bart	O
Preneel	O
,	O
and	O
has	O
been	O
selected	O
as	O
part	O
of	O
the	O
portfolio	O
for	O
low	O
area	O
hardware	O
ciphers	O
(	O
Profile	O
2	O
)	O
by	O
the	O
eSTREAM	O
project	O
.	O
</s>
<s>
It	O
generates	O
up	O
to	O
264	O
bits	O
of	O
output	O
from	O
an	O
80-bit	O
key	O
and	O
an	O
80-bit	O
IV	B-Algorithm
.	O
</s>
<s>
Trivium	B-Algorithm
's	O
288-bit	O
internal	O
state	O
consists	O
of	O
three	O
shift	B-General_Concept
registers	I-General_Concept
of	O
different	O
lengths	O
.	O
</s>
<s>
At	O
each	O
round	O
,	O
a	O
bit	O
is	O
shifted	O
into	O
each	O
of	O
the	O
three	O
shift	B-General_Concept
registers	I-General_Concept
using	O
a	O
non-linear	O
combination	O
of	O
taps	O
from	O
that	O
and	O
one	O
other	O
register	O
;	O
one	O
bit	O
of	O
output	O
is	O
produced	O
.	O
</s>
<s>
To	O
initialize	O
the	O
cipher	O
,	O
the	O
key	O
and	O
IV	B-Algorithm
are	O
written	O
into	O
two	O
of	O
the	O
shift	B-General_Concept
registers	I-General_Concept
,	O
with	O
the	O
remaining	O
bits	O
starting	O
in	O
a	O
fixed	O
pattern	O
;	O
the	O
cipher	O
state	O
is	O
then	O
updated	O
4	O
×	O
288	O
=	O
1152	O
times	O
,	O
so	O
that	O
every	O
bit	O
of	O
the	O
internal	O
state	O
depends	O
on	O
every	O
bit	O
of	O
the	O
key	O
and	O
of	O
the	O
IV	B-Algorithm
in	O
a	O
complex	O
nonlinear	O
way	O
.	O
</s>
<s>
No	O
taps	O
appear	O
on	O
the	O
first	O
65	O
bits	O
of	O
each	O
shift	B-General_Concept
register	I-General_Concept
,	O
so	O
each	O
novel	O
state	O
bit	O
is	O
not	O
used	O
until	O
at	O
least	O
65	O
rounds	O
after	O
it	O
is	O
generated	O
.	O
</s>
<s>
This	O
is	O
the	O
key	O
to	O
Trivium	B-Algorithm
's	O
software	O
performance	O
and	O
flexibility	O
in	O
hardware	O
.	O
</s>
<s>
Trivium	B-Algorithm
may	O
be	O
specified	O
very	O
concisely	O
using	O
three	O
recursive	O
equations	O
.	O
</s>
<s>
Given	O
an	O
80-bit	O
key	O
k0	O
...	O
k79	O
and	O
an	O
l-bit	O
IV	B-Algorithm
v0	O
...	O
vl−1	O
(	O
where	O
0	O
≤	O
l	O
<	O
80	O
)	O
,	O
Trivium	B-Algorithm
is	O
initialized	O
as	O
follows	O
:	O
</s>
<s>
To	O
map	O
a	O
stream	O
of	O
bits	O
r	O
to	O
a	O
stream	O
of	O
bytes	O
R	O
,	O
we	O
use	O
the	O
LSb-first	B-Language
mapping	O
Ri	O
=	O
Σj	O
=	O
0	O
,	O
...	O
,	O
7	O
2j	O
r8i+j	O
.	O
</s>
<s>
A	O
straightforward	O
hardware	O
implementation	O
of	O
Trivium	B-Algorithm
would	O
use	O
3488	O
logic	O
gates	O
and	O
produce	O
one	O
bit	O
per	O
clock	O
cycle	O
.	O
</s>
<s>
The	O
same	O
property	O
allows	O
an	O
efficient	O
bitslice	O
implementation	O
in	O
software	O
;	O
performance	O
testing	O
by	O
eSTREAM	O
give	O
bulk	O
encryption	O
speeds	O
of	O
around	O
4	O
cycles/byte	O
on	O
some	O
x86	B-Operating_System
platforms	O
,	O
which	O
compares	O
well	O
to	O
the	O
19	O
cycles/byte	O
of	O
the	O
AES	B-Algorithm
reference	O
implementation	O
on	O
the	O
same	O
platform	O
.	O
</s>
<s>
The	O
cube	O
attack	O
requires	O
268	O
steps	O
to	O
break	O
a	O
variant	O
of	O
Trivium	B-Algorithm
where	O
the	O
number	O
of	O
initialization	O
rounds	O
is	O
reduced	O
to	O
799	O
.	O
</s>
<s>
Reduced	O
variants	O
of	O
Trivium	B-Algorithm
using	O
the	O
same	O
design	O
principles	O
have	O
been	O
broken	O
using	O
an	O
equation-solving	O
technique	O
.	O
</s>
<s>
These	O
attacks	O
improve	O
on	O
the	O
well-known	O
time-space	O
tradeoff	O
attack	O
on	O
stream	B-Algorithm
ciphers	I-Algorithm
,	O
which	O
with	O
Trivium	B-Algorithm
's	O
288-bit	O
internal	O
state	O
would	O
take	O
2144	O
steps	O
,	O
and	O
show	O
that	O
a	O
variant	O
on	O
Trivium	B-Algorithm
which	O
made	O
no	O
change	O
except	O
to	O
increase	O
the	O
key	O
length	O
beyond	O
the	O
80	O
bits	O
mandated	O
by	O
eSTREAM	O
Profile	O
2	O
would	O
not	O
be	O
secure	O
.	O
</s>
<s>
A	O
detailed	O
justification	O
of	O
the	O
design	O
of	O
Trivium	B-Algorithm
is	O
given	O
in	O
a	O
paper	O
"	O
A	O
Stream	B-Algorithm
Cipher	I-Algorithm
Construction	O
Inspired	O
by	O
Block	O
Cipher	O
Design	O
Principles	O
"	O
.	O
</s>
