# The Design and FPGA-Based Implementation of a Stream Cipher Based on a Secure Chaotic Generator
## 2 The Proposed SCbSC-Based Architecture  
The block diagram of a stream encryption/decryption system is presented in Figure 1. As we can see, the stream encryption/decryption algorithm comes down to an XOR operation between the plaintext and the keystream for encryption; the ciphertext and the keystream for decryption. The security of such a system depends entirely on the keystream delivered by the keystream generator. If the keystream is perfectly random and the period tends to infinity, then the encryption/decryption system becomes unconditionally secure (called a one-time pad). The keystream generator takes as input a secret key and an initial value (IV) used to overcome known plain text attacks. The IV is changed with each new session and must be used only once. Thus, the sequences generated in the different sessions with the same secret key are different. Recall that stream ciphers are used to encrypt data (bits or samples) continuously, such as network communications or selective video encryption. In the following, we will describe in detail the proposed SPCNG as a secure keystream generator. Description of the Architecture of the Proposed SPCNG  
The architecture of the proposed SPCNG is on the one hand, partly based on one of our previous PCNG [16; 17], and on the other hand, it takes into account the vulnerabilities detected by SCAs [23; 24] in one of our other PCNGs [15]. This new architecture makes it possible to resist SCAs. The proposed system comprises three one-delay recursive cells, shown in blue, containing weakly coupled chaotic maps, namely: the logistic map (L), the skew-tent (S), and the 3D Chebyshev map (3D Ch) in parallel with a linear feedback shift register (LFSR), and a mixing technique on each recursive cell, depicted in red, as shown in Figure 2.  
The M-matrix weak coupling technique creates an interdependence between the three chaotic maps that avoids an attacker using the divide and conquer approach on the first  
Figure 1: Block diagram of a stream encryption/decryption system. Figure 2: Architecture of the proposed SPCNG. 128-bit IV. Indeed, for each new sample calculation, an attacker must take into account the three chaotic maps together. Besides, the use of the logistic map and especially the 3D Chebyshev map (which we have discretized) adds robustness to the system against algebraic attacks. Finally, the three recursive one-delay cells are protected against SCAs by using a mixing technique based on three internal pseudo-random numbers: PRNL, PRNS, and PRNT respectively, shown in red. The proposed SPCNG takes as input an initial vector (IV) and a secret key (K). The IV of the system provides the initial vectors of the three chaotic maps, \(IVL\), \(IVS\), and \(IVT\); the initial condition \(XS0\) of the skew-tent map; and the initial seeds \(X0\_L\), \(X0\_S\), and \(X0\_T\) (of 128 bits each) of the three pseudo-random numbers PRNL, PRNS, and PRNT. The output of each PRN is of size N = 32 bits. The secret key K provides the initial conditions and parameters of the SPCNG listed in Table 1.  
Note that \(XLC1\), \(XSC1\), and \(XTIC1\) mean \(XLC(-1)\), \(XSC(-1)\), and \(XTIC(-1)\). The models of the discrete logistic, skew-tent, and 3D Chebyshev maps are respectively given by:  
* The discrete logistic map [25]: \[ \begin{array}{c}XL(n)=\left\{\begin{array}{cc}\left\lfloor\frac{XL(n-1) [2^{N}-XL(n-1)]}{2^{N-2}}\right\rfloor&if\;XL(n-1)\
eq\left[3\times 2^{N-2}, 2^{N}\right]\\ \\ 2^{N}-1&otherwise\end{array}\right.\end{array} \] (1) This is the discretized equation of the standard logistic map: \[x(n)=\mu x(n-1)(1-x(n-1))\] (2) with here \(\mu\;=\;4\) and \(x(n)\in\;[0,1]\).