Next Article in Journal
“Whispers from the Wrist”: Wearable Health Monitoring Devices and Privacy Regulations in the U.S.: The Loopholes, the Challenges, and the Opportunities
Previous Article in Journal
The Security Evaluation of an Efficient Lightweight AES Accelerator
Previous Article in Special Issue
Random Number Generators: Principles and Applications
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Review

A Survey on Complexity Measures for Pseudo-Random Sequences

Department of Informatics, University of Bergen, 5020 Bergen, Norway
Cryptography 2024, 8(2), 25; https://doi.org/10.3390/cryptography8020025
Submission received: 5 May 2024 / Revised: 9 June 2024 / Accepted: 11 June 2024 / Published: 13 June 2024
(This article belongs to the Collection Survey of Cryptographic Topics)

Abstract

:
Since the introduction of the Kolmogorov complexity of binary sequences in the 1960s, there have been significant advancements on the topic of complexity measures for randomness assessment, which are of fundamental importance in theoretical computer science and of practical interest in cryptography. This survey reviews notable research from the past four decades on the linear, quadratic and maximum-order complexities of pseudo-random sequences, and their relations with Lempel–Ziv complexity, expansion complexity, 2-adic complexity and correlation measures.

1. Introduction

Cryptography and security applications make extensive use of random bits, such as keys and initialization vectors in encryption and nonces in security protocols. The generation of random bits should be designed with the security goal of indistinguishability from an ideal randomness source, which generates identically distributed and independent uniform random bits with full entropy (i.e., one bit of entropy per bit). However, this security goal is challenging to achieve. The list of real-world failures, where a random bit generator (RBG) is broken and the security of the reliant application crumbles with it, continues to grow [1,2,3,4]. There are two fundamentally different strategies for designing RBGs. One strategy is to produce bits non-deterministically, where every bit of output is based on a physical process that is unpredictable; the other strategy is to compute bits deterministically using an algorithm from an initial value that contains sufficient entropy to provide an assurance of randomness. This class of RBG is referred to as pseudo-random bit generators (PRBGs) or deterministic random bit generators (DRBGs) [5]. Due to their deterministic nature, PRBGs produce sequences of pseudo-random (rather than random) bits. Real-world PRBGs usually employ cryptographic primitives, such as stream ciphers, block ciphers, hash functions and elliptic curves, as their basic building blocks. For instance, the revised NIST SP 800-90A standard [5] recommends Hash-DRBG, HMAC-DRBG and CTR-DRBG based on approved hash functions and block ciphers. It is worth mentioning that, as pointed out in [2], the NIST SP 800-90A standard is not free from controversy: the disgraced algorithm DualEC-DRBG in the standard was reported to contain a back door [3]; the recommended DRBGs, when supporting a variety of optional inputs and parameters, do not fit cleanly into the usual security models of PRBGs; there is no formal competition in the standarization process; and there is a limited amount of formal analysis of the recommended DRBGs.Although not included in the NIST standard, PRBGs that use stream ciphers based on feedback shift registers (FSRs) as building blocks have several advantages, including the simple structure of operations of addition and multiplication, fast and easy hardware implementations in almost all computing devices, and good statistic characteristics (long period, balance, run properties, etc.) in output sequences [6,7]. In addition, the output sequence from other PRBGs will ultimately become periodic and therefore can be produced by certain FSRs. This provides another perspective for investigating the security strength of output sequences from PRBGs.
Consider a pseudo-random sequence s = s 0 s 1 s 2 generated from a PRBG. A natural question arises: how should one evaluate the randomness of the sequence s ? Research on this problem can be traced back to the early 20th century. As early as 1919, Mises [8] initiated the notion of random sequences based on his frequency theory of probability. Later, Church [9] pointed out the vagueness of the second condition on randomness in [8] and proposed a less restricted but more precise definition of random sequences, as follows: An infinite binary sequence s is a random sequence if it satisfies the following two conditions: (1) assume f ( r , s ) denotes the number of 1s among the first r terms of s , then the sequence f ( r , s ) / r for s approaches a limit p as r approaches infinity; (2) for a sequence b with b 1 = 1 , b n + 1 = 2 b n + s n and any effectively calculable function ϕ , if the integers n such that ϕ ( b n ) = 1 form an infinite sequence n 1 , n 2 , , then the sequence f ( r , c ) / r for c = s n 1 s n 2 s n 3 approaches the same limit p as r approaches infinity. Despite the emphasis of calculability of ϕ in Condition (2), one can see that it is hardly (if not at all) possible to test the randomness of a sequence by this definition. It could be used in randomness test by negative outcomes, namely, a binary sequence s is not random if one can find certain effectively calculable function ϕ , for which Condition (2) cannot hold. In order to justify a proposed definition of randomness, one has to show that the sequences, which are random in the stated sense, possess various properties of stochasticity with which we are acquainted in probability theory. Inspired by the properties obeyed by the maximum-length sequences, Golomb proposed the randomness postulates of binary sequences [10]: balancedness, run property (a subsequence of consecutive 1 s/0 s in a sequence is termed a run. A maximum-length sequence of length 2 m 1 contains one run of m 1 s, one run of ( m 1 ) 0 s and 2 k runs of m 2 k 1 s and 0 s for k = 0 , 1 , , m 3 ) and ideal autocorrelation. Kolmogorov [11] proposed the notion of complexity to test the randomness of a sequence s , which is defined as min A ( x ) = s len ( x ) , the length of the shortest x that can produce s by a universal Turing machine program A. This notion is later referred to as the Kolmogorov complexity in the literature. Along this line, further developments were made in [12,13] and summarized in Knuth’s famous book series The Art of Computer Programming [14].
Rather than considering an abstract Turing machine program that generates a given sequence, the model of using FSRs to generate a given sequence has attracted considerable attention. This model has two major advantages: firstly, all sequences that are generated by a finite-state machine in a deterministic manner are ultimately periodic, and as such, can be produced by certain finite-state shift registers; secondly, it is comparatively easier and more efficient to identify the shortest FSRs producing a given sequence, either of a finite length or of infinite length with a certain period. Due to its tractability, the linear complexity of a specific sequence s , which uses linear FSRs (LFSRs) as the algorithm A in the Kolmogorov complexity, is particularly appealing and has been intensively studied. The linear complexity of a given sequence s can be efficiently calculated by the Berlekamp–Massey algorithm [15,16], and the stochastic behavior of linear complexity for finite-length sequences and periodic sequences can be considered to be fairly well understood [17,18,19]. The good understanding of linear complexity of sequences is an important factor for its adoption in the NIST randomness test suite [20]. Note that extremely long sequences with large linear complexity can usually be generated by much short FSRs with certain nonlinear feedback function. Consequently, more figures of merit to judge the randomness of sequences, such as maximum-order complexity [21], 2-adic complexity [22], quadratic complexity [23], expansion complexity [24] and their variants, have been also explored in the literature.
This paper will survey the development of complexity measures used to assess the randomness of sequences. It is important to note that this paper does not intend to offer a comprehensive survey of this broad topic. Instead, it aims to provide a preliminary overview of the topic with technical discussions to certain extent, focusing mainly on complexities within the domain of FSR that align with the author’s research interests. To this end, I delved into significant findings on the study of FSR-based complexity measures, particularly on the algorithmic and algebraic methods in computation, statistical behavior, theoretical constructions and the relations of those complexity measures. Research papers on this topic presented at flagship conferences in cryptography, such as ASIACRYPT, CRYPTO and EUROCRYPT, published at prestigious journals with IEEE, Springer, Science Direct, etc, as well as some well-recognized books since the 1970s constitute the major content of this survey. Readers may refer to relevant surveys on this topic with different focuses by Meidl and Niederreiter [19,25] and Topuzoǧlus and Winterhof [26].
The remainder of this paper is organized as follows: Section 2 recalls the basics for feedback shift registers, which lays the foundation for the discussions in subsequent sections. Section 3 reviews important developments of the theory of linear complexity profile for random sequences, Section 4 discusses a mathematical tool used to efficiently calculate the quadratic complexity of sequences and Section 5 surveys computational methods, the statistical behavior for maximum-order complexity and theoretical constructions of periodic sequences with the largest maximum-order complexity. In Section 6, known relations among complexity measures of sequences are briefly summarized. Finally, conclusive remarks and discussion are given in Section 7.

2. Feedback Shift Registers

Let F q be the finite field of q elements, where q is an arbitrary prime power. For a positive integer m, an m-stage feedback shift register (FSR) is a clock-controlled circuit consisting of m consecutive storage units and a feedback function f as displayed in Figure 1.
Starting with an initial state s 0 s 1 s m 1 over F q , the states in the FSR will be updated by a clock-controlled transformation as follows:
F : s i s i + 1 s i + m 1 s i + 1 s i + m 1 s i + m , i 0 ,
where
s i + m = f ( s i , s i + 1 , , s i + m 1 ) ,
and the leftmost symbol for each state will be output. In this way an FSR produces a sequence s = s 0 s 1 s 2 based on each initial state s 0 s 1 s m 1 and its feedback function f. The output sequence from an FSR, known as an FSR sequence, can be equivalently expressed as a sequence of states s ̲ i = s i s i + 1 s i + m 1 , with the relation s ̲ i = F ( s ̲ i 1 ) = = F i ( s ̲ 0 ) for i 0 . When s ̲ p = F p ( s ̲ 0 ) = s ̲ 0 for the least integer p 1 , we obtain a cycle of states s ̲ 0 , s ̲ p 1 , or equivalently a sequence s 0 s p 1 of least period p. In his influential book [10], Golomb intensively studied the properties of FSR sequences from both linear feedback functions and nonlinear feedback functions. Readers can refer to [10] for a comprehensive understanding of FSR sequences.
For an m-stage FSR with a feedback function f and an initial state s 0 s 1 s m 1 , if we know n consecutive s i s i + 1 s i + n 1 in the output s , then we obtain n m equations
f ( s i , , s i + m 1 ) = s i + m f ( s i + 1 , , s i + m ) = s i + m + 1 f ( s i + n m 1 , , s i + n 2 ) = s i + n 1 .
When the feedback function f is linear, namely, f ( x 0 , , x m 1 ) = a 1 x m 1 + a 2 x m 2 + + a m x 0 , and  n 2 m , one can uniquely determine its m unknown coefficients a i from the above n m linear equations. When the feedback function f is nonlinear, the number of terms in f increases significantly. For instance, for  q = 2 a binary feedback function f of degree r has d = 0 r n d possible terms. The above equations in Equation (2) become more difficult to analyze. The equations are not necessarily linearly independent and a lot more variables are involved. Consequently, more observations and techniques are required in the analysis of these equations. In the following, we will review some results on FSR sequences when the feedback function is linear, quadratic and arbitrarily nonlinear, as well as their relations with other complexity measures.
We will consider both finite-length sequences and infinite-length sequences with certain finite period. Throughout what follows, we will use s to denote a generic sequence with terms from certain alphabet, s n = s 0 s 1 s n 1 to denote a sequence with length n that is not a repetition of any shorter sequence, s n k to denote a sequence of k repetition of s n and  s n to denote infinite repetitions of s n , indicating that s n has least period n.

