# Randomness Analysis for the Generalized Self-Shrinking Sequences

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

## 3. Preliminaries

#### 3.1. PN-Sequences

**Lemma**

**1.**

**Proof.**

#### 3.2. Modified Self-Shrinking Generator (MSSG)

**Example**

**1.**

#### 3.3. The Generalized Self-Shrinking Generator (GSSG)

**Example**

**2.**

## 4. The t-Modified Self-Shrinking Generator

#### Relationship between t-Modified Self-Shrunken Sequences and Generalized Self-Shrunken Sequences (GSS-Sequences)

**Theorem**

**1.**

**Proof.**

**Corollary**

**1.**

**Proof.**

**Theorem**

**2.**

**Proof.**

**Lemma**

**2.**

**Proof.**

**Theorem**

**3.**

**Proof.**

**Example**

**3.**

**Definition**

**1**

**.**: Let ${\mathbb{Z}}_{{2}^{L}}=\{0,1,2,\dots ,{2}^{L}-1\}$. We define the equivalence relation R between ${t}_{1},{t}_{2}\in {\mathbb{Z}}_{{2}^{L}}$ as follows: ${t}_{1}\phantom{\rule{4pt}{0ex}}R\phantom{\rule{4pt}{0ex}}{t}_{2}$ if there exists an integer j, $0\le j\le L-1$, such that

**Example**

**4.**

**Theorem**

**4.**

**Proof.**

**Example**

**5.**

**Theorem**

**5.**

**Proof.**

**Remark**

**1.**

## 5. Statistical Randomness Analysis

#### 5.1. Graphical Testing

**Definition**

**2.**

Shannon entropy (measured) | = | $7.9999$ bits per octet. |

Min-entropy (measured) | = | $7.9457$ bits per octet, |

**Definition**

**3.**

Lyapunov Hamming exponent, ideal | = | 4. |

Lyapunov Hamming exponent, real | = | 4. |

Absolute deviation from the ideal | = | $-1.0014\times {10}^{-5}.$ |

#### 5.2. Diehard Battery of Tests

#### 5.3. FIPS Test 140-2. Security Requirements for Cryptographic Modules

- LONG RUNS TEST(PRS): Passed. There are no runs of more than 25 equal bits.
- MONOBIT TEST(PRS): Passed. The test is passed if $(9725<\mathrm{number}\phantom{\rule{4.pt}{0ex}}\mathrm{of}\phantom{\rule{4.pt}{0ex}}\mathrm{ones}<10275)$. Our result was: 9954.
- X= POKER TEST(PRS): Passed. The test is passed if $2.16<X<46.17;$. Our result was: $X=10.0736$.
- RUNS TEST(PRS): Passed. The test is passed if the runs (for both the runs of zeros, red line, and the runs of ones, blue line) that occur (of lengths 1 through 6) are each within the corresponding interval specified in the Figure 12 by the green line.

#### 5.4. Lempel-Ziv Compression Test

