## 1 Introduction

*et al.*, 1996; Rijmen and Daemen, 2001; Rivest

*et al.*, 1978). Both techniques require a secret key that entitles the recipient to recover back the secret information. One disadvantage of data hiding techniques is that most schemes hide the raw data within the cover media (Cheddad

*et al.*, 2010; Mao and Qin, 2013; Ghebleh and Kanso, 2014; Tang

*et al.*, 2014). Furthermore, secret images of large sizes require quite large carriers. Due to some inherent characteristics of digital images such as bulk data capacity, high redundancy and correlation between adjacent pixels, conventional encryption schemes such as the Data Encryption Standard (DES) (Katz

*et al.*, 1996), the Advanced Encryption Standard (AES) (Rijmen and Daemen, 2001), the Rivest, Shamir and Adleman’s scheme (RSA) (Rivest

*et al.*, 1978) are unsuitable for the encryption of digital images.

*et al.*, 2010; Xie

*et al.*, 2017), Fridrich’s approach has been adopted in the designs of most proposed chaos-based image encryption schemes. Throughout the last two decades, a number of chaos-based image encryption schemes have been developed (Chen

*et al.*, 2004; Guan

*et al.*, 2005; Behnia

*et al.*, 2008; Zhang

*et al.*, 2010; Liu Y.

*et al.*, 2016; Hua

*et al.*, 2015; Kanso and Ghebleh, 2012, 2015a; Khan

*et al.*, 2017; Fu

*et al.*, 2018; Khan and Shah, 2015). Chen

*et al.*(2004) proposed an image encryption scheme that employs a 3-dimensional (3D) cat map. However, Chen et al.’s scheme (Chen

*et al.*, 2004) is shown to be vulnerable to differential attacks (Li and Chen, 2008; Wang

*et al.*, 2005). Guan

*et al.*(2005) proposed an image encryption scheme based on Arnold cat map and Chen’s chaotic system. Cokal and Solak (2009) proved that this scheme suffers from security weaknesses under chosen plain-image and known plain-image scenarios. Behnia

*et al.*(2008) proposed a new kind of image encryption scheme based on composition of trigonometric chaotic maps. However, this scheme is shown to suffer from security issues under chosen plain-image scenario and differential attacks (Li

*et al.*, 2010). Zhang

*et al.*(2010) proposed an image encryption scheme based on DNA addition in conjunction with two chaotic logistic maps. Hermassi

*et al.*(2014) revealed a number of flaws including non-invertibility of Zhang et al.’s scheme (Zhang

*et al.*, 2010). In Zhu (2012), Zhu proposed an image encryption scheme based on improved hyper-chaotic sequences. Li

*et al.*(2013) showed that Zhu’s scheme can be broken with only one known plain-image. In Liu Y.

*et al.*(2016), a hyper-chaos-based image encryption algorithm with linear feedback shift registers is proposed. Zhang

*et al.*(2017) showed that this scheme has some flaws due to weak security of the diffusion process and it is vulnerable to differential attacks. Hua

*et al.*(2015) introduced a new 2D sine logistic modulation map and proposed a chaotic magic transform image encryption scheme. Kanso and Ghebleh (2012) proposed an image encryption scheme based on 3D cat map. In Kanso and Ghebleh (2015a), a new family of 4D cat maps is proposed together with an image encryption scheme for medical applications. Khan

*et al.*(2017) proposed a chaos-based image encryption scheme that utilizes a non-linear chaotic algorithm for destroying correlation and diffusion in plain-image. In Fu

*et al.*(2018), Fu et al. proposed an algorithm based on a 4D hyper-chaotic system in conjunction with the hash function SHA-224. In addition to the aforementioned schemes, the research committee has proposed a number of schemes such as those presented in Wang

*et al.*(2015), Zhou

*et al.*(2014), Xu

*et al.*(2016), Liu

*et al.*(2016), Hua and Zhou (2017), Zhou

*et al.*(2013), Wu

*et al.*(2014), Cao

*et al.*(2018), Hua

*et al.*(2019), Khan

*et al.*(2017), Fu

*et al.*(2018), Liu

*et al.*(2019), Sun

*et al.*(2020), Hemdan

*et al.*(2019) and references therein.

*et al.*, 2005; Xiao

*et al.*, 2009; Fu

*et al.*, 2011; Ghebleh

*et al.*, 2014b; Soleymani

