An efficient image encryption scheme based on fractal Tromino and Chebyshev polynomial

The security of digital content during transmission and storage through insecure communication links and databases is a challenging issue in today's world. In this article, an encryption scheme based on fractal Tromino and Chebyshev polynomial-based generated chaotic matrix is presented. The scheme fulfills the most fundamental aspect of encryption that is diffusion and confusion. For confusion highly non-linear, pre-defined S-boxes are used. The proposed scheme has been tested using state-of-the-art key performance indicators including differential analysis, statistical analysis. Information entropy analysis, mean square error, and NIST-based randomness analysis. The encrypted images have the highest practically achievable entropy of 7.999 and the time analysis shows that the proposed system is suitable for real-time implementation. The rest of the results indicates that the proposed cryptosystem possesses high immunity toward various attacks. The security analysis compared with the existing scheme shows the strength of the suggested scheme.


Introduction
In this modern era of technology, the transmission and storage of multimedia content grow rapidly. The security and privacy of these contents have been an unavoidable subject of research for the last few decades. One of the main issues in this era of fifth-generation communication is the privacy of digital content [1]. In different databases, the information is stored, and travel in the form of bits, this information includes digital images, audio, video, etc., and available to different users through the Internet. The databases can be accessed by an unauthorized user and the information can be stolen and misused if the databases are secure enough that the intruder cannot access this database, then will monitor the traffic, and can steal information during communication from the database to the authorized user. The information needs security during storage as well as the transmission phase, so that if the intruder gets that information, it will have no use for her. The science of securing information is called cryptography. Cryptography is traditionally referred to as the science of secrecy, although the concept of cryptography is more closely related to it today. Encryption is the act of converting "unhidden" plain text to "hidden" to guard it against data intruders. There is another aspect of this phase where the hided text desires to be decrypted to be understood at the other end. In our everyday lives, the use of cryptography is everywhere. We use it, for instance, to easily submit passwords through large networks for online transactions. Bank servers and email clients also use encryption to preserve their passwords. The authentication of all communicated information in our IoT-related world is encrypted and authenticated by cryptography. Cryptography can be categorized as symmetric and asymmetric key cryptography. In symmetric-key cryptography, the keys for encryption and decryption are the same. The encryption comprises of diffusion and confusion. Guidelines for a reasonable level of safety and the utmost adequate characteristics of a cryptosystem are presented in [2]. The recommended guidelines report three foremost concerns: implementation, key management, 1 3 and security analysis. A comprehensive revision of various cryptosystems design techniques and development in metaheuristic-based image encryption is presented in [3]; the numerous attacks and evaluation of results allied to cryptosystem have also been presented. Most of the researchers [4,5] utilize chaos base generated sequences for the diffusion process, and due to extraordinary sensitivity to initial conditions, the use of chaos is widespread in cryptography [6][7][8]. Particle swarm optimization, based confusion, and chaotic map-based diffusion are presented in [9]. Fractals accompanied with chaotic maps have been also widely used in cryptography [10]. A lot of work has been done in the field of cryptography [11] discrete and continuous chaotic maps are utilized by the work presented in [12]. To add more diffusion in the cryptosystem fractals and multiple chaotic maps are utilized in [13]. For the deployment of the encryption scheme in different environments, several alterations have been done in the design of cryptosystems [14][15][16]. Chebyshev polynomial-based chaos has been utilized for image encryption [17]. Various transform like discrete cosine transform [18] and wavelet transform have also been utilized for image encryption [19,20]. The encryption system can be broadly classified as classic and modern cryptosystems, in classic cryptosystems, the process of diffusion or confusion is done, one at a time while in modern cryptosystems, both confusion and diffusion are performed. Only confusion can be easily broken [21]. The work presented in [22] uses only confusion and can be easily decrypted the procedure in [21]. It is shown [21] that encryption by solitary S-box, which is the essential part of AES and DES, is not sufficient. A privacy-preserving data aggregation scheme with a flexibility property that uses ElGamal is presented in [23]. A secure and efficient mutual authentication protocol for smart grid under grid is proposed in [24].
In this article, we have utilized Chebyshev polynomial and fractal Tromino accompanied by pre-defined highly nonlinear S-boxes to encrypt the secret images. Reducing computational complexity without affecting the security strength of a cryptosystem is important for real-time implementation. AES has excellent security, but when it came to implementation on images, it takes more time. Due to their uttermost simplicity in implementation and less computational complexity, the computed time for encryption makes this scheme suitable for real-time implementation. The reason for less time is the use of pre-defined S-boxes and less computational complexity of Chebyshev polynomial and fractal Tromino. The security analysis is performed and tabulated which reveals the strength of the cryptosystem to different cryptographic attacks. The remaining of the manuscript is arranged as the discussion of the different basics concepts and procedure are described in section two of the article, the step includes in the encryption process, and the explanation and flow diagram of the proposed cryptosystem is discussed in section three of the paper and to validate the strength and immunity to various attacks, the security analysis is computed and displayed in section four of the article, and finally, conclusion is drawn in Sect. 5 of the paper.