3. Linear Complexity

Given an FSR, when its feedback function f is a linear function on the input state, namely, it is associated with the following linear recurrence:
s i + m + a 1 s i + m 1 + + a m 1 s i + 1 + a m s i = 0 for i = 1 , 2 , ,
where a 1 , , a m are taken from F q , it is termed linear FSR and the output sequence s is called an LFSR sequence of order m. The polynomial
f ( x ) = x m + a m 1 x m 1 + + a 1 x + a 0 ,
with a 0 = 1 , is called the feedback or characteristic polynomial of s . The zero sequence 00 is viewed as an LFSR sequence of order 0.
Definition 1.
Let s be an arbitrary sequence of elements of F q and let n be a non-negative integer. Then the linear complexity L n ( s ) is defined as the length of the shortest LFSR that can generate s n = s 0 s 1 s n 1 . The sequence L 0 ( s ) , L 1 ( s ) , L 2 ( s ) , , is called the linear complexity profile of the sequence s .
It is clear that L n ( s ) L n + 1 ( s ) and 0 L n ( s ) n for any integer n and sequence s . Hence, the linear complexity profile of s is a nondecreasing sequence of non-negative integers. Two extreme cases for L n ( s ) correspond to highly non-random sequences s whose first n elements s 0 s 1 s n 1 are either 0 0 n or 0 0 n 1 s n 1 with s n 1 0 , which has L n ( s ) = 0 or L n ( s ) = n , respectively.
The linear complexity of a sequence s can be efficiently calculated by the well-known Berlekamp–Massey algorithm [15,16], which also returns the linear feedback function generating s . In the Berlekamp–Massey algorithm, at each step n 1 with the current linear recurrence for s 0 s 1 s n 2 , a discrepancy is calculated to assess whether the linear recurrence holds for the extended sequence s 0 s 1 s n 2 s n 1 : when the discrepancy is zero, indicating that the current linear recurrence indeed holds for s 0 s 1 s n 2 s n 1 , then move on to n; when the discrepancy is nonzero, indicating that a new (and possibly longer) linear recurrence is needed, the linear recurrence is then updated and the linear complexity is updated as
L n ( s ) = max { L n 1 ( s ) , n L n 1 ( s ) } .
Gustavson [27] showed that the above process requires O ( n 2 ) multiplication/addition operations for calculating L n ( s ) . Dornstetter, in [28], pointed out the equivalence between this procedure of calculation and the Euclidean algorithm.
Rueppel [17] investigated the varying behavior of the discrepancy Δ t , 1 t < n , for a binary sequence of length n, and characterized the linear complexity profile of random sequences in the following propositions.
Proposition 1.
The number of sequences of length n and linear complexity l, denoted by N n ( l ) , satisfies the following recursive relation
N n ( l ) = N n 1 ( l ) , 0 l < n 2 , 2 N n 1 ( l ) , l = n 2 , 2 N n 1 ( l ) + N n 1 ( n l ) , n 2 < l < n ,
and it, starting from N 1 ( 0 ) = N 1 ( 1 ) = 1 , can be given by
N n ( l ) = 2 min { 2 n 2 l , 2 l 1 } , 0 < l n , 1 , 0 = l < n .
Proposition 2.
The expected linear complexity L n of binary random sequences of length n drawn from a uniform distribution is given by
E L n = n 2 + 4 + R 2 ( n ) 18 2 n n 3 + 2 9 ,
and the variance of the linear complexity is given by
Var L n = 86 81 2 n 3 n ( 14 R 2 ( n ) ) ( 82 2 R 2 ( n ) ) 81 2 2 n 9 n 2 + 12 n + 4 81 ,
where R 2 ( n ) denotes n modulo 2.
From the above proposition, we readily see that
lim n E L n = n 2 + c n and lim n Var L n = 86 81 ,
where c n = ( 4 + R 2 ( n ) ) / 18 . From Rueppel’s characterization on the general stochastic behavior of binary random sequences, a similar and more important question arose: for a randomly chosen and then fixed sequence s over F q , what is the behavior of L n ( s ) ? To settle this question, Niederreiter [18] developed a probabilistic theory for linear complexity and linear complexity profiles of a given sequence s over any finite field F q . More specifically, he applied techniques from probability theory to dynamic systems and continued fractions, and deduced the probabilistic limit theorems for linear complexity by exploiting the connection between continued fractions and linear complexity of a sequence s . Below we first recall the connection discussed in [18].
Given a sequence s = s 0 s 1 s 2 , the fractional function G ( x ) = s 0 x 1 + s 1 x 2 + s 2 x 3 + F q [ x 1 ] has the following continued fraction expression
G = 1 / ( A 1 + 1 / ( A 2 + ) ) ,
where the partial quotients A 1 , A 2 , are polynomials over F q with positive degrees. The n-th linear complexity of s can be expressed as
L n ( s ) = i = 1 j A i ( s )
for the integer j satisfying
i = 1 j 1 A i ( s ) + i = 1 j A i ( s ) n i = 1 j A i ( s ) + i = 1 j + 1 A i ( s ) .
By the study of the above continued fraction expansion, Niederreiter obtained the following result on L n ( s ) .
Theorem 1.
Suppose f is a non-negative nondecreasing function on the positive integers with n = 1 q f ( n ) < . Then, we have
L n ( s ) n 2 1 2 f ( n ) f o r a l l s u f f i c i e n t l y l a r g e n .
By taking f ( n ) = ( 1 + ϵ ) log n / log ( q ) for arbitrary ϵ > 0 , a more explicit law of the logarithm for the n-th linear complexity of a random sequence s can be obtained as follows.
lim ¯ n L n ( s ) n 2 log n = 1 2 log q , lim ̲ n L n ( s ) n 2 log n = 1 2 log q .
Consequently, we have
L n ( s ) = n 2 + O ( log ( n ) ) .
As the equalities in (6) hold for infinitely many n, there is a strong interest in sequences s whose n-th linear complexity has small derivations from n / 2 .
Definition 2.
Let d be a positive integer. A sequence s = s 0 s 1 s 2 is said to be d-perfect if
L n ( s ) n 2 d 2 f o r a n y n 1 .
A 1-perfect sequence is also called perfect. A sequence is called almost perfect if it is d-perfect for some integer d > 1 .
Constructing d-perfect sequences is of significant interest. Sophisticated methods based on algebraic curves were introduced in [29], which yielded sequences with almost perfect linear complexity profiles. For cryptographic applications, especially as a keystream, a sequence s should have a linear complexity profile close to that of a random sequence. Moreover, this condition should be true for any starting point of the sequence. That is to say, for a sequence s = s 0 s 1 s 2 and any r 0 , the r-shifted sequence s r s r + 1 s r + 2 should have an acceptable linear complexity profile close to random sequences as well. Niederreiter and Vielhaber [30] attacked this problem with the help of continued fractions. An important fact is that the jumps in the linear complexity profile of s are exactly the degrees of the partial quotients A 1 , A 2 , . With such a connection, they proposed an algorithm to determine the linear complexity profile of shifted sequences s r s r + 1 s r + 2 by investigating the corresponding continued fractions [31]. To be more concrete, they designed a method to calculate the continued fraction expansions of G n ( x ) , , G 1 ( x ) , where G r ( x ) = j = r n 1 s j x ( j + 1 ) for r 0 . Later, in his survey paper [19], Niederreiter proposed the following open problem on d-perfect sequences.
Problem 1.
Construct a sequence s = s 0 s 1 s 2 over F q such that the r-shifted sequences s r s r + 1 s r + 2 for all r 0 are d-perfect for some integer d 1 .
The preceding discussion is mainly concerned with generic infinite-length sequences. Note that sequences from an m-stage LFSR over F q are periodic and their maximum period is q m 1 , which is achieved when the characteristic polynomial f ( x ) is a primitive polynomial in F q [ x ] . LFSR sequences of order m with period q m 1 are thus known as maximum-length sequences, or m-sequences for short. For a periodic sequence s = s n , the values in its linear complexity profile will remain unchanged at a certain point. This reveals apparently different linear complexity profiles between an infinite-length sequence of certain period and a random infinite-length sequence, which basically can be considered to have an arbitrarily long period.
An important tool for the analysis of the linear complexity of n-periodic sequences over F q is the discrete Fourier transform. Assume gcd ( n , q ) = 1 , which means that there exists an n-th primitive root β of unity in some finite extension of F q . Then the discrete Fourier transform of a time-domain n-tuple a 0 , , a n 1 F q n is the (frequency-domain) n-tuple b 0 , , b n 1 with b j = i = 0 n 1 a i β i j for j = 0 , , n 1 , i.e., 
DFT ( ( a 0 , , a n 1 ) ) = ( a 0 , , a n 1 ) 1 β β n 1 1 β 2 β 2 ( n 1 ) 1 β n 1 β n 1 ( n 1 ) .
In this case, the linear complexity of an n-periodic sequence can be determined via the discrete Fourier transform [32].
Proposition 3.
Let s = s 0 s 1 s 2 be an n-periodic sequence over F q with gcd ( n , q ) = 1 . Let β be an n-th primitive root of unity in an extension of F q and b 0 , , b n 1 be the discrete Fourier transform of ( s 0 , s 1 , s n 1 ) as in Equation (8). Then,
L n ( s ) = # { j : b j 0 , 0 j < n } = n # j : i = 0 n 1 s i β i j = 0 .
Massey and Serconek in [33] further extended the above relation to the general case gcd ( q , n ) > 1 with the generalized discrete Fourier transform. The generalized discrete Fourier transform of ( s 0 , s 1 , , s n 1 ) , where n = p v w , gcd ( w , p ) = 1 and p is the characteristic of F q , is defined as the following p v × n matrix
GDFT ( s 0 , s 1 , , s n 1 ) = s ( 1 ) s ( β ) s β n 1 s [ 1 ] ( 1 ) s [ 1 ] ( β ) s [ 1 ] β n 1 s p v 1 ( 1 ) s p v 1 ( β ) s p v 1 β n 1
where β is any n-th primitive root of unity over F q and
s [ t ] ( x ) = i = 0 n 1 i t s i x i t
is the t-th Hasse derivative of the polynomial s 0 + s 1 x + + s n 1 x n 1 . It is clear that when gcd ( n , q ) = 1 , the GDFT of ( s 0 , s 1 , , s n 1 ) reduced to the discrete Fourier transform of ( s 0 , s 1 , , s n 1 ) . As pointed out in [33,34], the linear complexity of s = s n can be calculated in terms of the Günther weight of GDFT ( s 0 , s 1 , , s n 1 ) , which was referred to as the Günther–Blahut theorem, which was used by Blahut implicitly in [35].
Proposition 4.
Let s = s n be an n-periodic sequence over F q with characteristic p, where n = p v w with gcd ( w , p ) = 1 . Then, the linear complexity of s is equal to the Günther weight of the GDFT of the n-tuple ( s 0 , s 1 , , s n 1 ) , where the Günther weight of a matrix M is the number of its entries that are nonzero.
Algebraically, the linear complexity of s n can be obtained via the feedback polynomial of the LFSR generating s [36]. Consider the generating function
g ( x ) = i = 0 s i x i = s 0 + s 1 x + + s n 1 x n 1 1 x n .
Assume the characteristic polynomial of s is given by f ( x ) = x m + a m 1 x m 1 + + a 1 x + a 0 with a 0 = 1 . Then
f ( x ) g ( x ) = s 0 + ( s 1 + a 1 s 0 ) x + + ( s m 1 + a 1 s m 2 + + a m 1 s 0 ) x m 1 + i 0 ( s i + m + a 1 s i + m 1 + + a m s i ) x i + m = s 0 + ( s 1 + a m 1 s 0 ) x + + ( s m 1 + a m 1 s n 2 + + a 1 s 0 ) x m 1 .
Letting φ ( x ) = f ( x ) g ( x ) , we have
g ( x ) = φ ( x ) f ( x ) = φ 0 ( x ) f 0 ( x ) ,
where gcd ( φ 0 , f 0 ) = 1 and f 0 is the minimal polynomial of s . This relation implies the following equality [36]:
f 0 ( x ) s n ( x ) = ( x n 1 ) φ 0 ( x ) .
where s n ( x ) = s 0 + s 1 x + + s n 1 x n 1 . Since gcd ( φ 0 , f 0 ) = 1 , it follows that f 0 ( x ) | ( x n 1 ) and φ 0 ( x ) | s n ( x ) . Therefore, we have the following result.
Proposition 5.
Let s = s n be an n-periodic sequence over F q and s ( x ) be the associated function of s given by s n ( x ) = s 0 + s 1 x + + s n 1 x n 1 . Then the minimal polynomial of s is given by
f 0 ( x ) = x n 1 gcd ( x n 1 , s n ( x ) ) ,
indicating that
L ( s ) = n deg ( gcd ( x n 1 , s n ( x ) ) ) .
With the above neat expression of L ( s ) for periodic sequences s n , several families of sequences with a nice algebraic structure were investigated, such as Legendre sequences [37], discrete logarithm function [38], Lempel–Cohn–Eastman sequences [39]. For more information about linear complexity of sequences with special algebraic structures, readers are referred to Shparlinski’s book [40].
The above discussion is concerned with the explicit calculation of an n-periodic sequence. The statistical behavior of a random n-periodic sequence over F q is of fundamental interest, particularly from the cryptographic perspective. Rueppel in [41] considered this problem: if we let s = s n run through all n-periodic sequences over F q , what is the expected linear complexity of
E q , n = 1 q n s L ( s ) ?
For the case q = 2 , Rueppel showed that if n is a power of 2, then E 2 , n = n 1 + 2 n ; and if n = 2 m 1 with a prime m, then E 2 , n e 1 n n 1 2 . Based on observations on numerical results, he conjectured that E 2 , n is always close to n. There was little progress on this conjecture until the work by Meidl and Niederreiter [42], in which they studied E q , n for an arbitrary prime power q with the help of the above Günther–Blahut theorem and the analysis of cyclotomic cosets. For an integer 0 j < w , the cyclotomic coset of j modulo w is defined as C j = { j q t ( mod w ) : t 0 } .
Theorem 2.
Let n = p v w , where p is the characteristic of F q , v 0 and  gcd ( p , w ) = 1 . Let C 1 , , C h be the different cyclotomic cosets modulo w and b i = C i for 1 i h . Then
E q , n = n i = 1 h b i 1 q b i p v q b i 1 .
From Theorem 2, a routine inequality scaling
i = 1 h b i 1 q b i p v q b i 1 < i = 1 h b i q b i 1 < 1 q 1 i = 1 h b i = w q 1
implies that
E q , n n w q 1 .
In the particular case v = 0 ,
E q , n n w q 1 = n ( 1 1 q 1 ) .
For small q, the above lower bounds can be further improved. For instance, for  q = 2 , as the only singleton coset is C 0 = { 0 } , it follows that
E 2 , n n w 2 3 for any n , 3 n 1 4 for odd n .
Recall that the expected linear complexity of a random binary sequence s 0 s 1 s n 1 is around n 2 . For a periodic sequence s = s n from a sequence s n with linear complexity l, the calculation of linear complexity of s n needs to consider the sequence s 0 s 1 s n 1 s 0 s l 1 . This expansion sequence, when considered as a random sequence, would have expected complexity around ( n + l ) / 2 . This is somewhat consistent with E 2 , n = ( 3 n 1 ) / 4 when l = ( n 1 ) / 2 for odd n. Further improved results for the case gcd ( q , n ) = 1 were obtained by more detailed analysis and can be found in [42].

