# Design, Implementation, and Analysis of a Block Cipher Based on a Secure Chaotic Generator

Fethi Dridi, Safwan El Assad, Wajih El Hadj Youssef, Mohsen Machhout, René Lozi

► To cite this version:

Fethi Dridi, Safwan El Assad, Wajih El Hadj Youssef, Mohsen Machhout, René Lozi. Design, Implementation, and Analysis of a Block Cipher Based on a Secure Chaotic Generator. Applied Sciences, 2022, 12 (19), pp.9252. 10.3390/app12199952. hal-03799417v2

HAL Id: hal-03799417

https://hal.science/hal-03799417v2

Submitted on 9 Oct 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Article

# Design, Implementation, and Analysis of a Block Cipher Based on a Secure Chaotic Generator

Fethi Dridi <fnref n="1" />,<fnref n="2" /> ID, Safwan El Assad <fnref n="2" />,* ID, Wajih El Hadj Youssef <fnref n="1" />, Mohsen Machhout <fnref n="1" /> and René Lozi <fnref n="3" /> ID

**Abstract:** This work proposes a new secure chaos-based encryption/decryption system, operating in cipher block chaining (CBC) mode, and analyze its performance. The cryptosystem includes a robust pseudorandom number generator of chaotic sequences (PRNG-CS). A strong chaos-based S-box is proposed to perform a circular substitution operation (confusion process). This PRNG-CS consists of four discrete 1-D chaotic maps, weakly coupled by a predefined coupling matrix M, to avoid, on the one hand, the divide-and-conquer attack and, on the other hand, to improve the generated sequence's randomness and lengths. The noun is also used in the construction of the S-box. Moreover, a 2-D modified cat map and a horizontal addition diffusion (HAD) preceded by a vertical addition diffusion (VAD) are introduced to perform the diffusion process. The security analysis and numerous simulation results of the main components (PRNG-CS and S-box) as well as the whole cryptosystem reveal that the proposed chaos-based cryptosystem holds up against various types of statistical and cryptographic attacks.

**Keywords:** chaos-based encryption/decryption system; PRNG-CS; S-box; modified 2-D cat map; performance; security analysis

## 1. Introduction

Nowadays, the necessity to protect data has become a primary challenge. The security of communication of sensitive data is not only limited to military and diplomatic information and national defense issues, but also concerns the private lives of individuals and companies. With this regard, cryptography schemes have been developed. Indeed, cryptographic techniques leads to well-ensured messages and data confidentiality. Chaos was integrated into cryptography for the first time by Matthews in the 1990s [1]. Among the existing state-of-the-art approaches, chaos-based cryptosystems have proved their efficiency in data security [2–4] due, on the one hand, to the powerful proprieties of chaotic sequences such as deterministic, unpredictable, random-like behavior, and high sensitivity to initial conditions and control parameters (secret key) [5–7] and, on the other hand, to their efficient properties of confusion and diffusion performed by chaotic maps [8–12].

Symmetric chaos-based encryption/decryption systems are classified under two categories: block ciphers and stream ciphers. The former is the main symmetric key cryptosystem, as their design is related to Shannon's theory of information security based on confusion and diffusion operations [8,13]. Their security properties were well-studied, and these ciphers encrypt the plaintext on a block of bits: 128, 256, 512, 1024, etc. [14,15].

Compared to traditional symmetric cryptography, chaos-based encryption/decryption schemes are more flexible (generic design, variable block size, and secret key can be easily enlarged), easier to implement, and have intrinsic security related to the properties of chaotic sequences [14,16]. Moreover, some of them use a substitution layer based on key-

<figure><img src="image_2.png" /></figure>

check for
updates

**Citation:** Dridi, F.; El Assad, S.; El Hadj Youssef, W.; Machhout, M.; Lozi, R. Design, Implementation, and Analysis of a Block Cipher Based on a Secure Chaotic Generator. *Appl. Sci.* **2022**, *12*, 9952. https://doi.org/10.3390/app12199952

Academic Editor: Arcangelo Castiglione

Received: 18 September 2022

Accepted: 29 September 2022

Published: 3 October 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_3.png" /></figure>

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

<footnote n="1">¹ Electronics and Microelectronics Laboratory (ΕμΕ), Faculty of Sciences of Monastir, University of Monastir, Monastir 5019, Tunisia</footnote>

<footnote n="2">² IETR UMR 6164, CNRS, University Nantes, F-44000 Nantes, France</footnote>

<footnote n="3">³ LJAD, CNRS, Université Côte d'Azur, F-06000 Nice, France</footnote>

<footnote>* Correspondence: safwan.elassad@univ-nantes.fr</footnote>
dependent S-boxes and not on fixed S-boxes as used in the Advanced Encryption Standard (AES) algorithm [17].

A key element of all chaos-based cryptosystems is the chaotic generator, which provides the dynamic keys (encryption keys) for the confusion and diffusion layer. The security, as well as the efficiency of the system, largely depend on the chaotic generator used.

However, most chaos-based cryptosystems reported in the literature refer to simple chaotic maps to supply the confusion and diffusion layer [18,19]. Such cryptosystems can be destroyed by side-channel attacks [20,21].

A fast chaos-based image encryption system with a dynamic state variables selection mechanism was proposed by Chen et al. [22] and it achieved a high confusion and diffusion process. Similar to the suggested cryptosystem by Fridrich [9] and Zhang et al. [23], three prototypes of a chaos-based cryptosystem were put up by Farajallah et al. [24]. The modified 2-D cat map was used to create the confusion process and 32-bit and 8-bit logistic maps were used as the diffusion layer for the two first versions, and a modified finite skew tent map (FSTM) in the third version.

A secure cryptosystem based on chaotic components was proposed by Qiao et al. [25]. In this cryptosystem, the AES S-box was used as a confusion layer. [17]. A global diffusion operating on the entire image was established using a horizontal addition diffusion (HAD), afterward, a vertical addition diffusion (VAD), introduced by Omrani et al. [26], then a permutation operation based on the modified 2-D cat map to reinforce the diffusion effect.

Wang et al. [27] published a block cipher cryptosystem using dynamic S-boxes based on a tent map. Their system operated on blocks using different generated S-boxes and used 32 iterations of substitution and left cyclic shift. A similar cryptosystem was proposed by Zhang et al. [28] based on a circular S-box as a confusion process and a keystream buffer as a diffusion layer. The system operates on the entire plain image. Another block cipher based on the chaotic logistic map was presented by Alawida et al. [29]. To enhance the performance of the logistic map, a new chaotification approach based on a multiplicative inverse function was applied. The diffusion and confusion process required data sequences, which were created by perturbing the chaotic variables with the secret key. The confusion process was controlled by the chaotic points themselves, whereas the diffusion process was controlled by an ergodic chaotic map.

Alshammari et al. [30] developed a new lightweight block cipher to protect the secu-
rity of data acquired by Internet of things (IoT) sensor. It consisted of a customized AES
algorithm with a chaos-based S-box and a chaotic map. Despite having good cryptographic
characteristics and a high amount of randomness, this was related primarily to the AES
underlying structure and not to the modified S-box. Additionally, AES was not well recog-
nized for its lightweight implementation and could not be appropriate for IoT devices with
constrained resource in terms of computing capabilities.

In this paper, we propose an efficient encryption/decryption system based on a
secure pseudorandom number generator of chaotic sequences (PRNG-CS) and a strong
key-dependent S-box. The proposed chaos-based cryptosystem design takes into account
the weaknesses and strengths of the systems mentioned above. The proposed PRNG-CS
is able to prevent the divide-and-conquer and the SCA attacks. This PRNG-CS is used to
build the key-dependent S-box. It also provides the encryption/decryption keys necessary
for the substitution and permutation operation [31–34].

The remainder of this paper is organized as follows: In Section 2, we present the proposed chaos-based cryptosystem architecture with a deep insight of the PRNG-CS, the S-box with the circular substitution process, and the diffusion process, then we give the pseudocode of the encryption/decryption algorithms. In Section 3, we present the experiments results and security analysis of the proposed cryptosystem and its computing performance. Finally, Section 4 summarizes the whole paper.
## 2. Proposed Chaos-Based Cryptosystem

The architecture of the proposed chaos-based cryptosystem is shown in Figure 1, for the encryption process and in Figure 2, for the decryption process. This structure achieves high confusion-diffusion effects. On the encryption side, the confusion is achieved by a circular substitution layer based on a proposed strong S-box, which is the non-linear element of the cryptosystem as in the Advanced Encryption Standard (AES) algorithm. The diffusion process consists of three steps: a permutation layer based on the modified 2-D-Cat map, a horizontal addition diffusion (HAD), and a vertical addition diffusion (VAD). The confusion and diffusion layers use the proposed PRNG-CS. On the decryption side, apart from the PRNG-CS, reverse diffusion and reverse substitution are achieved by reverse processes of those used in encryption, as indicated in Figure 2.

<figure><img src="image_4.png" /><figcaption>Figure 1. Diagram of the encryption process.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Figure 2. Diagram of the decryption process.</figcaption></figure>

The block cipher operation can be repeated *r* times, if necessary, to obtain the final secure encrypted image.

Each component of the proposed cryptosystem is described in depth in the following sections.

### 2.1. *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
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 *T*<sub>r</sub>, as summarized in Table 1.

<figure><img src="image_6.png" /><figcaption>**Figure 3.** The architecture of the proposed pseudorandom number generator of chaotic sequences.</figcaption></figure>