## 6. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Bhowmick, A.; Sinha, N.; Arjunan, R.V.; Kishore, B. Permutation-substitution architecture based image encryption algorithm using middle square and RC4 PRNG. In Proceedings of the 2017 International Conference on Inventive Systems and Control (ICISC), Coimbatore, India, 19–20 January 2017; pp. 1–6. [Google Scholar]
- Wortman, P.; Yan, W.; Chandy, J.; Tehranipoor, F. P2M-based security model: Security enhancement using combined puf and PRNG models for authenticating consumer electronic devices. IET Comput. Digit. Tech.
**2018**, 12, 289–296. [Google Scholar] [CrossRef] - Bikram, P.; Trivedi, G.; Jan, P.; Nemec, Z. Efficient PRNG design and implementation for various high throughput cryptographic and low power security applications. In Proceedings of the 2019 29th International Conference Radioelektronika (RADIOELEKTRONIKA), Pardubice, Czech Republic, 16–18 April 2019; pp. 1–6. [Google Scholar]
- Moufek, H.; Guenda, K.; Gulliver, T.A. A new variant of the McEliece cryptosystem based on QC-LDPC and QC-MDPC codes. IEEE Commun. Lett.
**2017**, 21, 714–717. [Google Scholar] [CrossRef] - Gong, G.; Helleseth, T.; Kumar, P.V. Solomon W. Golomb–Mathematician, Engineer, and Pioneer. IEEE Trans. Inf. Theory
**2018**, 64, 2844–2857. [Google Scholar] [CrossRef] - FIPS PUB 140-2. Security Requirements for Cryptographic Modules. In Federal Information Processing Standards Publication 140-2; U.S. Department of Commerce; NIST, National Technical Information Service: Springfield, VA, USA, 2001.
- Marsaglia, G. The Marsaglia Random Number CDROM including the DIehard Battery of Tests of Randomness; Florida State University: Tallahassee, FL, USA, 1995; Available online: http://www.stat.fsu.edu/pub/diehard (accessed on 3 November 2019).
- National Institute of Standards and Technology. A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications; NIST800-22, SP 800-22Rev 1a; U.S. Department of Commerce: Gaithersburg, MD, USA, 2010.
- Orúe López, A.B. Contribución al Estudio del Criptoanálisis y Diseño de los Criptosistemas Caóticos. Ph.D. Thesis, Universidad Politécnica de Madrid, Escuela Técnica Superior de Ingenieros de Telecomunicación, Madrid, Spain, 2013. [Google Scholar]
- Orúe, A.B.; Fúster-Sabater, A.; Ferná\ndez, V.; Montoya, F.; Hernández, L.; Martín, A. Herramientas gráficas de la criptografía caótica para el análisis de la calidad de secuencias pseudoaleatorias. In Proceedings of the Actas de la XIV Reunión Espan˜ola sobre Criptología y Seguridad de la Información, RECSI XIV, Menorca, Illes Balears, Spain, 26–28 October 2016; pp. 180–185. [Google Scholar]
- Hu, Y.; Xiao, G. Generalized self-shrinking generator. IEEE Trans. Inf. Theory
**2004**, 50, 714–719. [Google Scholar] [CrossRef] - Klein, A. Linear Feedback Shift Registers. In Stream Ciphers; Springer: London, UK, 2013; Chapter 2; pp. 1–13. [Google Scholar]
- Coppersmith, D.; Krawczyk, H.; Mansour, Y. The shrinking generator. In Proceedings of the 13th Annual International Cryptology Conference on Advances in Cryptology (CRYPTO ’93), Santa Barbara, CA, USA, 22–26 August 1993; Springer: Berlin/Heidelberg, Germany, 1994; pp. 22–39. [Google Scholar]
- Meier, W.; Staffelbach, O. The self-shrinking generator. In Advances in Cryptology, Proceedings of EUROCRYPT 1994; Cachin, C., Camenisch, J., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1984; Volume 950, pp. 205–214. [Google Scholar]
- Dong, L.; Zeng, Y.; Hu, Y. F-gss: A novel fcsr-based keystream generator. In Proceedings of the First International Conference on Information Science and Engineering, Nanjing, China, 26–28 December 2009; pp. 1737–1740. [Google Scholar]
- Kanso, A. Modified self-shrinking generator. Comput. Electr. Eng.
**2010**, 36, 993–1001. [Google Scholar] [CrossRef] - Berzina, I.; Bets, R.; Buls, J.; Cers, E.; Kulesa, L. On a non-periodic shrinking generator. In Proceedings of the 2011 13th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, Timisoara, Romania, 26–29 September 2011; pp. 348–354. [Google Scholar]
- Tasheva, A.T.; Tasheva, Z.N.; Milev, A.P. Generalization of the self-shrinking generator in the Galois Field GF(p
^{n}). Adv. Artif. Intell.**2011**, 2011. [Google Scholar] [CrossRef] - Tasheva, A.; Nakov, O.; Tasheva, Z. About balance property of the p-ary generalized self-shrinking generator sequence. In Proceedings of the 14th International Conference on Computer Systems and Technologies (CompSysTech ’13), Ruse, Bulgaria, 28–29 June 2013; ACM: New York, NY, USA, 2013; pp. 299–306. [Google Scholar]
- Erkek, E.; Tuncer, T. The implementation of asg and sg random number generators. In Proceedings of the 2013 International Conference on System Science and Engineering (ICSSE), Budapest, Hungary, 4–6 July 2013; pp. 363–367. [Google Scholar]
- Boztas, S.; Alamer, A. Statistical dependencies in the self-shrinking generator. In Proceedings of the 2015 Seventh International Workshop on Signal Design and its Applications in Communications (IWSDA), Bengaluru, India, 14–18 September 2015; pp. 42–46. [Google Scholar]
- Savova-Tasheva, Z.; Tasheva, A. Analysis of keystream produced by generalized shrinking multiplexing generator controlled by ternary m-sequence. In Proceedings of the 9th Balkan Conference on Informatics (BCI’19), Sofia, Bulgaria, 26–28 September 2019; ACM: New York, NY, USA, 2019; pp. 1–7. [Google Scholar]
- Gergely, A.M.; Crainicu, B. A succinct survey on (pseudo)-random number generators from a cryptographic perspective. In Proceedings of the 2017 5th International Symposium on Digital Forensic and Security (ISDFS), Tirgu Mures, Romania, 26–28 April 2017; pp. 1–6. [Google Scholar]
- Bikram, P.; Khobragade, A.; Sai, S.; Goswami, S.S.P.; Dutt, S.; Trivedi, G. Design and implementation of low-power high-throughput PRNGs for security applications. In Proceedings of the 2019 32nd International Conference on VLSI Design and 2019 18th International Conference on Embedded Systems, Delhi, NCR, India, 5–9 January 2019; pp. 535–536. [Google Scholar]
- Prokofiev, A.O.; Chirkin, A.V.; Bukharov, V.A. Methodology for quality evaluation of PRNG, by investigating distribution in a multidimensional space. In Proceedings of the 2018 IEEE Conference of Russian Young Researchers in Electrical and Electronic Engineering (EIConRus), Moscow, Russia, 29 January–1 February 2018; pp. 355–357. [Google Scholar]
- Dalai, D.K.; Maitra, S.; Pal, S.; Roy, D. Distinguisher and non-randomness of grain-v1 for 112, 114 and 116 initialisation rounds with multiple-bit difference in ivs. IET Inf. Secur.
**2019**, 13, 603–613. [Google Scholar] [CrossRef] - Avaroglu, E.; Çavdar, T. Quantum random number generators. In Proceedings of the 2018 International Conference on Artificial Intelligence and Data Processing (IDAP), Malatya, Turkey, 28–30 September 2018; pp. 1–4. [Google Scholar]
- Zhu, S.; Ma, Y.; Li, X.; Yang, J.; Lin, J.; Jing, J. On the analysis and improvement of min-entropy estimation on time-varying data. IEEE Trans. Inf. Forensics Secur.
**2019**, 1. [Google Scholar] [CrossRef] - Liu, Y.; Tong, X. Hyperchaotic system-based pseudorandom number generator. IET Inf. Secur.
**2016**, 10, 433–441. [Google Scholar] [CrossRef] - Cardell, S.D.; Fúster-Sabater, A. Discrete linear models for the self-shrunken sequences. Finite Fields Their Appl.
**2017**, 47, 222–241. [Google Scholar] [CrossRef] - Cardell, S.D.; Fúster-Sabater, A. The t-Modified Self-shrinking Generator. In Computational Science—ICCS 2018, Proceedings of the International Conference on Computational Science (ICCS 2018), Wuxi, China, 11–13 June 2018; Shi, Y., Fu, H., Tian, Y., Krzhizhanovskaya, V.V., Lees, M.H., Dongarra, J., Sloot, P.M.A., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2018; Volume 10860, pp. 653–663. [Google Scholar]
- Golomb, S.W. Shift Register-Sequences; Aegean Park Press: Laguna Hill, CA, USA, 1982. [Google Scholar]
- Fúster-Sabater, A. Linear Solutions for Irregularly Decimated Generators of Cryptographic Sequences. Int. J. Nonlinear Sci. Numer. Simul.
**2014**, 15, 377–385. [Google Scholar] [CrossRef] - Todorova, M.; Stoyanov, B.; Szczypiorski, K.; Kordov, K. SHAH: Hash Function based on Irregularly Decimated Chaotic Map. Int. J. Electron. Telecommun.
**2018**, 64, 457–465. [Google Scholar] [CrossRef] - Lidl, R.; Niederreiter, H. Introduction to Finite Fields and Their Applications; Cambridge University Press: New York, NY, USA, 1986. [Google Scholar]
- Alvarez, G.; Montoya, F.; Romera, M.; Pastor, G. Cryptanalyzing an improved security modulated chaotic encryption scheme using ciphertext absolute value. Chaos Soliton. Fract.
**2005**, 23, 1749–1756. [Google Scholar] [CrossRef] - Paar, C.; Pelzl, J. Understanding Cryptography; Springer: Berlin/Heidelberg, Germany, 2010. [Google Scholar]
- Massey, J.L. Shift-register synthesis and BCH decoding. IEEE Trans. Inf. Theor.
**1969**, 15, 122–127. [Google Scholar] [CrossRef] - Rueppel, R.A. Linear Complexity and Random Sequences. In Advances in Cryptology—EUROCRYPT 1985; Pichler, F., Ed.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1986; Volume 219, pp. 167–188. [Google Scholar]
- Killmann, W.; Schindler, W. AIS 20/AIS 31, A Proposal for: Functionality Classes for Random Number Generators; Bundesamt für Sicherheit in der Informationstechnik (BSI): Frankfurt am Main, Germany, 2011. [Google Scholar]
- Romera, M. Técnica de los Sistemas Dinámicos Discretos; 27 CSIC, Madrid II-C; Textos Universitarios: Madrid, Spain, 1997. [Google Scholar]
- Peitgen, H.O.; Jurgens, H.; Saupe, D. Chaos and Fractals: New Frontiers of Science; Springer: New York, NY, USA, 2004. [Google Scholar]
- Barnsley, M. Fractals Everywhere, 2nd ed.; Dover Publications, Inc.: Mineola, NY, USA, 2012. [Google Scholar]
- Cormen, T.H.; Leiserson, C.E.; Rivest, R.L.; Stein, C. Introduction to Algorithms, 2nd ed.; The MIT Press: Cambridge, MA, USA, 2001. [Google Scholar]