4. Quadratic Complexity

Quadratic feedback functions are the easiest nonlinear case and has been discussed by some researchers [43,44,45]. Chan and Games, in [43], studied the quadratic complexity of binary DeBruijn sequences of order m (in which each binary string s 0 s 1 s m 1 appears exactly once); Youssef and Gong characterized a jump property of the quadratic complexity profile of random sequences, and Rizomiliotis et al., in [45], proposed an efficient method to calculate the quadratic complexity of binary sequences in general. We first recall the definition of quadratic complexity of a sequence in the following:
Definition 3.
Given a binary sequence s = s 0 s 1 s 2 , its quadratic complexity is the length of the shortest FSRs with quadratic feedback functions
f ( x 0 , x 1 , , x m 1 ) = 0 i , j < m a i , j x i x j + 0 i < m a i x i + a , a i , j , a i , a F 2
that can generate s . The quadratic complexity profile of the sequence s is similarly defined as Q 0 ( s ) , Q 1 ( s ) , Q 2 ( s ) , , where Q n ( s ) is the quadratic complexity of the first n terms of s .
For the first n terms s 0 s 1 s n 1 of s , suppose it can be generated by an m-stage quadratic FSR. Following the recurrence as in Equation (2), we can obtain a system of n m equations. More concretely, denote
F ( m ) = ( a , a 0 , a 1 , a 0 , 1 , a 2 , a 1 , 2 , a 0 , 2 , , a m 1 , a m 2 , m 1 , , a 0 , m 1 ) T , E ( n , m ) = ( s m , s m + 1 , , s n 1 ) T , M ( n , m ) = ( 1 n m T | B 0 ( m , n ) | | B m 1 ( n , m ) ) ,
where, for  0 i < m ,
B i ( n , m ) = s i s i s i 1 s i s 0 s i + 1 s i + 1 s i s i + 1 s 1 s i + k 1 s i + k 1 s i + k 2 s i + k 1 s k 1 .
with k = n m . According to the ordering in F ( m ) and M ( n , m ) , it is easy to verify that
M ( n , m ) F ( m ) = E ( n , m ) .
Therefore, finding a quadratic feedback function in m variables that outputs the sequence s n = s 0 s 1 s n 1 is equivalent to solving the above system of linear equations in 1 + m ( m + 1 ) 2 variables in F ( m ) . Notice that the ordering of linear and quadratic terms in M ( n , m ) has a feature that the quadratic terms s i s j with j < i occur in M ( n , m ) only after the term s i occurs. This feature facilitates the calculation of Q n ( s ) term by term as in the Berlekamp–Massey algorithm.
We first give a toy example to illustrate the above linear equations. Let n = 9 and m = 3 . Then we have
M ( n , m ) = ( 1 6 T | B 0 ( 9 , 3 ) | B 1 ( 9 , 3 ) | B 2 ( 9 , 3 ) ) = 1 s 0 s 1 s 0 s 1 s 2 s 1 s 2 s 0 s 2 1 s 1 s 2 s 1 s 2 s 3 s 2 s 3 s 1 s 3 1 s 2 s 3 s 2 s 3 s 4 s 3 s 4 s 2 s 4 1 s 3 s 4 s 3 s 4 s 5 s 4 s 5 s 3 s 5 1 s 4 s 5 s 4 s 5 s 6 s 5 s 6 s 4 s 6 1 s 5 s 6 s 5 s 6 s 7 s 6 s 7 s 5 s 7 ,
and
F ( 3 ) = ( a , a 0 , a 1 , a 0 , 1 , a 2 , a 1 , 2 , a 0 , 2 ) T , E ( 9 , 3 ) = ( s 3 , s 4 , s 5 , s 6 , s 7 , s 8 ) T .
From the relation M ( 9 , 3 ) F ( 3 ) = E ( 9 , 3 ) , we obtain 6 equations with 7 variables in F ( 3 ) .
It is straightforward to see that the system is solvable if and only if
rank ( M ( n , m ) ) = rank ( M ( n , m ) E ( n , m ) ) .
Chan and Games in [43] had the following observation.
Theorem 3.
If an m-stage quadratic FSR can generate s n 1 but not s n , then there is no m-stage quadratic FSR that can generate s n if and only if
rank ( M ( n , m ) ) = rank ( M ( n 1 , m ) ) .
By this theorem, for each step, when s 0 s 1 s n 2 has quadratic complexity m, if rank ( M ( n , m ) ) rank ( M ( n 1 , m ) ) , then s 0 s 1 s n 2 s n 1 for any s n 1 also has the same quadratic complexity m. Based on such an observation, they proposed a term-by-term algorithm, similarly to the Berlekamp–Massey algorithm, to calculate the quadratic complexity of a sequence s n [23]. Their algorithm strongly depends on the Gaussian elimination for the computation of rank ( M ( n , m ) ) for each new term. The special structure of the matrix M ( n , m ) was not well taken into consideration in their algorithm, which did not reveal the precise increment of the quadratic complexity of s n . By looking into certain structure of the matrix M ( n , m ) , Youssef and Gong [44] showed that if the quadratic complexity of the first n terms of a sequence s , is larger than n / 2 , then the first n + 1 terms of s has the same quadratic complexity. Rizomiliotis, Kolokotronis and Kalouptsidis in [45] observed the following nesting structure of the matrix M ( n , m ) :
M ( n , m ) = M ( n 1 , m ) R n m 1 ( n , m ) = M ( n 1 , m 1 ) B m 1 ( n , m ) = R 0 ( n , m ) M ( n , m ) ,
where R n m 1 ( n , m ) is the last row in M ( n , m ) , R 0 ( n , m ) is the starting row of M ( n , m ) , and  M ( n , m ) contains all the columns of M ( n , m + 1 ) with indices of the form with indices of the form j = b ( b + 1 ) 2 + k , with  0 k b < m , including the starting all one column 1 n ( m + 1 ) T in M ( n , m + 1 ) . This nesting structure played an important role in the their derivation of the following results.
Theorem 4.
Suppose Q n 1 ( s ) < Q n ( s ) . Then, Q n ( s ) is the smallest integer m such that
rank ( M ( n , m ) ) rank ( M ( n 1 , m ) ) .
Theorems 3 and 4 laid the foundation for an algorithmic method to calculate the quadratic complexity of a sequence. More specifically, for each new term, Theorem 3 determines when the quadratic complexity will increase; and Theorem 4 characterizes how large the increment is. Combining different cases for each new term, Figure 2 provides a preliminary algorithm to recursively assess the quadratic complexity of a sequence s . It can be seen from Figure 2 that the assessment heavily depends on the calculation of ranks of involved matrices, which becomes slower as n and m grow.
With a detailed analysis of the nesting structure of M ( n , m ) , the authors in [45] proposed a more efficient algorithm (as in [45], Figure 3) to calculate the quadratic complexity profile of s n . In addition, when n < m ( m + 3 ) 2 + 1 , the system M ( n , m ) F ( m ) = E ( n , m ) is under-determined; and when n m ( m + 3 ) 2 + 1 , the necessary and sufficient condition that a unique quadratic feedback function generating the sequence s n can be given [45].
Theorem 5.
The quadratic feedback function of an m-stage FSR that generates the sequence s n is unique if and only if
rank ( M ( n , m ) ) = m ( m + 1 ) 2 + 1 .
Otherwise, there are 2 1 + m ( m + 1 ) 2 rank ( M ( n , m ) ) such functions.
This theorem illustrates that a binary sequence s with small quadratic complexity m should not be used for cryptographic applications. Otherwise, when O ( m ( m + 3 ) 2 ) consecutive components s i ’s in s are known, the quadratic feedback function could be (uniquely) determined, thereby producing the whole sequence and violating the requirement of unpredictability for sequences used in cryptography.
In the previous section, we saw a good theoretical understanding of the statistical behavior of linear complexity and linear complexity profile for random sequences. However, to the best of my knowledge, there is no published theoretical result on the statistical behavior for quadratic complexity and the quadratic complexity profile of random sequences s n and n-periodic sequences s n , except for the following two conjectures by Youssef and Gong [44] strongly indicated by numerical results.
Conjecture 1.
Let N n ( q c ) be the number of binary sequences s n with quadratic complexity q c = Q ( s ) > n / 2 . Then N n ( q c ) = N n + i ( q c + i ) for any i 1 , indicating that N n ( q c ) is a function of n q c .
Conjecture 2.
For moderately large n, the expected value of the quadratic complexity of a random binary sequence of length n is given by
E [ Q n ] 2 n .

