1. Introduction
The rapid progress and widespread adoption of contemporary digital communication and network technologies have revealed significant potential in improving online data storage and electronic data exchange. However, ensuring the protection of confidential information is equally essential, leading to the continuous prioritization of network security and data integrity [
1]. Consequently, scientists have implemented appropriate safety measures to enhance visibility and prevent security vulnerabilities. Since a large portion of multimedia content shared and stored online consists of images, it becomes necessary to guarantee the confidentiality and authenticity of digital images through the utilization of image encryption techniques. The process of image encryption involves utilizing a mathematical algorithm to convert the original image into an intricate format, making it challenging to interpret. This transformation strengthens the image’s resistance to security attacks [
2,
3,
4]. Image encryption finds practical applications in diverse fields such as medical imaging, telemedicine, business, biometric authentication, and military communication. To address the security demands of these applications, various image encryption techniques have been developed, including digital watermarking techniques [
5], image scrambling methods [
6], image steganography [
7], and image cryptography [
8].
In recent decades, there has been a significant rise in interest surrounding the application of chaos in cryptography. This interest stems from the fundamental property of chaos, which makes it sensitive to initial conditions and produces deterministic data sets that resemble randomness. By leveraging chaos-based cryptographic models, researchers have developed pioneering techniques for designing efficient image encryption systems. These systems showcase remarkable attributes in multiple areas, such as speed, cost-effectiveness, computational power, computational overhead, complexity, vulnerability, and more. The utilization of chaotic systems in cryptography offers notable benefits, such as sensitivity to initial values, strong randomness, and resistance to cracking [
9]. Consequently, chaotic systems have gained significant attention and been extensively studied for image encryption purposes [
10,
11,
12].
In 1989, mathematician Matthews pioneered the integration of chaos into encryption systems and introduced the concept of chaotic cryptography [
13]. Compared to traditional image encryption methods, encryption techniques based on chaotic systems demonstrate higher efficiency. Consequently, researchers have proposed a multitude of image encryption schemes that leverage chaotic systems [
5,
14,
15]. In a color image encryption (CIE) algorithm, it is common practice to encrypt the three components of R, G, and B separately and then merge them to generate a color image [
16]. Alternatively, one can create a unified grayscale image by dividing and encrypting the three components, allowing for the restoration of the original size [
17]. After extensive research conducted by countless scholars, the field of color image CIE has made significant progress and achieved a more refined state. The amalgamation of chaotic systems and scrambling methods within the scrambling–diffusion framework has proven effective in meeting the majority of encryption needs.
Nevertheless, there is still scope for enhancing the existing encryption algorithms. However, when it comes to proposing algorithms for image encryption, scholars have primarily utilized chaos theory, optical transformation, DNA encoding, and compressed sensing. These theories serve as the foundation for developing a wide range of image encryption algorithms that modify the positions and values of pixels. Despite the abundance of proposed image encryption algorithms, most of them concentrate on single grayscale images, raising doubts about their security and efficiency. To address these concerns, this paper introduces a new algorithm that strives to improve both the security and efficiency of image encryption. In order to enhance both security and efficiency, a novel CIE algorithm is introduced. The core contributions of this paper are outlined as follows:
Enhanced parallel execution: The proposed algorithms were developed to enable efficient parallel execution across all phases.
Innovations in confusion and diffusion techniques: The proposed algorithms incorporate original approaches within the confusion and diffusion processes, resulting in streamlined and parallel execution.
Robust random number generation: These algorithms make use of SBTM, which not only is highly efficient but also boasts remarkable strength in random number generation.
Streamlined encryption methods for grayscale and color images: The encryption and decryption processes for images have been optimized to achieve swift performance, with encryption times as low as 1 ms for small images and 1 s for larger images (100 MB).
Heightened sensitivity to key and image modifications: Through a single round of encryption, the cipher images exhibit extraordinary responsiveness to alterations in both the encryption key and the original image.
The structure of this paper is organized as follows:
Section 2 provides a comprehensive analysis of previous studies.
Section 3 introduces a new CIE algorithm.
Section 4 showcases the experimental results and provides detailed analyses. Finally,
Section 5 concludes the paper by summarizing the findings.
2. Related Works
In this section, a synthetic analysis of the latest colored image encryption techniques is presented. Numerous algorithms for encrypting colored images have been proposed, showcasing variations in terms of their effectiveness and robustness. The encryption of images is the procedure of securing them from unauthorized access utilizing a secret key. Digital visual data are structured in the form of rectangular frames consisting of individual elements referred to as pixels, each assigned a numerical value. With the progress of information technologies, digital images, encompassing diverse formats like medical images, grayscale images, color images, binary images, and others, have become increasingly prevalent in applications, storage, and transmission. Consequently, protecting this type of information has emerged as a crucial challenge [
18]. Considering the distinctive attributes of image data, numerous encryption algorithms have been proposed, employing various technologies, including [
19,
20,
21,
22,
23,
24,
25,
26,
27].
A color image encryption technique was proposed by Aqeel ur Rehman et al., utilizing an exclusive-OR operation with DNA complementary rules. The basis of this approach was the integration of chaos theory and the SHA-256 hash function to modify the initial conditions and control parameters of the chaotic system [
28]. The color image’s three channels were transformed into a one-dimensional vector and sorted according to the chaotic sequence generated via the Piecewise Linear Chaotic Map. This permuted array was then divided into three parts, representing each color channel, and independently permuted using Lorenz’s chaotic system. Following the dual permutation, each pixel in every channel was encoded independently using deoxyribonucleic acid (DNA) bases in a chaotic manner. Notably, the algorithm’s novelty lies in substituting each pixel in a channel with an exclusive-OR operation based on DNA complementary rules. Multiple DNA rules were employed, repeating this operation for a random number of cycles in a cyclic fashion. The selection of DNA rules at the beginning of this cyclic operation and its continuation depended on Chen’s chaotic sequence. Extensive simulated experiments demonstrated the algorithm’s exceptional encryption performance achieved within a single round.
In their work, Seyedzadeh et al. [
29] proposed an innovative image encryption algorithm that utilized chaos theory, employing a Coupled Two-Dimensional Piecewise Nonlinear Chaotic Map (CTP-NCM) and a masking process specifically designed for encrypting color images. Through computer simulations, it was demonstrated that the algorithm achieved a high level of security while maintaining exceptional speed in practical color image encryption applications. The algorithm incorporated a 256-bit external secret key to generate the initial conditions and parameters of the CTP-NCM. Experimental results substantiated the superior security performance of the proposed algorithm in comparison to other existing algorithms. Tong et al. presented a rapid algorithm for encrypting color images, utilizing a four-dimensional chaotic system as its foundation [
30]. To enhance the encryption algorithm’s complexity and key space, the researchers introduced an innovative method for designing four-dimensional chaotic systems based on classical equations from three-dimensional chaotic systems. The authors proposed a new pseudo-random sequence generator. The generator utilizes bits from the four values produced via the four-dimensional chaotic systems to generate three keys instead of one, leveraging the generated sequence to enhance the speed of the image encryption process. The authors employed row-major and column-major techniques to diffuse the original image, and they employed a cat map with a parameter to scramble the image pixels and achieve the desired encryption effect. Extensive simulations and security analyses confirmed that the proposed encryption algorithm demonstrated remarkable performance in terms of security, robustness, and high encryption speed.
Li et al. introduced an image encryption algorithm that leveraged hyper-chaos, utilizing a 5D, multi-wing, hyper-chaotic system in which the key stream was derived from the original image [
31]. The algorithm integrated pixel-level and bit-level permutations to enhance the cryptosystem’s security. Furthermore, a diffusion operation was employed to modify the pixels. Theoretical analysis and numerical simulations substantiated the algorithm’s ability to provide high security and reliability for image encryption. In a separate study, researchers proposed a simple and effective chaotic system by combining two existing one-dimensional chaotic maps (seed maps) [
18]. Simulations and performance evaluations demonstrated that this system generated one-dimensional chaotic maps with larger chaotic ranges and improved chaotic behaviors compared to the seed maps. The chaotic system was then utilized in a novel image encryption algorithm to address multimedia security. Notably, with the utilization of the same set of security keys, the algorithm generated distinct encrypted images for the same original image in each encryption process. Experimental investigations and security analyses verified the algorithm’s exceptional performance in image encryption and its resilience against various attacks. In addition, El-Latif et al. presented an innovative scheme for encrypting color images based on a quantum chaotic system [
32]. The method involved applying new substitution total automorphism in the integer wavelet transform, specifically scrambling only the Y (luminance) component of the L frequency sub-band. Subsequently, two diffusion modules were created by combining the features of horizontally and vertically adjacent pixels using a quantum chaotic map. In the final stage, a substitution/confusion process was generated by employing an intermediate chaotic key stream image derived from the quantum chaotic system. Thorough security and performance analyses were conducted through extensive experimental investigations, showcasing the exceptional characteristics of the proposed color image encryption method, including robust security and satisfactory performance. Comparative evaluations favored the proposed scheme in most cases.
Furthermore, Liu et al. proposed an image encryption scheme based on chaos using bijection [
33]. In this algorithm, the entire color image was diffused using XOR operations for a random number of rounds. Each color component was separated into blocks of equal size. A bijective function, denoted as f: B→S, was established between the block set B and the S-box set S. The corresponding 8 × 8 S-box was dynamically generated via the Chen system, incorporating variable conditions. The encrypted image was obtained by substituting each block with the corresponding paired S-box. Numerical simulations and security analyses indicated that the scheme exhibited the potential for practical application in image encryption. Additionally, Mazloom et al. introduced a novel image encryption algorithm based on chaos, specifically utilizing a coupled nonlinear chaotic map (CNCM), to encrypt color images [
34]. The algorithm employed symmetric key cryptography with a stream cipher structure. To enhance the security of the algorithm, a 240-bit secret key was used to generate the initial conditions and parameters of the chaotic map through algebraic transformations applied to the key. These transformations, combined with the nonlinear and coupling characteristics of the CNCM, resulted in an improved level of security within the cryptosystem. In this study, the image size and color components were incorporated to achieve higher security and complexity, thereby significantly increasing the approach’s resistance to known and chosen–plaintext attacks. The algorithm’s efficacy and security were validated through various experimental and statistical analyses, as well as key sensitivity tests, demonstrating its suitability for real-time image encryption and transmission.
Kadir et al. presented a color image encryption scheme that employed a couple of hyperchaotic Lorenz systems [
35]. The scheme introduced a novel approach by injecting impulse signals randomly into the coupled Lorenz system during iterations to enhance the complexity of the trajectory. Six sequences of state variables were generated to encrypt the R, G, and B components using bitwise operations such as XOR and a left or right cyclic shift. The utilization of six initial values and multiple indeterminate impulse signals expanded the cryptosystem’s key space, providing resistance to exhaustive attacks, including those from quantum computers. Simulations demonstrated the stability of the mean encryption speed, which was influenced by the hardware equipment and the algorithm employed. Statistical analysis confirmed the high effectiveness of the proposed image encryption algorithm. Existing color image encryption techniques using chaotic techniques have several main limitations.
Security: Some existing algorithms are vulnerable to attacks such as brute-force, statistical, and differential attacks. These vulnerabilities can compromise the security of encrypted images.
Key space: Chaotic systems often have a limited key space, making them susceptible to exhaustive key search attacks. If the key space is small, it is easier for an attacker to try all possible keys and decrypt the encrypted image.
Robustness: Some algorithms are not robust enough to withstand common signal processing operations or geometric transformations applied to the encrypted image. This can lead to a loss of information or a decrease in the quality of the decrypted image.
Speed: Chaos-based encryption algorithms can sometimes be computationally intensive, leading to slower encryption and decryption speeds. This can limit their practical use in real-time applications or scenarios requiring quick processing.
Resistance to attacks: Existing algorithms may not provide sufficient resistance to advanced attacks such as chosen-plaintext attacks or known-plaintext attacks. These attacks exploit the algorithm’s vulnerabilities and can potentially reveal the original content of the encrypted image.
Addressing these limitations is crucial to ensuring the development of more secure and efficient color image encryption algorithms based on chaotic techniques. In addition to the limitations mentioned above, there are also other challenges that need to be addressed in order to develop more secure and efficient color image encryption algorithms using chaotic techniques. These challenges include the following:
Developing more secure chaotic systems with a larger key space.
Developing more robust chaotic-based encryption algorithms that are resistant to common signal processing operations and geometric transformations.
Developing more efficient chaotic-based encryption algorithms that can achieve high encryption and decryption speeds.
Developing chaotic-based encryption algorithms that are resistant to advanced attacks, such as chosen-plaintext attacks and known-plaintext attacks.
The development of more secure and efficient color image encryption algorithms using chaotic techniques is an active area of research. By addressing the challenges mentioned above, it is possible to develop more secure and efficient color image encryption algorithms that can be used to protect sensitive data.
3. Proposed Technique
This section provides an overview of the proposed image ciphers. A total of six versions have been developed, with three of them employing the SBTM [
36] random number generator, while the other three adopt a modified version utilizing digits of PI as its state. This modification demonstrates the flexibility of SBTM, showcasing its ability to yield strong random numbers with diverse initial values. The following presents a brief description of the first three algorithms that were developed:
A Grayscale Image Cipher (GIC), a cipher that can only be used with grayscale images.
Colored Image Cipher Single Thread RGB (CIC1), a cipher that can be used with color images and uses a single thread to handle the red, green, and blue channels of a sub-image.
Colored Image Cipher Three Thread RGB (CIC3), a cipher that can be used with color images and that uses three threads to handle the red, green, and blue channels of a sub-image.
The preceding three algorithms rely on the original SBTM random number generator, while the remaining three ciphers share identical structures but implement a modified version of SBTM. All six versions adhere to a common logic; therefore, we discuss GIC in detail, and subsequently, we explore the distinctions present in the other variants. The description of a step-by-step implementation can be found in the appendices.
3.1. Image Encryption Methods and Ciphers
In this article, we focus on a number of strategies to produce image ciphers that are very strong and efficient. In particular, we consider the following:
The use of strong and efficient CPRNG: Random number generators are essential components in ciphers. They determine the cipher strength and time of execution. We decided to use SBTM CPRNG for its strong sequences and speed. Details about SBTM and the proposed variant, SBTMPi, are provided in the next section.
Parallel processing: Currently, almost all CPUs are multi-core, even those of smartphones and tablets. Encrypting an image in a sequential fashion takes a long time. Due to the nature of random number generators and the sequences they produce, many of the ciphers operate sequentially. In this article, however, we create four arrays of random numbers in advance and use them to shuffle and encrypt an image. This method allows for parallel processing utilizing all cores of the CPU, which results in a huge speed gain.
Number of random numbers required: Many of the image ciphers produce as many random numbers as the number of pixels in an image. Depending on the efficiency of the PRNG used, this process requires a large amount of time, especially for large images. In this article, we only produce a small number of random numbers to encrypt the image; for example, for images of size (1000 * 1000), we produce only 4000 random numbers. The numbers are then utilized in a smart way to provide strong encryption, as evidenced by the results shown in the Implementation and Evaluation section.
Efficient shuffling of pixels: Another aspect of image encryption that usually consumes time is the shuffling process. Shifting and rolling columns and rows of an image is time-consuming and gets worse with large images. We utilized a clever method to calculate new indices of a plain image pixel and store the encrypted pixel in the calculated indices in the encrypted image. This method avoided the actual shifting of pixels and allowed for parallel processing as well.
Sensitivity to change: We developed an efficient method that provides very strong sensitivity to changes in either plain images or their keys. A change of one to any of the plain image’s pixels leads to a drastic change in the encrypted image. The method used produces a digest of the image that can be used for an integrity check as a byproduct.
As mentioned above, a total of six ciphers are proposed, namely GIC, CIC1, and CIC3, which utilize SBTM CPRNG, and another three that uilize a proposed variant of SBTM, which are discussed in the next section. The overall processes of the six ciphers are summarized below, while a description of their detailed implementation is delegated to the appendices. The main steps followed in all six ciphers are listed below:
Load the image.
Divide the image into a number of sub-images.
Generate strong keys: as can be seen in
Figure 1,
and
are used to initialize SBTM. Ninety-seven values are generated, and then
is used to replace the control variable of SBTM, and so on until all keys are used. The state of SBTM is now influenced by all user input.
is assigned to the next random value. Ninety-seven values are generated, and the last one is assigned to
. This step is repeated for
to
.
Use a number of threads to initialize the required arrays: GIC has only two arrays to hold random double values, size r and size c. Hence, only two threads are needed.
Use a number of threads to calculate a digest called : based on the number of sub-images, create as many threads to calculate . The process is basically the sum of all the elements of the image after adding a random value to it and multiplying it with the sum of two random values from and as shown in the equation below. This process produces a simple digest that is affected by any modification to any pixel of the original image. .
Use a number of threads to initialize another set of arrays utilizing the calculated digest: GIC has only two arrays to hold random integer values, , size r, and , size c. Hence, only two threads are needed. Note that these two arrays hold randomly ordered indices.
Use a number of threads to encrypt the image: based on the number of sub-images, create as many threads to encrypt the image. Each thread is assigned one sub-image. The encryption step is rather simple. It XORs pixels from the plain image with four values from the four arrays, , , , and . Shift emulation is done here, through which new indices are calculated for any given pixel in the encrypted image, and the plain image pixel at the calculated indices is encrypted.
Save the digest and the encrypted image to file.
3.2. SBTM and SBTMPi
SBTM is the CPRNG proposed in [
36]. It was specifically designed to generate sequences with exceptional statistical properties and a high degree of security while maintaining a low computational cost. It utilizes a modified 1D chaotic tent map with enhanced attributes to produce chaotic sequences. SBTM utilizes the well-known tent map function and adds to it a circular array to serve as a state. The initial values of the state are square roots of prime numbers. The main functionality of SBTM is shown in Equation (
1). With every random number generated, an element of the state is updated. An automatic reset of state values is applied to keep them within a specific range. SBTM was thoroughly tested and proved to produce extremely strong sequences with a low computational time. The size of the state array was chosen to be five. In the original article, many sizes were tested, and they all produced strong sequences. Five, however, kept the size of the generator small. The values produced from Equation (
1) can be greater than one; only the fraction is returned to keep the random values between zero and one. In [
36], it was stated that other well-chosen values can be used for the initial state without impacting the strength of the generator. In this article, we propose SBTMPi, which uses digits from the fraction part of PI. The digits were multiplied by 100 and then by the constant (
e). The state array used is of length 13, as shown below: State of
{271.8281828459045, 1087.312731383618, 271.8281828459045, 1359.1409142295227, 2446.4536456131405, 543.656365691809, 1630.969097075427, 1359.1409142295227, 815.4845485377135, 1359.1409142295227, 2174.625462767236, 2446.4536456131405, 1902.7972799213317 }. GICP
i, CIC1P
i, and CIC3P
i use the proposed CPRNG, namely SBTMPi.
3.3. Image Decryption Process
The decryption process is simpler and faster than the encryption process due to the fact that the digest does not have to be calculated, as it is impeded in the encrypted file. The general procedure followed for all six ciphers can be summarized in the following steps:
Load , then load the encrypted image.
Divide the image into a number of sub-images.
Generate strong keys: a similar process as that of the encryption.
Use a number of threads to initialize the required arrays
Use a number of threads to decrypt the image, which is the opposite of the encryption step.
Save the decrypted image to file.
The detailed algorithms of the decryption processes are presented in the appendices.
3.4. Analytical Discussions
In this section, the reason for developing new image ciphers and the design decisions made are discussed.
Why develop a new image cipher? There are at least three reasons that can be used. (1) With the increasing number of cyber attacks and privacy issues, stronger ciphers need to be developed. (2) The current hardware used in PCs, laptops, and smartphones uses multi-core chips that need to be utilized. (3) The increasing number of images taken, and the enormous size of such images, makes a clear case for faster and more efficient ciphers.
Why use SBTM? A random number generator is an essential part of most if not all image ciphers. Many of the used PRNGs in the literature suffer from weaknesses such as a limited range of the control variable, non-uniform distribution, being slow, and/or weak sequences of random numbers. On the contrary, SBTM is a new CPRNG that is very strong and efficient, as demonstrated in [
36].
Why use PI as the initial seed? Practically any value could be used. To avoid simple and suspicious values, common constants are utilized. PI and the square roots of prime numbers are irrational and very random in nature.
Why use six keys, not seven, ten, or three, for example? SBTM uses only one control variable as a key by default. The users may choose weak values such as 1 or 5 as a key. To enlarge the key space of the cipher and to make it harder for an attacker, more keys are needed. Of course, there needs to be a balance between usability and security. While using fewer keys makes it more usable it also makes it weaker. On the other hand, using more keys makes it less usable but stronger. Six keys seem to achieve such balance. This number of keys has been used in the literature as well [
37].
Why generate digest ? There are two reasons here. (1) The user may choose a simple seed, such as 0.1 or 0.2, which makes it easy to guess. (2) Since, usually, images are encrypted pixel by pixel after being confused, a change in the original image will only impact one pixel in the encrypted image. For these two reasons, the proposed algorithms generate a strong digest dependent on the following: the user seed US, the generated Diff arrays, and the pixel value. The Diff arrays make the position of the pixel somewhat unique; i.e., if a white image were used, and only pixel values were used, changing pixel [0, 0] by adding one to it would produce the same digest as changing pixel [0, 1] or [5, 5], and so on. Utilizing a pair of random doubles will produce a different seed if the change is made to a pixel at a different location, given that all pixels have the same value. Experimental results show this impact.
Why generate encryption keys other than the user keys through 6? The user may choose simple keys such as all zero or one, etc. Despite the fact that SBTM is very strong, it will generate the same sequence if given the same key and seed. This will definitely negatively impact the strength of the encrypted image. To avoid such a situation, the algorithm uses the user keys to generate strong and different keys through 6 that are used to generate the random sequences.
Why do we divide the image? It is very clear that time is very important, and the current hardware is capable. Using a single thread to encrypt or decrypt an image is a waste of time and resources. The proposed algorithms give the user a choice to decide on the number of sub-images to be used and, hence, reduce time and improve hardware utilization. Experimental results show a huge gain when parallelizing the process.
Why emulate the shuffling of the image? Shuffling the image before encryption is essential in almost all image ciphers. This process takes a large amount of time, especially for large images of 10 MP and above. The goal is to make this process more efficient. A novel approach to calculate where the location of the pixel will be after shuffling, and then encrypting that pixel is proposed. It saves a large amount of time when dealing with large images, as shown in the results.
4. Implementation and Verification
All six algorithms, including SBTM and SBTMPi, were implemented in Java on a laptop equipped with an Intel Core i7 twelfth-generation processor and 16 GB of RAM, running Windows 11. Java was chosen for its concurrent programming capabilities and user-friendly nature. Numerous images were subjected to testing, but only the results for those listed in
Table 1 are reported due to space constraints. Throughout all experiments, the following values were consistently used:
, and
through
were 3.4, 5.6, 2.1, 7.8, 6.1, and 9.4, respectively. The time results presented are averages from 100 runs. The results were compared with those from the prior literature [
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50].
In this section, the evaluation of the proposed algorithms concerning key space, statistical analysis, sensitivity, and time complexity is explored. For statistical analysis, the histogram, correlation, and entropy are assessed. To examine sensitivity, the performances of NPCR, UACI, and BACI are calculated. Following that, the obtained results are compared with results from the prior literature [
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50].
4.1. Key Space Analysis
To effectively thwart brute force attacks, it is crucial to have a sufficiently large key space. In cryptography, a computational complexity exceeding 128 bits is considered adequately secure. In this section, we analyze the key space of the proposed algorithms to ensure that it significantly surpasses the 128-bit threshold. The secret parameters used for this analysis are the user seed (
), and the six user keys,
. Each parameter is represented as a double with 15 digits of precision, equivalent to 52 bits. Equation (
2) demonstrates that the keyspace indeed spans 364 bits, far exceeding the required minimum of 128 bits. As a result, the key meets this crucial security requirement.
4.2. Statistical Analysis
In the literature, three commonly employed statistical analysis tools are typically taken into account: histograms, correlation, and entropy. Histogram analysis involves evaluating the distribution of pixel values in images. To assess the relationship between the original and encrypted images, the correlation coefficients of the horizontal, vertical, and diagonal directional features are calculated. Additionally, Shannon’s entropy is utilized to demonstrate the randomness of the encrypted images.
4.2.1. Histogram Analysis
The significance of the histogram lies in its ability to reveal crucial insights into the randomness of an encrypted image. For an encrypted image to be secure, the distribution of pixel values should be uniform, preventing adversaries from extracting any valuable information through statistical attacks. Samples of histograms of the original images, as well as those of the encrypted images, are shown in
Figure 3. It is very clear that the histogram of the encrypted image is uniformly distributed, even for images with very little entropy, such as white.png and black.png, as can be seen in the following figures.
4.2.2. Correlation Analysis
In typical images, there is often a strong correlation between adjacent pixels. Nevertheless, an effective encryption scheme should generate cipher images with a minimal correlation between neighboring pixels to conceal the underlying image information. The correlation coefficient can be computed using Equation (
3).
where
x and
y are two adjacent pixels selected for calculation.
and
are the expectation of
x and
y, while
) and
) are the variances of
x and
y. For both the plain and cipher images, pairs of all pixels were considered in three directions: horizontal, vertical, and diagonal. The correlation coefficient was then computed, and the outcomes are displayed in
Table 2.
The analysis reveals that the plain images exhibit a significant correlation between adjacent pixels, whereas the cipher images generated via GIC, CIC1, and CIC3 demonstrate notably low correlation values.
Figure 4,
Figure 5,
Figure 6 and
Figure 7 visually illustrate the correlation between two adjacent columns in both the plain and cipher images. The figure vividly demonstrates that pixels in the cipher images appear to be randomly distributed, while those in the same columns of the plain image exhibit a pronounced correlation.
4.2.3. Information Entropy
Information entropy is a mathematical property used to measure the randomness of an information source. It is calculated based on Equation (
4).
where
s is the information source;
N is the number of bits used to represent
s; and
is the probability of the occurrence of symbol
. The entropy value of a genuinely random source with 256 gray levels is expected to be 8. After calculating the information entropy for all images, the results were compiled in
Table 3. The entropy values for all cipher images surpassed 7.999, while for Black.jpg, they exceeded 7.99999. This indicates that GIC, CIC1, and CIC3 effectively generate cipher images that withstand entropy analysis, ensuring robust security.
4.2.4. Sensitivity Analysis
Claude Shannon identified two crucial properties of a secure cipher: confusion and diffusion. Confusion involves the relationship between the cipher text and the encryption key, while diffusion pertains to the relationship between the cipher text and the plain text. In other words, any change to a character of the key or the plain text should result in multiple characters of the cipher text being altered. Contemporary cryptographic algorithms often employ a substitution–permutation (SP) network as a straightforward approach to achieving both confusion and diffusion. The S-Box used in AES is a popular method for achieving substitution. However, this type of substitution can require large memory usage or lead to high computational complexity.
To address this limitation, the proposed algorithms adopt a novel approach to computing the digest and another novel approach to emulating pixel shifting. Furthermore, they utilize all the cores available in the CPU in the main steps to enhance efficiency. To demonstrate that these algorithms yield cipher images satisfying Shannon’s properties, three evaluation metrics were calculated for all test images: NPCR (Number of Pixel Change Rate), UACI (Unified Average Changing Intensity), and BACI (Blocked Average Changing Intensity). NPCR and UACI were computed for all three color channels between the following pairs of images:
The original image and the cipher image.
Two cipher images: the cipher image and one generated after adding one to pixel [0, 0, 0] of the original image.
Two cipher images: the cipher image and one generated after adding to the user seed or any of the user keys.
BACI values were calculated for two pairs of images, cases 2 and 3 of the above. NPCR, UACI, and BACI were calculated using Equations (
5), (
7), and (
9).
The comprehensive details and expected values for the equations mentioned above, specifically when comparing the plain image with the cipher image and when comparing cipher images with each other, can be found in [
51], where the expected values are shown in
Table 4. The relevant results are presented in
Table A1.
Table A1 demonstrates that the calculated values for the three indexes closely align with the theoretical values provided in
Table 4. For NPCR, all calculated values were consistently greater than 99.6 across all three color channels. Regarding UACI between cipher images, the values were always above 33.4 for all channels, except for peppers.tiff, where it was 33.39456. However, when considering the average UACI value across all three channels, it exceeded 33.4. Furthermore, UACI between the original images and the cipher images was in close agreement with the results in
Table A1, particularly for the Lenna, Peppers, White, and Black images. The BACI results were even more promising than those of UACI. According to [
51], the obtained BACI values were around the theoretical value of 26.7712 for all cipher images. These findings indicate that the proposed algorithms effectively generate cipher images that exhibit a high level of randomness and sensitivity to changes in the original image or any of the keys used.
4.2.5. Test
The
test is a quantitative method used to assess the extent of deviation in the pixel distribution of an image from a perfectly uniform distribution. The calculation is represented in Equation (
10), where pi denotes the frequency of pixel
i in the image, and
p is the average frequency of all pixels, computed for
, where
m and
n represent the height and width of the image, respectively.
A smaller
value indicates a closer adherence of the image to a uniform distribution, signifying a more uniform pixel distribution.
Table 5 displays the
values for both the plain and cipher images. Notably, the
values of the cipher images are significantly lower compared to those of the plain images. The
values for the proposed algorithms are generally around 250, which is the expected value. Particularly, for six of the nine images, it was less than 250.
4.2.6. Digest ES Sensitivity
Each of the six algorithms produces a digest
, which is crucial for both the encryption and the decryption processes.
serves as a highly random and sensitive parameter used in conjunction with the user seed,
, to seed both SBTM and SBTMPi in order to generate the random numbers used during encryption and decryption.
Table A1 presents the distinct values obtained when encrypting the original image, an image with only one pixel modified, and when the encryption key is altered for all test images. Notably, the values are remarkably different even when the changes introduced to the image or the key are minimal. This highlights the robustness and sensitivity of
, making it a vital component in ensuring the security and effectiveness of the encryption process. It is worth noting that
is written to file. This is very safe, as no parameters can be extracted from it, and before using it, it is mixed with the user seed.
4.2.7. SBTM vs. SBTMPi-Based Ciphers
This article introduces SBTMPi as a proposed extension of SBTM, showcasing the remarkable robustness and flexibility of the original CPRNG. By carefully selecting different values for the state of SBTM, the strength of the generated sequences remains unaffected. The encryption of all test images was conducted using GICPi and CIC3Pi. The evaluation results, displayed in
Table A2 and
Table A3, illustrate that the generated cipher images are equally strong, if not better, compared to those produced using GIC and CIC3.
For instance, in many cases, the value of the encrypted black and white images was lower, signifying improved performance. Additionally, the entropy of many encrypted images exceeded 7.99999, further validating their robustness. Overall, all other evaluation metrics exhibited equally favorable outcomes, highlighting the efficacy of SBTMPi and its ability to produce secure and strong cipher images.
4.2.8. CIC1 vs. CIC3
CIC1 and CIC3 are two algorithms employed to encrypt colored images. The key difference between them lies in their approach to processing sub-images during encryption. CIC3 utilizes three threads to encrypt each sub-image, while CIC1 employs a single thread.
To determine which algorithm is more suitable and to illustrate the significance of dividing the image into various sub-images determined according to the values of R and C, a comprehensive experiment was conducted. Two images, one small (peppers.tiff) and one large (bernard-hermant-nHRXNv2qeDE-unsplash.jpg), were selected for testing. Each image was encrypted using both CIC1 and CIC3 with a varying number of sub-images, where R and C ranged from 1 to 10. The entire process was repeated 100 times, and the average encryption time was recorded.
A similar experiment was conducted to compare CIC1Pi and CIC3Pi.
Figure 8 and
Table A2 and
Table A3 illustrate the results obtained from these experiments. Notably, when the number of generated sub-images was one, CIC3 performed nearly three times faster than CIC1 for both images. However, as the number of sub-images increased, the behavior differed. For the large image, the encryption time was quite similar, but CIC3 demonstrated better performance with a minimum average of 246.7 ms compared to 256.1 ms for CIC1. Conversely, for the small image, CIC1 performed better as the number of sub-images grew. The minimum average was 1.5 ms (when
and
) for CIC1 and 2.5 ms (when
and
) for CIC3. It is worth noting that both algorithms required more time as the number of sub-images increased.
Similar outcomes were observed when comparing CIC1Pi and CIC3Pi. In conclusion, for large images, CIC3 with a large number of sub-images is recommended, while for small images, CIC1 with few sub-images is more suitable for efficient encryption.
Figure 8 shows the encryption time vs. the number of sub-images in the following: A. SBTM-based CIC1 is compared with CIC3 for a large image. B. SBTM-based CIC1 is compared with CIC3 for a small image. C. SBTMPi-based CIC1 is compared with CIC3 for a large image. D. SBTMPi-based CIC1 is compared with CIC3 for a small image.
4.2.9. Comparisons
In this section, we compare the results obtained from various metrics with those reported by other researchers. It is crucial to acknowledge that this comparison may not be entirely accurate in many cases due to differences in the images used and the evaluation metrics employed. Nonetheless, presenting this comparison is essential to showcase how the proposed algorithms fare against those introduced by other researchers.
Table 6,
Table 7,
Table 8 and
Table 9 show comparison results between the proposed encryption techniques with state-of-the-art methods when encrypting an image, which offers valuable insights into the quality and effectiveness of the image encryption process using the proposed technique. As depicted in
Table 6, the proposed technique demonstrates superior performance compared to the approach presented in [
43] when encrypting the “lenna.png” colored image. This superiority is evident in several aspects, including a substantial reduction in encryption time, from 1670 ms to 2.38 ms consumed for the proposed encryption technique compared to the time consumed for [
43] to encrypt the “lenna.png” colored image. Additionally, there was a notable improvement in the correlation between the original and encrypted images, as well as in the UACI and NPCR metrics for channel “0”.
Moreover,
Table 7 presents a more extensive comparison with state-of-the-art encryption techniques, as proposed in ([
37,
38,
39,
40,
41,
44,
45,
46,
47,
48,
49,
50]). It is evident that the proposed encryption technique surpasses all previously mentioned encryption techniques when applied to encrypting “Lenna Gray.png”. Furthermore, when compared to the existing techniques ([
39,
41,
43,
44,
45,
48,
52]) that have encrypted the “Peppers.png” image,
Table 8 provides compelling evidence of the superior performance of the proposed encryption technique across various metrics, including encryption time, MSE, correlation, entropy, UACI, NPCR, BACI, and more. Finally, in
Table 9, the comparison results with existing encryption techniques ([
37,
42,
43,
44,
45,
46,
47,
48,
52]) that utilized “baboon.tiff”, “white.png”, and “black.png” images in their experiments are presented. These results further underscore the superiority of the proposed encryption technique over the existing methods.
In sum, the series of experiments conducted in this study consistently demonstrate the clear and substantial superiority of the proposed encryption techniques over existing encryption methods. Across various test scenarios, including the encryption of the “Lenna Gray.png”, “Peppers.png”, “baboon.tiff”, “white.png”, and “black.png” images, the proposed encryption technique consistently outperforms its counterparts. This superiority is evident in multiple performance metrics, such as reduced encryption times, a lower MSE, improved correlation, enhanced entropy, and better performance in metrics like UACI, NPCR, and BACI. These compelling results collectively reinforce the effectiveness and robustness of the proposed encryption techniques, making them a noteworthy advancement in the field of image encryption.
4.2.10. Time Complexity and Average Time
The time complexity of all six algorithms is linear, denoted as O(n), concerning the number of pixels in the image. For grayscale images, we generated only and random numbers. Generating a random number with SBTM or SBTMPi was constant. Subsequently, each pixel was encrypted according to step 11 of GIC, wherein all the calculations were performed in constant time. Thus, the algorithm exhibits a linear time complexity relative to the number of pixels. The average encryption time is of significant importance, albeit challenging to directly compare with other algorithms due to variations in hardware, images, and running environments. Nonetheless, it is crucial to emphasize that the proposed algorithms showcased excellent performance with the utilized hardware. Notably, encrypting a colored Lenna image of size (512, 512) took a mere 1.26 ms, while encrypting the considerably larger image Black.png (100 MB) only required 1.0825 s. The decryption results are even more impressive since the decryption algorithm does not need to calculate the digest, , leading to an even faster processing times.
Figure 9 shows an image in the following forms: plain, encrypted, one pixel changed, key change of
, both pixel and key changes, and decrypted.
4.2.11. Exploring the Performance and Attributes of Proposed Ciphers
In this section, we explore the attributes claimed for the proposed ciphers, namely fast, strong, and parallel. The encryption time achieved using the proposed ciphers is remarkably short compared to the existing literature, as evidenced in
Table 7. Our cipher was able to encrypt the image Lenna in just 1.26 ms, whereas the reported literature ranges from 1.26 ms to over 1300 ms. Similar outcomes are observed in
Table 8 and
Table 9. Notably, our ciphers required only 1082.5 ms to encrypt the Black image, which consists of 100 million pixels. This exceptional speed led us to consider our ciphers to be fast. Assessing the strength of an encrypted image involves employing various statistical tests. In
Section 4.2.1,
Section 4.2.2,
Section 4.2.3,
Section 4.2.4 and
Section 4.2.5, we discuss a comprehensive array of tests conducted on the encrypted images. The results closely align with the theoretical values for each test, indicating that our ciphers possess a remarkable strength, thus earning the label of strong. Our implementation prioritized parallel processing to enhance efficiency. We found no practical limit to the number of sub-images we could create, which translates to no practical limit to the number of threads operating on an image.
Figure 10 illustrates this, demonstrating a nearly tenfold speedup when dividing the image into 30 sub-images compared to just one sub-image (one thread on CIC1). Although utilizing more sub-images is feasible, the overhead of managing threads becomes significant, especially considering our use of a single CPU with only 14 cores. For larger images (24 million pixels) or more, we experimented with 100 sub-images, which utilized 300 threads on CIC3, and we still observed improvements in the encryption time, as depicted in
Figure 8. Therefore, we confidently affirm that the proposed ciphers utilize parallel execution to improve the encryption time by a good margin.
5. Conclusions
This paper presents a significant contribution to the field of image encryption through the development of a novel, fast, and strong cryptographic scheme. The proposed colored image cipher, built upon a state-based modified tent map and cryptographically secure pseudo-random number generators, addresses several key challenges in image encryption and security. One of the primary achievements of this work is the introduction of a parallel implementation approach. By leveraging parallel processing techniques, the encryption process is expedited, enabling the real-time encryption and decryption of colored images. This advancement is particularly relevant in today’s fast-paced digital environment, where speed and efficiency are of utmost importance. The paper also introduces a novel approach to confusion and diffusion, essential components of effective encryption algorithms. By incorporating state-based modified tent map CPRNGs, the proposed cipher achieves an enhanced level of cryptographic strength. The synergy between the CPRNG and the encryption algorithm results in a robust system that withstands various cryptanalysis techniques.
Furthermore, this research tackles the crucial aspect of random number generation. The employed cryptographically secure pseudo-random number generator ensures a high degree of randomness, making the generated keys and masks resilient to prediction and attacks. This strong foundation contributes to the overall security of the proposed image cipher. Efficiency in encryption algorithms is another hallmark of this work. The developed encryption scheme is tailored to address the unique characteristics of colored images, optimizing both security and computational efficiency. This practicality ensures that the proposed cipher is not only theoretically robust but also feasible for real-world applications. Lastly, the cipher exhibits a remarkable sensitivity to key variations and plane image modifications. This attribute enhances the security of the encrypted images by rendering unauthorized decryption attempts ineffective. The proposed scheme’s robustness against unauthorized access is a testament to its practicality in safeguarding sensitive visual information. In sum, this paper’s contributions mark a significant step forward in the realm of image encryption. The combination of a highly parallel implementation, a novel confusion and diffusion strategy, a strong CPRNG, efficient encryption algorithms for colored images, and heightened sensitivity to key and plane image modifications collectively form a comprehensive and effective image encryption scheme. As digital data security becomes increasingly paramount, the findings presented in this paper offer valuable insights and methodologies for advancing the field of image encryption and secure data communication.
Future work should encompass an exploration of adaptive encryption algorithms, an investigation of hardware implementation, an integration with cloud services, a consideration of post-quantum security, and user experience enhancement. Additionally, potential extensions to multi-modal encryption, the exploration of advanced parallelization techniques, contributions to cryptographic standardization efforts, and real-world deployment scenarios are vital directions to further strengthen and apply the proposed image cipher’s contributions.