*et al.*, 2014; Kanso and Ghebleh, 2015a,b). Furthermore, a number of generalizations of the 2D cat map have appeared in the literature (Chen

*et al.*, 2004; Kanso and Ghebleh, 2013). In this paper, we propose a new family of 4D chaotic cat maps that is an extension of the generalization suggested in Kanso and Ghebleh (2013) for use in cryptographic applications. The objective of this proposal is to increase the number of control parameters in the coefficient matrix defining the 4D cat map which in turn increases the size of the keyspace of any cryptographic scheme adopting the generalization. We then propose an image encryption scheme based on members of this family. The proposed scheme follows Fridrich’s approach. It is composed of a light shuffling phase and a masking phase, which operate on image-blocks. The shuffling phase preforms a circular shift on the rows and columns of the image at hand in conjunction with a zigzag ordering algorithm. The masking phase uses pseudorandom sequences generated by the proposed 4D cat map for diffusion of the resulting shuffle-image. Furthermore, the masking phase applies measures of central tendency to enhance security against a number of cryptanalytic attacks such as differential attacks. The mixing is designed so that while encryption is highly sensitive to the secret key and the input image, decryption is robust against noise and cropping of the cipher-image. Simulation results are presented to demonstrate the high performance of the proposed scheme and its high security level.

- • The method is simple and efficient.
- • The encryption scheme is highly sensitive to its key and input image, while the decryption scheme is robust against various alternations such as noise and cropping of cipher-image.
- • The method is block-based. Based on the block size, there is a tradeoff between the security and the speed of the proposed scheme. However, simulations show that the chosen block size makes the scheme robust to existing attacks, insensitive to cipher-image attacks, and faster than existing schemes.

## 2 The 4-Dimensional Cat Map

*et al.*, 2004) using two positive integer parameters

*a*and

*b*as

##### (1)

\[ \left[\begin{array}{c}{x_{n+1}}\\ {} {y_{n+1}}\end{array}\right]=\left[\begin{array}{c@{\hskip4.0pt}c}1& a\\ {} b& ab+1\end{array}\right]\left[\begin{array}{c}{x_{n}}\\ {} {y_{n}}\end{array}\right]\hspace{0.3em}\mathrm{mod} \hspace{0.3em}1.\]*et al.*, 2004; Kanso and Ghebleh, 2013). Chen

*et al.*(2004) proposed a generalization of the 2D cat map into a 3D cat map, where the coefficient matrix consists of six control parameters. Kanso and Ghebleh (2013) extended the generalization of the 2D cat map into a 4D cat map, where the coefficient matrix consists of four control parameters. Despite existing generalizations, in this paper we extend the generalization of the 4D cat map suggested in Kanso and Ghebleh (2013) so that the number of control parameters of the coefficient matrix increases to twelve positive integers. The increase in the number of control parameters is very beneficial to cryptographic applications since it leads to a larger keyspace of the cryptographic scheme.

*A*of Eq. (2) is greater than or equal to its corresponding entry in the matrix ${A_{0}}$ obtained with all parameters set to 1:

*A*, then

*A*has modulus greater than 1, which justifies chaotic behaviour of the map of Eq. (3). See Ott (2002), Hua

*et al.*(2017), Wang

*et al.*(2018) for more information.

##### (4)

\[ A=\left[\begin{array}{c@{\hskip4.0pt}c@{\hskip4.0pt}c@{\hskip4.0pt}c}270\hspace{1em}& 34\hspace{1em}& 86\hspace{1em}& 385\\ {} 678\hspace{1em}& 87\hspace{1em}& 216\hspace{1em}& 985\\ {} 207\hspace{1em}& 28\hspace{1em}& 66\hspace{1em}& 317\\ {} 229\hspace{1em}& 30\hspace{1em}& 73\hspace{1em}& 340\end{array}\right],\]*A*has more than one eigenvalue greater than 1, the 4D cat map of Eq. (3) exhibits hyper-chaotic behaviour (Hua

*et al.*, 2017).

## 3 Description of the Proposed Scheme Pr-IES

### 3.1 The Preprocessing Phase

*J*, typically a 2D (for grayscale images) or 3D (for colour images) array of bytes, is reshaped into an almost square 2D matrix ${J_{0}}$. This step is necessary if the number of rows of the 2D matrix is more than twice the number of columns or vice versa. If this condition is not attainable (e.g. if the number of rows and columns of

*J*are primes far apart), then a padding scheme can be applied to the input image. We refer to the number of rows and columns of the resulting matrix ${J_{0}}$ from the preprocessing phase by