5. Maximum-Order Complexity

As an additional figure of merit for randomness testing, Jansen and Boekee in 1989 proposed the notion of maximum-order complexity, also later known as nonlinear complexity, of sequences [46]. We adopt the term maximum-order complexity in this survey for better distinction from the notion of quadratic complexity.
Definition 4.
The maximum-order complexity of a sequence s = s 0 s 1 s 2 , denoted by M ( s ) , is the length of the shortest FSRs that can generate the sequence s . Similarly, the maximum-order complexity profile of s is a sequence of M 0 ( s ) , M 1 ( s ) , M 2 ( s ) , , where M n ( s ) for each n 0 is the shortest FSRs that can generate the first n terms of s .
As pointed out in ref. [46], the significance of the maximum-order complexity is that it tells exactly how many terms of s have to be observed at least in order to be able to generate the entire sequence by means of an FSR with length M ( s ) . Therefore, it has been considered as an important measure to judge the randomness of sequences. Below we recall some basic properties of maximum-order complexity of sequences [46,47].
Lemma 1.
Let s = s 0 s 1 s 2 be a sequence over F q .
(i) Let l be the length of the longest subsequence of s that occurs at least twice with different successors. Then the sequence s has maximum-order complexity M ( s ) = l + 1 ;
(ii) The maximum-order complexity of any n-length sequence is at most n 1 . Moreover, the equality holds if and only if s n has the form ( α , , α , β ) with α β in F q .
Lemma 2.
Let s = s n be a sequence of period n over F q .
(i) The maximum-order complexity of s satisfies log q ( n ) M ( s ) n 1 ;
(ii) The reciprocal sequence s * = ( s n 1 , , s 0 ) has M ( s * ) = M ( s ) .
From Lemmas 1 and 2, the difference between nonlinear complexities of finite-length sequences and periodic sequences is apparent. One typical difference is that the maximum-order complexity of a periodic sequence remains unchanged under cyclic shift operations, while that of a finite-length sequence can change dramatically. For instance, for the sequence 0 0 1 of length n, while M ( 0 01 ) = M ( 0 01 ) = n 1 , after a right cyclic shift, we have M ( 10 0 ) = n 1 but M ( 10 0 ) = 1 .
Recall that for the case where the linear feedback function is unique for periodic sequences, and that for the quadratic feedback function is also unique when the matrix M ( n , m ) with n = m ( m + 3 ) 2 + 1 is nonsingular, the situation for maximum-order complexity is significantly different.
Proposition 6.
Let Φ s denote the class of feedback functions of the FSRs that can generate a periodic sequence s = s n with maximum-order complexity m over F q . Then the number of functions in Φ s is equal to | Φ s | = q q m n .
By the above proposition, the class Φ s generally contains more than one feedback function that can generate the periodic sequence, which is similar for non-periodic sequences. One can search for functions exhibiting certain properties, such as the function with the least number of terms. One of the methods that minimize the number of terms and their orders in the inclusive-or sum of products of variables or their complements is to use the disjunctive normal form (DNF) representation of the feedback function. For the binary case, the DNF of f is given by
f ( x 0 , x 1 , , x m 1 ) = b 0 , , b m 1 F 2 f ( b 0 , , b m 1 ) x 0 b 0 x m 1 b m 1 ,
where x i b i = x i + b i + 1 = 1 if and only if x i = b i for 0 i < m . It is also interesting to note that a unique feedback function occurs for DeBruijn sequences of order m, which have m-tuples over F q exactly once in one period q m . For binary DeBruijn sequences of order m, Chan and Games in [23] showed their quadratic complexity are upper bounded by 2 m 1 m 2 , which can be reached by those DeBruijn sequences derived from m-sequences by inserting 0 to the all-zero subsequence of length m 1 in m-sequences.

5.1. Computation and Statistical Behavior

In ref. [46] Jansen associated M ( s ) with the maximum depth of a direct acyclic word graph (DAWG) from s . Below, we recall a toy example from [46] to generate a DAWG from a binary string, which helps readers better understand relevant notions.
Example 1.
The sequence s = 110100 has the following set of all subsequences
SUB ( s ) = { λ , 1 , 0 , 11 , 10 , 01 , 00 , 110 , 101 , 010 , 100 , 1101 , 1010 , 0100 , 11010 , 10100 , 110100 } ,
where λ represents the empty sequence. For the sequence s , the endpoints are given as in Table 1.
For the sub-sequences of s , their endpoints are given as below
E ( λ ) = { 0 , 1 , 2 , 3 , 4 , 5 , 6 } E ( 1 ) = { 1 , 2 , 4 } , E ( 0 ) = { 3 , 5 , 6 } , E ( 11 ) = { 2 } , E ( 10 ) = { 3 , 5 } , E ( 01 ) = { 4 } , E ( 00 ) = { 6 } , E ( 110 ) = { 3 } , E ( 101 ) = { 4 } , E ( 010 ) = { 5 } , E ( 100 ) = { 6 } , E ( 1101 ) = { 4 } , E ( 1010 ) = { 5 } , E ( 0100 ) = { 6 } , E ( 11010 ) = { 5 } , E ( 10100 ) = { 6 } , E ( 110100 ) = { 6 } .
Subsequences are considered equivalent if they have the same set of endpoints. For instance, the following are three equivalent classes with endpoints 4, 5 and 6, respectively:
E 4 : 01 , 101 , 1101 E 5 : 010 , 1010 , 11010 , E 6 : 00 , 100 , 0100 , 10100 , 110100 .
Therefore, the total 17 subsequences in SUB ( s ) are divided into 9 equivalence classes. It is customary to choose the shortest subsequence as the class representative. In this way, we have the following representatives:
E Q ( s ) = { λ , 1 , 0 , 11 , 10 , 01 , 00 , 110 , 010 } .
From the above discussion, we can build a DAWG as follows: each representative in E Q ( s ) is denoted by a node and λ is considered as the source node; there is a directed edge between one node v i to another node v j if and only if the equivalence class of v i contains a subsequence, which when extended with the edge symbol belongs to the equivalence class of v j ; the edges are divided into primary and secondary edges: an edge is primary if and only if it belongs to a primary path (the longest path from the source to the node) and a depth of a node is the length of the primary path to the node, where the length of a path is the number of edges along the path. Let B N ( s ) be a subset consisting of nodes with more than one outgoing primary edges in E Q ( s ) and define the maximum depth d ( s ) = max v B N ( s ) d ( v ) .
In this way, we obtain the DAWG of the sequence s = 110100 as in Figure 3, where primary edges are displayed in solid arrows. From the definition of the depth of a node, we have
d ( λ ) = 0 , d ( 0 ) = d ( 1 ) = 1 , d ( 11 ) = d ( 10 ) = 2 , d ( 01 ) = 4 , d ( 00 ) = 6 , d ( 110 ) = 3 , d ( 010 ) = 5 .
Since B N ( s ) = { λ , 1 , 0 , 10 } , we have d ( s ) = d ( 10 ) = 2 .
Figure 3. Direct acyclic word graph of s = 110100 [21].
Figure 3. Direct acyclic word graph of s = 110100 [21].
Cryptography 08 00025 g003
With the notions illustrated in Example 1, Jansen in [21] established the following connection between the maximum-order complexity of a sequence s and the depth of DAWG derived from s , and proposed to calculate the maximum-order complexity of s from its DAWG.
Proposition 7.
Given a sequence s , the maximum-order complexity of s and the depth d ( s ) of its DAWG satisfy
M ( s ) = 0 , i f B N ( s ) = , d ( s ) + 1 , o t h e r w i s e .
Blumer’s algorithm [48] was identified as an important tool to build a DAWG of a sequence s , thereby calculating its maximum-order complexity profile in linear time and memory with regard to the sequence length. The method worked particularly well for periodic sequences. With this algorithm, Jansen exhausted all 2 l binary l-length sequences and l-periodic sequences as l ranges from 1 up to 24 ([21], Tables 3.1–3.4), which exhibited typical statistical behaviors of maximum-order complexity profiles of random sequences: the expected maximum-order complexity of a random sequence s of sufficiently large length n over F q is given by
E ( M n ( s ) ) 2 log q ( n ) .
Following the successful approach in ref. [45], Rizomiliotis and Kalouptsidis [49] considered the calculation of the maximum-order complexity of a sequence s in a similar way. From the recursive equations f ( s i , s i + 1 , , s i + m 1 ) = s i + m for 0 i < n m , one can obtain a similar system to linear equations
M ( n , m ) F ( m ) = E ( n , m ) ,
where the coefficient matrix M ( n , m ) from all binary terms i = 0 m 1 x i j i , where ( j 0 , j 1 , , j m 1 ) is any element in F 2 m in a special ordering according to the degree of the terms. For instance, when n = 10 and m = 3 , the system of linear equations is given by
M ( 10 , 3 ) = 1 s 0 s 1 s 2 s 0 s 1 s 0 s 2 s 1 s 2 s 0 s 1 s 2 1 s 1 s 2 s 3 s 1 s 2 s 1 s 3 s 2 s 3 s 1 s 2 s 3 1 s 2 s 3 s 4 s 2 s 3 s 2 s 4 s 3 s 4 s 2 s 3 s 4 1 s 3 s 4 s 5 s 3 s 4 s 3 s 5 s 4 s 5 s 3 s 4 s 5 1 s 4 s 5 s 6 s 4 s 5 s 4 s 6 s 5 s 6 s 4 s 5 s 6 1 s 5 s 6 s 7 s 5 s 6 s 5 s 7 s 6 s 7 s 5 s 6 s 7 1 s 6 s 7 s 8 s 6 s 7 s 6 s 8 s 7 s 8 s 6 s 7 s 8
with
F ( 3 ) = ( a , a 0 , a 1 , a 3 , a 0 a 1 , a 0 a 2 , a 1 a 2 , a 0 a 1 a 2 ) T , E ( 10 , 3 ) = ( s 3 , s 4 , s 5 , s 6 , s 7 , s 8 , s 9 ) T .
In ref. [49], the authors investigated the properties of the m-tuples T j ( n , m ) = ( s j , s j + 1 , , s j + m 1 ) as j runs through the indices 0 , 1 , , n m and proposed a term-by-term algorithm to compute the maximum-order complexity and output a feedback function for a given sequence s n . They also pointed out that the dominant multiplication complexity in their proposed algorithm is in the order of O ( n ) .
Attempting the above approach by analyzing the structure of M ( n , m ) is not satisfactory enough. Later, in ref. [50], the authors made more observations that further improved the performance of calculating maximum-order complexity of sequences.
Proposition 8.
For a binary sequence s , suppose M n 1 ( s ) = m and the minimal FSR of s 0 s 1 s n 2 does not generate s 0 s 1 s n 2 s n 1 . Then M n ( s ) = m if and only if the subsequence s n m 1 s n m s n 2 has not appeared within s n 1 .
The above observation is a natural extension of the property of maximum-order complexity in Lemma 1 (i). Instead, the following observation characterized the jump of maximum-order complexity profile at each term.
Proposition 9.
For a binary sequence s , suppose M n 1 ( s ) = m < M n ( s ) . Let i n m 1 be the least integer such that s j s j + m 1 = s i s i + m 1 for certain 0 j < i . Then M n ( s ) = M n 1 ( s ) + ( n m i ) = n i . Moreover, if  M n ( s ) = m + k for k 1 , then the sequence s n | | s n s n + k 1 by arbitrary extension s n s n + k 1 has the same maximum-order complexity m + k .
In addition, they observed that the maximum-order complexity profile of a sequence has a close connection to its eigenvalue profile. To be more concrete, the eigenwords in a sequence s 0 s 1 s r 1 are those subsequences of s 0 s 1 s r 1 that are not contained in any proper subsequence s 0 s t 1 of s 0 s 1 s r 1 . They showed the following interesting connection.
Theorem 6.
For a binary sequence s , suppose M n 1 ( s ) = m and the minimal FSR of s n 1 does not generate s n . Then,
M n ( s ) = max { M n 1 ( s ) , n Eigenvalue ( s n 1 ) , }
where Eigenvalue ( s n 1 ) is the number of eigenwords in the sequence s n 1 .
From the observations on the update of certain feedback function when the minimal FSR of s n 1 does not generate s n , they proposed the following procedure to generate a minimal feedback function and maximum-order complexity of a sequence s . Suppose M n 1 ( s ) = m and the minimal feedback function of s n 1 is h n 1 ( x 0 , , x m 1 ) . Then,
  • if s n 1 = h n 1 ( s n m 1 , , s n 2 ) , then s n and s n 1 share the minimal feedback function h n 1 and the same maximum-order complexity m
  • if s n 1 h n 1 ( s n m 1 , , s n 2 ) and M n ( s ) = M n 1 ( s ) , then update h n 1 as
    h n ( x 0 , , x m 1 ) = h n 1 ( x 0 , , x m 1 ) + i = n m 1 n 2 ( x i + s i + 1 )
  • if s n 1 h n 1 ( s n m 1 , , s n 2 ) and M n ( s ) = m + k , then
    h n ( x 0 , , x m + k 1 ) = h n 1 ( x 0 , , x m + k 1 ) + i = n m k 1 n 2 ( x i + s i + 1 )
