Abstract
Introduction
Background
The Internet of Things (IoT) involves technology that connects objects and people by means of electronic devices. IoT applications are deployed in a variety of objects that are attached to terminal devices, such as sensors, actuators, and radio frequency identification (RFID) tags. RFID technology is applied to a variety of areas for target perception, control, and recognition as part of distributed sensor networks, including environmental monitoring and management, healthcare, and transportation systems management.1–3 Before RFID systems can be deployed in critical infrastructures, such as emergency rooms and power plants, the security properties of their sensors must be fully examined.3,4 In fact, the security of RFID systems is a major industrial concern that could significantly hinder the market growth of distributed sensor networks.
However, sensor networks are not traditional computing devices, and existing security models and methods are therefore inadequate. Instead, the security components must suit the low resource and power consumption of the devices. 4
Trivium is a well-known lightweight synchronous stream cipher designed by C De Canniere and B Preneel, 5 which was submitted to the European ECRYPT Stream Cipher Project (eSTREAM) project in April 2005. Trivium was designed to be hardware-oriented, such that the algorithm emphasizes effectiveness—particularly the effectiveness of hardware implementation—without weakening security. Compared with other stream ciphers (such as A5/1 6 ), Trivium’s performance was shown to be superior during the three phases of eSTREAM evaluation on the stream cipher proposals. 7
Trivium is designed as a lightweight algorithm that requires much less resource consumption than traditional cryptography techniques, such as AES (Advanced Encryption Standard), ECC (Elliptic Curve Cryptography), and hash-based algorithms.8–11 However, it remains too costly for low-cost RFID tags in distributed sensor networks due to their extreme resource limitations. 3 Therefore, we attempt to design a more lightweight Trivium-like algorithm to fit the environment of distributed sensor networks.
Related works
There has been no successful attack demonstrated against Trivium to date. Raddum
12
has tried to solve the equations of Trivium with a special technique, but his method is too complex when applied to the full cipher of Trivium, and the attack is no faster than an exhaustive search. Numerical attacks, as proposed by J Borghoff et al.,
13
convert the equations system to a mixed-integer programming problem. However, the attack is only useful on Bivium, which is an inferior version of Trivium. Maximov and Biryukov
14
study two attacks on Trivium, that is, state recovering and statistical tests. A state recovering attack is regarded as the most powerful attack against Trivium, but the estimated time complexity of this attack remains approximately
Enhanced-Bivium, as proposed by Zhang et al., 20 is an improved version of Bivium that is also designed for RFID systems. However, although Enhanced-Bivium can theoretically provide more security than the original Trivium, it has been shown to be less secure than Trivium. There has been no successful attack against Trivium-like algorithms, but there have been some successful attacks implemented against Bivium due to its two-layer structure, which is smaller than the three-layer structure of Trivium-like algorithms. This additional layer substantially increases the complexity of attacks. Although there has been no successful attack against Enhanced-Bivium to date, it will face more potential attacks than Trivium-like algorithms.
Main contributions
In this article, we aim to design a lightweight Trivium-like algorithm suitable for distributed sensor networks. Our main contributions are as follows:
Study the mathematical structure of Trivium and generalize it to the Trivium-Model algorithm.
Propose a “Micro-Trivium” algorithm with better parameters that can provide increased security and better performance in chip size and power consumption.
Propose the principles of choosing good parameters.
The remainder of the article is organized as follows. Section “Trivium-Model algorithm and Micro-Trivium” generalizes Trivium to the “Trivium-Model” algorithm and proposes the “Micro-Trivium” algorithm. The resource consumption of Trivium and Micro-Trivium is compared through experimental data in section “Emulation results for resource consumption.” The security of Trivium and Micro-Trivium is discussed in section “Security analysis.” Section “Discussion” discusses the results and explains the principles of choosing the parameters. The final section, section “Conclusion,” concludes.
Trivium-Model algorithm and Micro-Trivium
Trivium
5
is designed to generate up to

Structure of Trivium.
Trivium consists of three registers with similar structures. Maximov and Biryukov
14
proposed nine parameters to study Trivium’s security under two trivial attacks. However, these parameters are used only to define the size of the registers and are thus only useful to study the properties of the attacks. In this article, we propose a set of new parameters to study Trivium’s internal state. In detail, we generalize Trivium to a “Trivium-Model” algorithm by extracting the sequence index. Algorithm 1 shows the pseudo code of the Trivium-Model algorithm, where
Figure 2 shows the structure of the Trivium-Model algorithm. The Key and IV are initialized in the following manner

