# Chaos Based Cryptographic Pseudo-Random Number Generator Template with Dynamic State Change +
## 1 Introduction  
As bandwidth in state-of-the-art communication channels is increasing at a high rate, cryptographic solutions need to keep up with the large amount of information that should be encrypted. One of the key requirements for stream cryptosystems is the underlying pseudo-random number generator. In recent years, chaotic systems have been considered as generating good and fast pseudo-random sequences [1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11]. The generated numbers are equiprobable, non-correlated. Good pseudo-random number generators (pRNGs) have a large period of repetition. They have properties such as reproducibility and consistency (independence from the seed), portability, efficiency, coverage of the entire output space. The sequences generated utilizing different seeds must be disjoint, consecutive numbers not revealing any pattern for any length of the sequence. Every permutation of a number generated by a good pRNG is equally likely [12]. The theory behind a good pRNG and some practical aspects concerning its design can be consulted in [13]. An analysis of statistical testing methods of pRNGs is given in [14]. Generally, cryptographically secure pseudo-random sequences are obtained from cryptosystems--stream ciphers or block ciphers in counter mode--which, as opposed to regular pRNGs, are slower [15]. In this paper we attempt to design and build a chaos based pseudo random number generator template, configurable with a map function and entropy builder so that depending on the application, it can focus on randomness quality, throughput, or a balance between the two. A chaos based pseudo-random number generator was proposed in [16]. The underlying system was the three dimensional generalized Henon map (2). Given its simple shift-register form, yet complex behavior, many studies were done [17; 18; 19; 20; 21; 22; 23; 24; 25] to investigate its dynamics. \[x_{k+1} = a-y_{k}^{2}-bz_{k}\] \[y_{k+1} = x_{k} \tag{1}\] \[z_{k+1} = y_{k}\]  
where \(a\in(0,2)\), \(b\in[-0.3,0.3]\), \(x,y,z\in(-2,2)\), \(k\) is the iteration number and \((x_{0},y_{0},z_{0})\) the initial states. The definition intervals for parameters \(a\) and \(b\) were established by computing bifurcation diagrams [26] and Lyapunov exponents [27] for \(a\in(-2,2)\) and \(b\in(-1,1)\). A Monte Carlo analysis [28] with initial conditions \(x_{0},y_{0},z_{0}\) chosen randomly from an uniform distribution in [\(-2\),\(2\)] was performed. The conclusion was that \(a\in(0,2)\) and \(b\in[-0.3,0.3]\) are the ranges ensuring \(x,y,z\in(-2,2)\). For the pRNG in [16] the least significant nibble of each state of system (2) was discarded and the next bytes _xor-ized_, as shown in Figure 1. A sequence obtained was tested for randomness with the NIST [14] battery test. As the system of equations generating the pseudo-random sequences is chaotic--aperiodic and highly sensitive to initial states--it displays a fractal structure [29], depending upon its bifurcation parameters, \((a;b)\). This implies that not all pairs of parameters engender a pseudo-random behavior for the generated bits and also that there is no continuous interval that contain only chaotic parameter values [30]. Different evolutions are depicted in Figure 2 for the same initial conditions:  
\[(x_{0},y_{0},z_{0})=(0.814723686393179,0.905791937075619,0.126986816293506)\]  
and different pairs \((a;b)\) given in Table 1. The top left and the bottom left state spaces show periodic attracting orbits, while the right part of the figure demonstrates (hyper)chaotic attractors. Figure 1: Logic for generating random bytes from the states’ double precision floating point strings. The Lyapunov exponents [27] are the commonly used metric to indicate periodic or (hyper)chaotic behavior. For the investigated system, the generalized Henon map (2), the number of exponents is three, corresponding to the dimension of the state space. The algorithm computing the Lyapunov spectrum in [27] sorts the exponents from the largest to the lowest.