On the implementation of large period piece-wise linear Arnold cat map

This paper presents a piece-wise linear cat map (PWLCM) obtained by perturbing the conventional quantized Arnold cat map (QACM) with a nonlinear term. The effect of the nonlinear term on the dynamics of the QACM is investigated. We show that the eigenvalues, hence the Lyapunov exponents of the PWLCM depend on the initial conditions, which is not the case for the QACM. As a result, the proposed PWLCM is a generalized form of the QACM, whose the period exponentially increases with respect to the precision, thus taking as value 1.09 × 10513 for only 10-bit precision; while that of the corresponding QACM is only 768. The nonlinear term increases the sensitivity of the system to the initial conditions, which contributes to increase its period, hence to enhance its complexity. An electronic implementation of both the QACM and the PWLCM in the case of 4-bit precision using Multisim is presented. The proposed architecture of both the QACM and the PWLCM are implemented using Verilog and prototyped on the Zynq 7020 FPGA board. For 4-bit precision, the FPGA implementation performs 1.072 Gbps throughput at 134 MHz maximum frequency. We verified that experimental and simulation behaviors of the proposed system perfectly match, thus confirming the effectiveness of the proposed electronic circuit for exhibiting the expected dynamics in real-time.

few. In order to achieve fast generation of random numbers, researchers have focused their attention to chaotic systems that can be experimentally implemented [5,15,21]. Chaotic systems are sensitive to initial conditions and present mixing properties that are necessary for a good pseudo-random number generator [12]. Since then, various chaotic systems generating a large variety of complex dynamics have been modeled, but they are still suffering from lack of reliable methods for their implementation [3,[24][25][26]32]. Some of them are realized with analogue circuits, while many others are more and more implemented using numerical targets like the Field Programmable Gate Array (FPGA) [2,16,19,[26][27][28].
Chaotic systems have been shown efficient and convenient for modern cryptography, although most experimental and commercial systems are using random number generators (RNGs) based on modular algebra operations, as the digitization of chaotic orbits sometimes may reduce the key sensitivity [20,26]. Such RNGs present the advantage to make modular calculations in a finite field (the Galois field GF(2 n ) for example), hence to be easily implemented on hardware with a finite number of basic electronic logic gates without loss of precision. An example is the RNG implemented by the RAND function in the MAT-LAB software to generate uniformly distributed random numbers. Another example is the Arnold cat map (ACM) which is often used for its ergodic and mixing properties [1,30]. In practical applications, the original cat map is generalized and discretized in the phase space to obtain the quantized ACM (QACM).
Arnold's cat map is known to be chaotic, area-preserving, ergodic and mixing, and invertible [8,10,17]. It has a unique hyperbolic fixed point and the linear transformation defining it is hyperbolic (it presents irrational eigenvalues, one with an absolute value greater than 1 and the other one less than 1). Its quantized version forms short limit cycles whose lengths depend on the modulo value, although it preserves the properties of its continuous analogue [4,11]. The other properties of this interesting map can be found in the literature [4,8,10,11,17]. The ACM is used in cryptography, in digital tattoo applications, in watermarking and for random number generation to cite a few [8,9,23]. The QACM is particularly used for image scrambling due to its periodic nature [7]. It has been also used for the implementation of public key ciphers [18], but the latter are not secure when dealing with QACM with weak periods [22].
Thus, the period of the QACM is an important parameter when using it in cryptography. It has been shown that the period of the QACM does not exceed 3m, m being the modulo value. In the case of n-bit precision (m = 2 n ) which is convenient for digital applications, the period of the QACM is only equal to 3·2 n−2 , n ≥ 2, which is effectively smaller than 3m. Therefore, for the security level of ciphers including the QACM to be enhanced, its period needs to be increased. In order to overcome such a limitation of the period, the ACM (n = 0) is preferred to the QACM in many applications. Some improvements including the increase of the dimension of the map have been proposed. Guoscheng et al. [14] proposed to extend the conventional 2D Arnold's cat map into a 3D map by introducing six control parameters. Although the resulting map allows to increase the key space for data encryption, the authors did not investigate its period distribution, as well as the impact of the introduced control parameters on dynamics of the system. To prevent the degradation of chaotic sequences into periodic ones due to the finite computer precision, they just applied a slight perturbation on the 3D map output without formally investigating its impact. In [33], the authors combined the 2D cat map with an affine cipher to enhance the security level of their proposed cipher. In order to efficiently apply Arnold's cat map to data encryption, it is important to directly investigate and increase its period in the discrete phase space, hence to significantly increase the period of the QACM, even for small data precision.
In this paper, we suggest to introduce a nonlinear perturbation to the linear QACM for its period to increase. In order to preserve the simplicity of the QACM, we consider as nonlinear element another modular algebra based module, such that the final system is a piece-wise linear cat map (PWLCM). We thus investigate the dynamics of the so-called PWLCM and verify that in the case of 4-bit precision, its period is more than 10 11 times greater than that of the conventional QACM. An equivalent electronic circuit is proposed in the case of 4-bit precision to further confirm the simplicity of the proposed system that can be used for the generation of pseudo-random numbers. Furthermore, an equivalent implementation on Zynq 7020 FPGA board is presented in order to confirm the effectiveness of the proposed architecture.
The rest of the paper is organized as follows: in Section 2 the modeling system is presented, Section 3 is devoted to the results analysis, Section 4 shows the electronic implementation of the PWLCM while in Section 5 some concluding remarks are given.

The conventional quantized Arnold cat map
The Arnold cat map has been widely described and investigated in the literature. The evolution of the 2D system behavior, where the two variables (position and momentum) are completely depending on each other is modeled as follows [17]: The system in (1) can be rewritten using matrix representation as where , and x = (x, y) T ; (·) T is the transpose of (·). This discrete time system is continuous in the phase space for (x, y) ∈ [0, 1) 2 and m = 1. The QACM is obtained for (x, y) ∈ [0, m) 2 with m ∈ N >1 . It is periodic and its period depends both on m and the parity of α and β. For α = β = 1 and m = 2 n , the period behaves like with 1 = 2 = 3 for the minimal period, as shown in [8,11].

The piece-wise linear cat map
In order to increase the period of the QACM, we introduce a nonlinear perturbation term to the conventional QACM. The modified system is written as where with (i, j ) ∈ N 2 , c i and d j two natural numbers such that 0 ≤ c i < m + a i and 0 and Equations (8)- (9) can be written as piece-wise linear functions such that: where q i = a i +y(t) c i ; and By developing the whole set of equations, we obtain the PWLCM defined as: where with α = M + α, β = N + β and, u(t) is the Heaviside function defined as The PWLCM thus obtained presents a conservative linear term Bx(t) (det(B) = 1) that exhibits the same behavior as a QACM, and a nonlinear term C(t) that contributes to increase the period of the linear term by modifying its trajectory for a given initial condition. a i and b j , c i and d j are defined as perturbation parameters.

Stability analysis of the PWLCM
In this section, we investigate the stability of the PWLCM. While considering the system in (12), we deduce the following Jacobian matrix: From the above Jacobian matrix we deduce the eigenvalues and The determinant of J is equal to 1, which implies that the sum of the Lyapunov exponents λ 1 (t) and λ 2 (t) is equal to 0, hence 1 (t) ≥ 1 and 0 ≤ 2 (t) ≤ 1. The PWLCM is thus a conservative system as the generating ACM, independently to the choice of the parameters a i , b i , c i and d i . Depending on the choice of these parameters, it can be difficult to determine the steady states of the system, whenever they exist. For is the single steady state of the system. Given that 1,2 > 0, all the existing steady states of the PWLCM are unstable.

The reverse PWLCM
The generalized inverse PWLCM is obtained by determining x(t) and y(t) from (4) as: Given that x(t + 1) and y(t+1) are the initial condition for the reverse system, x(t) and y(t) are the iterates that are obtained from the initial conditions. By reversing the time evolution, (19) can be rewritten as: Equation (20) is the reverse PWLCM.

Results and discussion
In this section, we investigate the dynamics of the PWLCM period and largest Lyapunov exponent with respect to the system control parameters and initial conditions. For a given precision, the period of the PWLCM is equivalent to the least common multiple (lcm) of the individual periods of the set of initial conditions [6,13,27,29,31]. Indeed, each possible initial condition of the phase space generates its own dynamics whose period is determined. The number of initial conditions is directly related to the precision n. For n = 1 for example, there are four possible initial conditions that are (0, 0), (0, 1), (1, 0) and (1, 1).

Sensitivity of the period
We evaluate the period of the system for various precisions n = 2 to n = 8. Table 1 illustrates the matrix T (x 0 , y 0 ) of individual periods for the different initial conditions of the PWLCM in the case of n = 2. We set for this example α = β = 1, M = N = 2, while the corresponding period for the QACM is 3. In order to estimate the impact of the nonlinear term on the QACM, we evaluated the period of the QACM described by matrix B, instead of matrix A. We obtained as period B = 3 while A = 3. It appears that by adding the modulus terms, the system described by T A is both linearly and nonlinearly modified, thus leading to a new QACM that is perturbed by the nonlinear term C(t). The linear modification leads to the conventional QACM, whereas the nonlinear modification leads to a completely different system with a large period that does not necessarily respect the relation in (3). Table 1 also shows that the system above described presents a single steady state that is (x 0 = 2, y 0 = 3). While evaluating the impact of the perturbation on the QACM, we observed that for some combinations of parameters a i , b i c i and d i , the PWLCM may present or not multiple steady states.
x 0 \y 0 0 1 2 3 0 there is a single steady state, that is (x 0 = 0, y 0 = 1) while the period of the system is = 3. By just changing the value of c 2 as c 2 = 3, the system now presents two steady states that are (x 0 = 0, y 0 = 1) and (x 0 = 0, y 0 = 2) and a period = 20.

Sensitivity of the Lyapunov exponent
We also evaluate the Lyapunov exponents of the above system for each initial condition with the above three parameter settings and compare them to the largest Lyapunov exponent of the corresponding QACM, that is We considered 20 000 iterations of the PWLCM to evaluate the Lyapunov exponents. For the first parameter setting, Table 2 shows the corresponding largest Lyapunov exponents of the PWLCM that are to be compared to λ 0 (3, 3) = 2.3895. It appears from this table that setting c i = 0 and d j = 0 contributes to reduce the Lyapunov exponent, while it contributes to increase the period of the system.
The second parameter setting leads to Table 3, with values that are to be compared to λ 0 (3, 3) = 2.3895. We can confirm that the Lyapunov exponent does not depend on a i and b i in the case c i = d j = 0.
The third parameter setting leads to Table 4, with values that are also to be compared to λ 0 (3, 3) = 2.3895. This table as compared to Table 3 shows that setting c i = 0 or d j = 0 reduces the value of the Lyapunov exponent, while increasing the period of the PWLCM.
The combination of the observations made from these three tables implies that there is no direct relationship between the Lyapunov exponent and the period of the system. Furthermore, a large Lyapunov exponent in that case does not induce a high complexity of the PWLCM, as it corresponds to the smallest period. However, we observe that the period of the system increases with the diversity or variability of the Lyapunov exponent. Indeed, a high sensitivity of the Lyapunov exponent to the initial conditions contributes to increase the period of the system. Figure 1 shows the behavior of the Lyapunov exponent in the case of n = 4 for the above three parameter settings. In the first case (setting 1), there are Table 3 Matrix of the individual largest Lyapunov exponent of different initial conditions of the PWLCM for n = 2, α = β = 1,   , which corresponds to T 3 = 2520. We can observe that in the case of a single Lyapunov exponent, the largest period value is a multiple of the other values, which contributes to reduce the period of the whole system. Such an observation also implies a high sensitivity of the period to the precision n. Indeed, for a parameter setting with a high sensitivity of the Lyapunov exponent to the initial conditions, the diversity of the Lyapunov exponent values increases with n, as the number of initial conditions itself increases. While setting n = 5 for the above parameter settings, the periods become respectively T 1 = 1.51 · 10 15 , T 2 = 24 and T 3 = 1.02 · 10 10 . As shown in Fig. 2, the values of the largest Lyapunov exponent are within the same range (1.4, 2.5), but the number of distinct values has significantly increased, 450 for the first parameter setting Fig. 1 Behavior of the Lyapunov exponent λ(z 0 ) with respect to the initial condition z 0 = 2 n x 0 + y 0 , for n = 4 and a i , b i , c i and d i set as in Table 2 (setting 1), Table 3 (setting 2) and Table 4 (setting 3). The corresponding periods are respectively T 1 = 9320, T 2 = 12 and T 3 = 2520.The Lyapunov exponents were evaluated after 1000 iterations of the PWLCM Fig. 2 Behavior of the Lyapunov exponent λ(z 0 ) with respect to the initial condition z 0 = 2 n x 0 + y 0 , for n = 5 and a i , b i , c i and d i set as in Table 2 (setting 1), Table 3 (setting 2) and Table 4 (setting 3). The corresponding periods are respectively T 1 = 1.51 · 10 15 , T 2 = 24 and T 3 = 1.02 · 10 10 . The Lyapunov exponents were evaluated after 1000 iterations of the PWLCM (setting 1), and 163 for the third one (setting 3). There is no change for the second parameter setting as the corresponding Jacobian matrix does not depend on the initial conditions.

Sensitivity to control parameters a i and b i
For the analysis of the impact of a i and b i , we first set M = N = 1 and n = 3, α = β = 1, c 1 = 3, d 1 = 5. The corresponding periods are summarized in Table 5 from where we can appreciate the sensitivity of the system to the parameters a i and b j . These periods are to be compared to A = 6 that is the period of the equivalent QACM. Table 6 shows the dependence of the PWLCM period on the perturbation parameters c 1 and d 1 , for n = 2, M = N = 1, α = β = 1, a 1 = 1 and b 1 = 3. It appears from this table that the maximum period is obtained for (c 1 , d 1 ) = (1, 6). This table shows that large periods can be achieved even with a small number of bits (n = 2 for example), which is not possible  with the conventional QACM. Indeed, the period depends on the choice of the parameters

Sensitivity on control parameters c i and d i
The proposed PWLCM is conservative and depending on the parameter setting, it can be linear or nonlinear. As it includes all the properties of the QACM, it can be seen as a generalized form of the QACM that can exhibit large periods. The worst parameter setting of the PWLCM corresponds to a QACM. For the PWLCM to generate dynamics with large periods, its Jacobian matrix should depend on the initial conditions. We suggest a particular parameter setting depending on the parity of n that generates large periods such that: and We verified that the case c i = 0 or d i = 0 corresponds to the forced QACM in which the steady state (0,0) is modified and depends on a i and b i and the case c i = 1 or d i = 1 corresponds to the conventional QACM. The period of the system is large when only one dimension is perturbed with d i = 1 and c i as in (22), or c i = 1 and d i as in (22). In such a case, the Lyapunov exponent of the PWLCM is sensitive to the initial condition as it is the case for many chaotic systems. It can therefore generate rich and complex dynamics. An example periodic image shuffling using both 8-bit QACM and 8-bit PWLCM is shown in Fig. 3. The period of the QACM in that case is 192, while that of the PWLCM, with a 1 = 0, a 2 = 0, c 1 = 0, c 2 = 11 and d 1 = d 2 = 1, is 4.28 × 10 114 . Applying the reverse system to the shuffled image with the same number of iterations allows to obtain the original image without needs of running the shuffling process on the whole period of the system. In order to compare the mixing property of the PWLCM and QACM, we applied the NIST800-22 statistical test to a periodic 2 13 × 2 13 image shuffled with both systems. The periodic image is obtained by repeating sequences of 8-bit encoded integers ranged from 0 to 255. Such a data set can be divided into 50 bitstreams of 10 6 length each. The NIST test was applied to the shuffled images, after 50 iterations. The PWLCM parameters were set as a 1 = 0, a 2 = 0, c 1 = 0, c 2 = 11 and d 1 = d 2 = 1, and the number of bits was n = 13 for both systems. The corresponding results are shown in Table 7, from where it appears that the PWLCM shuffled image is passing NIST test, whereas the QACM image is failing. The PWLCM thus better mixes the pixels of the image than the QACM, hence is suitable for image shuffling.

Hardware implementation
In this section, we propose 2-dimensional (2D) electronic implementations of the conventional QACM and the proposed PWLCM. The implementation circuit includes exclusively basic electronic logic circuits such as adders, multiplexers, D-type flip-flops, and basic logic gates (AND, NOR, NAND, NOT, . . . ). We propose a hardware architecture which is simulated on both Multisim and Vivado HLx, and implemented on a Zynq 7020 FPGA board to confirm the effectiveness of the proposed architecture. The Multisim synthesis allows to optimize the FPGA architecture.

Multisim architecture
We first designed the circuit corresponding to the conventional 2-dimensional (2D) QACM with α = β = 1. For such a circuit, we considered two stages, the one computing x(t + 1) and the one computing y(t + 1). Given that y(t + 1) depends on x(t + 1), we considered a delay time of half the clock period to sequentially determine x(t + 1), then y(t + 1). The corresponding electronic architecture is shown in Fig. 4. Components U1 and U4 are multiplexers (74157N) that are used to set initial conditions x 0 and y 0 , respectively. The SET input allows to load initial conditions when SET = 1. Once initial conditions have been set, the circuit starts oscillating (SET = 0), that is computing x(t + 1) on the leading edge of the clock pulse and y(t + 1) on the trailing edge of the clock signal. U3 and U6 are D-type flip-flops (74ALS273) that allow the circuit to sequentially change the output value as a clock pulse occurs (time increment). U2 and U5 are 4-bit adders (74283N) that are used to implement (1). Now considering the perturbation term, we propose the schematic of the PWLCM whose equation is The circuit in Fig. 5 implements such a system for α = 3, β = 1, c 1 = 0, c 2 = 11, a 1 = a 2 = 0 and, n = 4. The circuit implementing modulo 11 is shown in Fig. 6. The  period of the above PWLCM is T = 4.8135 × 10 12 , while that of the corresponding QACM is only T = 12. The period gain for this example is therefore γ = 4 11 . We simulated this circuit using MULTISIM software as well as PROTEUS/ISIS software and verified that the dynamics of the electronic system perfectly matches with the MATLAB simulation. Based on the low complexity of the electronic circuit and the period gain brought by the insertion of the nonlinear term into the QACM, we concluded that the proposed system can be efficiently included in a pseudo-random number generator. We analyzed its period for 2 ≤ n ≤ 10 and compared it with that of the corresponding QACM. The overall results obtained are summarized in Table 8, from where we can confirm the efficiency of the nonlinear element for increasing the QACM period, thus giving an exponential growth of the period with respect to the precision n. Cases n = 2 and n = 3 correspond to the QACM with α = 3 and β = 1, as c 2 > 2 n , while the periods of the cases 4 ≤ n ≤ 10 are evaluated using the Maple software to avoid calculation errors in Matlab. An example of distribution of the orbit periods T (x 0 , y 0 ) with respect to the initial condition (x 0 , y 0 ) for the case n = 8 is shown in Fig. 7. One can observe that there are some initial conditions for which the period is greater than the upper limit of the orbit periods of the QACM, that is π = 2 n . Figure 8 shows the probability distribution of T (x 0 , y 0 ) for n = 6, 7 and 8. It appears from this figure that the frequency or probability increases with the period: the highest probability corresponds to the largest period T (x 0 , y 0 ). Such a result is interesting as our goal is to obtain large periods for all the nontrivial points of the PWLCM.

FPGA implementation
In order to confirm the effectiveness of the above architecture simulated with the Multisim software, we used Vivado and implemented the system on Zynq 7020 FPGA board. The schematic of the implemented system is shown in Fig. 9, with α = 3, β = 1, c 1 = 0, Fig. 9 Generalized FPGA implementation of n-bit PWLCM. The "LOAD" command allows to set x 0 and y 0 as initial conditions in the 2n-bit register; "RESET" allows to clear the 2n-bit register; and the "SET" command allows to load the initial conditions to n-bit registers FF 1 and FF 2 , therefore to start the system , a 1 = a 2 = 0 and, n = 4. The resource utilisation as well as the throughput of the proposed architecture are given in Table 9. From this table we observe that the implementation of the PWLCM does not require any DSP module, but exclusively basic modules such as look-up tables (LUT) and flip-flops (FF). We verified that the outputs of the FPGA and Multisim architectures perfectly match, thus confirming the effectiveness of the proposed architectures of the QACM and the PWLCM. For 4-bit precision, the FPGA implementation performs 1.072 Gbps throughput at 134 MHz maximum frequency. Such a high throughput shows that the proposed system can be easily combined with other basic gates such XOR gates or linear feedback shift registers (LSFR) for a real-time generation of pseudo-random numbers.

Conclusion
We presented in this paper the PWLCM obtained from a QACM that is nonlinearly perturbed. Depending on the parameter setting, the PWLCM exhibits large periods as compared to the equivalent QACM. The increase of the period enhance the complexity of the PWLCM, thereby is more suitable for image shuffling than the QACM. We evaluated the dependence of the period of the proposed system on the control parameters involved by the perturbing nonlinear term and observed that the worst parameter setting corresponds to a QACM. The PWLCM thus appears to be a generalized form of the QACM in which the sensitivity to the initial conditions has been improved for generating rich and complex dynamics. We showed that the Lyapunov exponent of the PWLCM is sensitive to the initial condition as it is the case for many chaotic systems, which justifies the large periods obtained. We noticed that the period of the PWLCM does not depend on the value of the largest Lyapunov exponent, but on its variability: a large Lyapunov exponent does not imply a large period, but a constant Lyapunov exponent implies a weak period. We also proposed an electronic implementation of both the QACM and the PWLCM. The two circuits are nearly identical, whatever confirms that introducing the perturbation term does not significantly modify the complexity of the QACM, despite the high period gain obtained. The effectiveness of the proposed architecture was confirmed by implementing the system on a Zynq 7020 FPGA board. Both the resource utilisation and the throughput of 1.072 Gbps at a maximum frequency of 134 MHz attest that the PWLCM can be easily combined with other basic gates to design a complete PRNG. The analysis of the model electronically implemented shows that the period exponentially increases with the precision n. In prospect, we intend to apply the PWLCM to data encryption in order to take advantage of its large periods, and to investigate its dynamics in the continuous phase space.