# The Design and FPGA-Based Implementation of a Stream Cipher Based on a Secure Chaotic Generator
## 2 The Proposed SCbSC-Based Architecture
\begin{table}
\begin{tabular}{c c} \hline \hline
**Symbol** & **Definition** \\ \hline XL0 and XT0 & The initial conditions of the chaotic maps: logistic and 3D Chebyshev respectively, ranging from \(1\) to \(2^{N}-1\). \\ XLC1, XSC1, and XTIC1 & The initial conditions of the delayed values in recursive cells: logistic, skew-tent, and 3D Chebyshev respectively, in the range \([1,2^{N}-1]\). \\  & The initial value Q0 of the Linear Feedback Shift Register (LFSR) defined by: \\ Q0 & \(Q(n)=x^{32}+x^{22}+x^{2}+x+1\). \\ \end{tabular}
\begin{tabular}{c c} KL, KS, and KT & The coefficients of the recursive cells: logistic, skew-tent, and 3D Chebyshev respectively, ranging from \(1\) to \(2^{N}-1\). \\ P\({}_{s}\) & The control parameter of the skew-tent map, in the range \([1,2^{N}-1]\). \\ \(e_{ij}\) & The parameters of the coupling matrix M, in the interval \([1,2^{k}]\) with \(k\leq 5\). \\ T\({}_{r}\) & The transient phase of 10 bits. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Composition of the secret key K.  
* The discrete skew-tent map [26]: \[XS(n)=\left\{ \begin{array}{cc}\left\lfloor\frac{2^{N}\times XS(n-1)}{P_{s}} \right\rfloor&if\ 0<XS(n-1)<P_{s}\\ \\ 2^{N}\times\frac{\left[2^{N}-XS(n-1)\right]}{2^{N}-P_{s}}\right\rfloor&if\ P_{s}<XS(n-1)<2^{N}\\ \\ 2^{N}-1&otherwise\end{array} \right.\] (3) This is the discretized equation of the standard skew-tent map: \[x(n)=\left\{ \begin{array}{cc}\frac{x(n-1)}{p}&if\ 0\leq x(n-1)\leq p\\ \frac{1-x(n-1)}{1-p}&if\ p\leq x(n-1)\leq 1\\ \end{array} \right.\] (4) with \(x(n)\in\ [0,1]\); \(0<p<1\). * The discrete 3D Chebyshev map [27]: \[XT(n)=\left\lfloor 2^{(-2N+2)}\times\left( \begin{array}{c}4\times\left(XT-2^ {(N-1)}\right)^{3}-3\\ \times 2^{(2N-2)}\times\left(XT-2^{(N-1)}\right)\\ \end{array} \right)+2^{(N-1)}\right\rfloor\] (5) This is the discretized equation of the standrd 3D Chebyshev map: \[x(n)=4[x(n-1)]^{3}-3x(n-1).\] (6) with \(x(n)\in\ [-1,1]\). \(\left\lfloor Z\right\rfloor\) (floor function) is the greatest integer less than or equal to Z and \(X(n)\) takes integer values \(\in[1,2^{N}-1]\) and \(N=32\) is the precision used. In Figure 2(a),b, we show the mapping and attractor of the 3D Chebyshev map respectively. Further, in Figure 3(a),b, we give the histogram of a sequence produced by the 3D Chebyshev map alone and the histogram of a sequence generated by the 3D Chebyshev map in parallel with an LFSR, respectively. As we can see, the histogram of Figure 3(b) becomes uniform (confirmed by the chi-square test) compared to that of Figure 3(a). The histograms of the skew-tent and logistic maps are known, and an example of their shape is given in [28]. Figure 3: (**a**) Mapping of the 3D Chebyshev map (3D Ch); (**b**) its attractor. The first sample is calculated by:  
\[XL(1)=Logistic\Big{\{}\text{mod}\,\left(XL(0),2^{N}\right)\Big{\}} \tag{7}\]  
\[XS(1)=SkewT\Big{\{}\text{mod}\,\left(XS(0),2^{N}\right)\text{, }P_{s}\Big{\}} \tag{8}\]  
\[XT(1)=3D\,Ch\Big{\{}\text{mod}\,\left(XT(0),2^{N}\right)\Big{\}} \tag{9}\]  
where \(XL(0)\), \(XS(0)\) and \(XT(0)\) are the initial values (inputs) of the three chaotic maps defined as follows:  
\[ \begin{array}{l}XL(0)=(IVL+XL0+KL\times XLC1)\\ SS(0)=(IVS+XS0+KS\times XSC1)\\ XT(0)=(IVT+XT0+KT\times XTIC1)\end{array}  \tag{10}\]  
Afterward, for \(n\geq 2\) and \(n\leq N_{s}\), we calculate the samples by the following relations:  
\[XL(n)=Logistic\Big{\{}\text{mod}\,\left(KL\times XLC(n-1),\,2^{N}\right)\Big{\}} \tag{11}\]  
\[XS(n)=SkewT\Big{\{}\text{mod}\,\left(KS\times XSC(n-1),\,2^{N}\right)\text{, }P_{s}\Big{\}} \tag{12}\]  
\[XT(n)=3D\,Ch\Big{\{}\text{mod}\,\left(KT\times XTIC(n-1),\,2^{N}\right)\Big{\}} \tag{13}\]  
where \(N_{s}\) is the number of the desired samples, and \(XLC(n-1)\), \(XSC(n-1)\), and \(XTIC(n-1)\) are the unmasked inputs of the three chaotic maps. The coupling system is defined by the following relation:  
\[\left[ \begin{array}{c}XLC(n)\\ XSC(n)\\ XTIC(n)\end{array} \right]=\ M\ \times\ \left[ \begin{array}{c}XL(n)\\ XS(n)\\ XT(n)\end{array} \right], \tag{14}\]  
where:  
\[M=\left[