**Figure 2.**Return map of GSS-sequence of ${2}^{23}$ bits. It provides no information about the parameters of the generator.

**Figure 3.**Return maps of imperfect generators. The parameter values can be deduced by inspection of the return map.

**Figure 7.**Chaos game representations of imperfect generators. The observed patterns indicate a lack of randomness in the sequence.

**Figure 10.**Distribution of samples with equal values a function of their distance: GSS-sequence (red) and a perfect random sequence (green).

**Figure 11.**Distribution of the first collisions (blue bars) and collision probability density distribution function (red line).

**Figure 12.**Run test for a GSS-sequence with characteristic polynomials of degree $\le 27$. Observe that the test is passed both for the runs of zeros (red line) and for the runs of ones (blue line) since they all fall within the corresponding range specified by the green line.

Algorithm 1: Constructing the family of GSS-sequences |

Input: Primitive polynomial $p\left(x\right)$ and initial state a |

01: Compute the PN-sequence $\left\{{a}_{i}\right\}$. |

02: Set $T={2}^{L}-1$ the period of the PN-sequence |

03: for $p=1\mathbf{to}T$ do |

04: Set $\left\{{v}_{i}\right\}$ the shifted version of $\left\{{a}_{i}\right\}$ by p positions |

06: for $k=0$ to $T-1$ do |

