# Understanding Cryptography by Christof Paar and Jan Pelzl - Chapter 2 Solutions - Ex2.12

- 4 mins

## Exercise 2.12

Assume the IV and the key of Trivium each consist of 80 all-zero bits. Compute the first 70 bits $s_1, ..., s_70$ during the warm-up phase of Trivium. Note that these are only internal bits which are not used for encryption since the warm-up phase lasts for 1152 clock cycles.

### Solution

I haven’t yet verified this solution independently. If you spot any mistakes, please leave a comment in the Disqus box at the bottom of the page.

I wrote a python script which inplements Trivium:

This script reveals that the first 70 bits of output are:

$\begin{array}{c|c} s_1 & s_2 & s_3 & s_4 & s_5 & ... & s_{67} & s_{68} & s_{69} & s_{70}\\ \hline 0 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 1 & 0 \end{array}$

The source code is shown below:

Note: This is not a remotely efficient implementation of Trivium.