Consequently, they proposed an efficient algorithm for maximum-order complexity, which works very similarly to the Berlekamp–Massey algorithm. For ease of comparison with the Berlekamp–Massey algorithm, we recall it in Algorithm 1. The computational complexity of Algorithm 1 in the worse case is O ( n 3 ) , while in the average case is O ( n 2 log 2 ( n ) ) since the the expected maximum-order complexity E [ M n ] 2 log 2 ( n ) . While it has the similar complexity as the DAWG method [21], its recursive nature is an important advantage since it eliminates the need to know the entire sequence in advance. This resembles the well-known Berlekamp–Massey algorithm in the linear case: if a discrepancy occurs at certain step, then a well-determined corrective function is added to the current minimal feedback function of s n 1 to provide an updated minimal feedback of s n . In addition, the update of maximum-order complexity M n ( s ) = max { M n 1 ( s ) , n Eigenvalue ( s n 1 ) } at each step is similar to L n ( s ) = max { L n 1 ( s ) , n L n 1 ( s ) } for linear complexity of the sequence s in the recursive procedure.   
Algorithm 1: Generation of minimal polynomial for s .
Cryptography 08 00025 i001

5.2. Approximate Statistical Behavior

Conducting a rigorous theoretical analysis of the behavior of maximum-order complexity profiles, as was done for linear complexity, appeared intractable. On the other hand, maximum-order complexity had a lot of similarities as linear complexity. In order to facilitate the randomness test with maximum-order complexity, Erdman and Murphy proposed a method to approximate the distribution of the maximum-order complexity [51]. Inspired by the property of maximum-order complexity in Lemmas 1 and 2, they investigated a function that approximates the function P ( m , n ) : the probability that the first nm-tuples are all different in a sequence.
Proposition 10.
Let R ( m , n 1 ) be the probability that the n-th m-tuple is unique given that the previous ( n 1 ) m-tuples were unique. Then,
P ( m , n ) = i = 1 n R ( m , i ) i = 1 n 1 i + 1 2 m + 1 = p ( m , n ) .
Simulations on random sequences for m from 4 to 24 ([51], Table 2) indicated that the above approximation was accurate, particularly when m 17 .
Recall that a purely periodic sequence has maximum-order complexity m if the first nm-tuples are unique but at least one of the first n ( m 1 ) -tuples is repeated. Thus, for calculating a periodic sequence s = s n , it suffices to only look at the first n + m 1 bits to see if the nm-tuples are unique and the first n + m 2 bits to see if the n ( m 1 ) -tuples are not unique. Denote by Q ( m , n ) the probability that the first nm-tuples are unique while the n ( m 1 ) -tuples are not. This probability function can be well approximated by q ( m , n ) , which is given by
q ( m , n ) = p ( m , n ) p ( m 1 , n ) , if n 2 m 1 , p ( m , n ) otherwise .
Based on this approximation (of which the accuracy was shown in ([51], Table 3)), the expected maximum-order complexity was approximated as follows:
Theorem 7.
Let M n be the maximum-order complexity of a random periodic binary sequence s n . Then,
E [ M n ] = m = log 2 ( n ) n 1 m Q ( m , n ) = ( n 1 ) m = log 2 ( n ) n 2 P ( m , n ) ( n 1 ) m = log 2 ( n ) n 2 p ( m , n ) = ( n 1 ) m = log 2 ( n ) n 2 i = 1 n 1 i + 1 2 m + 1 .
Similarly, for random binary sequences of length n, the expected maximum-order complexity was approximated below.
Theorem 8.
Let N ( m , n ) be the number of binary sequences of length n with maximum-order complexity m. Then, it can be approximated as
N ( m , n ) 2 n q ( m , n m + 1 ) ,
and the expected maximum-order complexity M ^ n of random binary sequence of length n is given by
E [ M ^ n ] = m = 0 n 1 m N ( m , n ) i = 0 n 1 N ( i , n ) m = 0 n 1 m 2 n q ( m , n m + 1 ) i = 0 n 1 2 n q ( i , n i + 1 ) 2 log 2 ( n ) ( f o r s u f f i c i e n t l y l a r g e n ) .

5.3. Sequences with High Maximum-Order Complexity

Different complexity measures were proposed in the literature to evaluate the randomness of sequences. A sequence with low complexity, including the linear, quadratic and maximum-order complexity, allows for short FSRs to generate the whole period of the sequence. That is to say, all remaining unknown terms in this sequence can be efficiently uncovered when the feedback function and the initial state of the short FSRs are determined. It is clear that this kind of sequences should be avoided for any cryptographic applications. On the other hand, the relation between high complexity of a sequence and good randomness of a sequence is not yet well understood.
For the aforementioned complexity measures, the sequences of the form ( 0 , , 0 , 1 ) have the largest complexity, but have clearly poor randomness. According to the exhaustive search results on maximum-order complexity in Tables 1–3 in [21], while sequences ( 0 , , 0 , 1 ) are the only instances of n-length sequences that have the highest possible complexity n 1 , there are multiple n-periodic binary sequences having the highest maximum-order complexity n 1 .
Researchers have been interested in the study of sequences with high maximum-order complexity [52,53], particularly on sequences having highest possible maximum-order complexity [54,55]. For the latter case, Rizomiliotis [49] in 2005 proposed the following necessary and sufficient condition for an n-periodic binary sequence to have maximum-order complexity the same as its linear complexity.
Proposition 11.
For a periodic binary sequence s = s n , let s n ( x ) = s 0 + s 1 x + + s n 1 x n 1 be the polynomial representation of s n , and let h ( x ) = gcd ( x n + 1 , s n ( x ) ) , c ( x ) = s n ( x ) / h ( x ) and f ( x ) = x n + 1 / gcd ( x n + 1 , s n ( x ) ) . Then,
M ( s ) = min { n 1 , L ( s ) }
if and only if there exists integers 0 p 1 < p 2 n 1 satisfying
f ( x ) | 1 + ( x p 1 + x p 2 ( x ) ) c ( x )
when L C ( s ) n 1 .
Based on the above condition, different families of n-periodic binary sequences that have the same linear complexity and maximum-order complexity were proposed in ref. [49]. Moreover, an algorithm based on Lagrange interpolation and an algorithm based on the relative shift of the component sequences were proposed to generate binary sequences with highest possible maximum-order complexity. These two ideas were further developed for constructing such periodic sequences with period of the form 2 m 1  [54]. Roughly 10 years later, n-periodic sequences with highest maximum-order complexity were revisited in ref. [55], which provided a complete picture of sequences with maximum-order complexity. The authors of ref. [55] gave the necessary and sufficient condition for n-periodic sequences over any alphabet to have maximum-order complexity n 1 .
Theorem 9.
Let s = s n be an n-periodic sequence over any field F . Then M ( s ) = n 1 if and only if there exists an integer p with 1 p < n such that s i = s i + p ( mod n ) for 0 i < n 2 and s i s i + p ( mod n ) for i = n 2 , n 1 . Furthermore, such a sequence can, up to shift equivalence, be represented as one of the following forms
(1) s n = ( α n 1 β ) = ( α , , α n 1 , β ) where α β F ;
(2) s n = s r 0 = s r 1 m 1 s r 2 for certain integer r 1 Z n * with
s r i 1 = s r i m i s r i + 1 , i = 1 , 2 , , k ,
and
s r k = ( α ) r k 1 β , s r k + 1 = ( α ) ,
where the integers m i , r i + 1 for i = 1 , 2 , , k are derived from r i + 1 = r i 1 m i r i with r 1 > r 2 > > r k + 1 = 1 ,
With the full characterization in Theorem 9, the distribution of random n-periodic binary sequences having maximum-order complexity n 1 can be derived as follows.
Proposition 12.
The probability that a randomly generated sequence s = s n has the highest M ( s ) = n 1 is given by
P n 1 = Prob ( M ( s ) = n 1 ) = q ( q 1 ) n φ ( n ) 2 d | n μ ( d ) q n / d ,
where φ ( · ) is the Euler’s totient function and μ ( · ) is the Möbius function given by μ ( n ) = k Z n * e 2 π i k / n . In particular, when q = 2 , the probability
P n 1 = φ ( n ) d n μ ( d ) 2 n d .
Interestingly, the sequences s characterized in Theorem 9 exhibit a strong recursive structure, which can be derived by applying the Euclidean algorithm on n and the integer p, a smaller period of a subsequence of s n . This strong recursive structure, on the other hand, implies that s is far from being random. As discussed in ref. [55], the balancedness, stability and scalability of such sequences are not good, indicating that they should be avoided for cryptographic applications. Very recently, binary sequences with periodic n were further studied in ref. [56], where the authors further investigated the structure of s n and proposed an algorithmic method to determine all n-periodic binary sequences with maximum-order complexity n / 2 .
In addition, Liang et al. recently investigated the structure of n-length binary sequences with high maximum-order complexity n / 2 and proposed an algorithm that can completely generate all those binary sequences [53]. Based on the completeness, they managed to provide an explicit expression of the number of n-length binary sequences with any maximum-order complexity between n / 2 and n.
Proposition 13.
The number of n-length binary sequences with maximum-order complexity m with n / 2 m n 1 is given by
N ( m , n ) = d = 1 n m ( n m d + 2 ) 2 n m d 1 N ( m , m + d , d )
where
N ( m , m + d , d ) = 2 n m t = 1 r ( 1 ) t 1 1 j 1 < < j t 2 n m p 1 j 1 p t j t
when n m is factorized as n m = p 1 j 1 p r j r .

