Abstract
Cascade connection architectures of nonlinear feedback shift registers (NFSRs) have been widely used in cryptography. In particular, the Grain family of stream ciphers uses the cascade connection architecture of an LFSR into an NFSR. A cascade connection representation is not always unique. The nonuniqueness of the representation may threat the security of a cipher. Inspired by the Grain family of stream ciphers, in this paper, we focus on cascade connections of an LFSR into an NFSR. A necessary and sufficient condition for the uniqueness of this class of cascade connection representations is provided under a reasonable condition that the involved NFSR has only trivial cascade connection decompositions. In particular, as a direct application of new results, it is theoretically proved that the cascade connection representation of a Grain-like structure, an n-bit primitive LFSR into an n-bit NFSR with a positive integer n, is unique not considering some trivial distinct representations if the involved n-bit NFSR satisfies the condition. Besides, it is verified that all the main registers used in the Grain family of stream ciphers satisfy the condition.





Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Ågren M., Hell M., Johansson T., Meier W.: Grain-128a: a new version of grain-128 with optional authentication. IJWMC 5(1), 48–59 (2011).
Armknecht F., Mikhalev V.: On lightweight stream ciphers with shorter internal states. In: Leander G. (ed.) Fast Software Encryption–22nd International Workshop, FSE 2015, Istanbul, Turkey, March 8–11, 2015, Revised Selected Papers. Lecture Notes in Computer Science, vol. 9054, pp. 451–470. Springer, New York (2015).
Aumasson J., Henzen L., Meier W., Naya-Plasencia M.: Quark: a lightweight hash. J. Cryptol. 26(2), 313–339 (2013).
Cannière C.D., Dunkelman O., Knezevic M.: KATAN and KTANTAN—a family of small and efficient hardware-oriented block ciphers. In: Clavier C., Gaj K. (eds.) Cryptographic Hardware and Embedded Systems—CHES 2009, 11th International Workshop, Lausanne, Switzerland, September 6–9, 2009, Proceedings, vol. 5747, pp. 272–288. Lecture Notes in Computer ScienceSpringer, New York (2009).
Cannière C.D., Preneel B.: Trivium. In: Robshaw M.J.B., Billet O. (eds.) New Stream Cipher Designs—The eSTREAM Finalists. Lecture Notes in Computer Science, vol. 4986, pp. 244–266. Springer, New York (2008).
Courtois N., Meier W.: Algebraic attacks on stream ciphers with linear feedback. In: Biham E. (ed.) Advances in Cryptology–EUROCRYPT 2003, International Conference on the Theory and Applications of Cryptographic Techniques, Warsaw, Poland, May 4–8, 2003. Lecture Notes in Computer Science, vol. 2656, pp. 345–359. Springer, New York (2003).
Golomb S.W.: Shift Register Sequences. Aegean Park Press, Laguna Hills (1981).
Hamann M., Krause M., Meier W.: LIZARD—a lightweight stream cipher for power-constrained devices. IACR Trans. Symmetric Cryptol. 2017(1), 45–79 (2017).
Hell M., Johansson T., Maximov A., Meier W.: The grain family of stream ciphers. In: Robshaw M.J.B., Billet O. (eds.) New Stream Cipher Designs—The eSTREAM Finalists. Lecture Notes in Computer Science, vol. 4986, pp. 179–190. Springer, New York (2008).
Jiang Y., Lin D.: On affine sub-families of grain-like structures. Des. Codes Cryptogr. 82(3), 531–542 (2017).
Ma Z., Qi W., Tian T.: On the decomposition of an NFSR into the cascade connection of an NFSR into an LFSR. J. Complex. 29(2), 173–181 (2013).
Mikhalev V., Armknecht F., Müller C.: On ciphers that continuously access the non-volatile key. IACR Trans. Symmetric Cryptol. 2016(2), 52–79 (2016).
Mykkeltveit J., Siu M., Tong P.: On the cycle structure of some nonlinear shift register sequences. Inf. Control 43(2), 202–215 (1979).
Robshaw M.J.B., Billet O. (eds.): New Stream Cipher Designs-The eSTREAM Finalists. Lecture Notes in Computer Science, vol. 4986. Springer, New York (2008).
Zhang J., Qi W., Tian T., Wang Z.: Further results on the decomposition of an NFSR into the cascade connection of an NFSR into an LFSR. IEEE Trans. Inf. Theory 61(1), 645–654 (2015).
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by C. Carlet.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This work was supported by the National Natural Science Foundation of China (Grant 61672533, 61521003).
Appendices
Appendix A
Let
Then
Appendix B
In this section, we shall verify that the main registers of Grain, Grain-128, and Grain-128a all satisfy the condition of Theorem 4, respectively.
1.1 Notations
Let f be a Boolean function.
-
sub(f): The set of subscripts of all variables appearing in the ANF of f.
-
\(f_{[d]}\): The summation of all terms in T(f) with degree d. Take \(g = x_0\oplus x_1x_2\oplus x_2x_3\oplus x_2x_3x_4\oplus x_5\) for example. Then \(g_{[2]} = x_1x_2\oplus x_2x_3\) and \(sub(g_{[2]})=\{1,2,3\}\).
-
\(f_{\ge [d]}\): The summation of all terms in T(f) with degree not smaller than d. For example, \(g_{\ge [2]} = x_1x_2\oplus x_2x_3\oplus x_2x_3x_4\).
-
\(\frac{f}{x_i}\): The Boolean function p such that the summation of all terms in T(f) divisible by \(x_i\) is equal to \(px_i\). For example, \(\frac{g}{x_3} = x_2 \oplus x_2x_4\).
1.2 Auxiliary lemmas
Lemma 4
Let \(f\in \mathbb {B}^{*}\) with \(\deg (f) >1\) and \(g \in \mathcal {C}^{*}\). Suppose \(f = f_{[1]} \oplus r \oplus s\cdot x_n\) where \(n = \mathrm {ord}(f_{\ge [2]})\), \(f_{\ge [2]} = r \oplus s\cdot x_n\), and \(\mathrm {ord}(r)<n\). Then
where \(d = \deg (g)\) and \(m=\mathrm {ord}(g)\).
Proof
Let \(g = x_0\oplus g'(x_1,\ldots , x_{m-1})\oplus x_m\). Then we have
Let us denote
and so
Since \(\deg (f_{[1]}*g)= d\) if \(f_{[1]}*g\ne 0\), it follows that
By Corollary 3, we know that \(r*g,s*g\ne 0\) if \(r,s\ne 0\). Since \(\mathrm {ord}(r) < n\), it follows that if \(r\ne 0\), then \(\mathrm {ord}(r*g) < n+m\). This and (30) lead to
Taking (32) into (31) completes the proof. \(\square \)
One may think it is possible that \((s*g)_{\ge [d]}\) in (29) equals zero. The following lemma implies that \((s*g)_{\ge [d]}=0\) will never happen and provides a useful upper bound on the degree of a right \(*\)-factor.
Lemma 5
Let \(f\in \mathbb {B}^{*}\) and \(g \in \mathcal {C}^{*}\). Then \(\deg (f*g) \ge \deg (g)\) and the equality holds if and only if f is linear.
Proof
We use mathematical induction on the degree of f. If f is linear, then we have \(f*g \ne 0\) by Proposition 2, and it is clear that \(\deg (f*g) = \deg (g)\). Let \(k\ge 2\), and suppose \(\deg (f*g) \ge \deg (g)\) hold for every function \(f\in \mathbb {B}^{*}\) with \(\deg (f) < k\).
Next we consider the case \(\deg (f)=k\). Let us write
where \(r,s\in \mathbb {B}^{*}\) and \(n = \mathrm {ord}(f_{\ge [2]})\). Then by Lemma 4, we have
Since \(1\le \deg (s)<\deg (f)\), the induction hypothesis implies that
and so \((s*g)_{\ge [d]} \ne 0\). Hence (33) and (34) immediately imply that
This completes the proof. \(\square \)
Let f, s, g be as described in Lemma 4. By Lemma 5 we know \(\deg (s*g) \ge d\), and so \((s*g)_{\ge [d]}\ne 0\). Since it can be seen that \(\mathrm {ord}(p_{\ge [d+1]}) = n+m\) in the proof of Lemma 4, it follows from (31) that \(\mathrm {ord}((f*g)_{\ge [d+1]}) = n+m\). This indicates that Lemma 4 could also be described in the following way.
Lemma 6
Let f, s, g be as described in Lemma 4. Then
where \(d = \deg (g)\) and \(u=\mathrm {ord}((f*g)_{\ge [d+1]})\).
If we focus on \(\min sub(f_{\ge [2]})\) not on \(\max sub(f_{\ge [2]})\) (which is also \(\mathrm {ord}(f_{\ge [2]})\)), then quite similar arguments could yield the following result.
Lemma 7
Let \(f\in \mathbb {B}^{*}\) with \(\deg (f) >1\) and \(g \in \mathcal {C}^{*}\). Suppose \(f = f_{[1]} \oplus r' \oplus s'\cdot x_v\) where \(v = \min sub(f_{\ge [2]})\), \(f_{\ge [2]} = r' \oplus s'\cdot x_v\), and \(x_v\) does not appear in \(r'\). Then
where \(d = \deg (g)\).
Finally, when we analyze Grain and Grain-128a in the following subsections, we shall often meet the special case that \(l*g\) is a one term function where l is a linear Boolean function and \(g\in \mathbb {B}^{*}\). In such case, the following lemma will be useful.
Lemma 8
Let l be a linear Boolean function and \(g\in \mathbb {B}^{*}\). If \(l*g = x_{i_1}x_{i_2}\cdots x_{i_d}\), then
-
(1)
\(|T(l)|=1\) and \(|T(g)|=1\), i.e., l is a single variable and g is a one term function;
-
(2)
\(g=x_{a}x_{a-i_1+i_2}\cdots x_{a-i_1+i_k}\) for some nonnegative integer a not larger than \(i_1\).
Proof
Let us write
Suppose either \(|T(l)|>1\) or \(|T(g)|>1\). Then it can be seen that \(x_{i_1}*t_1\) and \(x_{i_u} *t_k\) are two distinct terms of \(l*g\), which is a contradiction to \(|T(l*g)|=1\). Hence, we have \(|T(l)|=1\) and \(|T(g)|=1\). Consequently, we know \(l=x_{j}\) for some integer \(0\le j \le i_1\). It follows from \(l*g = x_{i_1}x_{i_2}\cdots x_{i_d}\) that \(g = x_{i_1-j}x_{i_2-j}\cdots x_{i_d-j}\). Let \(a = i_1-j\). Then we get \(g = x_ax_{a-i_1+i_2}\cdots x_{a-i_1+i_d}\). \(\square \)
1.3 Grain v1
In this subsection, we shall prove that the 80-bit NFSR involved in Grain v1 is \(*\)-irreducible.
Recall that the characteristic function of the 80-bit NFSR\((f^{80})\) in Grain v1 is given by
Note that \(\deg (f^{80}) = 6\). By Lemma 5, if \(f^{80}\) could be factored into \(f^{80} = p*g\) for some \(p,g\in \mathcal {C}^{*}\), then \(\deg (g)\le 6\). Hence we divide our discussions into the following six cases according to the algebraic degree of g.
Case 1 Suppose \(\deg (g)=6\). It follows from Proposition 4 that \(p=x_0\).
Case 2 Suppose \(\deg (g)=5\). On one hand, it follows from Lemma 6 that
for some function \(s\in \mathbb {B}^{*}\). Since \(\deg (g)=5\), it is necessary that s is linear by Lemma 5, and so in fact we have
Then it follows from Lemma 8 that
for some nonnegative integer a. On the other hand, it follows from Lemma 7 that
for some function \(s'\in \mathbb {B}^{*}\). Similarly, we have
for some nonnegative integer b. It can be seen that (35) is a contradiction to (36). Hence, this case is impossible.
Case 3 Suppose \(\deg (g)=4\). On one hand, it follows from Lemma 6 that
for some function \(s\in \mathbb {B}^{*}\). Since \(\deg (g)=4\), it is necessary that s is linear by Lemma 5, and so in fact we have
Then it follows from Lemma 8 that
for some nonnegative integer a. On the other hand, it follows from Lemma 7 that
for some function \(s'\in \mathbb {B}^{*}\). Similarly, we have
for some nonnegative integer b. It can be seen that (38) is a contradiction to (37). Hence, this case is impossible.
Case 4 Suppose \(\deg (g)=3\). To show this case is impossible either, the basic idea is the same as that used in the previous two cases except that we need to use Lemmas 6 and 7 twice respectively.
On one hand, it follows from Lemma 6 that
for some function \(s\in \mathbb {B}^{*}\). Let us denote \(h = s*g\). Then based on the equality
Lemma 6 implies that
for some function \(s_1\in \mathbb {B}^{*}\). Consequently, \(g_{[3]}\) could only be of the form
for some nonnegative integer a.
On the other hand, using Lemma 7 twice, we obtain
for some function \(s_1'\in \mathbb {B}^{*}\). Consequently, we have
for some nonnegative integer b. It can be seen that (41) is a contradiction to (40). Hence, this case is impossible.
Case 5 Suppose \(\deg (g)= 2\). Recursively using Lemma 6 three times leads to
for some function \(s\in \mathbb {B}^{*}\), while recursively using Lemma 7 three times leads to
for some function \(s'\in \mathbb {B}^{*}\). Consequently, it follows from (42) that \(g_{[2]}\) should be of the form \(g_{[2]} = x_ax_{a-37+45}\) for some nonnegative integer a, while it follows from (43) that \(g_{[2]}\) should be of the form \(g_{[2]} = x_bx_{b-28+33}\) for some nonnegative integer b, a contradiction. Hence, this case is impossible.
Case 6 Suppose \(\deg (g)= 1\). It follows from [11, Corollary 1] that \(g = x_0\).
In all, the six cases show that \(f^{80}\) only has trivial \(*\)-factorizations, and so \(f^{80}\) is \(*\)-irreducible.
1.4 Grain-128
In this subsection, we shall prove that the 128-bit NFSR involved in Grain-128 is \(*\)-irreducible.
Recall that the characteristic function of the 128-bit NFSR\((f^{128})\) in Grain-128 is given by
Note that \(\deg (f^{128}) = 2\), and so by Lemma 5, if \(f^{128}\) could be factored into \(f^{128} = p*g\) for some \(p,g\in \mathcal {C}^{*}\), then \(\deg (g)\) is equal to 1 or 2. If \(\deg (g)=1\), then it follows from [11, Corollary 1] that \(g = x_0\). If \(\deg (g)=2\), then p is linear by Lemma 5 and it follows from Proposition 4 that \(p=x_0\). Hence, \(f^{128}\) is \(*\)-irreducible.
1.5 Grain-128a
In this subsection, we shall prove that the 128-bit NFSR involved in Grain-128a is \(*\)-irreducible.
Recall that the characteristic function of the 128-bit NFSR\((f^{128a})\) in Grain-128a is given by
Note that \(\deg (f^{128a}) = 4\). By Lemma 5, if \(f^{128a}\) could be factored into \(f^{128a} = p*g\) for some \(p,g\in \mathcal {C}^{*}\), then \(\deg (g)\le 4\). Hence we divide our discussions into the following four cases according to the algebraic degree of g.
Case 1 Suppose \(\deg (g)=4\). It follows from Proposition 4 that \(p=x_0\).
Case 2 Suppose \(\deg (g)=3\). Using Lemma 6 once leads to
for some function \(s\in \mathbb {B}^{*}\). This implies that
for some nonnegative integer a. Using Lemma 7 once leads to
for some function \(s'\in \mathbb {B}^{*}\). This implies that
for some integer b. It can be seen that (44) is a contradiction to (45). Hence this case is impossible.
Case 3 Suppose \(\deg (g)=2\). Using Lemma 6 twice leads to
for some function \(s\in \mathbb {B}^{*}\). This implies that \(g_{[2]}\) should be of the form
for some nonnegative integer a. Using Lemma 7 once leads to
for some function \(s'\in \mathbb {B}^{*}\). This implies that \(g_{[2]}\) should be of the form
for some integer b. It can be seen that (46) is a contradiction to (47). Hence this case is impossible.
Case 4 Suppose \(\deg (g)=1\). It follows from [11, Corollary 1] that \(g = x_0\).
In all, the four cases show that \(f^{128a}\) only has trivial \(*\)-factorizations, and so \(f^{128a}\) is \(*\)-irreducible.
Rights and permissions
About this article
Cite this article
Tian, T., Zhang, JM. & Qi, WF. On the uniqueness of a type of cascade connection representations for NFSRs. Des. Codes Cryptogr. 87, 2267–2294 (2019). https://doi.org/10.1007/s10623-019-00617-w
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10623-019-00617-w