<table><caption>**Table 1.** Initial conditions and parameters that form the secret key.</caption><thead><tr><th>Symbol</th><th>Definition</th></tr></thead><tbody><tr><td>XP0, XS0, XL0, and XT0</td><td>Initial conditions of the four chaotic maps: PWLCM, skew tent, logistic, and 3-D Chebyshev in [1,2<sup>N</sup> − 1].</td></tr><tr><td>P<sub>p</sub></td><td>PWLCM map control parameter in [1,2<sup>N−1</sup> − 1].</td></tr><tr><td>P<sub>s</sub></td><td>Skew tent map control parameter in [1,2<sup>N</sup> − 1].</td></tr><tr><td>ε<sub>ij</sub></td><td>Coupling matrix M parameters in [1,2<sup>k</sup>] with k ≤ 5.</td></tr><tr><td>Q0</td><td>The initial value of the used LFSR is defined by:<br>Q(n) = x<sup>32</sup> + x<sup>22</sup> + x<sup>2</sup> + x + 1.</td></tr><tr><td>T<sub>r</sub></td><td>The transient phase of 10 bits.</td></tr></tbody></table>

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. \qquad (1) $$

The output *X(n)* is calculated by:

$$ X(n) = XPC(n) \oplus XSC(n) \oplus XLC(n) \oplus XTIC(n) \qquad (2) $$

The coupling system is defined as follows:
$$ \begin{bmatrix} XPC(n) \\ XSC(n) \\ XLC(n) \\ XTIC(n) \end{bmatrix} = M \times \begin{bmatrix} XP(n) \\ XS(n) \\ XL(n) \\ XTI(n) \end{bmatrix} \qquad (3) $$

where