06 Initialize sequence $\left\{{s}_{j}^{p}\right\}$ |

07: if ${a}_{k}=1$ do |

08: Add ${v}_{k}$ as new bit of the sequence $\left\{{s}_{j}^{p}\right\}$ |

09: endif |

10: end for |

11: end for |

Output: $\left\{{s}_{j}^{p}\right\}$ GSS-sequences, $p=1,\dots ,T$. |

**Table 2.**Family of Generalized Self-Shrunken sequences generated by $p\left(x\right)=1+{x}^{3}+{x}^{4}$.

G | $\mathcal{G}$ | $\left\{{\mathit{v}}_{\mathit{i}}\right\}$ Sequence | Generalized Sequence |
---|---|---|---|

0 | 0000 | 000000000000000 | 00000000 |

1 | 0001 | 000111101011001 | 00011011 |

2 | 0010 | 001111010110010 | 00111100 |

3 | 0011 | 001000111101011 | 00100111 |

4 | 0100 | 011110101100100 | 01110010 |

5 | 0101 | 011001000111101 | 01101001 |

6 | 0110 | 010001111010110 | 01001110 |

7 | 0111 | 010110010001111 | 01010101 |

8 | 1000 | 111101011001000 | 11111111 |

9 | 1001 | 111010110010001 | 11100100 |

