# Enhanced-Bivium Algorithm for RFID System

Authors: Shiyong Zhang; Gongliang Chen; Yongkai Zhou; Jianhua Li
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

RFID (radio frequency identification) is an emerging technology for automatic identification of physical objects using radio frequency. The security and privacy of the system is increasingly concerned and some light-weight encryption schemes such as Trivium and Bivium have been proposed. In this paper, the internal structure of Bivium is exploited and generalized to an algorithm called Bivium-Model. It is shown that the original Bivium has its inherent imperfections due to the improper parameter selection. A set of better parameters are given out to fix the security vulnerability of original Bivium. Emulation results also show that the Enhanced-Bivium algorithm achieves lower power consumption and lower die size.


---

## Body

## 1. Introduction

RFID (radio frequency identification) systems are used for the automatic retrieval of data about any object which is equipped with a small circuit called RFID tag. The tag retrieved by a reader device could be used for tracking of goods in industrial systems. In this paper we focus on passive tags that receive their energy from the reader field. For this kind of RFID tags, the field’s intensity and the received power consumption are both limited. Therefore, power-aware designing of the tag circuitry is necessary for RFID application [1].On the other hand, the security and privacy of the system is increasingly concerned because a reader can scan and obtain the data from any tags if they are accessed without any authorization. Some encryption schemes were developed based on classic cipher algorithms such as Advanced Encryption Standard (AES) or Elliptic Curve Cryptography (ECC) [2–4]; Others utilised the hash-based algorithm, pseudo random number generator, and Cyclic Redundancy Check (CRC) function with some XOR and rotation operations [5–8].However, these schemes are all based on traditional cryptography techniques, which are too costly for the RFID tags. In order to embed the cipher engine into the low-price passive tags, light-weight cipher design is needed.Trivium is a notable light-weight stream cipher designed by De Cannire and Preneel, submitted to the European eSTREAM project in April 2005 [9]. It contains 3 rounds in each iteration. In 2007, Raddum proposed a reduced version of Trivium, named as Bivium [10]. He tried to reduce the process of Trivium from 3 to 2 rounds so as to further lower the complexity. However, Bivium has severe security problems. Maximov and Biryukov study two attacks on Trivium [11], which are state recovering and statistical tests. The former is regarded as the best result for attacking Bivium so far and the time complexity to break Bivium is about 2
37. Raddum also presents a technique to solve systems of equations associated with Trivium and successfully breaks Bivium in one day [10]. But his attack is very complex when applied to the full cipher and is not faster than exhaustive search. Borghoff et al. presents a numerical attack on Biviums. However, the estimated time complexity of this attack is about 2
63.7 [12].Based on the above work, in this paper we aim to design a 2-round Bivium-like cipher algorithm without compromising the security and still keeping low resource consumption. Our method is to exploit the internal structure of Bivium and generalize it to an algorithm called “Bivium-Model,’’ which can be used to analyze the root cause of Bivium’s weakness. By adjusting the parameters of “Bivium-Model,’’ an “Enhanced-Bivium’’ with better security and power performance will be proposed.The following part of the paper is organized as follows. The generalized “Bivium-Model’’ algorithm will be described in Section2. Section 3 will analyze the security of the original Bivium and then present an “Enhanced-Bivium.’’ Section 4 will compare the resource consumption of Trivium, Bivium, and Enhanced-Bivium through emulation results. The conclusion and future work will be given in Section 5.Notation 1.
Bold symbols in capital letter and small letter denote matrices and vectors, respectively.· is the determinant of a square matrix. I stands for the identity matrix. G
F
(
2
) denotes the Galois field of two elements. a
∣
b means b is divisible by a.


## 2. Bivium-Model Algorithm

