Abstract
To analyze the security of encryption, an effectual encryption scheme based on colored images utilizing the hybrid pseudo-random binary sequence (HPRBS) and substitution boxes, known as S-boxes, is proposed. The presented work aims to design S-boxes using pseudo-random binary numbers acquired by Linear Feedback Shift Registers (LFSRs) in combination with a modified quadratic chaotic map. Firstly, cryptographically robust S-boxes are constructed by using binary pseudo-random number sequences, and then the cryptographic properties of the presented S-boxes are tested. The suggested S-boxes showed good results. Secondly, an RGB image encryption algorithm utilizing sequences generated by modified quadratic chaotic maps and S-boxes is offered. The new color image encryption techniques comprise two steps, including a permutation and a substitution step. The key association with the content of the image is also addressed. This strategy can result in a “one-time pad” effect and make the algorithm resistant to chosen-plaintext attack (CPA). The proposed scheme has been confirmed to be more valuable than most of the existing schemes. S-boxes are analyzed by the nonlinearity test, bit independence criterion (BIC), linear and differential approximation probabilities (LPs; DPs), and Strict-Avalanche Criterion (SAC) tests. A comparison with different S-boxes presented in the literature is also carried out. The comparison shows encouraging results about the quality of the proposed box. From security and experimental outcomes, the effectiveness of the presented color image encryption technique is verified. The proposed scheme has evident efficiency benefits, which implies that the proposed colored encryption of the image scheme has better potential for application in encryption schemes in real-time.
MSC:
68P25; 94A60; 14G50
1. Introduction
In modern times, the public wishes to possess information secrets and hide from the populace. In the past, people used various techniques to keep information secrets from adversaries. The rulers, armed forces, and bureaucrats used vital coding methods for their sensitive material, which helped them in the transmission of their information to their militaries safely and securely. With the rapid development of civilization, it is very important to develop strategies for the preservation of information. Currently, data security has a prime significance. Hence, cryptography helps to resolve issues related to security and data hiding by converting it into an unreadable format [].
Cryptosystems are generally classified into two main classes: block and stream cipher. Data that are transformed in the form of blocks (i.e., the input bits of m length are transformed to output bits of length n by use of block cipher) are known as a block cipher. A stream cipher operates on a single bit at a time, which means that a single input bit is transformed into a single output bit []. Numerous encryption techniques have evolved with the passage of time for securing information of high intelligence value. Wireless communication, being more prone to theft, requires data security using advanced encryption techniques []. Block cipher-based cryptosystems are heavily dependent on S-boxes, and designers of cryptosystems focus on the cryptographically strong design of S-boxes.
For the bulk of data encryption techniques, Advance Encryption Standards (AESs) are utilized for encryption and decryption. Over time, AES superseded the Data Encryption Standards. In AES, the nonlinear transformation of the S-box (substitution box) is an essential constituent. The S-boxes’ strength plays a vital role in the algorithm’s security. Thus, researchers spend a lot of time on the improvement of S-box strength []. Most of the time spent on construction and analysis is devoted to S-box construction, as it only represents the nonlinear component of the technique. Hence, every weakness in the S-box can be intercepted easily in a cryptosystem []. For this purpose, many techniques for the construction of S-boxes have been proposed by many researchers. Since nonlinear systems demonstrate randomness, in cryptography, chaos plays a great role. Because chaos helps in the generation of many sequences of pseudo-random numbers, it is utilized in nonlinear components of encryption construction. Many chaos-based cryptosystems have been reported in recent years because of the existence of a relationship between chaotic and cryptosystem properties [,,].
Some traditional techniques for encryption (like AES, DES, single one-dimensional chaos, etc.) are not suitable for the encryption of images as explained. So, it is necessary to devise strategies that secure image information. In view of this, many block-cipher-based encryption techniques that utilize random numbers generated by chaos and offer high security are presented [,]. The prime goals of this work are as follows:
- In many cryptographic applications, random numbers are needed for strong cryptosystem designs. In this context, the proposed work is based on a Hybrid Binary Pseudo-Random Number Generator (HPRNG) derived from a feedback shift register known as a Linear Feedback Shift Register (abbreviated as LFSR) and a modified chaotic quadratic map. Since the LFSR-based PRNGs are not resistant to attacks and reveal information about keys to overcome this flaw, the binary stream of random numbers obtained from LFSR is XORed with the random stream of the modified quadratic chaotic map.
- This above-mentioned technique helps in the elimination of the LFSR linearity property and helps in hiding characteristic statistical patterns of binary sequences generated by chaotic maps that are used in estimating their initial conditions. The binary stream generated by exclusive or operation between the LFSR and chaos helps to utilize all the benefits of chaotic maps and LFSRs and avoid all of their drawbacks.
- As cryptographically strong substitution boxes (S-boxes) have important features like nonlinearity, S-box generation using nonlinear sequences is addressed in this work. To design an S-box, a binary stream of numbers generated by HPRNGs is used. After conversion of bits to bytes, an S-box is achieved. Then, the strength of the attained S-box is analyzed via nonlinearity (NL), the Strict-Avalanche Criterion (SAC), bit independence criteria (BIC), and differential and linear approximation probability (DP; LP), which ensures that the S-box is cryptographically strong and has high performance.
To contribute to the study of cryptosystem design, this paper depicts a technique to design S-boxes based on pseudo-binary bit streams of numbers and its application in encryption schemes. The binary bit streams of random numbers were generated via hybrid-modified chaos and feedback shift registers. The S-boxes constructed using this scheme showed excellent properties, which indicates that they can be valuable in cryptosystems. In developing a novel image encryption algorithm, first, we use random numbers to scramble the pixels of an image and then the S-boxes are substituted to create confusion. The robustness of the proposed color image encryption technique is examined by the comparison of several quality measures of the image with RGB-based encryption utilizing chaos designs.
1.1. Linear Feedback Shift Registers (LFSRs)
In digital circuits, shift registers are a kind of logic circuit, compiled in a linear mode whose inputs are connected to the output in such a manner that by triggering a circuit, the data are moved along the line. LFSR is a shift register whose input bits are the linear function of more than two preceding states. An n-stage LFSR has an n-length numbered as , where each has the ability to store a single bit and a clock is used to control the shuffling of data. A shift register is initialized by vectors with entries . The operations used in LFSR are as follows:
- (the zero-stage entry) constitutes the output part.
- The entry of -stage is shifted to the stage, for .
- The new entry of the stage is obtained by a subset of -stage entry using Xor.
The LFSR starting input bit value is known as the seed. LFSR’s well-defined seed and feedback function generates bit sequences of random numbers with a large period value. If the input bit value in LFSR consists of only zeros, then the registers would stop working and the output is zero. Every starting state (except zero) produces a periodic state of the sequence with a period ( [,].
1.2. Modified Quadratic Chaotic Map
The chaotic Modified Quadratic map is depicted below.
This map has a state variable and parameter . The parametric value shows chaotic behavior in these intervals []. A simple modification of this chaotic map is used in the proposed work for generating chaotic binary numbers as follows:
where are state variables and are parameters and used as secret keys. Improved quadratic chaotic map bifurcation is illustrated in Figure 1.
Figure 1.
Bifurcation chaotic map diagram. The blue color is the chaotic behaviour of map fluctuating with parametric values.
2. Binary Sequence Generation Using Modified Quadratic Map
This section presents a technique for generating pseudo-random binary sequences using a threshold simple function that is combined with real numbers of modified quadratic chaotic maps. The following steps are used for this purpose, as illustrated in Figure 2:
Figure 2.
PRBS flow diagram.
- First, the initial values and parameters are determined from Equation (1), given in Section 1.2.
- The modified quadratic equations are iterated and times, respectively, where and are different constant values.
- By iterating Equation (1), two sequences (decimal) are generated using the following formulas:where the converts the value of to the closest integer equal of less than is used to provide the reminder value after the division, and is used to give the absolute value.
- The following threshold function ( can be applied:After that, a bit stream of pseudo-random numbers is obtained.
- The process is repeated until the desired bit stream of pseudo-random numbers is obtained.
2.1. Hybrid Pseudo-Random Binary Sequence Generation
The design of the HPRBS is based on an LFSR of length 128 bits and modified quadratic chaotic maps since many PRNG-based LFSRs are not resistant to attacks and provide information about the secret key. This flaw is overcome by using the XOR operation in which random bits obtained by a modified quadratic map binary stream (Section 1.2) are Xored with LFSR feedback in every clock cycle to generate the random binary number stream . The LFSR tap positions are decided by the primitive polynomial The total keys required for HPRBS are , where denotes the input vector in LFSR. The key space for the LFSR of 128 bits is The flow diagram of Figure 3 demonstrates the whole process of HPRBS.
Figure 3.
HPRBS flow diagram.
3. S-Box Construction Using Hybrid Pseudo-Random Binary Sequences
Simple steps are used for the construction of cryptographically secure S-boxes, as shown below. The bit stream generated in Section 2.1 is then employed in the formation of S-boxes as follows:
- Step–1: Each block sequence consisting of -bits is generated as follows:
- Step–2: Now, each -bit block, i.e., is converted to integer numbers as .
- Step–3: To obtain distinct values, the repeated numbers are removed.
- Step–4: Create S-boxes.
- Step–5: After one S-box, consider other blocks of -bits and then repeat the whole process to generate the other two S-boxes. In the proposed work, to generate 8 × 8 bit-based S-boxes. Table 1, Table 2 and Table 3 provides the S-boxes.
Table 1. S-box 1.
Table 2. S-box 2.
Table 3. S-box 3.
4. S-Box Algebraic Analysis
This section proposed the evaluation of S-boxes. The assessment of S-boxes ensures the efficiency and ability to create misperception in any cipher. For S-box algebraic property testing, the analysis used is nonlinearity (NL), Strict-Avalanche Criterion (SAC), differential approximation probability (DP), linear-approximation probability (LP), and bit independence criterion (BIC). It was noted from the analysis that the suggested S-boxes achieved almost all conditions close to the ideal result. Also, the comparison of proposed S-boxes produced by different schemes is presented.
4.1. Nonlinearity
Nonlinearity in the Hamming distance term is referred to as the minimum value among Boolean functions and possibly all affine functions. Bits required modifications in their configuration to attain the Boolean function adjacent affine function. The nonlinearity technique enumerates the alternate bit number to make the function closer to an affine function. In cryptographic literature, for S-boxes in the case of the Galois field the upper bound of nonlinearity is given as []. The proposed S-box NL calculations are given in Table 4. The presented analysis reveals that the produced S-boxes could replace the algebraic constructed S-boxes because their construction is appealing and based on random numbers generated by hybrid chaos and feedback registers that create extensive randomness.
Table 4.
Performance indexes of .
4.2. Strict Avalanche Criteria (SAC)
In 1986, Tavares and Webster established criteria for a strict avalanche to analyze the strength of S-boxes. A function has an SAC value if by affecting a particular input bit, it has every output bit alternating with 0.5 probability. The results are outlined in Table 4. From the results, it can be clearly seen that the average SAC value of S-boxes is near to the ideal value of 0.5, which verifies S-boxes’ SAC property fulfillment.
4.3. Bit Independent Criterion (BIC)
Webster and Tavares presented the bit independence criterion []. In this criterion, the variables are pairwise related to collect information about the independence of such variables. In this technique, for the analysis of independent variables, the output vectors are used, and input bits are tackled separately. The bit independence criterion is a highly recommended property in cryptographic structures because the increased independence among the bits creates more confusion in recognizing the design of the structure. The results are displayed in Table 4, which suggests that the S-boxes satisfy the BIC.
4.4. Linear Approximation Probability (LP)
The analysis of the imbalance maximum event value is termed linear approximation probability. This technique applies two masks, i.e., and over input and output bit parity. In [], the linear approximation probability of the S-box is given as follows:
Here, the mask input and output parity bits (, are represented by the set “”, which consists of all inputs, and is the representation of the element number. From the analysis of LP for the synthesized S-boxes, it can be observed that the S-boxes have an average LP value of 0.0343, which ensures their resistance against attacks.
4.5. Differential Approximation Probability (DP)
In an encryption process, the S-box is the nonlinear component with context-uniform differentiability in unique situations. Mathematically, differential approximation probability is given as follows:
This means a differential input should be uniquely mapped on differential outputs, which ensures uniform mapping probability for each []. Less DP values provide more resistance to attacks (differential attacks).
All three suggested S-boxes catalogs are displayed in Table 4, and the results with other S-boxes are compared in Table 5.
Table 5.
Proposed S-box comparison.
4.6. S-Box Comparison
For the testing of the cryptographic proposed S-box performance, extensively used performance criteria for S-boxes are employed. Additionally, a comparison between cryptographic proposed S-box performance with recently suggested S-boxes is made and the results are shown in Table 5; in the criteria of evaluated performance, the ideal value of BIC-SAC and SAC is 0.5. The greater value of nonlinearity indicates S-boxes’ better performance and resistance against attacks (cryptanalysis). For better resistance against differential and linear cryptanalysis LP, DP values for S-boxes must be smaller. From the results of Table 5, the suggested S-boxes have lower DP and LP values than the majority of the proposed schemes like [,,,,,,], which means that the S-boxes of the presented scheme have strong robustness against cryptanalysis attacks (linear and differential). S-box nonlinearity is also higher compared to many others. Table 5 also suggests that the BIC-SAC and SAC values of proposed S-boxes are close to the ideal SAC value.
5. Image Encryption Scheme
For the elimination of insecurities in S-box-based image encryption schemes, a novel encryption technique for S-boxes utilizing the pseudo-random binary stream of numbers is offered. Firstly, a new technique is used to generate S-box and binary pseudo-random number sequences, and then for diffusion and confusion, the processes used include the substitution and permutation process of the presented scheme. The flow diagram of the proposed scheme is shown in Figure 4.
Figure 4.
Flow diagram of encryption.
5.1. Permutation Process
The process of permutation involves the following steps:
- First, take an original color image of length and associate this image with some random security keys taken as whose values lie between 0 and 1, which are then used as initial values and parameters of the modified quadratic chaotic map for Equation (1) given in Section 1.2.
- Apply between the pixel values of matrices as follows:where are the matrices of red, green, and blue channels of the original color image Q.
- Now, the initial and parametric values of the modified quadratic chaotic map are generated by using the following formula:or denotes the decimal fraction value of .
- Iterate the modified quadratic map given in Equation (1) by using the initial values obtained in Step 3. Hence, new sequences are generated. Now, the image pixels are permuted row and column-wise utilizing sequences . Then, the permuted image , is obtained.
5.2. Substitution Process
For the encrypted final image substitution is achieved.
Step 1: Firstly, the binary pseudo-random number sequence obtained in Section 2 is converted to a key sequence with integer 8-bit values using the following formula:
Step 2: For the substitution process, the key and permuted image are used. First, convert the permuted image into three layers . Substitute every pixel of a permuted image with and the sequence The substitution is achieved using the following formula for the first pixel:
where is any number in For the pixel, it is calculated as follows:
For the last pixel, it is calculated as follows:
where belongs which is used for byte substitution for using S-box1. Hence, we obtain the final encrypted image for the red layer . We can repeat the process by using for .
Step 3: Lastly, for diffusion, again an iteration is performed times in order to generate sequences and in such a way that after every iteration, the initial conditions are altered. New initial and values are calculated by the following equations:
Here, represents the initial values and are output values after iterating them times. We can restrict these chaotic sequences and in the 0–255 range employing the following formulas:
Finally, the sequence is generated, which is obtained by the following equation:
Diffusion is carried out via exclusive OR operation between the pixels of the substituted image and key. The formula for this step is given as follows:
where is the substituted image and represents exclusive OR operation and is the final ciphered image.
Decryption is the reverse of the encryption scheme. For recovery of the plain image from the ciphered image, the following steps are taken.
Firstly, the ciphered image is diffused using sequence by using the following formula:
where the sequence is obtained by using the same formulation used in the encryption technique.
Decryption is the reverse of the encryption scheme. For recovery of the plain image from the ciphered image, the following steps are taken:
First, the substitution process is carried out.
For the last red-layer pixel, it is calculated as follows:
where , belongs used for inverse byte substitution for using S-box1.
For red image pixel, it is calculated as follows:
For the red image’s first pixel, it is calculated as follows:
The same steps are performed for the blue and green layers. The permutation steps are now performed. For permutation, the same keys generated in Section 5.1 for the encryption process are utilized. In row-wise permutation, the reverse steps are taken for to move permuted pixels back to the original move sequence and for column permutation, the reverse steps are taken to move column-permuted pixels back to the original utilizing sequence . The proposed scheme’s original and encrypted images of Lena are shown in Figure 5, where it can be clearly seen that the encrypted image is completely different from the original image. The original and encrypted images combine and each R, G, and B layer representation of Lena’s image is also illustrated in the figure.
Figure 5.
Lena (a); original image (b); image red layer (c); image green layer (d); image blue layer (e); permuted image (f); red-layer permuted image (g); green-layer permuted image (h); blue-layer permuted image (i); encrypted image (j); red layer of encrypted image (k); green layer of encrypted image (l); blue layer of the original image.
6. Security Analysis
To analyze the suggested encryption outline strength, experiments to check security were performed on color images of different sizes taken from the USC-SIPI database. The standard analysis techniques used to examine encrypted images include histograms, entropy, pixel adjacent correlation, UACI, and NPCR analysis. The proposed scheme simulations were conducted via 9.1.0.441655 (R2016b) MATLAB. The initial and parametric values of the modified quadratic map were chosen as and the inputted random keys were taken as .
6.1. Entropy
Entropy is a crucial factor in demonstrating randomness. For the calculation of an image, the following entropy formula is used:
Here, the probability grey-level occurrence is expressed by and is the level number of the greyscale image. If the probability of occurrence of each in the image is the same, then its probability is given as . Hence, the image signifies complete randomness by An encryption scheme with entropy values close to 8 is highly resistant to attacks []. The entropy results of the proposed encrypted image and the comparison with [,,,] are presented in Table 6. Entropy values for each layer of the proposed image are close to the optimal value. Also, the comparison shows that the proposed scheme achieved better results as compared to others.
Table 6.
Proposed scheme entropy analysis and comparison.
6.2. Analysis of Key
The total number of keys employed in the encoding techniques is considered as key space. The proposed scheme has nine random keys given in Section 6, and are used. The computational accuracy is , so the total number of keys is , which is enough for resistance against attacks.
6.3. Key Sensitivity Analysis
For any cryptosystem, security analysis of key sensitivity is very important in order to investigate the robustness. It helps to identify cryptosystem security against attacks like brute force. Key sensitivity plays a vital role in cryptosystem security. Cryptosystems with a high level of sensitivity offer security for similar plain images, as the ciphered images are completely altered by slight changes in key pairs if an attacker is trying to hack. The first round of encryption is performed by a set of initial keys given in Section 6.2. In the presentation of this article security, four rounds are performed by an alteration of small changes in the initial key values, while the other values remain unchanged. For instance, for a sensitivity test performed on the original image of an aeroplane with a size of 512 × 512, encryption of this image is first performed by the original initial key set and it is shown in Figure 6a,b. A small alteration is made in just a single initial key from the key set say in like , and the other keys remain unchanged. This helps in obtaining a new initial key set, which is then used for encryption of the same plain image with different keys, and then another ciphered image is obtained as shown in Figure 6c. The difference between the pixels of both ciphered images is given in Figure 6d. The value of the difference rate between them is 0.996423%, which represents that any slight modification in keys will result in significant alteration in ciphered images. The result of decryption for images by both key sets is shown in Figure 6e–h. In Figure 6e, the image is decrypted by the original key set values, while in Figure 6f,g, it is decrypted with slightly changed key set values. It is depicted in Figure 6 that the original plain image is just obtained from the original set of keys with which they are encrypted, while the slightly altered keys on encrypted images do not provide any information about a plain image. Thus, from the results, it can be seen that the proposed method shows high sensitivity towards secret keys in both enciphering and deciphering. Due to the length limitations of the article, the results of rate differences for some keys are given in Table 7. From the difference rates resulting in values of both ciphered images, it is concluded that the presented scheme has high sensitivity.
Figure 6.
Key sensitivity analysis (a) of original image (b) encrypted with original initial key set (c) and encrypted using slightly different key set. (d) Difference in both ciphered (b,c) image (e) decryption of (b) using original key set (f) decryption of (b) using slightly altered key set (g) decryption of (c) using original key set (h) decryption of (c) using slightly changed key set.
Table 7.
Difference rate of an encrypted image by varying slight keys.
6.4. Analysis for Correlation
Correlation helps to check adjacent image pixel association. It is categorized into distinct three formats: diagonal, horizontal, and vertical. To perform this analysis, the whole image texture is considered. The formulation of this analysis is mathematically given as follows:
The correlation analysis of the proposed original and ciphered RGB image in vertical, diagonal, and horizontal directions is presented in Table 8. Figure 7 represents vertical, diagonal, and horizontal correlation analysis for RGB images. It can be clearly seen from Table 8 that the correlation of the original image for each channel is near 1 but for ciphered images, the values are near 0, which illustrates that no correlation exists between ciphered image adjacent pixels, which makes it difficult for the attacker to attack.
Table 8.
Impact of correlation type on original and encrypted images.
Figure 7.
Plain image Red, Green, Blue channel correlation analysis: (a) horizontally, (b) vertically; (c) diagonally. Ciphered image Red, Green, Blue channel correlation: (d) horizontally, (e) vertically; (f) diagonally.
6.5. Histogram Analysis
To assess the security of encryption schemes, uniformity of the encrypted image histogram is very important. To check the pixel value dispersion in certain images, this analysis is used. An encryption scheme has strong algebraic properties if its histogram is uniform. The proposed encrypted image histograms are identical to one another but different from the original image, which ensures its resistance against attacks. In Figure 8 and Figure 9, histograms of each RGB channel for Lena, Aeroplane, Peppers, Baboon, and House images, including both original and encrypted images, are displayed. According to Figure 8 and Figure 9, it is evident that the histograms of the encrypted image for each layer are completely different from the original image and show excellent results.
Figure 8.
(I) Original image; (II) original image histogram; (i) original image red-layer; (ii) original image green-layer; (iii) original image blue-layer; (iv) original image red layer histogram; (v) original image green layer histogram; (vi) original image blue layer histogram; (vii) encrypted image red layer; (viii) encrypted image green layer; (ix) encrypted image blue layer; (x) encrypted image red layer histogram, (xi) encrypted image green layer histogram, (xii) encrypted image blue layer histogram (III) encrypted combined image; (IV) encrypted image combined histogram.

Figure 9.
(a–c) Original, encrypted, and decrypted image of aeroplane, (d–f) aeroplane original, encrypted and decrypted image histograms, (g–i) original, encrypted and decrypted image of baboon, (j–l) baboon original, encrypted and decrypted image histograms, (m–o) original, encrypted and decrypted image of peppers, (p–r) pepper original, encrypted and decrypted image histograms, (s–u) original, encrypted and decrypted image of house, (v–x) house original, encrypted and decrypted image histogram.
6.6. Chosen-Plaintext Attack Analysis
To break any cryptosystem, in general, it is presumed that the attacker knows exactly the design and workings of an understudy cryptosystem; aside from the secret key, all data are known. This attacker performed four attacks that are characterized in this study; (a) chosen-plaintext attack: a string of ciphertext has been accessed by an opponent; (b) known-plaintext attack: both the cipher and plaintext strings have been accessed by the opponent; (c) chosen-ciphertext attack: a plaintext string is randomly selected by the opponent in this attack, and it helps to obtain a string of corresponding ciphertext; and (d) ciphertext-only attack: a ciphertext string is randomly selected by opponent in this attack, and it helps to obtain a string of corresponding plaintext []. Of those four types of attacks, the most important one is the chosen-plaintext attack. In the permutation phase of the proposed scheme, firstly, the initial key values are defined depending on the colored plain image channel information, so if the images are different, the key streams are also changed. And then in the substitution phase, the pixels of permuted image R, G, and B layers are substituted with S-boxes and the chaotic sequence. And for every layer, different S-boxes are used, which enhance the security of proposed schemes. After this, the substituted image is xored with unknown chaotic sequence values, which helps to modify the ciphered image former values with new ones. So, the proposed encryption process strongly interlinks the image content with keys in such a way that a slight change in key would change the sequences, thus making it resistant against attacks.
6.7. MSE, PSNR and SSIM Analysis
The mean square error (MSE) is the average squared alteration among the original and encrypted images. Mathematically, it is defined as follows:
where , represents the and of original plain and ciphered images. Encryption schemes with high robustness must have MSE higher values. Furthermore, the quality of ciphered images is assessed by employing PSNR (peak signal noise ratio), which is mathematically formulated as follows:
where the maximum value of the image pixel is represented by The structural similarity index commonly known as SSIM is used for the measurement of the value of similarity between the original and ciphered images. The testation of the inter-dependency of pixels is usually referred to as the information based on structural properties that help to measure graphically strong pixel relationships. The structural information of any entity is carried out using the dependencies when it is visually seen. The values of SSIM lie between intervals −1 and 1. The mathematical computation of this analysis is given as follows:
where the average values for and are represented as and and their variances and covariance are represented by and and represents a weak denominator value for stabilized division. For the pixel dynamical values that are signified by l, the values are (0.01, 0.03). The results of MSE, PSNR, and SSIM for the proposed “Lena” ciphered and original images and their comparison are given in Table 9. It is clearly depicted from the resulting values that the SSIM ciphered image values are nearest to zero, whereas PSNR is lesser than 10 dB and the values of MSE are greater. This indicates that the ciphered images using the proposed technique are low quality, which means that it is quite difficult to recognize the original image from the ciphered ones. Furthermore, from the comparison result of Lena’s image, it can be observed that the proposed scheme PSNR, SSIM, and MSE resulted in values that are better than others.
Table 9.
SSIM, PSNR, and MSE analyses and their comparison.
6.8. Differential Attack Analysis
To acquire image-significant data, attackers mostly use a tactic in which they alter the original image slightly and then the proposed scheme is applied to encrypt the original and already ciphered image (the attacker wants that image to crack). Consequently, two ciphered images are obtained. In this manner, the attackers cracked the cryptosystem using both ciphered image difference rates; this overall process is known as differential analysis. For encryption algorithm robustness, the presented technique must be highly sensitive to both plain text and the secret key, so any slight secret key or plain text alteration would lead to a whole alteration in the ciphered text. The proposed technique’s strength against a differential attack of a ciphered/encrypted image is assessed in the following two ways: one is the rate change in the pixel number NPCR and the other is the unified average changing UACI. Two ciphered images by alteration of only one pixel are considered in NPCR; if is the first image representation and is the second, then the evaluation of NPCR can be conducted using the following equation:
Here, is the representation of the pixels’ total number and can be defined as follows:
To test the pixels, change number, and measurement of intensity average modification among the ciphered images, the UACI (unified average changed intensity) is utilized []. A mathematical formulation of the analysis is given below:
Here, F is the representation of the highest pixel-validated value with ciphered image format compatibility and is defined as follows:
The proposed image (Lena, Aeroplane, Peppers, Baboon and House) UACI and NPCR values are provided in Table 10. From the results, we observed that the percentages of NPCR and UACI are greater than 99% and 33.4%. Also, the comparison analyses depict that the results of the proposed technique NPCR for each layer are better than other schemes and the UACI results are better than [] and comparable with [].
Table 10.
Proposed scheme NPCR, UACI analysis and comparison.
6.9. Occasional Attack Analysis
Generally, in the transmission of data through networks, some information may be lost. For this purpose, occasional attack analysis is used for capacity testing of recovered images (original), even if a small quantity of data has been occluded. In Figure 10, occlusion random analysis is implemented, which indicates that in the transmission of images, a small amount of its information is lost. The recovered images are displayed in Figure 10. It can be seen from the images that the recovered images are still in a format that is readable, even though a portion of the data in the image has been lost.
Figure 10.
Occasional attack analysis of pepper image. Figure (a,b) represents cropped ciphered images from different pixel locations. Figure (c,d) is the representation of their deciphered images having different clarity visuals.
6.10. Time Complexity
The proposed technique is implemented on MATLAB via a personal laptop with the following properties 12th: Gen Intel(R) Core(TM) i7-1255U 1.70 GHz with 8.00 GB RAM. Different image ciphering and deciphering times are recorded and the results are given in Figure 11.
Figure 11.
Time complexity analysis.
7. NIST Analysis
The level of security for any cryptosystem can be noted by identifying its distribution of output data, complexity, and period. Robust systems require long periods of time and high complexity, and uniformity. SP 800-22 NIST analysis is utilized for testing the digital image ambiguity []. Few test parts have subclasses that are copious. For image randomness testing, number of significant initial key values should be thoroughly tested. Ciphered images are obtained by a completely blended encryption technique of color (RGB) Lena image. The test outcomes are exhibited in Table 11. Following outcome smashing, it could be seen that the anticipated encryption of the digital image tool effectively passed all NIST tests. Consequently, the accomplished outcomes under consideration confirmed that the random ciphers obtained in the presented encryption technique depict asymmetrical behavior in its output.
Table 11.
Results of NIST for strongly blended encrypted image.
8. Conclusions
First, we introduced a design for generating binary pseudo-random sequences utilizing Linear Feedback Shift Registers (LFSRs) in conjunction with a modified quadratic map. This approach offers the key advantage of minimizing interference in communication channels. Its applications extend to real-time scenarios, including safeguarding confidential image data, securing Internet banking transactions, and enhancing military communications. The resulting patterns exhibit high nonlinearity, a crucial characteristic akin to S-boxes. Next, we presented a cryptosystem employing a substitution and permutation encryption scheme. We constructed an S-box over binary streams of pseudo-random sequences and assessed their cryptographic strength, confirming their effectiveness through evaluation. Lastly, we proposed a novel encryption technique for colored ciphered images based on modified chaotic quadratic map sequences and S-boxes. This method employs a dual-phase approach, encompassing both substitution and permutation, and introduces a key association strategy based on image content. This strategy aims to emulate the “one-time pad” effect, enhancing resistance to chosen-plain-text attacks (CPAs). Furthermore, we analyzed the presented S-boxes and compared them with recent techniques, demonstrating their robust algebraic properties and highly nonlinear behavior.
Author Contributions
Conceptualization, D.S.M., T.S., S.T., I.M.N., N.L.F. and M.S.; methodology, D.S.M., T.S., N.L.F. and M.S.; software, I.M.N., N.L.F. and M.S.; validation, D.S.M., T.S. and S.T.; formal analysis, I.M.N., N.L.F. and M.S.; data curation, D.S.M.; writing—original draft preparation, D.S.M. and T.S.; writing—review and editing, I.M.N., N.L.F. and M.S.; visualization, D.S.M., T.S., S.T. and I.M.N.; supervision, N.L.F. and M.S.; funding acquisition, N.L.F. and M.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
All generated or analyzed data in this study are included in this publication.
Acknowledgments
The authors wish to express their sincere appreciation to HITEC University Taxila, Quaid-i-Azam University, Kaunas University of Technology, and Sejong University for their invaluable assistance and cooperation throughout the duration of this research. The contributions provided by these institutions have significantly enhanced the caliber and breadth of this work.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Cassal-Quiroga, B.B.; Campos-Cantón, E. Generation of Dynamical S-Boxes for Block Ciphers via Extended Logistic Map. Math. Probl. Eng. 2020, 2020, 2702653. [Google Scholar] [CrossRef]
- Carlet, C. S-boxes, boolean functions and codes for the resistance of block ciphers to cryptographic attacks, with or without side channels. In International Conference on Security, Privacy, and Applied Cryptography Engineering; Springer: Cham, Switzerland, 2015. [Google Scholar]
- Detombe, J.; Tavares, S. Constructing large cryptographically strong S-boxes. In International Workshop on the Theory and Application of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 1992. [Google Scholar]
- Shah, T.; Qamar, A.; Hussain, I. Substitution Box on Maximal Cyclic Subgroup of Units of a Galois Ring. Z. Naturforschung Sect. A-A J. Phys. Sci. 2013, 68, 567–572. [Google Scholar] [CrossRef]
- Ç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. [Google Scholar] [CrossRef]
- Farhan, A.K.; Ali, R.S.; Natiq, H.; Al-Saidi, N.M.G. A New S-Box Generation Algorithm Based on Multistability Behavior of a Plasma Perturbation Model. IEEE Access 2019, 7, 124914–124924. [Google Scholar] [CrossRef]
- Khan, M.; Asghar, Z. A novel construction of substitution box for image encryption applications with Gingerbreadman chaotic map and S8 permutation. Neural Comput. Appl. 2018, 29, 993–999. [Google Scholar] [CrossRef]
- Tian, Y.; Lu, Z. S-box: Six-dimensional compound hyperchaotic map and artificial bee colony algorithm. J. Syst. Eng. Electron. 2016, 27, 232–241. [Google Scholar]
- Zhang, X.-P.; Guo, R.; Chen, H.-W.; Zhao, Z.-M.; Wang, J.-Y. Efficient image encryption scheme with synchronous substitution and diffusion based on double S-boxes. Chin. Phys. B 2018, 27, 080701. [Google Scholar] [CrossRef]
- Wang, X.; Çavuşoğlu, Ü.; Kacar, S.; Akgul, A.; Pham, V.-T.; Jafari, S.; Alsaadi, F.E.; Nguyen, X.Q. S-Box Based Image Encryption Application Using a Chaotic System without Equilibrium. Appl. Sci. 2019, 9, 781. [Google Scholar] [CrossRef]
- Falih, S.M. A Pseudorandom Binary Generator Based on Chaotic Linear Feedback Shift Register. Iraq J. Electr. Electron. Eng. 2016, 12, 155–160. [Google Scholar] [CrossRef]
- Rahimov, H.; Babaei, M.; Farhadi, M. Cryptographic PRNG Based on Combination of LFSR and Chaotic Logistic Map. Appl. Math. 2011, 2, 1531–1534. [Google Scholar] [CrossRef]
- Ramadan, N.; Ahmed, H.E.H.; Elkhamy, S.E.; El-Samie, F.E.A. Chaos-based image encryption using an improved quadratic chaotic map. Am. J. Signal Process. 2016, 6, 1–13. [Google Scholar]
- Williams, H.; Webster, A.; Tavares, S. On the design of s-boxes. In Advances in Cryptology—CRYPTO’85 Proceedings; Springer: Berlin/Heidelberg, Germany, 1986. [Google Scholar]
- Dawson, M.H.; Tavares, S.E. An expanded set of S-box design criteria based on information theory and its relation to differential-like attacks. In Advances in Cryptology—EUROCRYPT’91: Workshop on the Theory and Application of Cryptographic Techniques Brighton, UK, April 8–11, 1991 Proceedings 10; Springer: Berlin/Heidelberg, Germany, 1991. [Google Scholar]
- Biham, E.; Shamir, A. Differential cryptanalysis of DES-like cryptosystems. J. Cryptol. 1991, 4, 3–72. [Google Scholar] [CrossRef]
- Matsui, M. Linear cryptanalysis method for DES cipher. In Workshop on the Theory and Application of of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 1993. [Google Scholar]
- Mahmood, S.; Farwa, S.; Rafiq, M.; Riaz, S.M.J.; Shah, T.; Jamal, S.S. To Study the Effect of the Generating Polynomial on the Quality of Nonlinear Components in Block Ciphers. Secur. Commun. Networks 2018, 2018, 5823230. [Google Scholar] [CrossRef]
- Zhu, S.; Wang, G.; Zhu, C. A Secure and Fast Image Encryption Scheme based on Double Chaotic S-Boxes. Entropy 2019, 21, 790. [Google Scholar] [CrossRef] [PubMed]
- Liu, L.; Zhang, Y.; Wang, X. A Novel Method for Constructing the S-Box Based on Spatiotemporal Chaotic Dynamics. Appl. Sci. 2018, 8, 2650. [Google Scholar] [CrossRef]
- Belazi, A.; El-Latif, A.A.A. A simple yet efficient S-box method based on chaotic sine map. Optik 2017, 130, 1438–1444. [Google Scholar] [CrossRef]
- Haq, T.U.; Shah, T. 12 × 12 S-box Design and its Application to RGB Image Encryption. Optik 2020, 217, 164922. [Google Scholar] [CrossRef]
- Mahboob, A.; Nadeem, M.; Rasheed, M.W. A study of text-theoretical approach to S-box construction with image encryption applications. Sci. Rep. 2023, 13, 21081. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef]
- Haralick, R.M.; Shanmugam, K.; Dinstein, I.H. Textural Features for Image Classification. IEEE Trans. Syst. Man Cybern. 1973, SMC-3, 610–621. [Google Scholar] [CrossRef]
- Chai, X.-L.; Gan, Z.-H.; Lu, Y.; Zhang, M.-H.; Chen, Y.-R. A novel color image encryption algorithm based on genetic recombination and the four-dimensional memristive hyperchaotic system. Chin. Phys. B 2016, 25, 100503. [Google Scholar] [CrossRef]
- Wu, J.; Liao, X.; Yang, B. Color image encryption based on chaotic systems and elliptic curve ElGamal scheme. Signal Process. 2017, 141, 109–124. [Google Scholar] [CrossRef]
- Joshi, A.B.; Kumar, D.; Kumar, S.; Singh, S. A novel method of digital image encryption using graph theory. Multimed. Tools Appl. 2024, 83, 6803–6828. [Google Scholar] [CrossRef]
- Jahangir, S.; Shah, T. Designing S-boxes triplet over a finite chain ring and its application in RGB image encryption. Multimedia Tools Appl. 2020, 79, 26885–26911. [Google Scholar] [CrossRef]
- Biryukov, A.; Wagner, D. Advanced slide attacks. In International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2000. [Google Scholar]
- Pareschi, F.; Rovatti, R.; Setti, G. On Statistical Tests for Randomness Included in the NIST SP800-22 Test Suite and Based on the Binomial Distribution. IEEE Trans. Inf. Forensics Secur. 2012, 7, 491–505. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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/).