10 | 1010 | 110010001111010 | 11000011 |

11 | 1011 | 110101100100011 | 11011000 |

12 | 1100 | 100011110101100 | 10001101 |

13 | 1101 | 100100011110101 | 10010110 |

14 | 1110 | 101100100011110 | 10110001 |

15 | 1111 | 101011001000111 | 10101010 |

111101011001000 |

Algorithm 2: Constructing the t-MSS-sequence |

Input: Primitive polynomial $p\left(x\right)$, initial state a and t |

01: Compute the PN-sequence $\left\{{a}_{i}\right\}$. |

02: Set $T={2}^{L}-1$ the period of the PN-sequence |

03: for $k=0$ to $T-1$ do |

04 Initialize sequence $\left\{{s}_{j}\right\}$ |

05: if ${\sum}_{j=0}^{t-2}{a}_{t\xb7k+j}=1$ do |

06: Add ${a}_{t\xb7k+(t-1)}$ as new bit of the sequence $\left\{{s}_{j}\right\}$ |

07: endif |

08: end for |

Output:
$\left\{{s}_{j}\right\}$ t-MSS-sequence. |

t | t-MSS-Sequence | LC | p(x) |
---|---|---|---|

2 | 1101100110100001 | 13 | $1+{x}^{2}+{x}^{5}$ |

3 | 1100100101110010 | 12 | $1+{x}^{2}+{x}^{3}+{x}^{4}+{x}^{5}$ |

4 | 1000111001011100 | 13 | $1+{x}^{2}+{x}^{5}$ |

5 | 1000111011000101 | 13 | $1+x+{x}^{2}+{x}^{4}+{x}^{5}$ |

6 | 0100111011011000 | 13 | $1+{x}^{2}+{x}^{3}+{x}^{4}+{x}^{5}$ |

7 | 0001011111001010 | 12 | $1+x+{x}^{2}+{x}^{3}+{x}^{5}$ |

8 | 0110101111010000 | 12 | $1+{x}^{2}+{x}^{5}$ |

9 | 1111000001011010 | 10 | $1+x+{x}^{2}+{x}^{4}+{x}^{5}$ |

10 | 0110001001011110 | 13 | $1+x+{x}^{2}+{x}^{4}+{x}^{5}$ |

11 | 0011010010110011 | 13 | $1+x+{x}^{3}+{x}^{4}+{x}^{5}$ |

12 | 1010000101111100 | 12 | $1+{x}^{2}+{x}^{3}+{x}^{4}+{x}^{5}$ |

13 | 0010011001001111 | 13 | $1+x+{x}^{3}+{x}^{4}+{x}^{5}$ |

14 | 1001000110111100 | 13 | $1+x+{x}^{2}+{x}^{3}+{x}^{5}$ |

15 | 1110010000110110 | 13 | $1+{x}^{3}+{x}^{5}$ |

16 | 1101000010100111 | 12 | $1+{x}^{2}+{x}^{5}$ |