*m*and

*n*, respectively.

### 3.2 The Shuffling Phase

*r*is the number of rounds. These numbers can be obtained from a chaotic map such as the skew tent map

*et al.*, 2014a). Algorithm 2 depicts the shuffling phase of the proposed image encryption scheme.

### 3.3 The Masking Phase

### 3.4 Randomness of the Masking Matrices

*et al.*(2010), the National Institute of Standards and Technology (NIST) proposes a Statistical Test Suite (STS) which is one of the most popular tools for validation of random number generators and pseudorandom number generators for cryptographic applications. To assess randomness of their entries, we subject the matrices ${\Omega _{1}},{\Omega _{2}},\dots ,{\Omega _{50}}$ constructed in 50 rounds of Algorithm 3 to the STS. These matrices are computed using the 4D cat map coefficient matrix

*A*of Eq. (3) which is used also as the transition matrix in all rounds. That is, ${A_{2}}={A_{3}}=\cdots ={A_{50}}=A$. Further parameters used in the generation of these matrices are $m=256$, $n=512$, and randomized initial condition ${\mathbf{x}_{0}}$. Hence each ${\Omega _{k}}$ is a $4\times 32768$ matrix, which is passed to the STS as a sequence of 1048576 bits. Table 1 presents the results generated by the STS. On the basis of these results, we conclude that the matrices ${\Omega _{1}},{\Omega _{2}},\dots ,{\Omega _{50}}$ all possess excellent randomness properties.

##### Table 1

Statistical test | Set of matrices | |

P-value | Result | |

Frequency | 0.455937 | $50/50$ |

Block-frequency | 0.983453 | $49/50$ |

Cumulative-sums (forward) | 0.350485 | $50/50$ |

Cumulative-sums (reverse) | 0.383827 | $50/50$ |

Runs | 0.779188 | $49/50$ |

Longest-runs | 0.191687 | $48/48$ |

Rank | 0.616305 | $50/50$ |

FFT | 0.494392 | $50/50$ |

Non-overlapping-templates | 0.616305 | $50/50$ |

Overlapping-templates | 0.289667 | $50/50$ |

Universal | 0.494392 | $50/50$ |

Approximate entropy | 0.657933 | $50/50$ |

Random-excursions | 0.324180 | $33/33$ |

Random-excursions variant | 0.706149 | $33/33$ |

Serial 1 | 0.383827 | $48/50$ |

Serial 2 | 0.816537 | $48/50$ |

Linear-complexity | 0.213309 | $49/50$ |

## 4 Statistical Analysis of Cipher-Images

### 4.1 Test Images and Parameters

##### Fig. 1

### 4.2 Histogram Analysis

##### Table 2

Cipher-image | ${\chi _{\text{test}}^{2}}$ |

Cipher-Barbara | 262.5859 |

Cipher-Lena | 248.8477 |

Cipher-Elaine | 222.1147 |

Random image | 235.4453 |

### 4.3 Correlation Analysis of Adjacent Pixels

*N*pairs of randomly chosen adjacent pixels $\mathbf{x}={\{{x_{i}}\}_{i=1}^{N}}$ and $\mathbf{y}={\{{y_{i}}\}_{i=1}^{N}}$ in a given image is defined by

**x**and

**y**respectively, and ${\sigma _{\mathbf{x}}}$ and ${\sigma _{\mathbf{y}}}$ are their standard deviations.

##### Table 3

Image | Adjacency | Plain-image | Shuffle-image | Cipher-image |

Barbara | Horizontal | 0.956279 | $-0.006150$ | $-0.017363$ |

Vertical | 0.971464 | 0.003786 | 0.007816 | |

Diagonal | 0.935520 | $-0.002700$ | $-0.016839$ | |

Lena | Horizontal | 0.972826 | 0.006197 | 0.001692 |

Vertical | 0.986398 | $-0.019941$ | 0.020036 | |

Diagonal | 0.962357 | $-0.015373$ | $-0.004486$ | |

Elaine | Horizontal | 0.994613 | 0.015765 | $-0.009980$ |

Vertical | 0.993920 | $-0.004081$ | 0.008746 | |

Diagonal | 0.989842 | 0.003508 | $-0.009003$ |

### 4.4 Information entropy analysis