6. Relations between Complexity Measures

Besides the complexity measures in the context of FSRs in previous sections, some other measures have been discussed by researchers, such as Lempel–Ziv complexity [57], 2-adic complexity for FSRs with carry operation [22], k-error complexity, expansion complexity [58] and correlation measure [59,60]. This section will briefly review the relations among these measures. Below we start with the relation between the complexity measures in the previous sections, and we will be mainly focusing on extreme cases.

6.1. Relations between FSR-Based Complexities

From their definitions, for a sequence s , it is easily seen that
M n ( s ) Q n ( s ) L n ( s ) n .
We know that the special sequence of the form s n = α α β , where α β , has the largest linear complexity n, quadratic and maximum-order complexity n 1 . As for n-periodic sequences s = s n over F q , the largest linear complexity is also n, which can be seen from the expression L ( s ) = n deg ( gcd ( x n 1 , s n ( x ) ) ) , as recalled in Proposition 5. This can be used to characterize the periodic sequences with largest linear complexity. Assume n = p v w with gcd ( p , w ) = 1 , where p is the characteristic of F q . Let C 1 = { 0 } , C 2 , , C h be the cyclotomic cosets modulo w relative to the power q. Let β be a primitive n-th root of unity in an extension of F q . Then, we have the following factorization of x n 1 over F q :
x n 1 = 1 i h f j ( x ) = 1 i h j C i ( x β i ) p u ,
which indicates that an n-periodic sequences over F q has the largest linear complexity n if and only if
gcd ( s n ( x ) , f j ) = 1 for j = 1 , 2 , , h .
Niederreiter, in ref. [61], proved the existence of n-periodic sequences with the largest linear complexity n and large k-error linear complexity, which is defined as
L k ( s n ) = min { L ( t n ) | wt ( s n t n ) k } .
This result was obtained by finding integers n = p v w satisfying a condition, which was derived from the following observation [61]: let l = min 2 i h | C i | and suppose k is an integer such that j = 0 k n j ( q 1 ) j < q l , then there exists an n-periodic sequence s satisfies
L ( s ) = n and L k ( s ) n p v .
As shown in the examples in ref. [61], there are infinitely many primes n allowing for the existence of binary n-periodic sequences of maximum possible linear complexity n.
Finding n-periodic sequences with the largest maximum-order complexity seems more challenging, especially when k-error complexity is also considered. As recalled in Section 5, Sun et al. [55] revealed n-periodic sequences with the largest maximum-order complexity n 1 , which have surprisingly strong recursive structure. Besides this, little results about k-error maximum-order complexity and quadratic complexity have been reported. Here, we propose two open problems for interested readers.
Problem 2.
Characterize all the n-periodic sequences over F q with the largest quadratic complexity n 1 .
Problem 3.
Characterize certain lower bound on the k-error maximum-order complexity of n-periodic sequences with maximum-order complexity n 1 .
Another extreme case for sequences is that they have the least possible complexity values. For finite-length sequences, we know that the linear, quadratic and maximum-order complexity can be as small as zero, which do not appear to be interesting to explore. When s is a periodic sequence over F q , we know that m-sequences of length n = q m 1 have the least complexities M ( s ) = Q ( s ) = L ( s ) = m and DeBruijn sequences of length n = q m have the least maximum-order complexity M ( s ) = m . In addition to the aforementioned observations, readers may wonder what else we know about their relations so far?
Due to the limited understanding of DeBruijn sequences, there have been only partial results for the above problem. It was well known [62] that the linear complexity of binary DeBruijn sequences of order m is between 2 m 1 + m and 2 m 1 , where both the lower and upper bound are attainable. However, there exists no binary DeBruijn sequences with linear complexity 2 m 1 + m + 1 [63]. Based on the evidence of existing results, Etzion, in his survey, made the following conjecture:
Conjecture 3.
For any integer 2 m 1 + m + 2 d 2 m 1 , there exists a binary DeBruijn sequence with minimal polynomial ( x + 1 ) d .
There is a close connection between m-sequence over F q of order m and DeBruijn sequences of order m. There have been also some works on the linear complexity of modified DeBruijn sequences, which were obtained by removing one zero from the longest run of zeros in a DeBruijn sequence. Mayhew and Golomb [64] showed that the minimal polynomial of binary modified DeBruijn sequences of order m is a product of distinct irreducible polynomials with degrees not equal to 1 and dividing m. Further results on the restrictions of the degrees were developed in [65,66,67].
When considering the fact for a binary sequence s with low quadratic complexity m, any subsequence of length slightly larger than ( m + 3 ) m 2 + 1 can be sufficient to recover the whole sequence s . However, the topic of quadratic complexity was significantly less explored. There has been little research progress on quadratic complexity, even though it was already studied in 1989. To the best of my knowledge, the only results about the quadratic complexity of DeBruijn sequences were reported by Chan and Games [23].
Proposition 14.
Given a binary DeBruijn sequence s of order m 3 , then
Q ( s ) 2 m m 2 1 .
In particular, this upper bound can be attained by the DeBruijn sequence derived from an m-sequence of order by including the all zero m-tuple.
In addition, numerical results for m = 3 , 4 , 5 , 6 led to a conjecture in [23]: the quadratic complexity of binary DeBruijn sequences of order m 3 is lower bounded by m + 2 . Three years later, this conjecture was later confirmed by Khachatrian in [68].

6.2. FSR-Based Complexities, Lempel–Ziv Complexity, Expansion Complexity and Autocorrelation

This subsection will briefly review recent works on the relations among the linear, maximum-order complexity and other significant metrics for assessing pseudo-random sequences.

6.2.1. 2-Adic Complexity

The 2-adic complexity introduced by Goresky and Klapper [22,69] is closely related to the length of a shortest feedback with carry shift register (FCSR) that generates the sequence. The theory of 2-adic complexity of periodic sequences has been well developed. Given a sequence s = s n of period n, one has
i = 0 s i 2 i = i = 0 n 1 s i 2 i 2 n 1 = A q ,
where 0 A q , gcd ( A , q ) = 1 and
q = 2 n 1 gcd 2 n 1 , i = 0 n 1 s i 2 i .
The 2-adic complexity of s is defined as Φ ( s ) = log 2 ( q ) . In the aperiodic case, the n-th 2-adic complexity, denoted by Φ 2 , n ( s ) , is the binary logarithm of
min max { | f | , | q | } : f , q Z , q odd , q i = 0 n 1 s i 2 i f ( mod 2 n ) .
There was very little work on exploring the relation between linear, quadratic and maximum-order complexities of a binary sequence and its 2-adic complexity. Until recently, it was shown [70] that the maximum-order complexity of a binary sequence s is upper bounded by its 2-adic complexity.

6.2.2. Lempel–Ziv Complexity

The Lempel–Ziv complexity of a sequence is one classical complexity measure based on pattern counting, introduced by Lempel and Ziv in 1976 [57] and later named after them. The parsing procedure in the calculation of Lempel–Ziv complexity laid the basis for the prominent Lempel–Ziv compression algorithms [71,72]. The Lempel–Ziv complexity reflects the compressibility of a sequence and thus has significant cryptographic interest.
The Lempel–Ziv complexity measures the rate at which new patterns emerge as we move along a given sequence. For a binary sequence s n = s 0 s 1 s n 1 , we split up s n into adjacent blocks. By definition, the first block consists of s 0 . If s 0 s m 1 is a union of blocks, or in other words if s m 1 is the last bit in a block, then the next block s m s m + k 1 is uniquely determined by two properties: (i) the sequence s m s m + k 2 occurs as a subsequence in s 1 s m + k 3 ; (ii) the sequence s m s m + k 1 does not occur as a subsequence in s 1 s m + k 2 . The Lempel–Ziv complexity is then the number of blocks into which s n is split up by this procedure.
Motivated by Niederreiter’s statement [31], Limniotis, Kolokotronis and Kalouptsidis explored the relation between the maximum-order complexity and Lempel–Ziv complexity of a sequence, which are both closely connected to the eigenvalue profile of the sequence. They pointed out that although the exhaustive history (which uniquely determines the Lempel–Ziv complexity) cannot fully estimate the maximum-order complexity profile and vise versa, there still exists a relationship between them in the sense that the eigenvalue profile of a sequence of given Lempel–Ziv complexity, which determines the maximum-order complexity profile, is restricted rather than arbitrary. They also established a lower bound on the compression ratio of sequences with a prescribed maximum-order complexity.

6.2.3. Expansion Complexity