17 | 0100111110100001 | 12 | $1+{x}^{2}+{x}^{3}+{x}^{4}+{x}^{5}$ |

18 | 1111010011001000 | 13 | $1+x+{x}^{2}+{x}^{4}+{x}^{5}$ |

19 | 0111101011000001 | 12 | $1+x+{x}^{2}+{x}^{3}+{x}^{5}$ |

20 | 1110011000110100 | 13 | $1+x+{x}^{2}+{x}^{4}+{x}^{5}$ |

21 | 0101111100001010 | 10 | $1+x+{x}^{3}+{x}^{4}+{x}^{5}$ |

22 | 1001100001011011 | 13 | $1+x+{x}^{3}+{x}^{4}+{x}^{5}$ |

23 | 0001011011011010 | 11 | $1+{x}^{3}+{x}^{5}$ |

24 | 0110011110100100 | 13 | $1+{x}^{2}+{x}^{3}+{x}^{4}+{x}^{5}$ |

25 | 0011011011100100 | 13 | $1+x+{x}^{2}+{x}^{3}+{x}^{5}$ |

26 | 1100011001110010 | 13 | $1+x+{x}^{3}+{x}^{4}+{x}^{5}$ |

27 | 0010111100011100 | 11 | $1+{x}^{3}+{x}^{5}$ |

28 | 0111000100111010 | 13 | $1+x+{x}^{2}+{x}^{3}+{x}^{5}$ |

29 | 1010000111000111 | 11 | $1+{x}^{3}+{x}^{5}$ |

30 | 1010101010101010 | 2 | $1+{x}^{3}+{x}^{5}$ |

${\mathit{C}}_{\mathit{i}}$ | ${\mathit{P}}_{{\mathit{C}}_{\mathit{i}}}\left(\mathit{x}\right)$ |
---|---|

${C}_{1}$ | $1+{x}^{2}+{x}^{5}$ |

${C}_{3}$ | $1+{x}^{2}+{x}^{3}+{x}^{4}+{x}^{5}$ |

${C}_{5}$ | $1+x+{x}^{2}+{x}^{4}+{x}^{5}$ |

${C}_{7}$ | $1+x+{x}^{2}+{x}^{3}+{x}^{5}$ |

${C}_{11}$ | $1+x+{x}^{3}+{x}^{4}+{x}^{5}$ |

${C}_{15}$ | $1+{x}^{3}+{x}^{5}$ |

${\mathit{C}}_{\mathit{i}}$ | ${\mathit{P}}_{{\mathit{C}}_{\mathit{i}}}\left(\mathit{x}\right)$ |
---|---|

${C}_{1}$ | $1+x+{x}^{4}$ |

${C}_{3}$ | $1+x+{x}^{2}+{x}^{3}+{x}^{4}$ |

${C}_{5}$ | $1+x+{x}^{2}$ |

${C}_{7}$ | $1+{x}^{3}+{x}^{4}$ |

**Table 7.**Summary of the main characteristics of the three decimation-based generators discussed in this work.

Generator | Decimation Rule | Period | LC |
---|---|---|---|

Modified self-shrinking (MSSG), [16] | Given three consecutive bits, the output sequence ${\left\{{s}_{j}\right\}}_{j\ge 0}$ is computed as:$\mathrm{If}\phantom{\rule{4.pt}{0ex}}{a}_{3i}+{a}_{3i+1}=1\phantom{\rule{4.pt}{0ex}}\mathrm{then},\phantom{\rule{4.pt}{0ex}}{s}_{j}={a}_{3i+2}.$$\mathrm{If}\phantom{\rule{4.pt}{0ex}}{a}_{3i}+{a}_{3i+1}=0\phantom{\rule{4.pt}{0ex}}\mathrm{then},\phantom{\rule{4.pt}{0ex}}{a}_{3i+2}\phantom{\rule{3.33333pt}{0ex}}\mathrm{is}\phantom{\rule{4.pt}{0ex}}\mathrm{discarded}.$ | ${2}^{\lfloor \frac{L}{3}\rfloor}\le T\le {2}^{L-1}$ | When L odd: ${2}^{\lfloor \frac{L}{3}\rfloor -1}\le LC\le {2}^{L-1}-(L-2).$ |