**s**emitting 256 symbols ${s_{1}},{s_{2}},\dots ,{s_{256}}$ is defined by where $P({s_{i}})$ represents the probability of occurrence of ${s_{i}}$. For a random source

**s**, $H(\mathbf{s})=8$. Table 4 reports the entropy measures for the test plain-images and their corresponding cipher-images. The reported measures are very close to the ideal value 8. Hence, the proposed scheme is robust against entropy attacks.

##### Table 4

Image | Entropy | |

Plain-image | Cipher-image | |

Barbara | 7.6019 | 7.9971 |

Lena | 7.4455 | 7.9993 |

Elaine | 7.5029 | 7.9998 |

*et al.*, 2013). Table 5 reports the mean of entropy measures over local cipher-images blocks, where the block sizes are $16\times 16$, $32\times 32$ and $64\times 64$. It is evident from this table that the reported measures are close to the theoretical mean of Shannon entropy measures for a random image, that is 7.174966353, 7.808756571 and 7.954588734 for $16\times 16$, $32\times 32$ and $64\times 64$ blocks, respectively (Wu

*et al.*, 2013). Table 5 also includes the mean of local entropy measures for a random image and its corresponding cipher-image.

##### Table 5

Image | Plain-image | Cipher-image | ||||

$16\times 16$ | $32\times 32$ | $64\times 64$ | $16\times 16$ | $32\times 32$ | $64\times 64$ | |

Barbara | 5.7160 | 6.5322 | 7.0868 | 7.1766 | 7.8076 | 7.9549 |

Lena | 4.9910 | 5.6328 | 6.2260 | 7.1763 | 7.8098 | 7.9550 |

Elaine | 4.7618 | 5.3754 | 5.9626 | 7.1759 | 7.8095 | 7.9546 |

Random | 7.1750 | 7.8097 | 7.9542 | 7.1738 | 7.8090 | 7.9542 |

### 4.5 Randomness Analysis

*et al.*, 2010). For this regard, we consider the first 100 images from the test bank of images in BOWS2 (2019). We encrypt each $512\times 512$ image by the proposed scheme, and subject the resulting cipher-image to the STS. Each cipher-image consists of 2097152 bits and is processed in STS as a single sequence. Table 6 reports the STS results for a collection of 100 cipher-images, each of length 2097152 bits. According to documentation of the STS documentation (Bassham

*et al.*, 2010), the minimum pass rate for each test is 96%. Thus, it is evident that the cipher-images pass all 15 test and hence, they possess very good randomness properties.

##### Table 6

Statistical test | Cipher-images | |

P-value | Result | |

Frequency | 0.911413 | $98/100$ |

Block-frequency | 0.366918 | $100/100$ |

Cumulative-sums (forward) | 0.924076 | $97/100$ |

Cumulative-sums (reverse) | 0.851383 | $98/100$ |

Runs | 0.334538 | $100/100$ |

Longest-runs | 0.419021 | $99/100$ |

Rank | 0.816537 | $99/100$ |

FFT | 0.108791 | $99/100$ |

Non-overlapping-templates | 0.897763 | $100/100$ |

Overlapping-templates | 0.739918 | $100/100$ |

Universal | 0.994250 | $98/100$ |

Approximate entropy | 0.657933 | $98/100$ |

Random-excursions | 0.534146 | $72/72$ |

Random-excursions variant | 0.846579 | $72/72$ |

Serial 1 | 0.719747 | $99/100$ |

Serial 2 | 0.191687 | $99/100$ |

Linear-complexity | 0.289667 | $99/100$ |

### 4.6 Speed Analysis

## 5 Security Analysis

### 5.1 Differential analysis

*et al.*, 2011). Suppose ${C_{1}}$ and ${C_{2}}$ are two $m\times n$ matrices, then the NPCR and UACI between ${C_{1}}$ and ${C_{2}}$ are given by where and

*et al.*(2011), the theoretical ideal NPCR and UACI measures for ${C_{1}}$ and ${C_{2}}$ to be random-like in comparison are approximately $99.6094\% $ and $33.4635\% $, respectively. Furthermore, Table 8 reports the acceptance intervals for the null hypothesis with different significance levels for the NPCR and UACI measures.

##### Table 8

*et al.*, 2011).

Parameter | Size | 0.05-level | 0.01-level | 0.001-level |

NPCR | $256\times 256$ | $[99.5693,100]$ | $[99.5527,100]$ | $[99.5341,100]$ |