In 2012, Diem introduced the notion of expansion complexity of sequences [24], in which he showed that the sequences over finite fields with optimal linear complexity proposed by Xing and Lam via function expansion [29] can be efficiently computed from a relatively short subsequence.
Let s = s 0 s 1 s 2 be a sequence over F q . For a positive integer n, the n th expansion complexity E n ( s ) is 0 if s 0 = = s n 1 = 0 and otherwise the least total degree of a nonzero polynomial h ( x , y ) = i , j h i j x i y j F q [ x , y ] with
h ( x , G ( x ) ) 0 mod x n ,
where the total degree of h ( x , y ) is given by
deg ( h ( x , y ) ) = max i , j 0 i + j x i y j is a monomial of h ( x , y ) , h i j 0 .
The expansion complexity of the sequence s is defined as
E ( s ) = sup n 1 E n ( s ) .
It can be verified that E n ( s ) E n + 1 ( s ) E n ( s ) + 1 . In particular, if h ( x , y ) is restricted to be irreducible, then the n-th irreducible expansion complexity and irreducible expansion complexity of s can be defined accordingly. The relations between the linear complexity, maximum-order complexity and expansion complexity were discussed recently in [58,73].
Proposition 15.
Let s be an ultimately periodic sequence with pre-period u, period n and linear complexity L ( s ) . Then, the irreducible expansion complexity
E * ( s ) = L ( s ) + 1 i f u = 0 L ( s ) i f u = 1 L ( s ) 1 i f u = 2 o r u > 2 , s u 1 s u + n 1
and E * ( s ) < L ( s ) 1 otherwise.
Proposition 16.
For any infinite sequence s over F q , if M n ( s ) = n k with 1 k < 2 n 2 and n > 8 , then its n th expansion complexity E n ( s ) is no more than k + 2 .

6.2.4. k-Order Correlation Measure

Let k be a positive integer. The n-th correlation measure of order k of a binary sequence s = s 0 s 1 s 2 is given by [74]
C n ( s , k ) = max u , d i = 0 u 1 ( 1 ) s i + d 1 + s i + d 2 + + s i + d k ,
where the maximum is taken over all d = ( d 1 , d 2 , , d k ) with non-negative integers 0 d 1 < d 2 < < d k and u such that u + d k < n .
The relations between the linear complexity, maximum-order complexity and correlation measure of order k were explored in [59,60,74].
Proposition 17.
Given a binary sequence s = s 0 s 1 s 2 , the n-th linear complexity and n-th correlation measure of s satisfy
L n ( s ) n max 1 k L n ( s ) + 1 C n ( s , k ) , n 1 ,
and the n-th maximum-order complexity and n-th correlation measure of s satisfy
M n ( s ) N 2 M n ( s ) + 1 max 1 k M n ( s ) + 1 C n ( s , k ) , n 1 .
The above bounds were recently improved in [60].
Proposition 18.
Given a binary sequence s = s 0 s 1 s 2 , if for some integer t, the n-th linear complexity of s satisfies
2 L n ( s ) < n 2 t ,
then for some k with 1 < k 2 t , one has
C n ( s , k ) n 2 .
In addition, if the n-th maximum-order complexity of s satisfies M n ( s ) M , then one has
C n ( s , 2 ) n 2 M + 1 .

7. Conclusions

This survey primarily focused on the complexity measures of sequences within the domain of feedback shift registers, which are efficiently computable and hold significant interest in cryptographic applications. Notable works on the computation, stochastic behavior and theoretical results of these complexities were examined to a certain technical extent. Several conjectures were revisited and new open problems were proposed. To offer a sounding overview of the research development on complexity measures, this survey also briefly reviewed the established relation between these complexities as well as their connection with other important metrics for pseudo-random sequences, including the well-known 2-adic complexity, Lempel–Ziv complexity, expansion complexity and k-order correlation measure. This survey indicates that although the study of complexity measures of randomness traces back to the 1960s, only linear complexity and maximum-order complexity are relatively well explored. Other complexity measures and their interrelations appear more intractable and require new tools, techniques and theoretical studies in future research.

Funding

This research was funded by the Research Council of Norway under Grant No. 311646.

Conflicts of Interest

The author declares no conflict of interest.

