# Design, Implementation, and Analysis of a Block Cipher Based on a Secure Chaotic Generator
## 2 Proposed Chaos-Based Cryptosystem
### Description of the Proposed Pseudorandom Number Generator of Chaotic Sequences (PRNG-CS)  
The proposed PRNG-CS (see Figure 3), which is a fundamental element of any chaos-based cryptosystem, uses an initial vector (\(IV\)) and a secret key (\(K\)) as inputs and outputs the dynamical keys (encryption/decryption keys) Kc for the confusing process and Kd for the diffusion process. The systems' \(IV\) supplies the initial vectors of the four chaotic maps _IVP_, _IVS_, _IVL_, and _IVT_ each \(N=32\) bits in size, and the secret key K gives all  
Figure 1: Diagram of the encryption process. Figure 2: Diagram of the decryption process. the initial conditions and parameters of the chaotic maps but also the initial value of the linear-feedback shift register (LFSR) and the parameters of the coupling matrix \(M\) and transient phase \(Tr\), as summarized in Table 1.  
The four chaotic maps' initial conditions, \(XP(0)\), \(XS(0)\), \(XL(0)\), and \(XT(0)\) are provided by:  
\[\left\{ \begin{array}{l}XP(0)=IVP+XP0\\ XS(0)=IVS+XS0\\ XL(0)=IVL+XL0\\ XT(0)=IVT+XT0\end{array} \right. \tag{1}\]  
The output \(X(n)\) is calculated by:  
\[X(n)=\ XPC(n)\oplus XSC(n)\oplus XLC(n)\oplus XTIC(n) \tag{2}\]  
The coupling system is defined as follows: \begin{table}
\begin{tabular}{l l} \hline \hline
**Symbol** & **Definition** \\ \hline \(XP0\), \(XS0\), \(XL0\), and \(XT0\) & Initial conditions of the four chaotic maps: PWLCM, skew tent, \\  & logistic, and 3-D Chebyshev in \([1,2^{N}-1]\). \\ \(P_{p}\) & PWLCM map control parameter in \([1,2^{N-1}-1]\). \\ \(P_{s}\) & Skew tent map control parameter in \([1,2^{N}-1]\). \\ \(e_{ij}\) & Coupling matrix M parameters in \([1,2^{k}]\) with \(k\leq 5\). \\  & The initial value of the used LFSR is defined by: \\ Q0 & \(Q(n)=x^{32}+x^{22}+x^{2}+x+1\). \\ \(T_{r}\) & The transient phase of 10 bits. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Initial conditions and parameters that form the secret key. Figure 3: The architecture of the proposed pseudorandom number generator of chaotic sequences. \[\left[ \begin{array}{c}XPC(n)\\ XSC(n)\\ XLC(n)\\ XTIC(n)\end{array} \right]=\ M\ \times\ \left[ \begin{array}{c}XP(n)\\ XS(n)\\ XL(n)\\ XT(n)\end{array} \right] \tag{3}\]  
where  
\[M\ =\ \left[ \begin{array}{cccc}M_{11}&\epsilon_{12}&\epsilon_{13}&\epsilon_{ 14}\\ \epsilon_{21}&M_{22}&\epsilon_{23}&\epsilon_{24}\\ \epsilon_{31}&\epsilon_{32}&M_{33}&\epsilon_{34}\\ \epsilon_{41}&\epsilon_{42}&\epsilon_{43}&M_{44}\end{array} \right] \tag{4}\]  
with \(M_{11}\ =(2^{N}-\epsilon_{12}-\epsilon_{13}-\epsilon_{14})\), \(M_{22}\ =(2^{N}-\epsilon_{21}-\epsilon_{23}-\epsilon_{24})\), \(M_{33}\ =(2^{N}-\epsilon_{31}-\epsilon_{32}-\epsilon_{34})\), and \(M_{44}\ =(2^{N}-\epsilon_{41}-\epsilon_{42}-\epsilon_{43})\). \(XP(n)\), \(XS(n)\), \(XL(n)\), and \(XT(n)\) are denoted as the maps' output values at instant \(n\) of the _PWLCM_, skew tent, logistic, and 3-D Chebyshev maps, respectively, and defined as follows:  
The first sample is given by:  
\[XP(1)=\ PWLCM\Big{\{}\text{mod}\ \Big{(}XP(0),2^{N}\Big{)},\ P_{p}\Big{\}} \tag{5}\]  
\[XS(1)=\ SkewT\Big{\{}\text{mod}\ \Big{(}XS(0),2^{N}\Big{)},\ P_{s}\Big{\}} \tag{6}\]  
\[XL(1)=\ Logistic\Big{\{}\text{mod}\ \Big{(}XL(0),2^{N}\Big{)}\Big{\}} \tag{7}\]  
\[XT(1)=\ 3D\ Ch\Big{\{}\text{mod}\ \Big{(}XT(0),2^{N}\Big{)}\Big{\}} \tag{8}\]  
Then, for \(2\leq n\leq N_{s}\), the samples are calculated by (\(N_{s}\): the number of the desired samples):  
\[XP(n)=\ PWLCM\Big{\{}\text{mod}\Big{(}XPC(n-1),\,2^{N}\Big{)},\ P_{p}\Big{\}} \tag{9}\]  
\[XS(n)=\ SkewT\Big{\{}\text{mod}\Big{(}XSC(n-1),\,2^{N}\Big{)},\ P_{s}\Big{\}} \tag{10}\]  
\[XL(n)=\ Logistic\Big{\{}\text{mod}\Big{(}XLC(n-1),\,2^{N}\Big{)}\Big{\}} \tag{11}\]  
\[\left\{ \begin{array}{c}XT(n)=3D\ Ch\big{\{}\text{mod}\ \big{(}XTIC(n-1),\,2^{N}\big{)}\big{\}}\\ \\ XTI(n)=XT(n)\oplus Q(n)\end{array} \right. \tag{12}\]  
The discrete equations of _PWLCM_, skew tent, logistic, and 3-D Chebyshev maps are reported in the literature [35; 36; 37; 38].