Trivium [9] is designed to generate up to 2
64 bits of key stream from an 80-bit secret key (Key) and an 80-bit initial value (IV). The process consists of two phases: first the internal state of the cipher is initialized using Key and IV; then the state is repeatedly updated and used to generate key stream bits. There are 288 bits in the internal state. Figure 1 shows the structure of the algorithm. Each iteration consists of 3 rounds with similar structure.Figure 1
Structure of Trivium.Bivium proposed by Raddum [10] is a reduced version of Trivium. It breaks the cipher into smaller parts and reconstructs these parts as 2 rounds. The internal state s
=
(
s
1
,
s
2
,
…
,
s
177
) of Bivium drops to 177 bits. Denote the intermediate variable as t
1, t
2 and the output stream as z
=
(
z
1
,
z
2
,
…
,
z
N
), with N standing for the number of output bits. The complete process of the generation key-stream phase is given by the pseudo-code shown in Algorithm 1.Algorithm 1:Bivium algorithm.
for
i
=
1 to N
do
t
1
←
s
66
+
s
93
t
2
←
s
162
+
s
177
z
i
←
t
1
+
t
2
t
1
←
t
1
+
s
91
⋅
s
92
+
s
171
t
2
←
t
2
+
s
175
⋅
s
176
+
s
69
(
s
1
,
s
2
,
…
,
s
93
)
←
(
t
2
,
s
1
,
…
,
s
92
)
(
s
94
,
s
95
,
…
,
s
177
)
←
(
t
1
,
s
94
,
…
,
s
176
)
end forBy extracting the sequence index of Algorithm1, the process of Bivium can be generalized to a “Bivium-Model’’ algorithm, shown as Algorithm 2. u
i
(
i
=
1
,
…
,
4
), n
i
(
i
=
1,2
), and u
1
<
u
2
<
n
1
<
u
3
<
u
4
<
n
2 are the parameters of Algorithm 2. We will show in later section that these indices actually correspond to the degree of the characteristic polynomials.Algorithm 2:Generalized “Bivium-Model” algorithm.
for
i
=
1 to N
do
t
1
←
s
3
u
1
+
s
3
n
1
t
2
←
s
3
u
3
+
s
3
n
2
z
i
←
t
1
+
t
2
t
1
←
t
1
+
s
3
n
1
-
2
⋅
s
3
n
1
-
1
+
s
3
u
4
t
2
←
t
2
+
s
3
n
2
-
2
⋅
s
3
n
2
-
1
+
s
3
u
2
(
s
1
,
s
2
,
…
,
s
3
n
1
)
←
(
t
2
,
s
1
,
…
,
s
3
n
1
-
1
)
(
s
3
n
1
+
1
,
s
3
n
1
+
2
,
…
,
s
3
n
2
)
←
(
t
1
,
s
3
n
1
+
1
,
…
,
s
3
n
2
-
1
)
end forThe structure of the Bivium-Model algorithm is given by Figure2. Key and IV are loaded as follows:(1)
s
t
=
s
1
,
s
2
,
…
,
s
3
n
1
⟵
K
1
,
K
2
,
…
,
K
80
,
0
,
…
,
0
s
3
n
1
+
1
,
s
3
n
1
+
2
,
…
,
s
3
n
2
⟵
I
V
1
,
I
V
2
,
…
,
I
V
80
,
0
,
…
,
0,1
,
1,1
.Figure 2
Structure of Bivium-Model.By this way, any of the Bivium-like algorithm can then be represented by{
3
u
1
,
3
u
2
,
3
n
1
} and {
3
u
3
,
3
u
4
,
3
n
2
} tuples.Proposition 1.
Bivium algorithm is a Bivium-Model algorithm, with parameters shown in Table1.Table 1
Parameters of Bivium.
u
1
u
2
n
1
u
3
u
4
n
2
22
23
31
54
57
59


## 3. Security Analysis and “Enhanced-Bivium’’