References

  1. Ristenpart, T.; Yilek, S. When good randomness goes bad: Virtual machine reset vulnerabilities and hedging deployed cryptography. In Proceedings of the Network and Distributed System Security (NDSS) Symposium, San Diego, CA, USA, 28 February–3 March 2010. [Google Scholar]
  2. Woodage, J.; Shumow, D. An analysis of NIST SP 800-90A. In Advances in Cryptology—EUROCRYPT 2019; Ishai, Y., Rijmen, V., Eds.; Springer International Publishing: Cham, Switzerland, 2019; pp. 151–180. [Google Scholar] [CrossRef]
  3. Bernstein, D.J.; Lange, T.; Niederhagen, R. Dual EC: A standardized back door. Cryptol. ePrint Arch. 2015, 767. Available online: https://eprint.iacr.org/2015/767 (accessed on 7 June 2024).
  4. Davis, H.; Green, M.D.; Heninger, N.; Ryan, K.; Suhl, A. On the possibility of a backdoor in the Micali-Schnorr generator. In Public-Key Cryptography—PKC 2024; Tang, Q., Teague, V., Eds.; Springer Nature: Cham, Switzerland, 2024; pp. 352–386. [Google Scholar] [CrossRef]
  5. Barker, E.; Kelsey, J. Recommendation for Random Number Generation Using Deterministic Random Bit Generators; Special Publication; NIST (National Institute of Standards and Technology): Washington, DC, USA, 2015. [Google Scholar] [CrossRef]
  6. Mukhopadhyay, S.; Sarkar, P. Application of LFSRsfor parallel sequence generation in cryptologic algorithms. In Computational Science and Its Applications—ICCSA 2006; Gavrilova, M., Gervasi, O., Kumar, V., Tan, C.J.K., Taniar, D., Laganá, A., Mun, Y., Choo, H., Eds.; Springer: Berlin/Heidelberg, Germany, 2006; pp. 436–445. [Google Scholar] [CrossRef]
  7. Kuznetsov, A.A.; Potii, O.V.; Poluyanenko, N.A.; Gorbenko, Y.I.; Kryvinska, N. Areas of Application for Nonlinear Shift Registers in PRS Generators. In Stream Ciphers in Modern Real-Time IT Systems: Analysis, Design and Comparative Studies; Springer International Publishing: Cham, Switzerland, 2022; pp. 295–318. [Google Scholar] [CrossRef]
  8. Mises, R.V. Grundlagen der Wahrscheinlichkeitsrechnung. Math. Z. 1919, 5, 52–99. [Google Scholar] [CrossRef]
  9. Church, A. On the concept of a random sequence. Bull. Am. Math. Soc. 1940, 46, 130–135. [Google Scholar] [CrossRef]
  10. Golomb, S.W. Shift Register Sequences: Secure and Limited-Access Code Generators, Efficiency Code Generators, Prescribed Property Generators, Mathematical Models, 3rd Revised ed.; World Scientific Publishing Company: Singapore, 2017. [Google Scholar]
  11. Kolmogorov, A.N. On tables of random numbers. Theor. Comput. Sci. 1998, 207, 387–395. [Google Scholar] [CrossRef]
  12. Martin-Löf, P. The definition of random sequences. Inf. Control 1966, 9, 602–619. [Google Scholar] [CrossRef]
  13. Schnorr, C. Process complexity and effective random tests. J. Comput. Syst. Sci. 1973, 7, 376–388. [Google Scholar] [CrossRef]
  14. Knuth, D.E. The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 3rd ed.; Addison-Wesley: Boston, MA, USA, 1997. [Google Scholar]
  15. Berlekamp, E.R. Algebraic Coding Theory; World Scientific Publishing Company: Singapore, 1968. [Google Scholar] [CrossRef]
  16. Massey, J. Shift-register synthesis and BCH decoding. IEEE Trans. Inf. Theory 1969, 15, 122–127. [Google Scholar] [CrossRef]
  17. Rueppel, R.A. Linear complexity and random sequences. In Advances in Cryptology—EUROCRYPT’85; Pichler, F., Ed.; Springer: Berlin/Heidelberg, Germany, 1986; pp. 167–188. [Google Scholar] [CrossRef]
  18. Niederreiter, H. The probabilistic theory of linear complexity. In Advances in Cryptology— EUROCRYPT’88; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1988; pp. 191–209. [Google Scholar] [CrossRef]
  19. Niederreiter, H. Linear complexity and related complexity measures for sequences. In Progress in Cryptology—INDOCRYPT 2003; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2003; pp. 1–17. [Google Scholar] [CrossRef]
  20. Bassham, L.E.; Rukhin, A.L.; Soto, J.; Nechvatal, J.R.; Smid, M.E.; Leigh, S.D.; Levenson, M.; Vangel, M.; Heckert, N.A.; Banks, D.L. A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications; NIST: Washington, DC, USA, 2010. [Google Scholar]
  21. Jansen, C.J.A. Investigations on Nonlinear Streamcipher Systems: Construction and Evaluation Methods. Ph.D. Thesis, Delft University of Technology, Delft, The Netherlands, 1989. [Google Scholar]
  22. Klapper, A.; Goresky, M. Feedback shift registers, 2-adic span, and combiners with memory. J. Cryptol. 1997, 10, 111–147. [Google Scholar] [CrossRef]
  23. Chan, A.H.; Games, R.A. On the quadratic spans of DeBruijn sequences. IEEE Trans. Inf. Theory 1990, 36, 822–829. [Google Scholar] [CrossRef]
  24. Diem, C. On the use of expansion series for stream ciphers. LMS J. Comput. Math. 2012, 15, 326–340. [Google Scholar] [CrossRef]
  25. Meidl, W.; Niederreiter, H. Linear complexity, k-error linear complexity, and the discrete Fourier transform. J. Complex. 2002, 18, 87–103. [Google Scholar] [CrossRef]
  26. Topuzoğlus, A.; Winterhof, A. Pseudorandom Sequences. In Topics in Geometry, Coding Theory and Cryptography; Garcia, A., Stichtenoth, H., Eds.; Springer: Berlin/Heidelberg, Germany, 2006; pp. 135–166. [Google Scholar] [CrossRef]
  27. Gustavson, F.G. Analysis of the Berlekamp-Massey linear feedback shift-register synthesis algorithm. IBM J. Res. Dev. 1976, 20, 204–212. [Google Scholar] [CrossRef]
  28. Dornstetter, J. On the equivalence between Berlekamp’s and Euclid’s algorithms. IEEE Trans. Inf. Theory 1987, 33, 428–431. [Google Scholar] [CrossRef]
  29. Xing, C.; Lam, K.Y. Sequences with almost perfect linear complexity profiles and curves over finite fields. IEEE Trans. Inf. Theory 1999, 45, 1267–1270. [Google Scholar] [CrossRef]
  30. Niederreiter, H.; Vielhaber, M. An algorithm for shifted continued fraction expansions in parallel linear time. Theor. Comput. Sci. 1999, 226, 93–104. [Google Scholar] [CrossRef]
  31. Niederreiter, H. Some computable complexity measures for binary sequences. In SEquences and Their Applications (SETA); Springer: London, UK, 1999; pp. 67–78. [Google Scholar] [CrossRef]
  32. Jungnickel, D. Finite Fields: Structure and Arithmetics; B.I. Wissenschaftsverlag: Berlin, Germany, 1993. [Google Scholar]
  33. Massey, J.L.; Serconek, S. Linear complexity of periodic sequences: A general theory. In Advances in Cryptology—CRYPTO’96; Koblitz, N., Ed.; Springer: Berlin/Heidelberg, Germany, 1996; pp. 358–371. [Google Scholar]
  34. Massey, J.L.; Serconek, S. A Fourier transform approach to the linear complexity of nonlinearly filtered sequences. In Advances in Cryptology—CRYPTO’94; Springer: Berlin/Heidelberg, Germany, 1994; pp. 332–340. [Google Scholar] [CrossRef]
  35. Blahut, R.E. Theory and Practice of Error Control Codes; Addison-Wesley Publishing Company: Boston, MA, USA, 1983. [Google Scholar]
  36. Selmer, E.S. Linear Recurrence Relations over Finite Fields; Department of Informatics, University of Bergen: Bergen, Norway, 1966. [Google Scholar]
  37. Ding, C.; Hesseseth, T.; Shan, W. On the linear complexity of Legendre sequences. IEEE Trans. Inf. Theory 1998, 44, 1276–1278. [Google Scholar] [CrossRef]
  38. Meidl, W.; Winterhof, A. Lower bounds on the linear complexity of the discrete logarithm in finite fields. IEEE Trans. Inf. Theory 2001, 47, 2807–2811. [Google Scholar] [CrossRef]
  39. Helleseth, T.; Kim, S.H.; No, J.S. Linear complexity over GF(p) and trace representation of Lempel-Cohn-Eastman sequences. In Proceedings of the IEEE International Symposium on Information Theory, Lausanne, Switzerland, 30 June–5 July 2002; IEEE: Piscataway, NJ, USA, 2003. [Google Scholar] [CrossRef]
  40. Shparlinski, I. Cryptographic Applications of Analytic Number Theory; Birkhäuser: Basel, Switzerland, 2003. [Google Scholar]
  41. Rueppel, R.A. Analysis and Design of Stream Ciphers; Springer: Berlin/Heidelberg, Germany, 1986. [Google Scholar] [CrossRef]
  42. Meidl, W.; Niederreiter, H. On the expected value of the linear complexity and the k-error linear complexity of periodic sequences. IEEE Trans. Inf. Theory 2002, 48, 2817–2825. [Google Scholar] [CrossRef]
  43. Chan, A.H.; Games, R.A. On the quadratic spans of periodic sequences. In Advances in Cryptology — CRYPTO’89; Lecture Notes in Computer Science, Proceedings; Springer: Berlin/Heidelberg, Germany, 1990; pp. 82–89. [Google Scholar] [CrossRef]
  44. Youssef, A.; Gong, G. On the quadratic span of binary sequences. In Proceedings of the 20th Biennial Symposium on Communications, Kingston, ON, Canada, 28–31 May 2000; pp. 159–163. [Google Scholar]
  45. Rizomiliotis, P.; Kolokotronis, N.; Kalouptsidis, N. On the quadratic span of binary sequences. IEEE Trans. Inf. Theory 2005, 51, 1840–1848. [Google Scholar] [CrossRef]
  46. Jansen, C.; Boekee, D. The shortest feedback shift register that can generate a given sequence. In Advances in Cryptology—CRYPTO’89; Lecture Notes in Computer Science, Proceedings; Springer: Berlin/Heidelberg, Germany, 1990; pp. 90–99. [Google Scholar] [CrossRef]
  47. Jansen, C. The maximum order complexity of sequence ensembles. In Advances in Cryptology—EUROCRYPT ’91; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1991; pp. 153–159. [Google Scholar] [CrossRef]
  48. Blumer, A.; Blumer, J.; Ehrenfeucht, A.; Haussler, D.; McConnell, R.M. Linear size finite automata for the set of all subwords of a word—An outline of results. Bull. EATCS 1983, 21, 12–20. [Google Scholar]
  49. Rizomiliotis, P.; Kalouptsidis, N. Results on the nonlinear span of binary sequences. IEEE Trans. Inf. Theory 2005, 51, 1555–1563. [Google Scholar] [CrossRef]
  50. Limniotis, K.; Kolokotronis, N.; Kalouptsidis, N. On the nonlinear complexity and Lempel–Ziv complexity of finite length sequences. IEEE Trans. Inf. Theory 2007, 53, 4293–4302. [Google Scholar] [CrossRef]
  51. Erdmann, D.; Murphy, S. An approximate distribution for the maximum order complexity. Des. Codes Cryptogr. 1997, 10, 325–339. [Google Scholar] [CrossRef]
  52. Luo, Y.; Xing, C.; You, L. Construction of sequences with high nonlinear complexity from function fields. IEEE Trans. Inf. Theory 2017, 63, 7646–7650. [Google Scholar] [CrossRef]
  53. Liang, S.; Zeng, X.; Xiao, Z.; Sun, Z. Binary sequences with length n and nonlinear complexity not less than n/2. IEEE Trans. Inf. Theory 2023, 69, 8116–8125. [Google Scholar] [CrossRef]
  54. Rizomiliotis, P. Constructing periodic binary sequences with maximum nonlinear span. IEEE Trans. Inf. Theory 2006, 52, 4257–4261. [Google Scholar] [CrossRef]
  55. Sun, Z.; Zeng, X.; Li, C.; Helleseth, T. Investigations on periodic sequences with maximum nonlinear complexity. IEEE Trans. Inf. Theory 2017, 63, 6188–6198. [Google Scholar] [CrossRef]
  56. Yuan, Q.; Li, C.; Zeng, X.; Helleseth, T.; He, D. Further investigations on nonlinear complexity of periodic binary sequences. IEEE Trans. Inf. Theory 2024, 1. [Google Scholar] [CrossRef]
  57. Lempel, A.; Ziv, J. On the complexity of finite sequences. IEEE Trans. Inf. Theory 1976, 22, 75–81. [Google Scholar] [CrossRef]
  58. Merai, L.; Niederreiter, H.; Winterhof, A. Expansion complexity and linear complexity of sequences over finite fields. Cryptogr. Commun. 2017, 9, 501–509. [Google Scholar] [CrossRef]
  59. Işık, L.; Winterhof, A. Maximum-order complexity and correlation measures. Cryptography 2017, 1, 7. [Google Scholar] [CrossRef]
  60. Chen, Z.; Gómez, A.I.; Gómez-Pérez, D.; Tirkel, A. Correlation measure, linear complexity and maximum order complexity for families of binary sequences. Finite Fields Their Appl. 2022, 78, 101977. [Google Scholar] [CrossRef]
  61. Niederreiter, H. Periodic sequences with large k-error linear complexity. IEEE Trans. Inf. Theory 2003, 49, 501–505. [Google Scholar] [CrossRef]
  62. Chan, A.H.; Games, R.A.; Key, E.L. On the complexities of DeBruijn sequences. J. Comb. Theory A 1982, 33, 233–246. [Google Scholar] [CrossRef]
  63. Games, R.A. There are no DeBruijn sequences of span n with complexity 2n-1+n+1. J. Comb. Theory A 1983, 34, 248–251. [Google Scholar] [CrossRef]
  64. Mayhew, G.; Golomb, S. Linear spans of modified DeBruijn sequences. IEEE Trans. Inf. Theory 1990, 36, 1166–1167. [Google Scholar] [CrossRef]
  65. Kyureghyan, G.M. Minimal polynomials of the modified DeBruijn sequences. Discret. Appl. Math. 2008, 156, 1549–1553. [Google Scholar] [CrossRef]
  66. Dong, Y.J.; Tian, T.; Qi, W.F.; Wang, Z.X. New results on the minimal polynomials of modified DeBruijn sequences. Finite Fields Their Appl. 2019, 60, 101583. [Google Scholar] [CrossRef]
  67. Wang, H.Y.; Zheng, Q.X.; Wang, Z.X.; Qi, W.F. The minimal polynomials of modified DeBruijn sequences revisited. Finite Fields Their Appl. 2020, 68, 101735. [Google Scholar] [CrossRef]
  68. Khachatrian, L.H. The lower bound of the quadratic spans of DeBruijn sequences. Des. Codes Cryptogr. 1993, 3, 29–32. [Google Scholar] [CrossRef]
  69. Klapper, A.; Goresky, M. Cryptanalysis based on 2-adic rational approximation. In Advances in Cryptology—CRYPTO’95; Springer: Berlin/Heidelberg, Germany, 1995; pp. 262–273. [Google Scholar] [CrossRef]
  70. Chen, Z.; Chen, Z.; Obrovsky, J.; Winterhof, A. Maximum-order complexity and 2-adic complexity. arXiv 2023, arXiv:2309.12769. [Google Scholar] [CrossRef]
  71. Ziv, J.; Lempel, A. A universal algorithm for sequential data compression. IEEE Trans. Inf. Theory 1977, 23, 337–343. [Google Scholar] [CrossRef]
  72. Ziv, J.; Lempel, A. Compression of individual sequences via variable-rate coding. IEEE Trans. Inf. Theory 1978, 24, 530–536. [Google Scholar] [CrossRef]
  73. Sun, Z.; Zeng, X.; Li, C.; Zhang, Y.; Yi, L. The expansion complexity of ultimately periodic sequences over finite fields. IEEE Trans. Inf. Theory 2021, 67, 7550–7560. [Google Scholar] [CrossRef]
  74. Brandstätter, N.; Winterhof, A. Linear complexity profile of binary sequences with small correlation measure. Period. Math. Hung. 2006, 52, 1–8. [Google Scholar] [CrossRef]
Figure 1. An m-stage FSR with feedback function f.
Figure 1. An m-stage FSR with feedback function f.
Cryptography 08 00025 g001
Figure 2. Recursive calculation of the quadratic complexity profile of s .
Figure 2. Recursive calculation of the quadratic complexity profile of s .
Cryptography 08 00025 g002
Table 1. Endpoints for s = 110100 .
Table 1. Endpoints for s = 110100 .
s 110100
endpoints0123456
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, C. A Survey on Complexity Measures for Pseudo-Random Sequences. Cryptography 2024, 8, 25. https://doi.org/10.3390/cryptography8020025

AMA Style

Li C. A Survey on Complexity Measures for Pseudo-Random Sequences. Cryptography. 2024; 8(2):25. https://doi.org/10.3390/cryptography8020025

Chicago/Turabian Style

Li, Chunlei. 2024. "A Survey on Complexity Measures for Pseudo-Random Sequences" Cryptography 8, no. 2: 25. https://doi.org/10.3390/cryptography8020025

APA Style

Li, C. (2024). A Survey on Complexity Measures for Pseudo-Random Sequences. Cryptography, 8(2), 25. https://doi.org/10.3390/cryptography8020025

Article Metrics

Back to TopTop