Preliminaries
This segment is dedicated to the discussion of basics utilized in the proposed cryptosystem.

Generation of fractal Tromino
The fractal Tromino is generated using the succeeding steps.
Step 1: A matrix R of dimension M × 3 N is created where M × N × 3 is the dimension of the plain image.
Step 2: two random keys k 1 and k 2 are created; each key has a length of 8-bits.
Step 3: The values of the Matrix generated in step 1 are updated using the following rule in Eq. (1): where c can be computed using relation in Eq. (2) The value of c is rounded to the nearest digit, where m in Eq. (2) is the mean of the matrix generated in step 1.
Step 4: The matrix updated as in step 3 is reshaped M × N × 3. This is desired fractal Tromino. The generated fractal is shown in Fig. 1, and part b displays the image after XORing with the fractal.

Chebyshev polynomial-based chaotic matrix generator
Chebyshev polynomial (CP) is a sequence of cosine-related polynomials. In this section based on CP, random sequences are created by utilizing [25] the two relations in Eq. (3) where the governing bounds for CP are (p k , q l ) ∈ [−1, 1] and (l, k) ∈ [2, ∞] . The following describes the rest of the algorithm.
Step 1: The starting values p(0)q(0) and parameters (x, y) are initiated as a key.
Step 2: Eq. (3) is iterated M × N times, where M × N is the size of each layer of the plain image, and by doing

3
this, we have obtained two matrices containing the decimal fractional entries; these values are processed using Eq. (4) where r = 256.
Step 3: These two matrices are XORed and a third matrix is obtained.
The chaotic matrix is converted into a row vector in and the first 200 iterations output are plotted, as shown in Fig. 2.

Substitution using S-boxes
In cryptography, an S-box is a core element of the symmetric-key system that accomplishes the substitution. To unclear the relationship, in the block cipher between the key and the ciphertext, S-boxes are utilized. The process of substitution is shown in Fig. 3. In our case, we have utilized the highly non-linear S-boxes generated by [26]. The pixel of the plain image is taken; after converting into binary, it is divided into MSBs and LSBs, again converted into decimal; the MSB converted decimal indicates column index of S-box and the other indicates the row of the S-box, and the intersected element is a substitute of the pixel in the ciphered image.

Proposed encryption scheme
The proposed encryption scheme can be implemented using the following steps. The procedure is depicted in Fig. 4.
Step 1: The secret color RGB image that needs to be enciphered is loaded and split into respective channels.
Step 2: Two keys K 1 and K 2 are initiated and L-shaped fractal Tromino is generated using the procedure in Sect. 2.1 of the article.
Step 3: The 3-fractal Tromino is XORed with the respective layers of the image.
Step 4: The parameters for CPs are initiated and chaotic matrices are generated using the procedure discussed in Sect. 2.2 of the article.
Step 5: The chaotic matrices obtained in step 4 are XORed with outcomes of step 3.
Step 6: The processed image layers obtained in step 5 are further passed through the process of substitution using the procedure discussed in Sect. 2.3 of the article.
Step 7: The three split layers of the image obtained in step 1 are encrypted till step 6; now the three layers are combined to achieve the concluding encrypted RGB image.
The procedure of encryption is presented in Fig. 4. The process of decryption is carried out using the reverse approach, but instead, in the substitution phase using the S-boxes, first, the inverse S-boxes are computed, and the process of substitution is carried out using the inverse S-boxes following the same procedure for substitution as discussed in Sect. 2.3. To estimate the effectiveness of the proposed encryption against various thread security analysis is carried out and discussed in the upcoming section of the paper.