$512\times 512$ | $[99.5893,100]$ | $[99.5810,100]$ | $[99.5717,100]$ | |

$1024\times 1024$ | $[99.5994,100]$ | $[99.5952,100]$ | $[99.5906,100]$ | |

UACI | $256\times 256$ | $[33.2824,33.6447]$ | $[33.2255,33.7016]$ | $[33.1594,33.7677]$ |

$512\times 512$ | $[33.3730,33.5541]$ | $[33.3445,33.5826]$ | $[33.3115,33.6156]$ | |

$1024\times 1024$ | $[33.4183,33.5088]$ | $[33.4040,33.5231]$ | $[33.3875,33.5396]$ |

##### Table 9

Measures | Cipher-images of Barbara | Cipher-images of Lena | Cipher-images of Elaine | ||||||

Min | Mean | Max | Min | Mean | Max | Min | Mean | Max | |

NPCR | 99.5483 | 99.6093 | 99.6796 | 99.5819 | 99.6110 | 99.6399 | 99.5972 | 99.6089 | 99.6252 |

UACI | 33.2820 | 33.4913 | 33.6932 | 33.3231 | 33.4388 | 33.5638 | 33.4136 | 33.4649 | 33.5160 |

### 5.2 Keyspace

##### Fig. 8

##### Fig. 9

### 5.3 Cipher-Image and Plain-Image Analysis

##### Table 10

Measures | Cipher-images of Barbara | Cipher-images of Lena | Cipher-images of Elaine | |||

NPCR | 99.6338 | 99.6124 | 99.6002 | 99.6101 | 99.6215 | 99.6066 |

UACI | 33.6906 | 33.4831 | 33.3946 | 33.4988 | 33.4807 | 33.4435 |

### 5.4 Robustness to Noise and Data Loss

## 6 Comparison with Existing Work

##### Table 11

*et al.*(2019).

Scheme | Pass rate | |

NPCR | UACI | |

WWZ (Wang et al., 2015) | $23/25$ | $22/25$ |

ZBC1 (Zhou et al., 2014) | $15/25$ | $6/25$ |

XLLH (Xu et al., 2016) | $23/25$ | $23/25$ |

LSZ (Liu et al., 2016) | $23/25$ | $23/25$ |

HZ (Hua and Zhou, 2017) | $24/25$ | $24/25$ |

ZBC2 (Zhou et al., 2013) | $23/25$ | $7/25$ |

WZNA (Wu et al., 2014) | $23/25$ | $22/25$ |

CSL (Cao et al., 2018) | $24/25$ | $25/25$ |

HZH (Hua et al., 2019) | $25/25$ | $25/25$ |

Pr-IES | $25/25$ | $25/25$ |

##### Fig. 12

*et al.*(2019).

*et al.*(2011) and Liao

*et al.*(2010) are referred to by FLMLC and LLZ, respectively.

##### Fig. 13

*et al.*(2019).

*et al.*(2019). According to Hua

*et al.*(2019), the reported running times for existing schemes are obtained on a computer under the following environments: Intel® Core™ i7-7700 CPU @3.60 GHz and 8 GB of memory, running Windows 10 operating system. While the reported running times for the proposed scheme Pr-IES are obtained on a desktop machine with an Intel® Core™ i7-4770 processor @3.40 GHz and 8GB of memory, running Windows 10 operating system.

##### Table 12

Image size | $128\times 128$ | $256\times 256$ | $512\times 512$ | $1024\times 1024$ |

(Diaconu, 2016) | 0.0579 | 0.2224 | 0.9731 | 3.8377 |

(Ping et al., 2018) | 0.0902 | 0.3440 | 1.3357 | 5.3223 |

(Chai et al., 2017) | 0.2757 | 0.9810 | 3.8539 | 15.4565 |

(Hua and Zhou, 2017) | 0.1531 | 0.6347 | 2.4913 | 9.9185 |

(Xu et al., 2016) | 0.0247 | 0.1164 | 0.4924 | 20.144 |

(Zhou et al., 2014) | 0.0933 | 0.3843 | 1.4824 | 5.8175 |

(Liao et al., 2010) | 0.0323 | 0.1440 | 0.5510 | 2.0864 |

(Hua et al., 2019) | 0.0244 | 0.0949 | 0.4010 | 1.9857 |

Pr-IES | 0.0217 | 0.0645 | 0.2422 | 1.0021 |