Structure of the Trivium-Model algorithm.
Using this method, a Trivium-like algorithm can be presented by the parameters
Parameters of Trivium.
In this article, we aim to select better parameters for the Trivium-Model algorithm, which will make it feasible to be used by distributed sensor networks while still guaranteeing security. For this purpose, we filter all possible parameters and simulate the results under state recovering attacks and statistical tests. 14 Finally, we choose the best sets of parameters obtained, which is shown in Table 2, and the new algorithm is called “Micro-Trivium.”
Parameters of Micro-Trivium.
In the next section, we will compare the resource consumption of Micro-Trivium with Trivium and other algorithms.
Emulation results for resource consumption
All RFID tags in distributed sensor networks are labeled with a miniaturized integrated circuit (IC) equipped with antennae and some memory blocks. 21 Reduced power consumption and chip size are our two major design objectives, as a low-cost RFID tag must be priced in the range from $ 0.50 to $1.00 to achieve a significant economic benefit. 22 However, the silicon area of the chip determines the costs of the tag, and that area mainly depends on the number of logic gates. 23 Additionally, the available power budget is very small because the dissipated power directly influences the operational range of the tag. 23 The power consumption is largely based on the mean current consumption. Therefore, only 250–3000 gates and 15 µA can be used for security-related operations.23–25 Trivium requires more than 3000 gates, which is not suitable for low-cost RFID tags in distributed sensor networks. Therefore, we aim to design a lightweight algorithm with fewer than 3000 gates and the smallest mean current consumption possible.
We simulate the Micro-Trivium algorithm in the form of Verilog code on Xilinx FPGA (field-programmable gate array) technology to determine whether it can be used for low-cost RFID tags. We use ISE Design Suite 9.1 to simulate the hardware property, which is based on 0.35 µm CMOS (complementary metal-oxide semiconductor) process technology. Implementing the Micro-Trivium data-path requires 2696 gates, and the mean current consumption is 0.52 µA. Table 3 lists the resource consumption of Trivium, Micro-Trivium, and other algorithms, where the comparison is based on power consumption and gate equivalent (GE) count.23,26
Resource consumption of eight cipher algorithms.
GE: gate equivalent; AES: Advanced Encryption Standard.
As the results show, Bivium requires the least resource consumption. However, Bivium can be broken in
In the next section, the security analysis and comparisons between Micro-Trivium, Trivium, and Bivium will be provided.
Security analysis
Mathematical structure
If we denote the internal state bits of the Trivium-Model algorithm at time
where
Hence, we can obtain the theorem as shown below.
where
The property of the characteristic polynomial
where
and it can be verified that
Therefore,
In fact, the characteristic polynomial of Trivium is also a third-order primitive polynomial. Notably, the characteristic polynomial of the 3-round Trivium 5 can be derived in a similar manner and expressed as follows
where
Therefore, we have the following proposition.
Therefore, Trivium and Micro-Trivium have the similar mathematical structure.
Attack analysis
Now, we compare Trivium and Micro-Trivium under the state recovering attack and statistical tests. The state recovering attack is considered the most powerful attack against Trivium. Statistical tests, also known as linear distinguishing attacks, continue to be one of the most powerful tools for analyzing stream ciphers. The descriptions of the two attacks are presented in Algorithms 2 and 3.
In Algorithm 2,
The detailed parameters of Trivium, Bivium, and Micro-Trivium under the state recovering attack are shown in Table 4. The results of Trivium, Bivium, and Micro-Trivium under the two attacks are shown in Table 5.
Parameters of three algorithms under state recovering attack.
Comparison of three algorithms under two attacks.
Discussion
Compared with the original Trivium and Bivium, Micro-Trivium has the best performance in terms of security under both the state recovering attack and statistical tests. In fact, from (10), the breaking complexity of the state recovering attack is mainly determined by the internal state bits and the parameters

Comparison of nonlinear terms among the three algorithms.
Therefore, Micro-Trivium performs best under the state recovering attack. In the statistical tests, we should assume that all the AND terms are zero to make the linear features more prominent. With this reasoning, Micro-Trivium is difficult to distinguish as a result of its additional terms. Therefore, Micro-Trivium performs best with a balance between security and resource consumption.
Finally, we present the principles of determining the parameters of the Trivium-Model algorithm:
The characteristic polynomial of the parameters should be a third-order primitive polynomial.
The number of nonlinear term parameters should increase as rapidly as possible with the same
The best value of
In fact, the parameters of Micro-Trivium are chosen based on these principles.
Conclusion
In this article, we study the internal structure of Trivium and generalize Trivium to the “Trivium-Model” algorithm. A set of better parameters is given to the Trivium-Model algorithm to make it feasible for low-cost RFID tags in distributed sensor networks while guaranteeing security. Emulation results also show that Micro-Trivium not only consumes less power and has a smaller chip size but also performs better under the state recovering attack and statistical tests. Therefore, this new algorithm is promising in its ability to meet the needs of RFID tags in distributed sensor networks.