Generalized self-shrinking (GSSG), [11] | Let ${\left\{{a}_{i}\right\}}_{i\ge 0}$ be an PN-sequence generated by a maximal-length LFSR with L stages. Let G be an L-dimensional binary vector $G=[{g}_{0},{g}_{1},{g}_{2},...,{g}_{L-1}]\in {\mathbb{F}}_{2}^{L}$ and ${\left\{{v}_{i}\right\}}_{i\ge 0}$ a sequence defined as: ${v}_{i}={g}_{0}{a}_{i}+{g}_{1}{a}_{i-1}+{g}_{2}{a}_{i-2}+\cdots +{g}_{L-1}{a}_{i-L+1}$. For $i\ge 0$, the decimation rule is: $\mathrm{If}\phantom{\rule{4.pt}{0ex}}{a}_{i}=1\phantom{\rule{4.pt}{0ex}}\mathrm{then}\phantom{\rule{4.pt}{0ex}}{s}_{j}={v}_{i}.$ $\mathrm{If}\phantom{\rule{4.pt}{0ex}}{a}_{i}=0\phantom{\rule{4.pt}{0ex}}\mathrm{then}\phantom{\rule{4.pt}{0ex}}{v}_{i}\phantom{\rule{4.pt}{0ex}}\mathrm{is}\phantom{\rule{4.pt}{0ex}}\mathrm{discarded}.$ | $T={2}^{r},\phantom{\rule{4.pt}{0ex}}\mathrm{with}\phantom{\rule{4.pt}{0ex}}r\le L-1$ | $LC\le {2}^{L-1}-(L-2).$ |

t-modified self-shrinking (t-MSSG), [31] | Given t consecutive bits, the output sequence ${\left\{{s}_{j}\right\}}_{j\ge 0}$ is computed as: $\mathrm{If}\phantom{\rule{4.pt}{0ex}}{\sum}_{j=0}^{t-2}{a}_{t\xb7i+j}=1\phantom{\rule{4.pt}{0ex}}\mathrm{then},\phantom{\rule{4.pt}{0ex}}{s}_{j}={a}_{t\xb7i+(t-1)}.$$\mathrm{If}\phantom{\rule{4.pt}{0ex}}{\sum}_{j=0}^{t-2}{a}_{t\xb7i+j}=0\phantom{\rule{4.pt}{0ex}}\mathrm{then},\phantom{\rule{4.pt}{0ex}}{a}_{t\xb7i+(t-1)}\phantom{\rule{4.pt}{0ex}}\mathrm{discarded}.$ | If $gcd\{{2}^{L}-1,t\}=1$ or ${P}_{{C}_{t}}$ is primitive with degree $|{C}_{i}|:T={2}^{r},\phantom{\rule{4.pt}{0ex}}\mathrm{with}\phantom{\rule{4.pt}{0ex}}r\le L-1$. Other cases are not cryptographic relevant. | If $gcd\{{2}^{L}-1,t\}=1$ or ${P}_{{C}_{t}}$ is primitive with degree $|{C}_{i}|:LC\le {2}^{L-1}-(L-2)$. Other cases are not cryptographic relevant. |

**Table 8.**Diehard battery of tests results for a GSS sequence with characteristic polynomial of degree 27.

Test Name | p-Value | Result | Test Name | p-Value | Result |
---|---|---|---|---|---|

0.854161 | 0.6612 | ||||

0.128374 | 0.1300 | ||||

0.350541 | 0.7321 | ||||

0.843946 | 0.7540 | ||||

Birthday spacing | 0.820384 | Pass | 0.7276 | ||

0.751627 | 0.0776 | ||||

0.669644 | 0.2807 | ||||

0.263248 | 0.2276 | ||||

0.274206 | 0.5481 | ||||

Overlapping | 0.973492 | Pass | 0.0144 | ||

permutations | 0.998474 | 0.7242 | |||

0.460374 | 0.7410 | ||||