The original Bivium algorithm has some security problems. In this section, we will analyze its security based on the generalized “Bivium-Model’’ algorithm and adjust the parameters to induce a better performance.We begin by studing the property of Bivium-Model algorithm. Denote the internal state bits at timet as s
(
t
)
=
(
s
1
(
t
)
,
s
2
(
t
)
,
…
,
s
3
n
2
(
t
)
); then the internal bits from time t to time t
+
1 can be expressed as(2)
s
t
+
1
=
A
·
s
t
+
b
,where A
=
(
a
i
j
)
3
n
2
×
3
n
2 is the state-transition matrix of the algorithm with size 3
n
2
×
3
n
2:(3)
a
i
j
=
1
,
i
=
1
,
j
=
3
u
2
,
3
u
3
,
3
n
2
,
1
,
i
=
3
n
1
+
1
,
j
=
3
u
1
,
3
u
4
,
1
,
1
<
i
≤
3
n
2
,
j
=
i
-
1
,
0
,
otherwise.
b
=
(
b
i
)
3
n
2 is the nonlinear part of the algorithm which is treated as vectors of bits: (4)
b
i
=
s
3
n
2
-
2
·
s
3
n
2
-
1
,
i
=
1
,
s
3
n
1
-
2
·
s
3
n
1
-
1
,
i
=
3
n
1
+
1
,
0
,
otherwise.Hence we can get the theorem as follows:Theorem 2.
The characteristic polynomial of Bivium-Model algorithm is in the following form:(5)
f
x
=
x
3
+
1
2
·
g
x
3
,where g
(
·
) is a polynomial.Proof.
A is the state transformation matrix of Bivium-Model algorithm defined in (3). The characteristic polynomial f
(
x
) is(6)
f
x
=
x
I
-
A
=
x
3
n
2
+
x
3
n
2
-
3
u
2
+
x
3
n
2
+
3
n
1
-
3
u
4
+
x
3
n
2
+
3
n
1
-
3
u
1
-
3
u
3
+
x
3
n
2
+
3
n
1
-
3
u
2
-
3
u
4
+
x
3
n
1
-
3
u
1
+
x
3
n
2
-
3
u
3
+
1
.Let h
(
x
)
=
x
n
2
+
x
n
2
-
u
2
+
x
n
2
+
n
1
-
u
4
+
x
n
2
+
n
1
-
u
1
-
u
3
+
x
n
2
+
n
1
-
u
2
-
u
4
+
x
n
1
-
u
1
+
x
n
2
-
u
3
+
1; we have f
(
x
)
=
h
(
x
3
).
Denotey
=
x
+
1; we only need to prove that y
2
∣
h
(
y
+
1
). That is to say, we need to prove that the constant coefficient and the monomial coefficient of h
(
y
+
1
) are both 0.
The constant coefficientC
0 of h
(
y
+
1
) is(7)
C
0
=
h
y
+
1
y
=
0
=
h
1
=
0
.The monomial coefficient C
1 of h
(
y
+
1
) is(8)
C
1
=
∑
i
i
1
=
∑
i
i
=
n
2
+
n
2
-
u
2
+
n
2
+
n
1
-
u
4
+
n
2
+
n
1
-
u
1
-
u
3
+
n
2
+
n
1
-
u
2
-
u
4
+
n
1
-
u
1
+
n
2
-
u
3
=
0
.Therefore, (9)
y
2
∣
h
y
+
1
⟹
1
+
x
3
∣
h
x
⟹
h
x
=
1
+
x
2
·
g
x
⟹
f
x
=
h
x
3
=
x
3
+
1
2
·
g
x
3
.Here, we define the term “k-order primitive polynomial’’ to evaluate the property of the characteristic polynomial, f
(
x
).Definition 3.
Givenf
(
x
)
=
∑
i
=
0
n
a
i
x
i, n
>
k, a
i
∈
G
F
(
2
), i
=
0,1
,
…
,
n, f
(
x
) is called a k-order primitive polynomial if f
(
x
)
=
(
x
+
1
)
k
·
g
(
x
), where g
(
x
) is a primitive polynomial.Proposition 4.
Primitive polynomial is 0-order primitive polynomial.Proposition 5.
The characteristic polynomial of the Bivium is not a 2-order primitive polynomial.Proof.
By (6), the transformation matrix of the Bivium can be expressed as(10)
f
x
=
x
177
+
x
108
+
x
99
+
x
42
+
x
30
+
x
27
+
x
15
+
1
=
x
3
+
1
2
·
g
x
3
.Here g is not a primitive polynomial and can be decomposed as(11)
g
y
=
y
57
+
y
55
+
y
53
+
y
51
+
y
49
+
y
47
+
y
45
+
y
43
+
y
41
+
y
39
+
y
37
+
y
35
+
y
34
+
y
33
+
y
32
+
y
30
+
y
28
+
y
26
+
y
24
+
y
22
+
y
20
+
y
18
+
y
16
+
y
14
+
y
8
+
y
7
+
y
6
+
y
5
+
y
4
+
y
2
+
1
=
y
5
+
y
4
+
y
3
+
y
2
+
1
·
y
7
+
y
4
+
1
·
y
45
+
y
44
+
y
43
+
y
41
+
y
34
+
y
32
+
y
26
+
y
21
+
y
18
+
y
17
+
y
13
+
y
9
+
y
7
+
y
5
+
y
4
+
y
3
+
1
.Therefore f
(
x
) is not a 2-order primitive polynomial.From Proposition5, we can see that the characteristic polynomial of the Bivium algorithm is not a 2-order primitive polynomial. Therefore, it cannot guarantee large periods, and this is the root cause for the state recovering attack on Bivium [11].In order to the solve the imperfection of the original Bivium, we try to choose sets of better parameters. Direct calculation of all the 2-order primitive polynomials is too complex. Therefore we determine the parameters under the following conditions:(1)
The characteristic polynomial of the new parameters is a 2-order primitive polynomial.
(2)
To reduce the resource consumption while keeping the security, we specially fix the valuen
2
=
58 and the range of u
1
∈
[
20,24
].
(3)
To improve the security, we supposeu
3
=
n
1
+
1.However, except for condition 1, the other 2 conditions do not necessarily result in the best parameter set. We just guarantee that the parameters that meet these conditions are more likely to be better. We use Maple to search the parameters [13]. The code is shown in Algorithm 3.Algorithm 3:Maple code for parameter selection.
n
2
=
58
for
u
1
=
20 to 24
do
for
u
2
=
u
1
+
1 to 54
do
for
n
1
=
u
2
+
1 to 55
do
u
3
=
n
1
+
1
for
u
4
=
u
3
+
1 to 57
do
g
(
x
)
=
x
n
2
+
x
n
2
-
u
2
+
x
n
2
+
n
1
-
u
4
+
x
n
2
+
n
1
-
u
1
-
u
3
+
x
n
2
+
n
1
-
u
2
-
u
4
+
x
n
1
-
u
1
+
x
n
2
-
u
3
+
1
ifDivide(g
(
x
), (
x
+
1
)
2, “h”) mod 2then
ifIrreduc(h) mod 2 and CheckPrimitive(h) mod 2
then
printf(“%d, %d, %d, %d, %d, %d
∖
n”, u
1, u
2, n
1, u
3, u
4, n
2)
end if
end if
end for
end for
end for
end forAlgorithm3 outputs more than 200 results, and we choose one of these parameter sets, shown in Table 2: and the resulting algorithm is referred to as “Enhanced-Bivium.’’Table 2
Parameters of Enhanced-Bivium.
u
1
u
2
n
1
u
3
u
4
n
2
21
25
30
31
46
58Proposition 6.
The characteristic polynomial of “Enhanced-Bivium’’ is a 2-order primitive polynomial.Proof.
By (6), the transformation matrix of the “Enhanced-Bivium’’ can be expressed as(12)
f
x
=
x
174
+
x
126
+
x
108
+
x
99
+
x
81
+
x
51
+
x
27
+
1
=
x
3
+
1
2
·
g
x
3
,where(13)
g
y
=
y
56
+
y
54
+
y
52
+
y
50
+
y
48
+
y
46
+
y
44
+
y
42
+
y
34
+
y
32
+
y
31
+
y
30
+
y
29
+
y
28
+
y
27
+
y
26
+
y
24
+
y
22
+
y
20
+
y
18
+
y
16
+
y
15
+
y
14
+
y
13
+
y
12
+
y
11
+
y
10
+
y
9
+
y
8
+
y
6
+
y
4
+
y
2
+
1and it can be verified that g
(
·
) is a primitive polynomial.
Thereforef
(
x
) is a 2-order primitive polynomial.According to Proposition6, the new set of parameters ensure f
(
x
) to be a 2-order primitive polynomial, thus making the resulting algorithm more resistant to the state recovering attack.Note that the characteristic polynomial of the 3-round Trivium [9] can be derived in a similar way, expressed by(14)
f
x
=
x
288
+
x
219
+
x
210
+
x
201
+
x
141
+
x
132
+
x
123
+
x
87
+
x
72
+
x
60
+
x
54
+
x
45
+
x
42
+
x
27
+
x
15
+
1
=
x
3
+
1
3
·
g
x
3
,where g
(
·
) is a primitive polynomial which can be expressed as(15)
g
y
=
y
93
+
y
92
+
y
89
+
y
88
+
y
85
+
y
84
+
y
81
+
y
80
+
y
77
+
y
76
+
y
73
+
y
72
+
y
70
+
y
68
+
y
67
+
y
44
+
y
43
+
y
41
+
y
39
+
y
38
+
y
35
+
y
34
+
y
31
+
y
30
+
y
27
+
y
25
+
y
23
+
y
20
+
y
19
+
y
17
+
y
14
+
y
13
+
y
12
+
y
9
+
y
8
+
y
6
+
y
4
+
y
+
1
.Therefore, we will have the following proposition.Proposition 7.
The characteristic polynomial of the Trivium algorithm is a 3-order primitive polynomial.Finally, we compare the Trivium, Bivium, and Enhanced-Bivium under the state recovering attack. The result is shown in Table3.Table 3
Comparison of three algorithms under state recovering attack.
Algorithm
Trivium
Bivium
Enhanced-Bivium
Breaking complexity
2
83.5
2
37
2
57It is observed that the Trivium algorithm is most robust to state recovering attack. Bivium algorithm can be broken in time around2
37, which is a relatively low level. “Enhanced-Bivium’’ performs much better than original Bivium due to its 2-order primitive structure.