$$ M = \begin{bmatrix} 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{bmatrix} \qquad (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\{\mod(XP(0),2^N), P_p\} \qquad (5) $$

$$ XS(1) = SkewT\{\mod(XS(0),2^N), P_s\} \qquad (6) $$

$$ XL(1) = Logistic\{\mod(XL(0),2^N)\} \qquad (7) $$

$$ XT(1) = 3D Ch\{\mod(XT(0),2^N)\} \qquad (8) $$

Then, for $2 \le n \le N_s$, the samples are calculated by ($N_s$: the number of the desired samples):

$$ XP(n) = PWLCM\{\mod(XPC(n-1), 2^N), P_p\} \qquad (9) $$

$$ XS(n) = SkewT\{\mod(XSC(n-1), 2^N), P_s\} \qquad (10) $$

$$ XL(n) = Logistic\{\mod(XLC(n-1), 2^N)\} \qquad (11) $$

$$ \left\{ \begin{array}{l} XT(n) = 3D Ch\{\mod(XTIC(n-1), 2^N)\} \\ XTI(n) = XT(n) \oplus Q(n) \end{array} \right. \qquad (12) $$

The discrete equations of PWLCM, skew tent, logistic, and 3-D Chebyshev maps are reported in the literature [35–38].

The size of the secret key of the proposed PRNG-SC is:

$$ |K| = |XP0| + |XS0| + |XL0| + |XT0| + |Q0| + |P_p| + |P_s| + |T_r| + (9 \times |\epsilon_{ij}|) = 278 \text{ bits} \qquad (13) $$

where $|XP0|=|XS0|=|XL0|=|XT0|=|Q0|=|P_s|=32 \text{ bits}$, $|P_p|=31 \text{ bits}$, $|T_r|=10 \text{ bits}$, and $|\epsilon_{ij}|=5 \text{ bits}$.

Therefore, the keyspace contains $2^{278}$ different values, which is large enough to make brute-force attacks infeasible.

## 2.2. Circular Substitution Process Based on the S-Box and Their Inverse Processes

In the following, we first describe the construction process of the S-box, then we give the equation of the circular substitution process based on this S-box. Recall that the S-box is generally the only component of a cryptosystem that gives rise to a nonlinear mapping
between inputs and outputs. Its main role is to make the cryptosystem immune against differential and linear cryptanalysis, so the security of the cryptosystem is strongly increased.

### 2.2.1. S-Box Construction

Mathematically, an $n \times n$ S-box is a nonlinear mapping $S : \{0, 1\}^n \rightarrow \{0, 1\}^n$, where $\{0, 1\}^n$ represents the vector spaces of elements from GF (2). Since the key-dependent S-boxes do not offer any specific properties to the attackers, then, they are more secure than fixed S-boxes. Therefore, many methods have been proposed to design and create key-dependent S-boxes in conventional cryptography, such as SEAL [39], which used a Secure Hash Algorithm (SHA) and especially in chaos-based cryptography [40–46]. All of these later methods are based on iterating discrete chaotic maps to generate a 1-D table of size 256, containing unique chaotic values belonging to 0 and 255. The proposed S-box is based on our PRNG-CS and uses the approach of Çavuşoğlu et al. [42].

The block diagram of the 8 × 8 S-box design algorithm is given in Figure 4.

<figure><img src="image_7.png" /><figcaption>**Figure 4.** Block diagram of the proposed chaos-based 8 × 8 S-box construction.</figcaption></figure>

The design steps of the S-box generation algorithm are as follows:

1. Specify a one-dimensional empty array called 1-D S-box $S[...]$.

2. The eight-bit $V$-value is obtained from the PRNG-CS output sequence $X(n)$.

3. Check for the existence of the last obtained $V$-value in the content of the 1-D S-box $S[...]$.

4. If this value exists, it is rejected. Otherwise, it is added to the S-box 1-D $S[...]$.

5. Afterward, new 8-bit values are generated and the whole process is repeated until all 256 values are completed in the form of a sequence $S[t] = \{S[0], ..., S[255]\}$, where each value $\in [0, 255]$ is unique to others in it, so the constructed 8 × 8 S-box is obviously bijective (by construction).

The number $n$ of needed samples to construct the S-box is the size of the dynamic key $K_c: |K_c| = n \times 32$-bit.
In Table 2, we give an example of an S-box obtained by our proposed algorithm, presented in its usual form, a 16×16 matrix of byte values in hexadecimal presentation.

<table><caption>**Table 2.** An example of an S-box is obtained by the proposed algorithm.</caption><thead><tr><th></th><th>0</th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr><th>0</th><td>2E</td><td>3E</td><td>5D</td><td>03</td><td>7C</td><td>B7</td><td>AD</td><td>9B</td><td>E0</td><td>62</td><td>67</td><td>50</td><td>95</td><td>BC</td><td>24</td><td>83</td></tr><tr><th>1</th><td>A6</td><td>CB</td><td>DD</td><td>F5</td><td>BE</td><td>39</td><td>9A</td><td>C3</td><td>2C</td><td>64</td><td>EA</td><td>EC</td><td>05</td><td>3B</td><td>26</td><td>2A</td></tr><tr><th>2</th><td>F8</td><td>B4</td><td>D0</td><td>C5</td><td>30</td><td>FD</td><td>E6</td><td>69</td><td>70</td><td>74</td><td>7A</td><td>77</td><td>F7</td><td>1A</td><td>E5</td><td>DF</td></tr><tr><th>3</th><td>15</td><td>7F</td><td>8B</td><td>32</td><td>51</td><td>F1</td><td>C9</td><td>93</td><td>40</td><td>5C</td><td>48</td><td>8E</td><td>2F</td><td>65</td><td>E2</td><td>CC</td></tr><tr><th>4</th><td>FB</td><td>D8</td><td>BD</td><td>04</td><td>C7</td><td>0B</td><td>E1</td><td>06</td><td>90</td><td>B6</td><td>A1</td><td>EF</td><td>14</td><td>2B</td><td>D5</td><td>82</td></tr><tr><th>5</th><td>4B</td><td>D1</td><td>B8</td><td>59</td><td>92</td><td>E3</td><td>CD</td><td>B9</td><td>38</td><td>1F</td><td>71</td><td>73</td><td>EE</td><td>F9</td><td>46</td><td>45</td></tr><tr><th>6</th><td>C0</td><td>A8</td><td>00</td><td>6E</td><td>9C</td><td>6A</td><td>9F</td><td>A9</td><td>78</td><td>6F</td><td>87</td><td>5E</td><td>D9</td><td>BA</td><td>47</td><td>42</td></tr><tr><th>7</th><td>68</td><td>DA</td><td>F0</td><td>53</td><td>58</td><td>31</td><td>D3</td><td>36</td><td>34</td><td>20</td><td>33</td><td>8D</td><td>D4</td><td>8C</td><td>4C</td><td>3D</td></tr><tr><th>8</th><td>1D</td><td>4E</td><td>61</td><td>E9</td><td>5A</td><td>5F</td><td>4D</td><td>6B</td><td>AA</td><td>C4</td><td>91</td><td>3F</td><td>4A</td><td>1E</td><td>02</td><td>0F</td></tr><tr><th>9</th><td>09</td><td>72</td><td>88</td><td>CA</td><td>F2</td><td>85</td><td>99</td><td>9D</td><td>FF</td><td>CF</td><td>B2</td><td>2D</td><td>52</td><td>23</td><td>E4</td><td>3C</td></tr><tr><th>A</th><td>C8</td><td>EB</td><td>AF</td><td>81</td><td>1C</td><td>FE</td><td>9E</td><td>B5</td><td>7B</td><td>55</td><td>ED</td><td>07</td><td>41</td><td>89</td><td>94</td><td>7E</td></tr><tr><th>B</th><td>12</td><td>11</td><td>D7</td><td>49</td><td>AB</td><td>4F</td><td>21</td><td>DE</td><td>0C</td><td>D6</td><td>17</td><td>BF</td><td>56</td><td>6D</td><td>F3</td><td>01</td></tr><tr><th>C</th><td>1B</td><td>A5</td><td>3A</td><td>8A</td><td>27</td><td>E7</td><td>8F</td><td>0E</td><td>A3</td><td>75</td><td>BB</td><td>84</td><td>76</td><td>CE</td><td>25</td><td>B1</td></tr><tr><th>D</th><td>FA</td><td>DB</td><td>18</td><td>B0</td><td>A0</td><td>C1</td><td>44</td><td>54</td><td>A7</td><td>28</td><td>43</td><td>13</td><td>22</td><td>A2</td><td>35</td><td>FC</td></tr><tr><th>E</th><td>C6</td><td>C2</td><td>66</td><td>63</td><td>AC</td><td>A4</td><td>7D</td><td>F6</td><td>96</td><td>29</td><td>10</td><td>86</td><td>16</td><td>D2</td><td>37</td><td>6C</td></tr><tr><th>F</th><td>79</td><td>08</td><td>97</td><td>E8</td><td>DC</td><td>0A</td><td>19</td><td>0D</td><td>B3</td><td>98</td><td>80</td><td>AE</td><td>F4</td><td>57</td><td>5B</td><td>60</td></tr></tbody></table>

### 2.2.2. Circular Substitution Equation Based on the Constructed S-Box

Once the S-box is constructed, then it is used to perform the substitution operation. Unlike the circular substitution used by Zhang et al. [28], which was performed in ECB mode on the entire plain image, we achieved here the circular substitution in CBC mode on blocks of size 1024 pixels each. The advantages of proceeding in CBC mode are, on the one hand, because it is a secure mode (ECB mode is not secure), and on the other hand, the encryption/decryption processes are carried out on blocks that can be stored and computed on IoT devices which are constrained resource in terms of computing capabilities, and also energy and memory capacities. In addition, in ECB mode, the decryption process requires receiving the entire ciphered image before decrypting it.

To start the substitution process, the input plain image is split into $b_l$ blocks $p_l$, each of size $|p_l| = 1024$ pixels (32 × 32 bytes). Notice that the elements of the S-box are considered to be circular (the last element followed the first element) with a head pointer $h$ initialized to a constant (or a random) value in the range of 0 to 255. Each pixel $p_l(k)$ of a given block $l$ is substituted by an element of the S-box, $s_l(k)$, according to the pixel value $p_l(k)$, the previous substituted pixel $q_{l-1}(k)$, and the pointer $h$ (see Equations (14)–(16)). After a pixel is substituted, the value of the pointer $h$ is adapted to a new value using the second row of Equation (14), where $m_h \in [0, 255]$ is a random value.

$$ \left\{ \begin{array}{l} s_l(k) = S[y_l(k) + h] \mod 256 \\ h = s_l(k) \oplus m_h \end{array} \right. \qquad (14) $$

where

$$ y_l(k) = p_l(k) + q_{l-1}(k) \qquad (15) $$

$$ q_{l-1}(k) = \begin{cases} ivb & \text{if } l = 0 \\ c_{l-1}(k) & \text{if } l > 0 \end{cases} \qquad (16) $$

where $c_{l-1}(k)$ is the previous ciphered pixel obtained after the horizontal and vertical addition diffusion of the block $sp_{l-1}$, which is the permuted of the substituted block $s_{l-1}$, $k = 1, 2, \dots, |p_l| = 1, 2, \dots, b_l$
$b_l = (image\ size/block\ size) = (R \times C \times P/|p_l|)$ (R: number of rows, C: number of columns, and P: number of planes ($P = 1$ for a grayscale image and $P = 3$ for an RGB image).

From Equations (14)–(16), we can observe that all the same pixel values of the plain image are substituted by different values, and then the security is strengthened against cryptographic attacks. In addition, there is an intrinsic diffusion effect in each substituted block.

### 2.2.3. Inverse Substitution Process

The reverse substitution operation is carried out by first, the construction of the inverse S-box, IS, which is derived from the S-box $S(t)$ by a simple operation satisfying the following equation:

$$IS[S(t)] = t \qquad (17)$$

used during the inverse substitution process, then, performing the inverse substitution itself using the following formula to recover each plain pixel $p_l(k)$:

$$\left\{ \begin{array}{l} p_l(k) = (IS[s_l(k)] + 256 - h) \mod 256 \\ h = s_l(k) \oplus m_h \end{array} \right. \qquad (18)$$

## 2.3. Diffusion Process and Its Inverse

A permutation layer based on a modified 2-D cat map followed by a horizontal addition diffusion (HAD) and a vertical addition diffusion (VAD) is used to achieve the diffusion process of the proposed cryptosystem (VAD).

### 2.3.1. Permutation Layer Based on the Modified 2-D Cat Map and Its Reverse

To permute a substituted block $s_l(k)$, utilizing the improved 2-D cat map, we transform it to a matrix form $s_l(i, j)$ such that [24]:

$$s_l(i, j) = s_l(k), \quad k = (i - 1) \times M + j; \quad i = 1, \dots, M; \quad j = 1, \dots, M \qquad (19)$$

The equation of the modified 2-D cat map [47] and its optimized implementation [24] are given below:

$$\begin{bmatrix} i_n \\ j_n \end{bmatrix} = \text{Mod} \left( \begin{bmatrix} 1 & u_d \\ v_d & (1 + u_d v_d) \end{bmatrix} \begin{bmatrix} i \\ j \end{bmatrix} + \begin{bmatrix} r_{id} + r_{jd} \\ r_{jd} \end{bmatrix}, \begin{bmatrix} M \\ M \end{bmatrix} \right) \qquad (20)$$

$$\left\{ \begin{array}{l} i_n = \text{Mod}((i + u_d \times j + Z_1), M) \\ j_n = \text{Mod}((Z_3 + Z_2 \times j), M) \end{array} \right. \qquad (21)$$

with $Z_1 = r_{id} + r_{jd}$, $Z_2 = u_d \times v_d + 1$, and $Z_3 = v_d \times i + r_{jd}$.

The values of $Z_1$ and $Z_2$ are calculated once per round and the value of $Z_3$ is calculated $M$ times per round (with $M = \sqrt{|p_l|} = 32 = 2^q - 1$).

The 2-D cat map is bijective since each permuted element's ($i_n, j_n$) position is unique. Despite it being reversible, the modulo operation on the cat map prevents it from being an invertible function. Thus, the same following relation can be used to perform the permutation and the reverse permutation:

$$sp_l(i_n, j_n) = s_l(i, j), \quad i = 1, \dots, M, \quad j = 1, \dots, M \qquad (22)$$

The dynamic key $Kd$ is formed by four elements $Kd = \{u_d, v_d, r_{id}, r_{jd}\}$, each $\in [1, M-1]$ and it is fed by the PRNG-CS. The size $Kd$ is $|Kd| = 4 \times q = 20$-bit.
### 2.3.2. Horizontal and Vertical Addition Diffusion HAD and VAD and Their Inverses

The operations of horizontal and vertical addition diffusion [26] on a given permuted block $sp_l(i, j)$ are described by the following mathematical model, and shown in Figure 5:

$$sph_l(i, j) = \text{HAD}[sp_l(i, j)] = \begin{cases} sp_l(i, j) + sp_l(i, j-1) \bmod 256 & \text{for } 1 \le i \le M \text{ and } 1 < j \le M \\ sp_l(i, j) + sp_l(i-1, M) \bmod 256 & \text{for } 1 < i \le M \text{ and } j = 1 \\ sp_l(i, j) + sp_l(M, M) \bmod 256 & \text{for } i = j = 1 \end{cases} \quad (23)$$

$$c_l(i, j) = \text{VAD}[sph_l(i, j)] = \begin{cases} sph_l(i, j) + sph_l(i-1, j) \bmod 256 & \text{for } 1 < i \le M \text{ and } 1 \le j \le M \\ sph_l(i, j) + sph_l(M, j-1) \bmod 256 & \text{for } i = 1 \text{ and } 1 < j \le M \\ sph_l(i, j) + sph_l(M, M) \bmod 256 & \text{for } i = j = 1 \end{cases} \quad (24)$$

<figure><img src="image_8.png" /><figcaption>Figure 5. Horizontal and vertical addition diffusion.</figcaption></figure>

The inverse relations of the vertical and horizontal addition diffusion are given by:

$$sph_l(i, j) = \text{InvVAD}[c_l(i, j)] = \begin{cases} c_l(i, j) - c_l(i-1, j) \bmod 256 & \text{for } 1 < i \le M \text{ and } 1 \le j \le M \\ c_l(i, j) - c_l(M, j-1) \bmod 256 & \text{for } i = 1 \text{ and } 1 < j \le M \\ c_l(i, j) - c_l(M, M) \bmod 256 & \text{for } i = j = 1 \end{cases} \quad (25)$$

$$sp_l(i, j) = \text{InvHAD}[sph_l(i, j)] = \begin{cases} sph_l(i, j) - sph_l(i, j-1) \bmod 256 & \text{for } 1 \le i \le M \text{ and } 1 < j \le M \\ sph_l(i, j) - sph_l(i-1, M) \bmod 256 & \text{for } 1 < i \le M \text{ and } j = 1 \text{ and } j = 1 \\ sph_l(i, j) - sph_l(M, M) \bmod 256 & \text{for } i = j = 1 \end{cases} \quad (26)$$

Finally, we summarize in Algorithms 1 and 2, the full operation of encryption and decryption process of the proposed chaos-based cryptosystem, respectively.
**Algorithm 1 Encryption process.**

**Input** : IV = Initial Vector of PRNG – CS;

K = Secret key of the PRNG – CS;

ivb = Initialization vector used in the first block;

b_l = Number of blocks;

p_l = Plaintext block;

PRNG – CS(IV, K) = (Kc, Kd).

**Output:** The block under test is encrypted.

1 **begin**

2 Generate the needed dynamic keys $|K_c|$ to construct the S-box and $|K_d|$ to perform the permutation;

Produce the initial vector ivb with a prng to encrypt the first block and produce h, m_h values (with a prng);

Construct the S-box using the four steps of Figure 4;

for m = 1 to r do

3 **for** l = 1 to b_l **do**

4 Substitution process

for k = 1 to |p_l| **do**

5 Calculate y_l(k) by Equations (15) and (16);
Perform the substitution process using Equation (14) to obtain
s_l(k);

6 **end**

7 Permutation process for the diffusion

$M = \sqrt{|p_l|};$

**for** i = 1 to M **do**

8 **for** j = 1 to M **do**

9 Calculate k = (i - 1) × M + j;
Perform the permutation of pixels: sp_l(i_n, j_n) = s_l(i, j);

10 **end**

11 **end**

12 HAD diffusion

**for** i = 1 to M **do**

13 **for** j = 1 to M **do**

14 Calculate horizontal diffusion using Equation (23);

15 **end**

16 **end**

17 VAD diffusion

**for** i = 1 to M **do**

18 **for** j = 1 to M **do**

19 Calculate vertical diffusion using Equation (24);

20 **end**

21 **end**

22 **end**

23 **end**

24 **end**
performance of the proposed chaotic generator, histogram chi-square, NIST tests on the generated sequences, and finally, we examine the security of the cryptosystem up against the usual cryptographic attacks.

All the simulations were implemented using MATLAB (R2016b) on a PC with a 2.5 GHz processor Intel Core i5-7300HQ CPU, 16 GB RAM, under Windows 10 Professional, and a 64-bit operating system.

### 3.1. Estimation of the Number of Rounds Required

In this section, we provide the number *r* of rounds that was used in the chaos-based cryptosystem implementation. For this, we determined the average Hamming distance (HD) between two ciphered images *C*₁, using 100 secret keys, and *C*₂ using the same secret keys, each with a different LSB-bit. This test was applied to 10 different plain images. The HD(*C*₁, *C*₂) was defined by the following equation:

$$HD(C_1, C_2) = \frac{1}{Nb} \sum_{i=1}^{Nb} (C_1(i) \oplus C_2(i)) \quad (27)$$

where Nb was the number of bits in a ciphered image. In Table 3, a list of the Hamming distance outcomes for *r* = 1, 2, and 3 is provided.

<table><caption>**Table 3.** HD versus the round times in the encryption process.</caption><thead><tr><th rowspan="2">Image</th><th rowspan="2">Size</th><th colspan="3">HD (%)</th></tr><tr><th>r = 1</th><th>r = 2</th><th>r = 3</th></tr></thead><tbody><tr><td>Airplane</td><td>512 × 512 × 3</td><td>50.0010</td><td>49.9974</td><td>49.9998</td></tr><tr><td>Black</td><td>256 × 256 × 1</td><td>50.0027</td><td>50.0050</td><td>49.9977</td></tr><tr><td>Bridge</td><td>512 × 512 × 1</td><td>50.0039</td><td>49.9962</td><td>50.0021</td></tr><tr><td>Cameraman</td><td>256 × 256 × 1</td><td>49.9936</td><td>50.0018</td><td>50.0000</td></tr><tr><td>Flowers</td><td>256 × 256 × 3</td><td>49.9993</td><td>50.0034</td><td>49.9955</td></tr><tr><td>Goldhill</td><td>512 × 512 × 3</td><td>49.9999</td><td>49.9988</td><td>49.9996</td></tr><tr><td>Kiel</td><td>512 × 512 × 1</td><td>50.0010</td><td>49.9989</td><td>50.0036</td></tr><tr><td>Lena</td><td>512 × 512 × 3</td><td>50.0001</td><td>49.9997</td><td>49.9972</td></tr><tr><td>Sailboat</td><td>512 × 512 × 3</td><td>49.9961</td><td>50.0050</td><td>50.0000</td></tr><tr><td>White</td><td>256 × 256 × 1</td><td>50.0107</td><td>49.9948</td><td>50.0009</td></tr></tbody></table>

It is noteworthy from Table 3 that for *r* ≥ 1, the HDs for the various plain images encrypted by the proposed encryption algorithm were close to the optimal value of 50%. Therefore, for all subsequent tests, we used *r* = 1.

This result was also confirmed by the plaintext sensitivity test carried out in Section 3.3.3.

### 3.2. Performance Analysis of the Proposed PRNG-CS

We give below the performance obtained by the proposed chaotic generator.

#### 3.2.1. Histogram and Chi-Square Test

A histogram describes the distribution of numerical data in the form of a graph. It forms an estimation of the probability distribution of a random or pseudorandom variable.

The distribution uniformity of the generated sequences was examined. A uniform distribution over the whole phase space must be provided by the proposed PRNG-CS. Figure 6 shows an example of a histogram of a produced sequence, formed by 3,125,100 samples, in which the first 100 samples were not used (the transient regime).

Visually, we observe that the generated sequence is nearly uniformly distributed.
<figure><img src="image_9.png" /><figcaption>Figure 6. An example of a histogram of a generated sequence X(n).</figcaption></figure>

Then, to assert the uniformity of this sequence, we applied the chi-square test. The experimental chi-square $\chi^2$ value was given by:

$$ \chi_{exp}^2 = \sum_{i=0}^{N_c-1} \frac{(O_i - E_i)^2}{E_i} \qquad (28) $$

where $N_c = 1000$, $O_i$, and $E_i = Ns/Nc$ are the number of classes, the number of calculated samples in the ith class $E_i$, and the anticipated number of samples of a uniform distribution. Table 4 shows the experimental and theoretical values for the chi-square values obtained. The theoretical value of the chi-square was greater than the obtained experimental one, which proved that the sequence generated by the proposed PRNG-CS was uniform.

<table><caption>Table 4. Chi-square results on the tested histograms.</caption><thead><tr><th>Chi-Square Test</th><th>PRNG-CS</th></tr></thead><tbody><tr><td>χ<sup>2</sup><sub>ex</sub></td><td>967.700</td></tr><tr><td>χ<sup>2</sup><sub>th</sub> (1000, 0.05)</td><td>1073.642</td></tr></tbody></table>

Note that this test was repeated on one hundred various sequences, each was generated using a different secret key. All the sequences passed the chi-square test.

### 3.2.2. NIST

The NIST Test Suite [48] is a statistical package consisting of 15 tests that were developed to test the randomness of binary sequences produced by PRNGs. Some tests are decomposable into a variety of subtests. To determine the result of each test, a p-value is computed. A p-value ≥ 0.01 means that the sequence is considered to be random with a confidence of 99%. A p-value ≤ 0.01 means that the sequence is nonrandom with a confidence of 99%.

To carry out the NIST test, we produced 100 different sequences of 3,125,100 32-bit samples each, using 100 random secret keys. Only 3,125,000 samples per sequence (i.e., $10^8$ bits) were used (the first 100 samples for each sequence, corresponding to the transient regime, were not useful for the various robustness tests).

We give in Table 5 the p-values obtained for the 15 tests by the proposed PRNG-CS. All p-values were distinctly larger than the critical value 0.01, which proved the high degree of randomness of the generated sequences. Therefore, from the statistical results obtained previously, we could confirm that the proposed PRNG-CS was robust against statistical attacks.
<table><caption>**Table 5.** *P*-values and proportion results of NIST tests.</caption><thead><tr><th>Test</th><th><i>p</i>-Value</th><th>Proportion (%)</th></tr></thead><tbody><tr><td>Frequency test</td><td>0.494</td><td>98.000</td></tr><tr><td>Block-frequency test</td><td>0.514</td><td>99.000</td></tr><tr><td>Cumulative sums test</td><td>0.504</td><td>98.000</td></tr><tr><td>Runs test</td><td>0.494</td><td>99.000</td></tr><tr><td>Longest-run test</td><td>0.262</td><td>97.000</td></tr><tr><td>Rank test</td><td>0.868</td><td>99.000</td></tr><tr><td>FFT test</td><td>0.384</td><td>99.000</td></tr><tr><td>Nonperiodic templates</td><td>0.482</td><td>99.061</td></tr><tr><td>Overlapping templates</td><td>0.596</td><td>98.000</td></tr><tr><td>Universal</td><td>0.946</td><td>99.000</td></tr><tr><td>Approximate entropy</td><td>0.419</td><td>100.000</td></tr><tr><td>Random excursions</td><td>0.439</td><td>98.214</td></tr><tr><td>Random excursion variant</td><td>0.488</td><td>98.651</td></tr><tr><td>Serial test</td><td>0.415</td><td>100.000</td></tr><tr><td>Linear complexity</td><td>0.817</td><td>97.000</td></tr></tbody></table>

### 3.3. Security Analysis of the Proposed Chaos-Based Cryptosystem

In this section, we first give the performance of the proposed S-box, then we evaluate the security of the proposed chaotic encryption system regarding statistical attacks and a cryptanalytic analysis. Eventually, we estimate the computing performance.

#### 3.3.1. Performance Analysis of the Proposed Key-Dependent S-Box

A strong S-box should have some important properties, based on an information theory analysis. The main properties, besides the bijectivity, are nonlinearity, strict avalanche criterion (SAC), output bits independence criterion (BIC), equiprobable input/output XOR distribution, differential approximation probability (DP), and linear approximation probability (LP). To demonstrate the performance of the proposed S-box, we quantified these properties and compared the results obtained with those obtained from several S-boxes in the literature.

From Table 6, we can observe that the constructed S-box met all the requirements of a robust S-box and the performance obtained were close to those obtained by [42–44,49,50].

<table><caption>**Table 6.** Performance comparison of different S-boxes.</caption><thead><tr><th rowspan="2">S-Box</th><th colspan="3">Nonlinearity</th><th colspan="3">SAC</th><th rowspan="2">BIC-SAC</th><th rowspan="2">BIC Nonlinearity</th><th rowspan="2">DP</th><th rowspan="2">LP</th></tr><tr><th>Min</th><th>Avg</th><th>Max</th><th>Min</th><th>Avg</th><th>Max</th></tr></thead><tbody><tr><td>Proposed S-box</td><td>102</td><td>104</td><td>108</td><td>0.4375</td><td>0.4948</td><td>0.5625</td><td>0.4991</td><td>103.4286</td><td>10</td><td>0.1094</td></tr><tr><td>Çavuşoğlu et al. [42]</td><td>104</td><td>106</td><td>110</td><td>0.4218</td><td>0.5039</td><td>0.5937</td><td>0.5058</td><td>103.40</td><td>10</td><td>0.1406</td></tr><tr><td>Lambić et al. [43]</td><td>106</td><td>106.75</td><td>108</td><td>-</td><td>0.5034</td><td>-</td><td>0.5014</td><td>103.78</td><td>10</td><td>0.1328</td></tr><tr><td>Ahmed et al. [44]</td><td>106</td><td>107.5</td><td>108</td><td>-</td><td>0.4943</td><td>-</td><td>0.4982</td><td>104.35</td><td>10</td><td>0.1250</td></tr><tr><td>Lai et al. [49]</td><td>104</td><td>105</td><td>110</td><td>0.3906</td><td>0.5014</td><td>0.5937</td><td>0.5028</td><td>102.75</td><td>10</td><td>0.1250</td></tr><tr><td>Al Solami et al. [50]</td><td>106</td><td>108.5</td><td>110</td><td>-</td><td>0.5017</td><td>-</td><td>0.5026</td><td>104</td><td>10</td><td>0.1094</td></tr></tbody></table>

You can see from Table 2 that the constructed S-box had all the different output values of the interval [0, 255], so it satisfied the requirement of bijectivity.

By comparing the properties of our S-box with other S-boxes, we can claim that the proposed chaos-based S-box was better than others in some measures. Therefore, the proposed S-box was suitable for use in the proposed encryption scheme.

#### 3.3.2. Statistical Analysis

To prove the robustness of the proposed chaos-based cryptosystem against statistical attacks, we performed the following experiments on various plain images: histogram, chi-square test, correlation, and entropy analysis.
## Histograms of encrypted images

The ciphered image must have a uniform distribution and this is a basic condition for any cryptosystem to be strong against statistical attacks. We encrypted 10 color and gray plain images with varying features and sizes and then we deducted the histograms of the plain images and corresponding ciphered images. The obtained results are given in Figures 7–16, and on each figure, we show: (a) the plain image, (b) the histogram of the plain image, (c) the corresponding ciphered image, and (d) the histogram of the ciphered image.

<figure><img src="image_10.png" /><figcaption>Figure 7. Histograms: (a) Airplane image, (b) histogram of plain Airplane, (c) encrypted Airplane, and (d) histogram of encrypted Airplane.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Figure 8. Histograms: (a) Black image, (b) histogram of plain Black, (c) encrypted Black, and (d) histogram of encrypted Black.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Figure 9. Histograms: (a) Bridge image, (b) histogram of plain Bridge, (c) encrypted Bridge, and (d) histogram of encrypted Bridge.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Figure 10. Histograms: (a) Cameraman image, (b) histogram of plain Cameraman, (c) encrypted Cameraman, and (d) histogram of encrypted Cameraman.</figcaption></figure>
<figure><img src="image_14.png" /><figcaption>**Figure 11.** Histograms: (a) Flowers image, (b) histogram of plain Flowers, (c) encrypted Flowers, and (d) histogram of encrypted Flowers.</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>**Figure 12.** Histograms: (a) Goldhill image, (b) histogram of plain Goldhill, (c) encrypted Goldhill, and (d) histogram of encrypted Goldhill.</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>**Figure 13.** Histograms: (a) Kiel image, (b) histogram of plain Kiel, (c) encrypted Kiel, and (d) histogram of encrypted Kiel.</figcaption></figure>

<figure><img src="image_17.png" /><figcaption>**Figure 14.** Histograms: (a) Lena image, (b) histogram of plain Lena, (c) encrypted Lena, and (d) histogram of encrypted Lena.</figcaption></figure>
<figure><img src="image_18.png" /><figcaption>**Figure 15.** Histograms: (a) Sailboat image, (b) histogram of plain Sailboat, (c) encrypted Sailboat, and (d) histogram of encrypted Sailboat.</figcaption></figure>

<figure><img src="image_19.png" /><figcaption>**Figure 16.** Histograms: (a) White image, (b) histogram of plain White, (c) encrypted White, and (d) histogram of encrypted White.</figcaption></figure>

Note that visually the histograms of the encrypted images appeared to have a uniform distribution and were very different from those of the single images. Therefore, no visual information could be detected from the encrypted images by the proposed chaos-based cryptosystem.

To check the uniformity of the histogram, we applied the chi-square test (using Equation (28)) to statistically confirm it. However, here, $N_c$ was the number of values (256), $O_i$ were the detected occurrence frequencies of each color value $\in [0, 255]$ in the histogram of the encrypted image, and $E_i$ was the anticipated occurrence frequency of the uniform distribution, provided by $E_i = (L \times C \times P)/N_c$. The distribution of the tested histogram was uniform if it met the following condition: $\chi_{exp}^2 < \chi_{th}^2 (N_c - 1, \alpha) = 293.2478$ (for $N_c = 256$ and $\alpha = 0.05$) [12].

In Table 7, we reported the experimental values of the chi-square test for the 10 ciphered images. The values of the experimental chi-square obtained confirmed the uniformity of the histograms of the tested encrypted images.

<table><caption>**Table 7.** Chi-square test.</caption><thead><tr><td>Image</td><td>Size</td><td>Chi-Square Test</td></tr></thead><tbody><tr><td>Airplane</td><td>512 × 512 × 3</td><td>256.7715</td></tr><tr><td>Black</td><td>256 × 256 × 1</td><td>234.0391</td></tr><tr><td>Bridge</td><td>512 × 512 × 1</td><td>256.6113</td></tr><tr><td>Cameraman</td><td>256 × 256 × 1</td><td>275.5625</td></tr><tr><td>Flowers</td><td>256 × 256 × 3</td><td>236.6458</td></tr><tr><td>Goldhill</td><td>512 × 512 × 3</td><td>239.6576</td></tr><tr><td>Kiel</td><td>512 × 512 × 1</td><td>243.4629</td></tr><tr><td>Lena</td><td>512 × 512 × 3</td><td>249.1270</td></tr><tr><td>Sailboat</td><td>512 × 512 × 3</td><td>242.1380</td></tr><tr><td>White</td><td>256 × 256 × 1</td><td>273.6641</td></tr></tbody></table>
Correlation Analysis

Another key property of a secure cryptosystem is that the correlation of the encrypted image should be close to zero and very different from the correlation of the plain image, which is generally close to one. To measure this property, N = 8000 pairs of two adjacent pixels in the horizontal (HC), vertical (VC), and diagonal (DC) directions from the original and the ciphered images were randomly selected. Then, the correlation coefficients were calculated using the following equation:

$$ \rho_{xy} = \frac{cov(x, y)}{\sqrt{D(x)}\sqrt{D(y)}} \qquad (29) $$

with:

$$ cov(x, y) = \frac{1}{N} \sum_{i=1}^{N} ([x_i - E(x)][y_i - E(y)]) \qquad (30) $$

$$ E(x) = \frac{1}{N} \sum_{i=1}^{N} x_i \qquad (31) $$

$$ D(x) = \frac{1}{N} \sum_{i=1}^{N} (x_i - E(x))^2 \qquad (32) $$

Furthermore, x and y were the gray-level values of two adjacent pixels in the image.

In Table 8, we give the mean correlation coefficient value based on 10 images ciphered by 100 different secret keys. From this table, the correlation coefficients in all directions of the plain images were close to one, indicating that the pixels were highly correlated, while those of encrypted images were near to zero, which proved that there was no correlation between the plain and ciphered images.

<table><caption>**Table 8.** The correlation coefficient of 8000 pairs of two adjacent pixels of the plain and ciphered images.</caption><thead><tr><th rowspan="2">Image</th><th rowspan="2">Size</th><th rowspan="2"></th><th colspan="3">Plain Image</th><th colspan="3">Encrypted Image</th></tr><tr><th>HC</th><th>VC</th><th>DC</th><th>HC</th><th>VC</th><th>DC</th></tr></thead><tbody><tr><td rowspan="3">Airplane</td><td rowspan="3">512 × 512 × 3</td><td>R</td><td>0.97191</td><td>0.96051</td><td>0.93848</td><td>0.00006</td><td>-0.00153</td><td>0.00024</td></tr><tr><td>G</td><td>0.95150</td><td>0.96915</td><td>0.92863</td><td>-0.00154</td><td>-0.00041</td><td>-0.00098</td></tr><tr><td>B</td><td>0.96226</td><td>0.94538</td><td>0.92419</td><td>-0.00033</td><td>-0.00056</td><td>-0.00004</td></tr><tr><td>Black</td><td>256 × 256 × 1</td><td></td><td>-</td><td>-</td><td>-</td><td>-0.00167</td><td>-0.00044</td><td>-0.00074</td></tr><tr><td>Bridge</td><td>512 × 512 × 1</td><td></td><td>0.93981</td><td>0.92720</td><td>0.89716</td><td>-0.00130</td><td>0.00172</td><td>0.00084</td></tr><tr><td>Cameraman</td><td>256 × 256 × 1</td><td></td><td>0.92013</td><td>0.95496</td><td>0.89590</td><td>0.00110</td><td>0.00193</td><td>0.00028</td></tr><tr><td rowspan="3">Flowers</td><td rowspan="3">256 × 256 × 3</td><td>R</td><td>0.95049</td><td>0.96800</td><td>0.93340</td><td>0.00197</td><td>-0.00128</td><td>0.00153</td></tr><tr><td>G</td><td>0.91532</td><td>0.94200</td><td>0.88863</td><td>-0.00082</td><td>-0.00019</td><td>0.00071</td></tr><tr><td>B</td><td>0.92085</td><td>0.94834</td><td>0.89510</td><td>-0.00092</td><td>0.00009</td><td>0.00182</td></tr><tr><td rowspan="3">Goldhill</td><td rowspan="3">512 × 512 × 3</td><td>R</td><td>0.97767</td><td>0.97649</td><td>0.95975</td><td>0.00039</td><td>0.00052</td><td>-0.00058</td></tr><tr><td>G</td><td>0.98180</td><td>0.98496</td><td>0.96998</td><td>-0.00047</td><td>0.00028</td><td>0.00148</td></tr><tr><td>B</td><td>0.98453</td><td>0.98641</td><td>0.97339</td><td>-0.00140</td><td>0.00084</td><td>-0.00024</td></tr><tr><td>Kiel</td><td>512 × 512 × 1</td><td></td><td>0.90591</td><td>0.82571</td><td>0.78020</td><td>0.00168</td><td>-0.00127</td><td>-0.00044</td></tr><tr><td rowspan="3">Lena</td><td rowspan="3">512 × 512 × 3</td><td>R</td><td>0.97529</td><td>0.98540</td><td>0.96464</td><td>0.00055</td><td>-0.00041</td><td>0.00001</td></tr><tr><td>G</td><td>0.96666</td><td>0.98011</td><td>0.95321</td><td>-0.00162</td><td>0.00049</td><td>-0.00023</td></tr><tr><td>B</td><td>0.93357</td><td>0.95552</td><td>0.91819</td><td>0.00077</td><td>-0.00006</td><td>0.00042</td></tr><tr><td rowspan="3">Sailboat</td><td rowspan="3">512 × 512 × 3</td><td>R</td><td>0.95595</td><td>0.95302</td><td>0.94030</td><td>-0.00041</td><td>0.00070</td><td>-0.00001</td></tr><tr><td>G</td><td>0.97088</td><td>0.96404</td><td>0.95027</td><td>-0.00096</td><td>0.00038</td><td>-0.00015</td></tr><tr><td>B</td><td>0.97054</td><td>0.96872</td><td>0.95208</td><td>-0.00164</td><td>0.00048</td><td>-0.00018</td></tr><tr><td>White</td><td>256 × 256 × 1</td><td></td><td>-</td><td>-</td><td>-</td><td>-0.00165</td><td>0.00025</td><td>0.00036</td></tr></tbody></table>

These results can be observed visually in Figure 17, in which we show the correlation of adjacent pixels of the Goldhill (512 × 512 × 3) and encrypted Goldhill images in the three directions: horizontal, vertical, and diagonal, respectively.
<figure><img src="image_20.png" /><figcaption>**Figure 17.** Distribution of adjacent pixels in the plain and encrypted images of Goldhill in the three directions: horizontal, vertical, and diagonal, respectively.</figcaption></figure>

Entropy Analysis

The random behavior of the encrypted image can also be evaluated using the entropy information defined by:

$$H(C) = \sum_{i=0}^{N_c-1} P(c_i) \times \log_2 \frac{1}{P(c_i)} \quad (33)$$

where $H(C)$ is the entropy of the encrypted image C, $P(c_i)$ is the occurrence value of each level ($i$ = 0, 1, 2, ..., 255). In the condition of equal probability levels ($P(c_i) = 2^{-8}$), the entropy is maximum, $H(C) = 8$.

We show in Table 9 the entropy test results of the original and encrypted images. It is clear that the results for the encrypted images were close to the optimal value. Based on these results, the proposed chaos-based cryptosystem had a high degree of resilience.

<table><caption>**Table 9.** Entropy test results.</caption><thead><tr><th>Image</th><th>Size</th><th>Plain</th><th>Encrypted</th></tr></thead><tbody><tr><td>Airplane</td><td>512 × 512 × 3</td><td>6.6639</td><td>7.9997</td></tr><tr><td>Black</td><td>256 × 256 × 1</td><td>0.0000</td><td>7.9974</td></tr><tr><td>Bridge</td><td>512 × 512 × 1</td><td>5.7056</td><td>7.9992</td></tr><tr><td>Cameraman</td><td>256 × 256 × 1</td><td>6.9046</td><td>7.9977</td></tr><tr><td>Flowers</td><td>256 × 256 × 3</td><td>7.5434</td><td>7.9991</td></tr><tr><td>Goldhill</td><td>512 × 512 × 3</td><td>7.6220</td><td>7.9997</td></tr><tr><td>Kiel</td><td>512 × 512 × 1</td><td>6.9589</td><td>7.9994</td></tr><tr><td>Lena</td><td>512 × 512 × 3</td><td>5.6822</td><td>7.9998</td></tr><tr><td>Sailboat</td><td>512 × 512 × 3</td><td>7.7632</td><td>7.9998</td></tr><tr><td>White</td><td>256 × 256 × 1</td><td>0.0000</td><td>7.9968</td></tr></tbody></table>
Based on all of these results of the histogram, chi-square, correlation, and information entropy analysis, the proposed chaos-based cryptosystem was secure against statistical attacks.

### 3.3.3. Cryptanalytic Analysis

In the following part, we perform some habitual cryptanalytic analyses such as the key sensitivity and the plaintext sensitivity test.

#### Key Sensitivity

A secure encryption/decryption system should be very sensitive to the secret key, i.e., even a one-bit change in the secret key should produce a completely different encrypted image. The testing scenario of the key sensitivity was as follows: first, a plain-image *I* was encrypted using a secret key *K*₁ to obtain *C*₁, then the same plain-image *I* was encrypted using a secret key *K*₂ different from *K*₁ by just a one bit LSB to obtain *C*₂. Three parameters, namely the number of pixels change rate (NPCR), the unified average changing intensity (UACI) [51], and the Hamming distance (see Equation (27)) were used to evaluate the key sensitivity and were defined as follows:

$$NPCR = \frac{1}{R \times C \times P} \sum_{i=1}^{R} \sum_{j=1}^{C} \sum_{p=1}^{P} D(i, j, p) \times 100\% \quad (34)$$

$$D(i, j, p) = \begin{cases} 0 & \text{if } C_1(i, j, p) = C_2(i, j, p) \\ 1 & \text{if } C_1(i, j, p) \neq C_2(i, j, p) \end{cases} \quad (35)$$

$$UACI = \frac{1}{R \times C \times P \times 255} \sum_{i=1}^{R} \sum_{j=1}^{C} \sum_{p=1}^{P} |C_1 - C_2| \times 100\% \quad (36)$$

In the above relation, *i*, *j*, and *p* were, respectively, the row, column, and plane indexes of the image. *R*, *C*, and *P* were its length, width, and plane sizes.

This test was repeated over 100 different secret keys.

Table 10 presents the average results obtained for the NPCR, UACI, and HD.

<table><caption>**Table 10.** Average NPCR, UACI, and HD key sensitivity tests.</caption><thead><tr><th rowspan="2">Image</th><th rowspan="2">Size</th><th colspan="3">Key Sensitivity Test</th></tr><tr><th>NPCR (%)</th><th>UACI (%)</th><th>HD (%)</th></tr></thead><tbody><tr><td>Airplane</td><td>512 × 512 × 3</td><td>99.6065</td><td>33.4666</td><td>50.0052</td></tr><tr><td>Black</td><td>256 × 256 × 1</td><td>99.6099</td><td>33.4323</td><td>50.0094</td></tr><tr><td>Bridge</td><td>512 × 512 × 1</td><td>99.6098</td><td>33.5052</td><td>50.0019</td></tr><tr><td>Cameraman</td><td>256 × 256 × 1</td><td>99.5992</td><td>33.4234</td><td>49.9844</td></tr><tr><td>Flowers</td><td>256 × 256 × 3</td><td>99.6040</td><td>33.4772</td><td>49.9941</td></tr><tr><td>Goldhill</td><td>512 × 512 × 3</td><td>99.6069</td><td>33.4464</td><td>49.9942</td></tr><tr><td>Kiel</td><td>512 × 512 × 1</td><td>99.6042</td><td>33.4650</td><td>49.9976</td></tr><tr><td>Lena</td><td>512 × 512 × 3</td><td>99.6088</td><td>33.4664</td><td>49.9907</td></tr><tr><td>Sailboat</td><td>512 × 512 × 3</td><td>99.6077</td><td>33.4680</td><td>50.0090</td></tr><tr><td>White</td><td>256 × 256 × 1</td><td>99.6231</td><td>33.5524</td><td>50.0000</td></tr></tbody></table>

The resulting values obtained were near the optimal values of NPCR, UACI, and HD which were 99.6094%, 33.4635%, and 50%, respectively. Therefore, the proposed scheme was very sensitive to small changes in the secret key.

#### Plaintext sensitivity test

To resist known and chosen plaintext attacks, which are related to the differential attack, the cryptosystem must be sensitive to a single bit change in the plaintext. The plaintext sensitivity attack test case is almost identical to the key sensitivity attack. Indeed, after
having encrypted a plain image, we chose 21-pixel positions [26] and we changed, in turn, their LSB bit, then we encrypted them and calculate the 21 HDs.

In Figure 18, we show for each position the HDs of the 10 test images (red dots) as well as their average values (green line). As we can see, for each position, the average HD was close to the optimal value of 50%. Furthermore, the maximum value of the HD was equal to 50.1602% and the minimum value was equal to 49.8039% which was close to the optimal value.

<figure><img src="image_21.png" /><figcaption>**Figure 18.** Plaintext sensitivity test evaluated by the Hamming distance.</figcaption></figure>

Moreover, in Table 11, we give the average NPCR, UACI, and HD on 21 positions for each image. According to these results, the average values of the obtained NPCR, UACI, and HD were almost equal to their optimal value. These values proved that the proposed chaos-based cryptosystem was highly sensitive to small changes in the plaintext.

<table><caption>**Table 11.** NPCR, UACI, and HD of the plaintext sensitivity test.</caption><thead><tr><th rowspan="2">Image</th><th rowspan="2">Size</th><th colspan="3">Plaintext Sensitivity</th></tr><tr><th>NPCR (%)</th><th>UACI (%)</th><th>HD (%)</th></tr></thead><tbody><tr><td>Airplane</td><td>512 × 512 × 3</td><td>99.6102</td><td>33.4659</td><td>49.9972</td></tr><tr><td>Black</td><td>256 × 256 × 1</td><td>99.6067</td><td>33.4840</td><td>50.0143</td></tr><tr><td>Bridge</td><td>512 × 512 × 1</td><td>99.6114</td><td>33.4960</td><td>50.0060</td></tr><tr><td>Cameraman</td><td>256 × 256 × 1</td><td>99.6068</td><td>33.4616</td><td>49.9907</td></tr><tr><td>Flowers</td><td>256 × 256 × 3</td><td>99.6016</td><td>33.4563</td><td>49.9954</td></tr><tr><td>Goldhill</td><td>512 × 512 × 3</td><td>99.6081</td><td>33.4460</td><td>50.0003</td></tr><tr><td>Kiel</td><td>512 × 512 × 1</td><td>99.6075</td><td>33.4658</td><td>49.9974</td></tr><tr><td>Lena</td><td>512 × 512 × 3</td><td>99.6092</td><td>33.4669</td><td>50.0028</td></tr><tr><td>Sailboat</td><td>512 × 512 × 3</td><td>99.6058</td><td>33.4837</td><td>50.0062</td></tr><tr><td>White</td><td>256 × 256 × 1</td><td>99.6008</td><td>33.5139</td><td>49.9981</td></tr></tbody></table>

### 3.3.4. Robustness against Noise and Occlusion

Encrypted images transmitted may be affected by channel noise and data loss. In this paragraph, we study the resistance capacity of the proposed cryptosystem against noise and occlusion. We utilized salt and pepper noise and an occlusion attack [25].
We added salt and pepper noise with different intensities (0.01, 0.02, 0.05, and 0.1) to the encrypted Cameraman image (see Figure 10c), as shown in Figure 19a–d, respectively, and then we decrypted them. The recovered images are shown in Figure 19e–h, respectively. It can be seen that under limited noise, the decrypted images were always identified. Thus, our proposed decryption system had good robustness against noise attacks.

<figure><img src="image_22.png" /><figcaption>**Figure 19.** Robustness against salt and pepper noise.</figcaption></figure>

Another kind of attack is occlusion. To assess the robustness of the cryptosystem against such an attack, first, we occluded the Cameraman encrypted image (see Figure 10c) with different data loss sizes and positions: 1/16, 1/8, 1/4, and 1/2, as shown in Figure 20a–d, respectively, then, we decrypted and shown them in Figure 20e–h. We can observe that all the recovered images were recognized but their qualities decreased with the increase of the occlusion size. Therefore, the proposed cryptosystem had a high level of robustness against occlusion attacks.

<figure><img src="image_23.png" /><figcaption>**Figure 20.** Robustness against occlusion attack.</figcaption></figure>
### 3.3.5. The Speed Performance of the Proposed Chaos-Based Cryptosystem

Computing performance is an important issue for practical applications and largely depends on the programming languages used. The Matlab language is not a good candidate to achieve high computing performance compared to C language, VHDL description language, etc. However, with Matlab, we can design and realize cryptosystems faster than the other languages mentioned.

We evaluated the computational performance: average encryption time, average encryption throughput (ET), and average number of needed cycles per bytes (NCpB) of the proposed cryptosystem and we compared its performance (NCpB) with other cryptosystems designed in the Matlab language.

The ET and NCpB are given by the following equation:

$$ET = \frac{\text{Image Size (Bytes)}}{\text{Average Encryption Time (second)}} \qquad (37)$$

$$NCpB = \frac{\text{CPU Speed (Hertz)}}{\text{ET (Bytes/s)}} \qquad (38)$$

In Table 12, we give the computing performance obtained by the proposed encryption system using 100 different secret keys, for four plain images.

<table><caption>**Table 12.** The proposed encryption system's computing performance.</caption><thead><tr><th>Image</th><th>Size</th><th>Encryption Time (Milliseconds)</th><th>ET (Mbps)</th><th>NCpB (Cycles/Byte)</th></tr></thead><tbody><tr><td>Cameraman</td><td>256 × 256 × 1</td><td>39.3</td><td>1.589</td><td>1501</td></tr><tr><td>Flowers</td><td>256 × 256 × 3</td><td>119.2</td><td>1.5726</td><td>1516</td></tr><tr><td>Kiel</td><td>512 × 512 × 1</td><td>163.9</td><td>1.5249</td><td>1564</td></tr><tr><td>Lena</td><td>512 × 512 × 3</td><td>602.3</td><td>1.2451</td><td>1915</td></tr></tbody></table>

In Table 13, we compare the NCpB of our algorithm for the Lena image of size 512 × 512 × 1 with the NCpBs of other chaos-based encryption algorithms.

<table><caption>**Table 13.** Comparison of NCpBs from different encryption schemes.</caption><thead><tr><th>Cryptosystem</th><th>NCpB</th></tr></thead><tbody><tr><td>Proposed</td><td>1568</td></tr><tr><td>Qiao et al. [25]</td><td>77,386</td></tr><tr><td>Luo et al. [52]</td><td>95,368</td></tr><tr><td>Huang et al. [53]</td><td>15,642</td></tr></tbody></table>

As Table 13 shows, the proposed encryption system had higher computational performance efficiency than the others.

## 4. Conclusions

This paper proposed a new secure chaos-based cryptosystem system for a block cipher in CBC mode and evaluated its performance. The proposed cryptosystem achieved high confusion diffusion effects thanks to a robust pseudorandom number generator of chaotic sequences, a strong circular substitution based on the proposed S-box, and a solid diffusion layer. The proposed PRNG-CS was formed by four discrete 1-D chaotic maps weakly coupled by a predefined coupling matrix M, to avoid the divide-and-conquer attack, and to increase the randomness of the sequences produced as well as their lengths. The diffusion layer was performed by a 2-D modified cat map and a horizontal addition diffusion (HAD) followed by a vertical addition diffusion (VAD). The experimental results and the security analysis demonstrated that the proposed cryptosystem could successfully resist various attacks known in the literature, such as statistical attacks, brute force attacks, noise attacks,
and occlusion attacks, and therefore could be used to secure sensitive data. In a future study, we plan to address the hardware implementation of the system.

**Author Contributions:** Conceptualization, F.D.; Formal analysis, R.L.; Methodology, F.D.; Writing—original draft, F.D.; Writing—review & editing, F.D. and S.E.A.; Validation, W.E.H.Y., M.M. and R.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

## References

1. Matthews, R. On the derivation of a "chaotic" encryption algorithm. *Cryptologia* **1989**, *13*, 29–41. [CrossRef]

2. Liu, Y.; Tong, X.; Hu, S. A family of new complex number chaotic maps based image encryption algorithm. *Signal Process. Image Commun.* **2013**, *28*, 1548–1559. [CrossRef]

3. Zhang, X.; Shao, L.; Zhao, Z.; Liang, Z. An image encryption scheme based on constructing large permutation with chaotic sequence. *Comput. Electr. Eng.* **2014**, *40*, 931–941. [CrossRef]

4. Fouda, J.A.E.; Effa, J.Y.; Sabat, S.L.; Ali, M. A fast chaotic block cipher for image encryption. *Commun. Nonlinear Sci. Numer. Simul.* **2014**, *19*, 578–588. [CrossRef]

5. Caragata, D.; El Assad, S.; Luduena, M. An improved fragile watermarking algorithm for JPEG images. *AEU Int. J. Electron. Commun.* **2015**, *69*, 1783–1794. [CrossRef]

6. Pichler, F.; Scharinger, J. Finite dimensional generalized baker dynamical systems for cryptographic applications. In Proceedings of the International Conference on Computer Aided Systems Theory, Innsbruck, Austria, 22–25 May 1995; Springer: Berlin/Heidelberg, Germany, 1995; pp. 465–476. [CrossRef]

7. Masuda, N.; Aihara, K. Cryptosystems with discretized chaotic maps. *IEEE Trans. Circuits Syst. Fundam. Theory Appl.* **2002**, *49*, 28–40. [CrossRef]

8. Shannon, C.E. Communication theory of secrecy systems. *Bell Syst. Tech. J.* **1949**, *28*, 656–715. [CrossRef]

9. Fridrich, J. Symmetric ciphers based on two-dimensional chaotic maps. *Int. J. Bifurc. Chaos* **1998**, *8*, 1259–1284. [CrossRef]

10. Pareek, N.K.; Patidar, V.; Sud, K.K. Image encryption using chaotic logistic map. *Image Vis. Comput.* **2006**, *24*, 926–934. [CrossRef]

11. Zhu, Z.L.; Zhang, W.; Wong, K.W.; Yu, H. A chaos-based symmetric image encryption scheme using a bit-level permutation. *Inf. Sci.* **2011**, *181*, 1171–1186. [CrossRef]

12. El Assad, S.; Farajallah, M. A new chaos-based image encryption system. *Signal Process. Image Commun.* **2016**, *41*, 144–157. [CrossRef]

13. El Assad, S.; Farajallah, M.; Vladeanu, C. Chaos-based block ciphers: An overview. In Proceedings of the 2014 10th International Conference on Communications (COMM), Bucharest, Romania, 29–31 May 2014; pp. 1–4. [CrossRef]

14. Alvarez, G.; Li, S. Some basic cryptographic requirements for chaos-based cryptosystems. *Int. J. Bifurc. Chaos* **2006**, *16*, 2129–2151. [CrossRef]

15. Lian, S.; Sun, J.; Wang, Z. Security analysis of a chaos-based image encryption algorithm. *Phys. A Stat. Mech. Appl.* **2005**, *351*, 645–661. [CrossRef]

16. Bouteghrine, B.; Tanougast, C.; Sadoudi, S. A Survey on Chaos-Based Cryptosystems: Implementations and Applications. In Proceedings of the Chaotic Modeling and Simulation International Conference, Florence, Italy, 9–12 June 2022; pp. 65–80. [CrossRef]

17. Daemen, J.; Rijmen, V. *The Design of Rijndael*; Springer: Berlin/Heidelberg, Germany, 2002; Volume 2.

18. Munir, N.; Khan, M.; Hussain, I.; Alanazi, A.S. Cryptanalysis of encryption scheme based on compound coupled logistic map and anti-codifying technique for secure data transmission. *Optik* **2022**, *267*, 169628. [CrossRef]

19. Rahman, Z.; Yi, X.; Billah, M.; Sumi, M.; Anwar, A. Enhancing AES Using Chaos and Logistic Map-Based Key Generation Technique for Securing IoT-Based Smart Home. *Electronics* **2022**, *11*, 1083. [CrossRef]

20. Nguyen, R. *Penetration Testing on a c-Software Implementation a-1709rns006-c*; Internal Report; Department of Informatics: Munich, Germany, 2018.

21. Nguyen, R.; Facon, A.; Guilley, S.; Gautier, G.; El Assad, S. Speed-up of SCA Attacks on 32-bit Multiplications. In Proceedings of the International Conference on Codes, Cryptology, and Information Security, Rabat, Morocco, 22–24 April 2019; pp. 31–39. [CrossRef]

22. Chen, J.X.; Zhu, Z.L.; Fu, C.; Yu, H.; Zhang, L.B. A fast chaos-based image encryption scheme with a dynamic state variables selection mechanism. *Commun. Nonlinear Sci. Numer. Simul.* **2015**, *20*, 846–860. [CrossRef]

23. Zhang, W.; Wong, K.W.; Yu, H.; Zhu, Z.L. An image encryption scheme using reverse 2-dimensional chaotic map and dependent diffusion. *Commun. Nonlinear Sci. Numer. Simul.* **2013**, *18*, 2066–2080. [CrossRef]

24. Farajallah, M.; El Assad, S.; Deforges, O. Fast and secure chaos-based cryptosystem for images. *Int. J. Bifurc. Chaos* **2016**, *26*, 1650021. [CrossRef]
25. Qiao, Z.; El Assad, S.; Taralova, I. Design of secure cryptosystem based on chaotic components and AES S-Box. *AEU Int. J. Electron. Commun.* **2020**, *121*, 153205. [CrossRef]

26. Omrani, T.; Rhouma, R.; Becheikh, R. LICID: A lightweight image cryptosystem for IoT devices. *Cryptologia* **2019**, *43*, 313–343. [CrossRef]

27. Wang, Y.; Wong, K.W.; Liao, X.; Xiang, T. A block cipher with dynamic S-boxes based on tent map. *Commun. Nonlinear Sci. Numer. Simul.* **2009**, *14*, 3089–3099. [CrossRef]

28. Zhang, X.; Zhao, Z.; Wang, J. Chaotic image encryption based on circular substitution box and key stream buffer. *Signal Process. Image Commun.* **2014**, *29*, 902–913. [CrossRef]

29. Alawida, M.; Teh, J.S.; Mehmood, A.; Shoufan, A. A chaos-based block cipher based on an enhanced logistic map and simultaneous confusion-diffusion operations. *J. King Saud.-Univ.-Comput. Inf. Sci.* **2022**, [CrossRef]

30. Alshammari, B.M.; Guesmi, R.; Guesmi, T.; Alsaif, H.; Alzamil, A. Implementing a symmetric lightweight cryptosystem in highly constrained IoT devices by using a chaotic S-box. *Symmetry* **2021**, *13*, 129. [CrossRef]

31. Lozi, R. Emergence of randomness from chaos. *Int. J. Bifurc. Chaos* **2012**, *22*, 1250021. [CrossRef]

32. El Assad, S.; Noura, H. Generator of Chaotic Sequences and Corresponding Generating System. U.S. Patent 20,130,170,641, 6 October 2011.

33. Hamza, R. A novel pseudo random sequence generator for image-cryptographic applications. *J. Inf. Secur. Appl.* **2017**, *35*, 119–127. [CrossRef]

34. Dridi, F.; El Assad, S.; El Hadj Youssef, W.; Machhout, M.; Lozi, R. The Design and FPGA-Based Implementation of a Stream Cipher Based on a Secure Chaotic Generator. *Appl. Sci.* **2021**, *11*, 625. [CrossRef]

35. Lian, S.; Sun, J.; Wang, J.; Wang, Z. A chaotic stream cipher and the usage in video protection. *Chaos Solitons Fractals* **2007**, *34*, 851–859. [CrossRef]

36. Masuda, N.; Jakimoski, G.; Aihara, K.; Kocarev, L. Chaotic block ciphers: From theory to practical algorithms. *IEEE Trans. Circuits Syst. I Regul. Pap.* **2006**, *53*, 1341–1352. [CrossRef]

37. Peng, J.; You, M.; Yang, Z.; Jin, S. Research on a block encryption cipher based on chaotic dynamical system. In Proceedings of the Third International Conference on Natural Computation (ICNC 2007), Haikou, China, 24–27 August 2007; Volume 5; pp. 744–748. [CrossRef]

38. El Assad, S.; Lozi, R. *Chaos-Based Cryptography*; Internal Report; Nantes Université: Nantes, France, 2019.

39. Bruce, S. *Applied Cryptography: Protocols, Algorithms, and Source Code in C*, 2nd ed.; John Wiley & Sons: New York, NY, USA, 1996.

40. Özkaynak, F.; Özer, A.B. A method for designing strong S-Boxes based on chaotic Lorenz system. *Phys. Lett. A* **2010**, *374*, 3733–3738. [CrossRef]

41. Wang, X.; Wang, Q. A novel image encryption algorithm based on dynamic S-boxes constructed by chaos. *Nonlinear Dyn.* **2014**, *75*, 567–576. [CrossRef]

42. Çavuşoğlu, Ü.; Zengin, A.; Pehlivan, I.; Kaçar, S. A novel approach for strong S-Box generation algorithm design based on chaotic scaled Zhongtang system. *Nonlinear Dyn.* **2017**, *87*, 1081–1094. [CrossRef]

43. Lambić, D. A novel method of S-box design based on discrete chaotic map. *Nonlinear Dyn.* **2017**, *87*, 2407–2413. [CrossRef]

44. Ahmed, H.A.; Zolkipli, M.F.; Ahmad, M. A novel efficient substitution-box design based on firefly algorithm and discrete chaotic map. *Neural Comput. Appl.* **2019**, *31*, 7201–7210. [CrossRef]

45. Shah, T.; Qureshi, A.; Usman, M. A Novel Color Image Encryption Scheme Based on Arnold's Cat Map and 16-Byte S-box. *Appl. Appl. Math. Int. J. AAM* **2021**, *16*, 33.

46. Belazi, A.; Abd El-Latif, A.A.; Belghith, S. A novel image encryption scheme based on substitution-permutation network and chaos. *Signal Process.* **2016**, *128*, 155–170. [CrossRef]

47. Wong, K.W.; Kwok, B.S.H.; Law, W.S. A fast image encryption scheme based on chaotic standard map. *Phys. Lett. A* **2008**, *372*, 2645–2652. [CrossRef]

48. Rukhin, A.; Soto, J.; Nechvatal, J.; Smid, M.; Barker, E. *A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications*; Technical Report; Booz-Allen and Hamilton Inc.: Mclean, VA, USA, 2001.

49. Lai, Q.; Akgul, A.; Li, C.; Xu, G.; Çavuşoğlu, Ü. A new chaotic system with multiple attractors: Dynamic analysis, circuit realization and S-Box design. *Entropy* **2018**, *20*, 12. [CrossRef]

50. Al Solami, E.; Ahmad, M.; Volos, C.; Doja, M.N.; Beg, M.M.S. A new hyperchaotic system-based design for efficient bijective substitution-boxes. *Entropy* **2018**, *20*, 525. [CrossRef]

51. Wu, Y.; Noonan, J.P.; Agaian, S. NPCR and UACI randomness tests for image encryption. *Cyber J. Multidiscip. J. Sci. Technol. J. Sel. Areas Telecommun.* JSAT **2011**, *1*, 31–38.

52. Luo, Y.; Zhou, R.; Liu, J.; Qiu, S.; Cao, Y. An efficient and self-adapting colour-image encryption algorithm based on chaos and interactions among multiple layers. *Multimed. Tools Appl.* **2018**, *77*, 26191–26217. [CrossRef]

53. Huang, L.; Cai, S.; Xiong, X.; Xiao, M. On symmetric color image encryption system with permutation-diffusion simultaneous operation. *Opt. Lasers Eng.* **2019**, *115*, 7–20. [CrossRef]