Security analysis
To evaluate the strength of the cryptosystem in contradiction of various cryptographic threads, the security analysis of the system is essential. Here, we have encrypted Lena, baboon, airplane, girl, and pepper images, and the following analysis was carried out to validate the strength of the proposed system. The size of the images utilized is 256 × 256 × 3.

Differential analysis
To evaluate the immunity of the proposed cryptosystem to resist differential attacks, differential analysis is carried out. The number of pixels change rate (NPCR) and unified average changing intensity (UACI) are employed in the examination against differential attacks (DA). In DA, the intruder faintly changes the original image and encrypt that image then compares the originally encrypted and the modified encrypted images and tries to find information regarding the cryptosystem. The NPCR and UACI analysis are as described.

NPCR
In computing NPCR, one-pixel change in the plain image is done and comparing the modified encrypted and original image without modification is encrypted through the same encryption scheme and the percentage change in terms of pixel change rate is studied; for a good cryptosystem, the value of NPCR needs to high. The NPCR can be computed using the relation in Eq. (5) where where M × N is the dimension of images and O symbolizes the original image, O is the encrypted image after the onepixel change. The NPCR value for a good cryptosystem needs to be near 100. The NPCR is computed and displayed in Table. 1. The results of NPCR show strong immunity toward differential attacks.

UACI
After one-pixel alteration in the plain image, the average alteration in intensity among the original image encrypted and the modified image encrypted is studied in UACI. It can be computed using Eq. (7) The values of UACI are computed for various images and tabulated as in Table 1. The computed value of NPCR is closest to the theoretically achievable value of 100 in each case, and comparison with the recently proposed encryption scheme is presented in Table 2. The graphs are shown in Fig. 5 from NPCR and UACI measurements we are confidently claiming that our proposed cryptosystem is secure against differential analysis.

Statistical analysis
The statistical analysis can also be utilized in the cryptanalysis of an Encryption scheme. To confirm the robustness of encryption against statistical attacks, histograms, and correlation among adjacent pixels are utilized, to withstand the statistical analysis, the encrypted must have a uniform histogram and zero correlation among the adjacent pixels.

Histogram analysis
A graph displaying the occurrence of something is known as a histogram. Typically, the histogram has bars that reflect the frequency of data that occurs in the data collection as a whole. The histogram has two axes, the x-axis and the y-axis. The x-axis includes an occurrence whose frequency has to count. The y-axis has a frequency. Various bar heights indicate the different frequency of data occurrence. Figure 6, displays the histograms of both plaintext and ciphertext. It can be seen from Fig. 6 that the non-uniform histogram having more frequent pixels in the range 200-50 refers to Fig. 6a, i.e., some pixel's frequency is less as compared to the rest. While the histogram of the encrypted image has an equal count of occurrence of every pixel and the distribution is uniform. When the histogram of an image is uniform, it does not convey any beneficial statistics to the intruders. Keeping in view the histograms in Figs. 6 and 7, we are confidently claiming that the Proposed encryption scheme retains great immunity against attacks that utilize histogram examination.