## 4. Emulation Results for Resource Consumption

For hardware emulation, we use protocols for symmetric challenge-response techniques based on encryption which are defined in the ISO/IEC 9798-2 standard [14]. Unilateral authentication works as follows: there are two partners A and B. Both possess the same private key K. B sends a random number r
B to A. A then encrypts the random number with the shared key K and sends it back to B. B proofs the result and can verify the identity of A.In order to achieve a significant economic benefit from using RFID systems, tags will need to be priced under US$ 0.10 [15]. The available power consumption for the digital part of the RFID tag is amounting to 20 μA. Estimating the current consumption of the digital controller to be 5 μA, 15 μA remains for the Bivium-Model module which should not exceed a chip area of 5,000 gates [3]. In a word, the less gates, the better.We use Verilog to simulate the “Enhanced-Bivium’’ algorithm as well as other algorithms and use Lattice Diamond which can offer tools optimized for FPGA architectures to simulate the hardware property and action on LFXP3C-5T100C. The implementation of the data-path of Enhanced-Bivium algorithm has a current consumption of 0.41μ
A. The required hardware complexity is estimated to be 2109 gates. The resource consumption of Trivium, Bivium, Enhanced-Bivium, and AES algorithm are shown in Table 4 and the comparison is based on energy consumption and gate equivalent (GE) count.Table 4
Resource consumption of 4 cipher algorithm.
Algorithm
μ
A
@
100 kHz
GE
Trivium
0.68
3488
Bivium
0.42
2145
Enhanced-Bivium
0.41
2109
AES
3
3400From the result, it can be seen that, compared to the 3-round Trivium, Bivium and Enhanced-Bivium have better performance due to less internal rounds. Furthermore, Enhanced-Bivium consumes even lower resources than the original Bivium; this is because the internal state bits of Enhanced-Bivium drops from 177 to 174 bits and the degree of the characteristic polynomial of the Enhanced-Bivium is lower than the degree of original Bivium.


## 5. Conclusion and Future Work

In this paper, an “Enhanced-Bivium’’ encryption scheme is proposed to meet the need of the RFID system in terms of high security and low resource consumption. The internal structure of Bivium is studied and generalized to “Bivium-Model’’ algorithm. A set of better parameters are given out to fix the security vulnerability of the original Bivium under state-recover attack. Emulation results show that it also achieves lower power consumption and die size.We will continue to study the property of “Bivium-Model’’ algorithm. Future work will focus on the search of new parameters with better consideration of the balance of security and effectiveness.



---

*Source: 616182-2015-10-25.xml*