Binary ranks | 0.607801 | Pass | 0.6259 | ||

0.470376 | 0.5815 | ||||

0.59389 | OQSO | 0.3380 | Pass | ||

0.95088 | 0.8546 | ||||

0.84285 | 0.5279 | ||||

0.99576 | 0.3305 | ||||

0.91144 | 0.1022 | ||||

0.06885 | 0.3367 | ||||

0.69611 | 0.8353 | ||||

0.28168 | 0.6487 | ||||

0.60022 | 0.5748 | ||||

Bit stream | 0.93126 | Pass | 0.8688 | ||

(Monkey tests) | 0.77314 | 0.2946 | |||

0.91404 | 0.4309 | ||||

0.81248 | 0.8943 | ||||

0.60022 | 0.1388 | ||||

0.84285 | 0.6424 | ||||

0.94645 | 0.1627 | ||||

0.96610 | 0.5008 | ||||

0.83486 | 0.6695 | ||||

0.52578 | 0.2392 | ||||

0.99599 | 0.7181 | ||||

0.9170 | 0.5722 | ||||

0.9852 | 0.9521 | ||||

0.6537 | 0.9762 | ||||

0.3155 | 0.3309 | ||||

0.2258 | 0.9433 | ||||

0.9600 | 0.2852 | ||||

0.6056 | 0.7472 | ||||

0.9116 | 0.3780 | ||||

0.7067 | 0.4109 | ||||

0.8025 | 0.8180 | ||||

0.9201 | 0.3395 | ||||

OPSO | 0.9671 | Pass | 0.2346 | ||

0.2808 | DNA | 0.5149 | Pass | ||

0.5257 | 0.9901 | ||||

0.8779 | 0.0708 | ||||

0.9751 | 0.0209 | ||||

0.9980 | 0.9450 | ||||

0.3569 | 0.9835 | ||||

0.1756 | 0.2135 | ||||

0.8006 | 0.0099 | ||||

0.9974 | 0.9157 | ||||

0.4474 | 0.0761 | ||||

0.9458 | 0.9593 | ||||

Count-the-1’s | 0.923369 | Pass | 0.1119 | ||

(stream of bytes) | 0.375390 | 0.5837 | |||

0.069242 | Parking lot | 0.357527 | Pass | ||

0.453489 | Minimum distance | 0.752286 | Pass | ||

0.531694 | 3D Spheres | 0.947691 | Pass | ||

0.476337 | Squeeze | 0.990622 | Pass | ||

0.115181 | Overlapping sums | 0.276467 | Pass | ||

0.238283 | 0.276783 | ||||

0.248038 | Runs | 0.893007 | Pass | ||

0.170200 | 0.908305 | ||||

0.595302 | 0.913183 | ||||

0.167417 | Craps | 0.995956 | Pass | ||

0.574701 | 105661 | ||||

Count-the-1’s | 0.384873 | Pass | |||

(specific bytes) | 0.944743 | ||||

0.955924 | |||||

0.210026 | |||||

0.142320 | |||||

0.717744 | |||||

0.191102 | |||||

0.728247 | |||||

0.297792 | |||||

0.971290 | |||||

0.323464 | |||||

0.408101 | |||||

0.013264 | |||||

0.859849 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Cardell, S.D.; Requena, V.; Fúster-Sabater, A.; Orúe, A.B.
Randomness Analysis for the Generalized Self-Shrinking Sequences. *Symmetry* **2019**, *11*, 1460.
https://doi.org/10.3390/sym11121460

**AMA Style**

Cardell SD, Requena V, Fúster-Sabater A, Orúe AB.
Randomness Analysis for the Generalized Self-Shrinking Sequences. *Symmetry*. 2019; 11(12):1460.
https://doi.org/10.3390/sym11121460

**Chicago/Turabian Style**

Cardell, Sara D., Verónica Requena, Amparo Fúster-Sabater, and Amalia B. Orúe.
2019. "Randomness Analysis for the Generalized Self-Shrinking Sequences" *Symmetry* 11, no. 12: 1460.
https://doi.org/10.3390/sym11121460