Correlation coefficient (CC)
The degree of association is calculated by the correlation coefficient (CC). The Pearson correlation coefficient is often named CC after its originator and is a linear association metric. On a scale that ranges from + 1 to 0 to − 1, the CC is computed. Either + 1 or − 1 reveals the full relationship between the two variables. In the case of images if the contiguous pixels are similar, the CC is near to unity; total lack of correlation is characterized by 0. The pixels in plain images are highly correlated and its CC is near to unity, as shown in Table. 3. The encrypted image pixels must not possess a high correlation to withstand statistical attacks. The CC for each layer of plain and encrypted images are computed using the relation given in Eq. (8) and displayed in Table 3 where  where A(k,l) is the covariance between pixel a and b, C is the number of pairs (a,b), and B(k), and B(l) represent the standard deviation of k and l. The linear relation is observed in Fig. 8 of the plain image pixels in all directions. While in the case of encrypted image, the pixels are distributed all over the plane.

Information entropy analysis (IE)
Randomness in information can be quantified using information entropy (IE). For an image that contains 256 levels of shades have an ideal value of IE 8. The purpose of encryption is to increase the randomness in the distribution of the pixels. The developed the value of the IE the higher will be the randomness in pixels distribution of an image and the harder it will be for an intruder to get any valuable information from the encrypted image. IE can be computed using the relation in Eq. (13) where p(k a ) denotes the probability distribution for the event k a . The computed value of IE for each layer of plain and its  Table 4. It can be perceived that the value of entropy is near to the superlative value of 8 in the case of encrypted layer images which shows the strength of the proposed cryptosystem.

Mean square error analysis (MSE)
Pixel-by-pixel squared difference examination of the plain and ciphered image is done in MSE analysis. The high value of MSE is the necessity of a worthy encryption structure (Tables 5, 6). The MSE can be computed by utilizing the relation in Eq. (14) where M × N is the dimension of images and O symbolizes the plain image and P symbolizes the processed ciphered image. The measurement of MSE is computed from different images and displayed in Table 7.

Peak signal-to-noise ratio (PSNR)
PSNR, is computed by utilizing MSE as depicted in Eq. (15) as the MSE is in the denominator so when it divides by the high value of MSE will result in a small PSNR. For a good encryption scheme, the lower value of PSNR is preferred. The PSNR can be computed using the relation in Eq. (15)     where m denotes the bits per pixel, and PSNR is often dignified in dBs. The measurement of PSNR is computed for every layer of the encrypted and plain image and tabulated in Table 7 and Table 8. Table 9 shows the comparison of the MSE for the proposed system with the recently proposed systems.

Throughput analysis for encryption procedure
The throughput of the cryptosystem is the proportion of the total size of the image to be encrypted to the total time taken by the encryption process for the image to encrypt. For realtime communication, throughput of a system is considered one of the most key performance indicators for an encryption scheme, the high the throughput the better the system. The throughput can be computed using the relation in Eq. (16) The memory occupied by the file to be enciphered is 500kBs, and the duration taken for encryption is 2.0050104. The throughput computed is 249.37527 kbs.

Time analysis
Time analysis of the proposed encryption scheme is carried out using MATLAB 2018 b on a PC Intel(R), Core(TM) i3-7700 CPU @ 3.60 GHz, 8 GB RAM with Windows 8. The computed time is tabulated in Table 10. The time analysis shows that the proposed encryption system is suitable for practical implementation.

NIST-based Randomness analysis
A non-regulatory and physical science laboratory National of Standard and Technology (NIST) issued a special edition of randomness test named NIST randomness analysis [36], which utilizes for the randomness in data. The detail of the tests is presented in [36], and the test is said to be certified if the value of the outcomes is less than unity. The subject test is accomplished, and the outcomes are displayed in Table 11. All the random tests are certified by the encryption scheme, it can be perceived from the results that the ciphered image achieves high randomness, which is the desired characteristic of a good encryption system.

Heat map analysis
The part of an image that grabs more attention is indicated warm-to-cool color spectrum in a heat map. The heat map for a plain image is computed. The heat map tells where the most important content of this image lies. In

Conclusion
In this article, utilizing L-shaped fractal Tromino, three fractals are generated followed by the generation of CPs based chaotic matrices for the encryption process. To obscure the relation of key and ciphertext substitution is performed using highly non-linear S-boxes. The security analysis is performed and tabulated. The performance comparison with the recently proposed encryption schemes is performed. The security analysis reveals that the suggested encryption system possesses strong invulnerability against various threads.