Next Article in Journal
Two Positive Solutions for Elliptic Differential Inclusions
Previous Article in Journal
Effect of Calcium on the Characteristics of Action Potential Under Different Electrical Stimuli
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A New Encryption Algorithm Utilizing DNA Subsequence Operations for Color Images

by
Saeed Mirzajani
1,2,
Seyed Shahabeddin Moafimadani
3 and
Majid Roohi
4,*
1
Department of Mathematics, National University of Skills (NUS), Tehran 143576-1137, Iran
2
Department of Mathematics, Payame Noor University, Tehran 19395-3697, Iran
3
School of Mathematics and Information Science, Guangzhou University, Guangzhou 510006, China
4
Department of Mathematics, Aarhus University, 8000 Aarhus, Denmark
*
Author to whom correspondence should be addressed.
AppliedMath 2024, 4(4), 1382-1403; https://doi.org/10.3390/appliedmath4040073
Submission received: 22 August 2024 / Revised: 26 September 2024 / Accepted: 7 October 2024 / Published: 4 November 2024

Abstract

:
The computer network has fundamentally transformed modern interactions, enabling the effortless transmission of multimedia data. However, the openness of these networks necessitates heightened attention to the security and confidentiality of multimedia content. Digital images, being a crucial component of multimedia communications, require robust protection measures, as their security has become a global concern. Traditional color image encryption/decryption algorithms, such as DES, IDEA, and AES, are unsuitable for image encryption due to the diverse storage formats of images, highlighting the urgent need for innovative encryption techniques. Chaos-based cryptosystems have emerged as a prominent research focus due to their properties of randomness, high sensitivity to initial conditions, and unpredictability. These algorithms typically operate in two phases: shuffling and replacement. During the shuffling phase, the positions of the pixels are altered using chaotic sequences or matrix transformations, which are simple to implement and enhance encryption. However, since only the pixel positions are modified and not the pixel values, the encrypted image’s histogram remains identical to the original, making it vulnerable to statistical attacks. In the replacement phase, chaotic sequences alter the pixel values. This research introduces a novel encryption technique for color images (RGB type) based on DNA subsequence operations to secure these images, which often contain critical information, from potential cyber-attacks. The suggested method includes two main components: a high-speed permutation process and adaptive diffusion. When implemented in the MATLAB software environment, the approach yielded promising results, such as NPCR values exceeding 98.9% and UACI values at around 32.9%, demonstrating its effectiveness in key cryptographic parameters. Security analyses, including histograms and Chi-square tests, were initially conducted, with passing Chi-square test outcomes for all channels; the correlation coefficient between adjacent pixels was also calculated. Additionally, entropy values were computed, achieving a minimum entropy of 7.0, indicating a high level of randomness. The method was tested on specific images, such as all-black and all-white images, and evaluated for resistance to noise and occlusion attacks. Finally, a comparison of the proposed algorithm’s NPCR and UAC values with those of existing methods demonstrated its superior performance and suitability.

1. Introduction

With the rapid expansion of the Internet and technological advancements, the security of multimedia data, such as movies and photos, has become a significant concern, prompting the development of various encryption methods to protect sensitive information. Innovative approaches include DNA-based concepts, which utilize the complexity and randomness of genetic codes to encode and encrypt image data, and chaos-based systems, which leverage the sensitivity and pseudo-randomness of chaotic sequences to shuffle and replace pixel positions and values. Additionally, genetic algorithms inspired by natural selection and evolution optimize encryption parameters through processes like selection, crossover, and mutation. These advanced techniques offer robust security solutions, ensuring the confidentiality and integrity of multimedia content against unauthorized access and cyber threats [1]. Securing RGB color images, which often contain critical information, from potential cyber-attacks, is the challenge addressed by this research through the introduction of an image encryption technique based on DNA subsequence operations. The proposed method’s effectiveness hinges on its two main components: a rapid reordering mechanism and flexible dispersion process [2].
Several papers have been produced in the recent decade to overcome these challenges. For instance, Enayatifar et al. [3] have presented an image encryption protocol that integrates DNA masking, a genetic algorithm (GA), and a logistic map. It utilizes DNA and logistic map functions to make initial DNA masks and employs GA to select the most effective mask for image encryption, enhancing image data security. Akhavan et al. [4] examine the security of a DNA-based image encryption protocol and evaluate its resistance to chosen plaintext attacks. Analysis reveals that the algorithm’s security predominantly depends on a static shuffling step accompanied by a basic confusion operation. Kalpana and Murali [5] proposed an image encryption algorithm combining chaos and DNA operations. DNA sequences generate the scrambling sequence and image encryption template, creating a synthetic DNA image uniquely applied to the three channels of the target image. In [6], a color image encryption protocol is introduced, which employs Fisher–Yates scrambling combined with DNA subsequence operations such as elongation, truncation, deletion, and insertion arithmetic. In [7], a new color image encryption algorithm uses dynamic DNA encoding and chaos. A three-neuron non-integer-order discrete-Hopfield neural network (FODHNN) generates pseudo-random chaotic sequences, with initial values derived from a secret key created using a five-parameter external key and the plain image’s hash code. In [8], a bit-level permutation protocol according to a five-D hyperchaotic-system and DNA sequence image encryption is proposed. This system enhances the pseudo-randomness of plaintext images through hyperchaotic dynamics and bit-wide permutation. Mang and Gu have introduced a color image encryption algorithm that employs extended DNA coding and a zig-zag transform, according to a non-integer-order laser system [9]. Chaos synchronization-based algorithms have been designed using sliding mode control methods in fractional order systems [10,11]. In [12], a color image encryption algorithm is designed, leveraging chaotic systems, block-based DNA coding, and compressive sensing (CS). The algorithm compresses the plain image using CS to generate three measurement value matrices, which are then quantized into integers and permuted using the Josephus problem method. A color image encryption method is devised by combining a hyperchaotic map, cross-plane operation, and gene theorem in [13]. The dynamics of the hyperchaotic map used in the image encryption process are analyzed and considered. Based on these dynamics, an image encryption scheme is designed. To enhance the randomness of the encoded images and improve the security of the image encryption protocol, a DNA mutation operation is applied at the end of the image encryption process.
While the mentioned significant advancements have been made in image encryption using chaotic systems and DNA-based techniques, the several gaps that remain, which this paper aims to address, are as follows:
  • Limited Focus on Color Image Encryption: Most encryption methods target grayscale images, with insufficient focus on the complexity of color images. This paper aims to address that gap by developing a robust encryption scheme specifically for color images;
  • Underutilization of Combined Chaotic and DNA Techniques: Few studies combine chaotic systems with DNA-based methods for encryption. This paper introduces a novel integration of these techniques to enhance security for color images;
  • Need for Better Chaotic Map Optimization: Existing chaotic maps used in encryption often lack sufficient key space and sensitivity. This paper improves chaotic systems to strengthen encryption robustness;
  • Inadequate Testing Against Advanced Attacks: Many current methods do not rigorously test resistance to advanced attacks. This research fills that gap by evaluating the security of the proposed scheme against various cryptographic attacks;
  • Lack of Synergistic Use of DNA Computing for Color Images: DNA computing is rarely used in conjunction with chaotic encryption for color images. This study bridges that gap by leveraging both for improved security.
This research introduces a novel image encryption technique specifically designed for securing color images (RGB type) against cyber-attacks. The proposed algorithm utilizes DNA subsequence operations, focusing on enhancing the security of multimedia data transmission over computer networks. Key features of the algorithm include a high-speed permutation process and adaptive diffusion mechanisms. Implemented and evaluated using MATLAB, the algorithm demonstrates a robust performance across various cryptographic parameters. Security analyses, encompassing histogram comparisons and statistical tests like Chi-square, validate its effectiveness. Furthermore, comprehensive assessments including correlation coefficient analysis, entropy calculations, and evaluations of NPCR and UAC values underscore its resilience against attacks and its suitability for practical application. Comparative studies against established methods highlight its superior performance in image encryption.

Contribution

  • The paper introduces a new image encryption technique specifically designed for color images (RGB type) using DNA subsequence operations;
  • The algorithm is implemented and evaluated in the MATLAB environment, demonstrating a robust performance across various cryptographic parameters;
  • Comprehensive security analyses are conducted, including histogram comparisons, Chi-square tests, correlation coefficient calculations, entropy assessments, and evaluations of NPCR and UAC values;
  • Comparative analysis with existing image encryption methods shows superior performance in terms of NPCR and UAC values, highlighting the algorithm’s effectiveness and suitability for securing multimedia data.
The presentation of this study is as follows: in Section 2 the basic concepts and preliminary information are denoted. The proposed DNA image encryption procedure is presented in Section 3. Also, Section 4 includes experimental results and security analysis. Comparisons and related discussions are presented in Section 5. Finally, Section 6 closes the paper by analyzing the results and presenting the conclusions derived from them.

2. Preliminary Concepts

2.1. An Image Encryption Algorithm Utilizing DNA Subsequence Operations

Creation of Chaotic Sequences

Chaotic systems are characterized by their nonlinear dynamics, extreme sensitivity to initial conditions, and unpredictable behavior, making them highly effective for enhancing the security of image encryption systems. Therefore, the use of this method for images is recommended [14].
Two chaotic maps are introduced here: the logistic map and the two-D logistic map. In this study, the two-D logistic map is employed to derive eight parameters that function as initial values and system parameters for four logistic maps. The logistic map, known as a prototypical chaotic map, is characterized by the following properties:
x n + 1 = μ x n ( 1 x n )
In which μ ∈ [0, 4],  x n ∈ (0, 1), and n = 0 , 1 , 2 , .
The research findings indicate that the system enters a chaotic state when the condition 3.56994 < μ     4 is met.
Also, two-D logistic map is defined in [10] such that:
x i + 1 = μ 1 x i 1 x i + γ 1 y i 2                                     y i + 1 = μ 2 y i 1 y i + γ 2 ( x i 2 + x i y i )
In which 2.75 < μ 1 ≤ 3.4, 2.75 < μ 2  ≤ 3.45, 0.15 < γ 1  ≤ 0.21 and, 0.13 < γ 2  ≤ 0.15, the system remains in a chaotic state and is capable of generating two chaotic sequences within the interval (0, 1). Given that the components γ 1 and γ 2 have a narrow value range, we set γ 1  = 0.17 and γ 2  = 0.14, while the other components are treated as secret keys.

2.2. The Sequences of DNA Image Encryption

2.2.1. Image Encoding and Decoding Using DNA Sequences

In a DNA sequence, there are four nucleic acid bases: A (adenine), C (cytosine), G (guanine), and T (thymine). These bases pair such that A pairs with T and C pairs with G. In a binary representation, this pairing translates to 0 pairing with 1 and vice versa, where 00 pairs with 11 and 01 pairs with 10. Therefore, the bases A, T, G, and C can be used to encode the binary digits 01, 10, 00, and 11, respectively. This encoding scheme aligns with the principles of the Watson–Crick base pairing [15].
In a grayscale image, each 8-bit pixel value can be represented as an 8-bit binary sequence. For instance, if the first pixel value of the original image is 75, its binary representation would be [01001011]. According to the DNA encoding rule provided, this binary-stream [01001011] can be translated into a DNA sequence [AGTC], where A represents 01, T represents 10, G represents 00, and C represents 11. Therefore, the DNA sequence [AGTC] corresponds to the binary sequence [01001011] [16].

2.2.2. DNA Subsequences Operation

Here, a DNA sequence P k is defined to contain mmm strands of DNA subsequences in a specific order, with k bases P k (where m     k ). The sequence is expressed as P k  = P m P m 1   P 2   P 1 . The number of bases in the corresponding DNA subsequences is l m l m 1 l 2 l 1 , respectively. Consequently, k = l m l m 1 l 2 l 1 .
According to this DNA subsequence statement, five types of DNA subsequence operations are described: elongation, truncation, deletion, insertion, and transmutation.
(1) DNA subsequence elongation operation.
Definition 1.
Consider the original DNA sequences  P 1  and  P 2  with length  l 1 When  P 2  is appended to the end of  P 1 , a new DNA sequence P′ is formed. The elongation operation is expressed as follows:
P 1 + P 2 P 1 P 2
(2) DNA subsequence truncation operation.
Definition 2.
The truncation operation is the reverse of the elongation operation. By removing the subsequence P 2  from the end of the DNA sequence P 1 P 2 , a new DNA sequence P  = P 1  is obtained. This operation is expressed as follows:
P 1 P 2 P 2 P 1
(3) DNA subsequence deletion operation.
Definition 3.
Given an original DNA sequence P  = P 3 P 2 P 1 , the deletion operation involves removing the subsequence P 2 . This results in a new DNA sequence P  = P 3 P 1 , expressed as follows:
P 3 P 2 P 1 P 2 P 3 P 1  
(4) DNA subsequence insertion operation.
Definition 4.
The insertion operation is the reverse of the deletion operation. Given an original DNA sequence P = P3 P 1 , inserting a subsequence P 2  with length l 2  into P results in a new DNA sequence P′. This operation is expressed as follows:
P 3 P 1 + P 2 P 3 P 2 P 1
(5) DNA subsequence transmutation operation.
Definition 5.
The transformation operation involves swapping the positions of two subsequences within a DNA sequence. For instance, given an original DNA sequence P = P 5 P 4 P 3 P 2 P 1 , exchanging the positions of P 4  and P 2  results in a new DNA sequence P′. This operation is expressed as follows:
P 5 P 4 P 3 P 2 P 1 P 5 P 2 P 3 P 4 P 1
In this section, five types of DNA subsequence operations are introduced, which are used in the algorithm to encode gray images. Eventually, this algorithm will be the basis of the image encryption algorithm for color images.

2.3. Algorithm Description

2.3.1. Generate Chaotic Sequences

Given the initial state ( x 0 μ 1 y 0 μ 2 ), chaotic sequences are generated using the two-D Logistic map. After iterating 1000 times, eight parameters ( x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 , x 8 ) are produced. The following formulas are used to generate four groups of parameters:
x 1 = x 1 , u 1 = 3.9 + 0.1   ×   x 2 , y 1 = x 3 , u 2 = 3.9 + 0.1   ×   x 4 , z 1 = x 5 , u 3 = 3.9 + 0.1   ×   x 6 , q 1 = x 7 , u 4 = 3.9 + 0.1   ×   x 8 .
Subsequently, four chaotic sequences are generated using the logistic chaotic map, based on the four sets of initial conditions ( x 1 u 1 ), ( y 1 u 2 ), ( z 1 u 3 ), and ( q 1 u 4 ). Each sequence has a length of m × n [17].

2.3.2. Generate DNA Subsequences

Step 1. Input an 8-bit grayscale image A(mn), where m and n represent the number of rows and columns of the image, respectively.
Step 2. Change the image A into a binary matrix A′ with dimensions (mn × 8), and then divide A′ into eight bit-planes. Pair the bit-planes as follows: the first with the eighth, the second with the seventh, the third with the sixth, and the fourth with the fifth. This results in four combined bit-planes.
Step 3. Perform the DNA encoding operation as described in Section 2.2.1 on the four bit-planes to obtain four coding matrices P 1 , P 2 , P 3 , and P 4 , each of size (mn).
Step 4. Convert P 1 , P 2 , P 3 , and P 4 into DNA subsequences P 1 , P 2 , P 3 , and , P 4 , with average subsequence lengths l 1  = 128,  l 2  = 64,  l 3  = 32, and l 4  = 8, respectively. Thus, the following representations are obtained [17]:
P 1 = P 11 P 12   P 1 ( m n / l 1 ) P 2 = P 21 P 22   P 2 ( m n / 2 ) P 3 = P 31 P 32   P 3 ( m n / l 3 ) P 4 = P 41 P 42   P 4 ( m n / l 4 )
where for all,  i [ 1 ,   4 ] , and j [ 1 ,   m n / l i ] ,   P i j shows DNA subsequence,  l i shows length of the subsequence.

2.3.3. Deletion Operation

Step 1. Assume there is a chaotic sequence X = { x 1 , x 2 , , x m n / l i } .
Step 2. In the case of x i < 0.5, remove the i-th subsequence based on Section 2.2.2, otherwise retain the subsequence.
Step 3. Move the removed subsequences to the end of the retained subsequences.

2.3.4. Transformation Operation

Step 1. Assume X = { x 1 , x 2 , , x m n / l i } is a chaotic sequence.
Step 2. Assume X = { x 1 , x 2 , , x m n / l i } is a chaotic sequence.
Step 3. In the case of x i  < 0.5, transform the i-th subsequence and the i-th subsequence from the place of X′ based on Section 2.2.2.

2.3.5. Elongation Operation and Truncation Operation

As illustrated in Figure 1 P 1 and P 2 show two DNA subsequences derived from any two bit-planes. Assume P 1 has a length of 128, and P 2 has a length of 64. The subsequences S 1 S 2 S 3 , and S 4 are parts of P 1 and P 2 , respectively. Initially,  S 1 and S 4 are truncated. Next,  S 1 is appended to the end of P 2 , and S 4 is appended to the end of P 1 [17]. A block diagram of this process is depicted in Figure 2. The proposed encryption algorithm consists of three main steps, as illustrated in Figure 2. First, DNA sequences are generated using the method outlined in Section 2.3.1, resulting in four groups: P 1 P 2 P 3 , and P 4 , each made up of multiple DNA subsequences. Next, the positions and values of the pixel points in the image are disturbed by combining logistic maps to generate chaotic sequences, employing various DNA subsequence operations, including elongation, truncation, deletion, and transformation. Finally, the encrypted image is obtained through DNA decoding and the recombination of bit-planes. Figure 2a depicts the encryption algorithm, showing the data flow from DNA sequence generation to the final encrypted image, while Figure 2b illustrates the decryption algorithm, which serves as the inverse of the encryption process, demonstrating how the encrypted image is reverted to its original form.

2.3.6. Complement Operation

The complement operation is applied to each one-dimensional bit-plane of ( 1 , m × n ) . Given a chaotic sequence X = { x 1 , x 2 , ,   x m n / l i } , if xi  < 0 .5, the nucleic acid base at the i-th position is enhanced; otherwise, it remains fixed [17].

2.3.7. The Process of the Image Encryption/Decryption

The proposed encryption algorithm consists of two main steps:
  • First, four groups of DNA sequences P 1 , P 2 , P 3   and   P 4 , are generated using the method described in Section 2.3.1. Each P i (where (i = 1, 2, 3, 4)) is composed of multiple DNA subsequences.
  • Next, the positions and values of the pixel points in the image are disturbed by combining the logistic map, chaotic sequence generation, and various DNA subsequence operations (such as elongation, truncation, deletion, transformation, etc.) [17].

3. Proposed Algorithm

In this section, we offer our algorithm for color encryption and decoration. Our theory starts like this: A color image is considered. That is called RGB. It consists of three red, green, and blue channels. In the encryption process, we separate the three channels. In fact, a picture will be converted into three pictures.

An Explanation of the Encryption and Decryption Process

After the channels are separated, the DNA algorithm is used to encode each of the three resulting images. Three cryptic images are obtained by the end of the algorithm. At this point, the three encrypted images are combined to obtain an encrypted color image. During decryption, the encoded image is used as the input for the algorithm, and its color channels are separated again. Three encoded images are obtained, which are then converted to visible images using the decryption algorithm. Finally, the three images are combined to reconstruct the original image.
After the channels are separated, three images are obtained, each with six parameters that differ from one another. These parameters are applied to both the encryption Algorithm 1 and decryption Algorithm 2.
Algorithm 1: Encryption.
  • Input: a color image (RGB) A;
  • Output: an encrypted image H.
1: [RGB] = Three color channels from image A;
2: I R = The image is taken from the red channel separation, which has ( x 0 μ 1 γ 1 ,   y 0 μ 2 γ 2 ) parameters;
3: I G = The image is taken from the green channel separation, which has ( c 0 θ 1 δ 1 ,   d 0 θ 2 δ 2 ) parameters;
4: I B = The image is taken from the blue channel separation, which has ( e 0 α 1 β 1 ,   f 0 α 2 β 2 ) parameters;
5: [ S 1 , S 2 , S 3 , S 4 ] = 4 DNA sequences gained from image I R ;
6: [ P 1 , P 2 , P 3 , P 4 ] = 4 groups of DNA subsequences gained from Image I R   S 1 , S 2 , S 3 , S 4 ;
7: [ x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 ] = 8 chaotic components gained from a two-D Logistic map under chaotic starting components ( x 0 μ 1 γ 1 ,   y 0 μ 2 γ 2 );
8: [XYZQ] = 4 chaotic sequences gained from a logistic map under the chaotic components ( x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 );
9: I R 1 = Deletion ( P 1 , X);
10: I R 2 = Deletion ( P 2 , Y);
11: [ E 1 E 2 ] = Elongation − truncation ( I R 1 , I R 2 );
12: I R 3   = Deletion ( P 3 , Z);
13: I R 3 = Transformation ( I R 3 , Z);
14: I R 4 = Deletion ( P 4 , Q);
15: I R 4 = Transformation ( I R 4 , Q);
16: [ B 1 B 2 B 3 B 4 ] = Recombine − subsequence( E 1 E 2 I R 3 ,   I R 4 ) ;
17: [ B 1 ,   B 2 ,   B 3 ,   B 4 ] = Complement ( B 1 B 2 B 3 B 4 );
18 I R e n c o d e  = carry out DNA encoding and recombining binary bit-planes for B 1 ,   B 2 ,   B 3 ,   B 4 ;
19: [ S 1 , S 2 , S 3 , S 4 ] = 4 DNA sequences gained from image I G ;
20: [ P 1 , P 2 , P 3 , P 4 ] = 4 groups of DNA subsequences gained from Image I G   S 1 , S 2 , S 3 , S 4 ;
21: [ x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 ] = 8 chaotic components gained from a two-D logistic map under chaotic starting components ( c 0 θ 1 δ 1 ,   d 0 θ 2 δ 2 );
22: [XYZQ] = 4 chaotic sequences gained from a logistic map under the chaotic components ( x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 );
23: I G 1 = Deletion ( P 1 , X);
24: I G 2 = Deletion ( P 2 , Y);
25: [ E 1 E 2 ] = Elongation − truncation ( I G 1 , I G 2 );
26: I G 3 = Deletion ( P 3 , Z);
27: I G 3 = Transformation ( I G 3 , Z);
28: I G 4 = Deletion ( P 4 , Q);
29: I G 4 = Transformation ( I G 4 , Q);
30: [ B 1 B 2 B 3 B 4 ] = Recombine − subsequence( E 1 E 2 I G 3 , I G 4 ) ;
31: [ B 1 ,   B 2 ,   B 3 ,   B 4 ] = Complement ( B 1 B 2 B 3 B 4 );
32: I G e n c o d e  = carry out DNA encoding and recombining binary bit-planes for B 1 ,   B 2 ,   B 3 ,   B 4 ;  *
33: [ S 1 ,   S 2 ,   S 3 ,   S 4 ] = 4 DNA sequences gained from image I B ;
34: [ P 1 ,   P 2 ,   P 3 ,   P 4 ] = 4 groups of DNA subsequences gained from Image I B   S 1 ,   S 2 ,   S 3 ,   S 4 ;
35: [ x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 ]: = 8 chaotic components gained from a two-D logistic map under chaotic starting components ( e 0 α 1 β 1 ,   f 0 α 2 β 2 );
36: [X, YZ, Q] = 4 chaotic sequences gained from a logistic map under the chaotic components ( x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 );
37: I B 1 = Deletion ( P 1 , X);
38: I B 2 = Deletion ( P 2 , Y);
39: [ E 1 E 2 ] = Elongation − truncation ( I B 1 ,   I B 2 );
40: I B = Deletion ( P 3 , Z);
41: I B 3 = Transformation ( I B 3 , Z);
42: I B 4 = Deletion ( P 4 , Q);
43: I B 4 = Transformation ( I B 4 , Q);
44: [ B 1 B 2 B 3 B 4 ] = Recombine − subsequence( E 1 E 2 I B 3 ,   I B 4 ) ;
45: [ B 1 ,   B 2 ,   B 3 ,   B 4 ] = Complement ( B 1 B 2 B 3 B 4 );
46: I B e n c o d e : = carry out DNA encoding and recombining binary bit-planes for B 1 ,   B 2 ,   B 3 ,   B 4 ;  *
47: H = combine ( I R e n c o d e I G e n c o d e I B e n c o d e );
48: H = encoded image with DNA algorithm.
Also,
Algorithm 2: Decryption.
  • Input: The encrypted image H;
  • Output: decrypted image A.
1: [RGB] = Three color channels from image H;
2: I R = The image is taken from the red channel separation, which has ( x 0 μ 1 γ 1 ,   y 0 μ 2 γ 2 ) parameters;
3: I G = The image is taken from the green channel separation, which has ( c 0 θ 1 δ 1 ,   d 0 θ 2 δ 2 ) parameters;
4: I B = The image is taken from the blue channel separation, which has ( e 0 α 1 β 1 ,   f 0 α 2 β 2 ) parameters;
5: [ B 1 B 2 B 3 B 4 ] = 4 DNA sequences gained from image I R ;
6: [ B 1 ,   B 2 ,   B 3 ,   B 4 ] = Complement (B1, B2, B3, B4);
7: [ P 1 ,   P 2 ,   P 3 ,   P 4 ] = 4 groups of DNA subsequences gained from Image I R [ B 1 ,   B 2 ,   B 3 ,   B 4 ];
8: [ x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 ]: = 8 chaotic components gained from a two-D logistic map under chaotic starting components ( x 0 μ 1 γ 1 ,   y 0 μ 2 γ 2 );
9: [X,YZ,Q] = 4 chaotic sequences gained from a logistic map under the chaotic components ( x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 );
10: [ E 1 E 2 ] = Elongation − truncation ( P 1 ,   P 2 );
11: M 1 = Insertion( E 1 , X);
12: M 2 = Insertion( E 2 , Y);
13: E 3 = Transformation ( P 3 , Z);
14: M 3   = Insertion( E 3 , Z);
15: E 4 = Transformation ( E 4 , Q);
16: M 4 = insertion( E 4 , Q);
17: [ I R 1 I R 2 ,   I R 3 ,   I R 4 ] = Recombine − subsequence( M 1 M 2 M 3 M 4 );
18: I R d e c o d e d = Perform DNA decoding and recombine the binary bit-planes for [ I R 1 I R 2 ,   I R 3 ,   I R 4 ];
19: [ B 1 B 2 B 3 B 4 ] = 4 DNA sequences gained from image I G ;
20: [ B 1 ,   B 2 ,   B 3 ,   B 4 ] = Complement ( B 1 B 2 B 3 B 4 );
21: [ P 1 ,   P 2 ,   P 3 ,   P 4 ] = 4 groups of DNA subsequences gained from Image I G [ B 1 ,   B 2 ,   B 3 ,   B 4 ];
22: [ x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 ] = 8 chaotic components gained from a two-D logistic map under chaotic starting components ( c 0 θ 1 δ 1 ,   d 0 θ 2 δ 2 );
23: [X,YZ,Q] = 4 chaotic sequences gained from a logistic map under the chaotic components ( x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 );
24: [ E 1 E 2 ] = Elongation − truncation ( P 1 ,   P 2 );
25: M 1 = Insertion( E 1 , X);
26: M 2 = Insertion( E 2 , Y);
27: E 3 = Transformation ( P 3 , Z);
28: M 3 = Insertion( E 3 , Z);
29: E 4 = Transformation ( E 4 , Q);
30: M 4 = insertion( E 4 , Q);
31: [ I G 1 I G 2 ,   I G 3 ,   I G 4 ] = Recombine − subsequence ( M 1 M 2 M 3 M 4 );
32: I G d e c o d e d = Perform DNA decoding and recombine the binary bit-planes for [ I G 1 I G 2 ,   I G 3 ,   I G 4 ]; *
33: [ B 1 B 2 B 3 B 4 ] = 4 DNA sequences gained from image I B ;
34: [ B 1 ,   B 2 ,   B 3 ,   B 4 ] = Complement (B1, B2, B3, B4);
35: [ P 1 ,   P 2 ,   P 3 ,   P 4 ] = 4 groups of DNA subsequences gained from Image I B [ B 1 ,   B 2 ,   B 3 ,   B 4 ];
36: [ x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 ]: = 8 chaotic components gained from a two-D logistic map under chaotic starting components ( e 0 α 1 β 1 ,   f 0 α 2 β 2 );
37: [XYZQ] = 4 chaotic sequences gained from a logistic map under the chaotic components ( x 1 u 1 y 1 u 2 z 1 u 3 q 1 u 4 );
38: [ E 1 E 2 ] = Elongation − truncation ( P 1 ,   P 2 );
39: M 1 = Insertion( E 1 , X);
40: M 2 = Insertion( E 2 , Y);
41: E 3 = Transformation ( P 3 , Z);
42: M 3 = Insertion ( E 3 , Z);
43: E 4 = Transformation ( E 4 , Q);
44: M 4 = insertion( E 4 , Q);
45: [ I B 1 I B 2 ,   I B 3 ,   I B 4 ] = Recombine − subsequence ( M 1 M 2 M 3 M 4 );
46: I B d e c o d e d = Perform DNA decoding and recombine the binary bit-planes for [ I B 1 I B 2 ,   I B 3 ,   I B 4 ]; *
47: A = combine ( I R d e c o d e d ,   I G d e c o d e d ,   I B d e c o d e d );
48: A = decoded image with DNA algorithm.
Remark 1:
The process of generating ciphertext involves a multi-step procedure that combines chaotic maps with DNA-based operations. Specifically, chaotic sequences are generated using a two-dimensional logistic map, which outputs a set of parameters that form the basis for further steps. These chaotic sequences are instrumental in DNA subsequence operations, where binary sequences derived from an image are converted into DNA sequences using predefined encoding rules (e.g., translating binary ‘01’ into the nucleotide ‘A’, etc.). Once encoded, the DNA sequences undergo various operations such as elongation, truncation, deletion, insertion, and transformation. For example, elongation involves appending one DNA sequence to another, while deletion removes specific subsequences based on the values derived from chaotic sequences. Each of these operations manipulates the DNA subsequences, ultimately resulting in a modified sequence that contributes to the ciphertext. The process is repeated across multiple bit-planes and combined to form the final encrypted image. For greater clarity, consider the following example of DNA subsequence truncation: given two DNA sequences  P 1  and P 2 ,   where P 1  has 128 nucleotides and P 2  has 64, the algorithm truncates portions from both sequences and swaps them. The chaotic sequences guide the process of selecting which portions to truncate, ensuring variability and unpredictability in the ciphertext generation.
Remark 2:
The main security concerns addressed by the new encryption algorithm for color images include:
  • Sensitivity to Initial Conditions: The use of chaotic systems, such as logistic maps and two-D logistic maps, ensures high sensitivity to initial conditions, making the encryption highly resistant to brute-force attacks;
  • Randomness and Unpredictability: Chaotic maps generate unpredictable chaotic sequences, which are crucial for scrambling the image data in a way that is difficult to reverse-engineer;
  • Multiple Encryption Layers: The algorithm applies different chaotic sequences and DNA encoding operations across all color channels (red, green, blue), increasing the complexity of the encryption process;
  • DNA-Based Security: Encoding pixel values using DNA sequences adds another layer of complexity. The DNA encoding and subsequent operations, like elongation, truncation, deletion, and transformation, disrupt the original data structure further;
  • Resistance to Known Attacks: The chaotic nature combined with DNA subsequence operations makes the algorithm resistant to known cryptographic attacks, including statistical analysis, differential attacks, and brute-force attacks;
  • Multiple Secret Parameters: The algorithm uses multiple parameters in its chaotic systems (e.g., initial values, control parameters) which serve as encryption keys, significantly expanding the key space and making it difficult to compromise the encryption;
  • Disruption of Pixel Values and Positions: By applying DNA operations and chaotic sequences, the algorithm disrupts both the positions and values of the pixels in the image, providing additional security against unauthorized reconstruction;
  • Color Channel Separation: By separating and individually encrypting the red, green, and blue channels, the algorithm ensures that even partial decryption will not reveal usable information about the original image.
These security measures combine to ensure that the algorithm provides a robust defense against unauthorized access to color images.

4. Experimental Outcomes and Security Evaluation

Here, the designed algorithm was implemented on four detailed color images using MATLAB 2022b software in a laptop with a Core i7 processor (3.4 GHz) and 16 GB RAM. Figure 3a–d shows the encrypted/decrypted reports of the plain Figure 3e–h, respectively, while Figure 3i–l displays the decryption.

4.1. Security Evaluation

As observed, a visual comparison between the plain images and the decrypted images is not feasible. Thus, a mathematical evaluation is essential to analyze metrics like the correlation coefficients between neighboring pixels in both the original and encrypted images, as well as entropy, NPCR (Number of Pixel Change Rate), and UACI (Unified Average Change Intensity). An example is provided using Daryasar’s image (Figure 3a), as shown in Figure 4.

4.2. Chi-Square Analysis

Statistical analysis is a common procedure in cryptology. The even distribution of the cipher image’s histogram demonstrates the encryption method’s strength in resisting statistical analysis. However, simply observing the histogram is not enough to verify the randomness of the cipher image’s pixel values [18]. To mathematically evaluate the histogram’s uniformity, the chi-square test is employed. The chi-square test is described as:
χ e x p 2 = i = 1 Q ( O i e i ) 2 e i , e i = M × N Q ,
  • Q = 256 in this way;
  • O i : Incident frequency of each pixel value in the histogram of the encrypted color image;
  • e i : Expected occurrence frequency based on a uniform distribution;
  • M × N : Total number of pixels in the color image sequence.
In this approach,  Q = 256 is employed. In this context,  o i corresponds to the actual frequency of each pixel value in the encrypted image’s histogram, while e i represents the expected frequency based on a uniform distribution. The image contains M × N pixels in total. For an effective image encryption system, the observed chi-square value should fall below the theoretical threshold. At a 0.05 significance level, this threshold is 293 [18].
The results of the chi-square test and transition rates are presented in Table 1 and Table 2. All test images pass the chi-square test, indicating that the proposed method achieves satisfactory encryption performance.

4.3. Correlation Analysis

The degree of correlation between neighboring pixels in both the original and encrypted images is a crucial indicator of the performance of image encryption techniques. Figure 5 displays the correlation histograms for both the original and encrypted images, with analyses provided in three orientations: horizontal (H), vertical (V), and diagonal (D).
Table 3 presents the numerical values of the correlation coefficients for both the original and encrypted images, with measurements taken in three directions: horizontal, vertical, and diagonal. It is evident that the correlation coefficients for the original image are close to 1, whereas those for the encrypted image are approximately 0. This significant reduction in correlation suggests that the encryption algorithm effectively resists potential statistical attacks. The table indicates that the proposed algorithm meets the necessary quality standards. The correlation coefficients between adjacent pixels in both the original and encrypted images are summarized as follows:
r x y = E ( ( x i E x ) ( y i E y ) D x D ( y ) ,
In which,
E x = 1 N i = 1 n x i
D x = 1 N i = 1 n ( x i E x ) 2
  • x and y: Intensity values of two neighboring pixels;
  • N: Total count of pixels considered from the image.
E ( ( x i E x ) ( y i E y = c o v ( x , y ) ,
Also, the term E x = 1 N i = 1 n x i represents the expected value, N denotes the total number of pixels in the image, and D x = 1 N i = 1 n ( x i E x ) 2 indicates the variance. Here,  x and y refer to the intensity values of two adjacent pixels, while N is the total count of pixels selected from the image.

4.4. Entropy Analysis

Information entropy is mostly used to measure the confusion rating of information sources and prevent the attacker from employing its image characteristics to attack. Entropy is a key characteristic that contributes to the randomness and unpredictability of images. This parameter could be used by the following formula:
H S = i = 0 2 N 1 P ( s i ) l o g ( 1 P ( s i ) )
  • N: Number of grayscale values in image;
  • P ( s i ) : Possibility of grayscale “I” in the image.
The entropy values for the randomly generated images must be close to 8. The closer these values are to 8 indicates that the encrypted image is more unpredictable and the proposed algorithm is safer [19].
The values obtained from the entropy parameter for the image encoded by the proposed algorithm are presented in Table 4.
Table 4 presents the entropy values for the plain and cipher images encoded by the proposed algorithm, illustrating the effectiveness of the encryption method in enhancing randomness and security. The entropy values for the plain images show lower levels across all channels (e.g., the red channel of Image a has an entropy of 6.9882), indicating discernible patterns that are susceptible to analysis. In contrast, the cipher images exhibit significantly higher entropy values (e.g., the red channel of Image a increases to 7.0994), suggesting improved randomness and reduced predictability. This increase in entropy across all channels confirms that the algorithm effectively obscures original patterns, thus providing stronger resistance against statistical attacks.

4.5. Number of Pixel Change Rate and Uniform Average Change Intensity

In the context of a differential attack, a slight modification is made to the original image, and the encryption algorithm is applied to both the modified and unmodified versions of the image. The resulting encrypted images are then analyzed to identify any potential correlation between the original and encrypted images. The Number of Pixels Change Rate (NPCR) and Uniform Average Change Intensity (UACI) are commonly utilized metrics for evaluating the robustness of an image encryption technique against differential attacks [15]. Let C 1 and C 2 represent two encrypted images derived from two original images differing by just one bit. The NPCR and UACI are formulated as:
N P C R I 1 , I 2 = i , j A ( i , j ) G × 100 %
And
U A C I I 1 , I 2 = i , j I 1 i , j I 2 i , j L 1 × G × 100 %
  • G: Total pixel count in each encrypted color image;
  • L: number of promised pixel value;
  • A: difference between I 1 and I 2 ; and defined as:
A i , j = 0 , w h e n I 1 i , j = I 2 i , j 1 , w h e n I 1 i , j I 2 i , j
Higher values of NPCR and UACI indicate superior algorithm quality. Table 5 shows the NPCR and UACI measurements for four randomly chosen points.
Table 5 presents the NPCR (Number of Pixels Change Rate) and UACI (Unified Average Changing Intensity) values, which are critical metrics for evaluating the quality of the encryption algorithm. Higher NPCR values indicate a significant change in pixel values when a single pixel in the plaintext is altered, reflecting the algorithm’s sensitivity and resistance to differential attacks. The NPCR values for the four randomly selected points are notably high, ranging from 98.8240% to 98.9942%, demonstrating the algorithm’s effectiveness in creating substantial differences between the original and encrypted images. Similarly, the UACI values, which measure the average intensity change between the plaintext and ciphertext, are consistently above 32.89%, reinforcing the conclusion that the proposed encryption method exhibits excellent performance in enhancing security and resisting attacks. Together, these results indicate that the algorithm maintains a high level of randomness and security across different locations in the image.

4.6. Key Sensitivity Analysis

The key in an encryption algorithm must be highly sensitive, which means that by making tiny changes to the key the encrypted image cannot be decrypted. And this change will make the resulting image completely different from the original image [20,21]. To this end, we tested the sensitivity of the key. Consider the encrypted image shown in Figure 3d. When the keys of initial values have changed by one bit, the five new encrypted images are obtained. Comparing them with the image in Figure 6 shows that there are huge differences between the images in Figure 6a–e and Figure 6f–j.

4.7. Analysis of Known and Selected Plain Image

Certain special images, such as all-black and all-white images, exhibit unique characteristics compared to other images. Therefore, it is important to include these types of images in the testing process of the algorithm. Figure 7 shows these images along with the encoded image and their histograms. The entropy results from this test are listed in Table 6, which are very close to 8, indicating the suitability of our proposed algorithm.

4.8. Noise and Occlusion Attacks

With the growth of digital technology, images are exposed to risks such as noise attacks and occlude attacks, and effective cryptography should be powerful against them. To this end, the image “Guangzhou” (referenced as image c in Figure 3) was chosen for testing. Figure 8 illustrates the noisy encrypted images affected by Gaussian noise (GN), salt and pepper noise (SPN), and speckle noise (SN) with varying intensities, along with their corresponding decrypted images. As shown in Figure 8, the decrypted images largely retain the visual information of the original “Guangzhou” image despite different noise types and levels. The Peak Signal-to-Noise Ratio (PSNR) is utilized to assess the quality of the decoded image. The formula for calculating PSNR is provided in [22], as follows:
P S N R = 10 × l o g 10 ( 255 × 255 M S E ) ( d b )
M S E = 1 m n i = 1 m j = 1 n | | I 1 i , j I 2 ( i , j ) | | 2 M S E = 1 m n i = 1 m j = 1 n | | I 1 i , j I 2 ( i , j ) | | 2
  • MSE: Squared difference between the encrypted image I 1 i , j and the original image I 2 ( i , j ) ;
  • m, n: width and height.
The results of these tests are described in Table 7 and Table 8.

5. Comparison

In this section we will compare the proposed algorithm with the two other methods proposed in [22,23]. By implementing the two proposed algorithms [22,23] in MATLAB software (R2024b) and comparing our proposed algorithm, we find that our proposed algorithm has several advantages over them. We used the two algorithms [22,23] for the comparison of the three plain images of Figure 3c. And the results of our comparison about pixel correlation, entropy, and NPCR, UACI value are described in Table 9, Table 10, Table 11, Table 12 and Table 13. The correlation coefficients of the two adjacent pixels for the proposed algorithm and the other two algorithms are presented in Table 9.
These coefficients have calculated in all three horizontal, vertical, and diagonal directions and by comparing these values we can see that our proposed method is very suitable (the correlation coefficients being closer to 0 indicates higher suitability) and the proposed method has more advantages than the other two methods.
As in Section Entropy Analysis, the entropy value should be close to 8. By comparing the proposed algorithm and the other two schemes shown in Table 10 and Table 11, it is clear that the proposed algorithm demonstrates very good quality.
As described in part Different analysis, the larger values NPCR and UACI display the high sensitivity of the algorithm to the original image. In Table 12 and Table 13, which display the values of NPCR and UACI, the designed method is very appropriate, and the algorithm [19] demonstrates good quality, but for algorithm [21], the conditions are very different and demonstrate the weakness of the algorithm in this part.
In this paper, we propose an encryption algorithm for color images (RGB images) based on:
Remark 3:
The algorithm ensures resistance to statistical attacks through key mechanisms and rigorous testing. First, it leverages chaotic sequences generated from a logistic map, enhancing the unpredictability of pixel values and making it difficult for attackers to predict outcomes. DNA sequence operations, such as elongation, truncation, deletion, and transformation, introduce further complexity and non-linearity, obscuring patterns that could be exploited. Several statistical tests were conducted to verify its robustness. Histogram analysis ensured uniform pixel distribution, while correlation coefficient analysis confirmed low correlation between original and encrypted images, indicating effective encryption. The Chi-square test demonstrated that the encrypted image’s pixel distribution is close to random, and an information entropy value near eight bits per pixel signified high randomness and resistance to statistical analysis. Overall, the integration of chaotic dynamics, complex DNA operations, and comprehensive testing ensures strong resistance to statistical attacks, greatly enhancing data security.

6. Conclusions

In this paper, we propose an encryption algorithm for color images (RGB images) based on a novel DNA subsequence operation to protect these images, which contain important information, from potential hacker attacks. The algorithm comprises two main parts: a high-speed permutation process and adaptive diffusion. Implementing the proposed algorithm in the MATLAB software environment yielded favorable results across key cryptographic parameters. We conducted a security analysis, including histograms and the Chi-square analysis test. Additionally, we calculated the correlation coefficient values between adjacent pixels, entropy values, and analyzed the NPCR (Number of Pixels Change Rate) and UACI (Unified Average Changing Intensity) values. We also explored the key sensitivity of the key space. The algorithm was further tested on specific images, such as all-black and all-white images, to evaluate its performance against noise and occlusion attacks. Finally, we compared the NPCR and UACI values of the proposed algorithm with those obtained from two existing methods referenced in [19,21], demonstrating that our method outperforms the current techniques and is more suitable for the intended applications.

Author Contributions

Conceptualization, S.S.M. and M.R.; Methodology, S.M.; Software, S.S.M.; Formal analysis, S.M. and M.R.; Investigation, M.R.; Writing—original draft, S.S.M.; Writing—review & editing, M.R.; Visualization, S.M.; Supervision, M.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Masood, F.; Masood, J.; Zhang, L.; Jamal, S.S.; Boulila, W.; Rehman, S.U.; Khan, F.A.; Ahmad, J. A new color image encryption technique using DNA computing and Chaos-based substitution box. Soft Comput. 2022, 26, 7461–7477. [Google Scholar] [CrossRef]
  2. Liu, Q.; Liu, L. Color Image Encryption Algorithm Based on DNA Coding and Double Chaos System. IEEE Access 2020, 8, 83596–83610. [Google Scholar] [CrossRef]
  3. Enayatifar, R.; Abdullah, A.H.; Isnin, I.F. Chaos-based image encryption using a hybrid genetic algorithm and a DNA sequence. Opt. Lasers Eng. 2014, 56, 83–93. [Google Scholar] [CrossRef]
  4. Akhavan, A.; Samsudin, A.; Akhshani, A. Cryptanalysis of an image encryption algorithm based on DNA encoding. Opt. Laser Technol. 2017, 95, 94–99. [Google Scholar] [CrossRef]
  5. Kalpana, J.; Murali, P. An improved color image encryption based on multiple DNA sequence operations with DNA synthetic image and chaos. Optik 2015, 126, 5703–5709. [Google Scholar] [CrossRef]
  6. Wang, X.; Su, Y.; Liu, L.; Zhang, H.; Di, S. Color image encryption algorithm based on Fisher-Yates scrambling and DNA subsequence operation. Vis. Comput. 2023, 39, 43–58. [Google Scholar] [CrossRef]
  7. Chen, L.-p.; Yin, H.; Yuan, L.-g.; Lopes, A.M.; Machado, J.A.T.; Wu, R.-c. A novel color image encryption algorithm based on a fractional-order discrete chaotic neural network and DNA sequence operations. Front. Inf. Technol. Electron. Eng. 2020, 21, 866–879. [Google Scholar] [CrossRef]
  8. Li, X.; Zeng, J.; Ding, Q.; Fan, C. A Novel Color Image Encryption Algorithm Based on 5-D Hyperchaotic System and DNA Sequence. Entropy 2022, 24, 1270. [Google Scholar] [CrossRef]
  9. Meng, F.; Gu, Z. A Color Image-Encryption Algorithm Using Extended DNA Coding and Zig-Zag Transform Based on a Fractional-Order Laser System. Fractal Fract. 2023, 7, 795. [Google Scholar] [CrossRef]
  10. Roohi, M.; Zhang, C.; Chen, Y. Adaptive model-free synchronization of different fractional-order neural networks with an application in cryptography. Nonlinear Dyn. 2020, 100, 3979–4001. [Google Scholar] [CrossRef]
  11. Chen, Y.; Tang, C.; Roohi, M. Design of a model-free adaptive sliding mode control to synchronize chaotic fractional-order systems with input saturation: An application in secure communications. J. Frankl. Inst. 2021, 358, 8109–8137. [Google Scholar] [CrossRef]
  12. He, Q.; Li, P.; Wang, Y. A Color Image Encryption Algorithm Based on Compressive Sensing and Block-Based DNA Coding. IEEE Access 2024, 12, 77621–77638. [Google Scholar] [CrossRef]
  13. Gao, X.; Sun, B.; Cao, Y.; Banerjee, S.; Mou, J. A color image encryption algorithm based on hyperchaotic map and DNA mutation. Chin. Phys. B 2023, 32, 030501. [Google Scholar] [CrossRef]
  14. Moafimadani, S.S.; Chen, Y.; Tang, C. A New Algorithm for Medical Color Images Encryption Using Chaotic Systems. Entropy 2019, 21, 577. [Google Scholar] [CrossRef] [PubMed]
  15. Watson, J.D.; Crick, F.H.C. Molecular Structure of Nucleic Acids: A Structure for Deoxyribose Nucleic Acid. Nature 1953, 171, 737–738. [Google Scholar] [CrossRef]
  16. Weichang, C.; Zhiyi, C.; Zhihua, C.; Ziqiang, W.; Hongxia, Q. Operational rules of the digital coding of DNA sequences in high dimension space. Shengwu Wuli Xuebao 2001, 17, 542–549. [Google Scholar]
  17. Zhang, Q.; Xue, X.; Wei, X. A novel image encryption algorithm based on DNA subsequence operation. Sci. World J. 2012, 2012, 286741. [Google Scholar] [CrossRef] [PubMed]
  18. Zidan, M.A.; Radwan, A.G.; Salama, K.N. Controllable V-shape multiscroll butterfly attractor: System and circuit implementation. Int. J. Bifurc. Chaos 2012, 22, 1250143. [Google Scholar] [CrossRef]
  19. Mirzaei, O.; Yaghoobi, M.; Irani, H. A new image encryption method: Parallel sub-image encryption with hyper chaos. Nonlinear Dyn. 2012, 67, 557–566. [Google Scholar] [CrossRef]
  20. Mazloom, S.; Eftekhari-Moghadam, A.M. Color image encryption based on coupled nonlinear chaotic map. Chaos Solitons Fractals 2009, 42, 1745–1754. [Google Scholar] [CrossRef]
  21. Liu, H.; Wang, X. Color image encryption based on one-time keys and robust chaotic maps. Comput. Math. Appl. 2010, 59, 3320–3327. [Google Scholar] [CrossRef]
  22. Patidar, V.; Pareek, N.K.; Purohit, G.; Sud, K.K. A robust and secure chaotic standard map based pseudorandom permutation-substitution scheme for image encryption. Opt. Commun. 2011, 284, 4331–4339. [Google Scholar] [CrossRef]
  23. Murillo-Escobar, M.A.; Cruz-Hernández, C.; Abundiz-Pérez, F.; López-Gutiérrez, R.M.; Acosta Del Campo, O.R. A RGB image encryption algorithm based on total plain image characteristics and chaos. Signal Process. 2015, 109, 119–131. [Google Scholar] [CrossRef]
Figure 1. DNA subsequence elongation and truncation processes.
Figure 1. DNA subsequence elongation and truncation processes.
Appliedmath 04 00073 g001
Figure 2. The schematic of the utilized procedure: (a) The schematic of the image encryption method, (b) The schematic of the decryption method.
Figure 2. The schematic of the utilized procedure: (a) The schematic of the image encryption method, (b) The schematic of the decryption method.
Appliedmath 04 00073 g002
Figure 3. Encryption and decryption of images: (ad): Plain images. (eh): Respective encryption of images. (il): Respective decryption of images.
Figure 3. Encryption and decryption of images: (ad): Plain images. (eh): Respective encryption of images. (il): Respective decryption of images.
Appliedmath 04 00073 g003
Figure 4. (a) Original color image of Daryasar; (bd) plain image histograms for R, G, and B, respectively; (e) cipher image; (fh) cipher image histograms, respectively.
Figure 4. (a) Original color image of Daryasar; (bd) plain image histograms for R, G, and B, respectively; (e) cipher image; (fh) cipher image histograms, respectively.
Appliedmath 04 00073 g004
Figure 5. Correlation histograms. (a,c,e) show the histograms for the original image, while (b,d,f) display the histograms for the encrypted image.
Figure 5. Correlation histograms. (a,c,e) show the histograms for the original image, while (b,d,f) display the histograms for the encrypted image.
Appliedmath 04 00073 g005aAppliedmath 04 00073 g005b
Figure 6. Encrypted images with correct and incorrect initial keys, and their differences from the original encrypted images: (ae) depict five newly encrypted images using the specified keys, while (fj) illustrate the differences between the incorrectly encrypted images and the original image.
Figure 6. Encrypted images with correct and incorrect initial keys, and their differences from the original encrypted images: (ae) depict five newly encrypted images using the specified keys, while (fj) illustrate the differences between the incorrectly encrypted images and the original image.
Appliedmath 04 00073 g006
Figure 7. Evaluation with selected plain images for uniform color patterns: (a) image with all-white pixels, (b) encrypted version of the all-white image, (c) histogram of the red channel for the all-white image, (d) image with all-black pixels, (e) encrypted version of the all-black image, (f) histogram of the red channel for the all-black image.
Figure 7. Evaluation with selected plain images for uniform color patterns: (a) image with all-white pixels, (b) encrypted version of the all-white image, (c) histogram of the red channel for the all-white image, (d) image with all-black pixels, (e) encrypted version of the all-black image, (f) histogram of the red channel for the all-black image.
Appliedmath 04 00073 g007
Figure 8. Outcomes of the noise attack evaluation for the “Guangzhou” image ((a,b): 10% noise attack, (c,d): 15% noise attack, (e,f): 20% noise attack).
Figure 8. Outcomes of the noise attack evaluation for the “Guangzhou” image ((a,b): 10% noise attack, (c,d): 15% noise attack, (e,f): 20% noise attack).
Appliedmath 04 00073 g008
Table 1. Chi-square test outcomes (part-I).
Table 1. Chi-square test outcomes (part-I).
Imagesab
ChannelsRGBRGB
x t e s t 2 237.2762214.9382226.1742259.7379263.4695246.6063
x 255.0 . 05 2 293293293293293293
PassingYesYesYesYesYesYes
Table 2. Chi-square test outcomes (part-II).
Table 2. Chi-square test outcomes (part-II).
Imagescd
ChannelsRGBRGB
x t e s t 2 265.8759253.9080251.2893257.9836216.7332291.1939
x 255.0 . 05 2 293293293293293293
PassingYesYesYesYesYesYes
Table 3. Results of the correlation coefficients of two adjacent pixels.
Table 3. Results of the correlation coefficients of two adjacent pixels.
ImageChannelPlain-TextCipher-Text
HVDHVD
aR0.98120.98680.9967−0.03250.0649−0.0529
G0.98750.99510.98780.06390.0893−0.0761
B0.98840.99820.9995−0.0554−0.05930.0562
bR0.96870.96630.89560.0298−0.0493−0.0695
G0.88450.86370.93180.03230.0272−0.0458
B0.96300.89560.89360.01670.03510.0262
cR0.90460.90740.9613−0.01540.0638−0.0552
G0.90640.91690.91840.02370.03880.0439
B0.92410.96370.9125−0.02990.01560.0134
dR0.96270.96730.95730.0105–0.0293–0.0991
G0.89950.96470.83380.06240.0183–0.0266
B0.92410.92570.96670.02360.03510.0167
Table 4. Results obtained from the entropy values of the color images.
Table 4. Results obtained from the entropy values of the color images.
ImageChannelsImage aImage bImage cImage d
Plain image channelsR6.98827.60676.99787.8157
G6.89967.53456.69917.6524
B6.62667.53236.52386.4623
RGB7.14287.40246.73397.8918
Cipher image channelsR7.09947.55927.44937.6691
G7.59937.81917.36947.5993
B7.39927.69947.88927.7887
RGB7.19987.59987.70987.8094
Table 5. NPCR and UACI value on different locations (%).
Table 5. NPCR and UACI value on different locations (%).
Location(12, 34)(34, 56)(56, 78)(78, 90)
NPCR98.929298.828598.824098.9942
UACI32.954432.893332.939632.9735
Table 6. Entropy values for all-black and all-white images.
Table 6. Entropy values for all-black and all-white images.
ImageRGB
black7.89827.88937.8974
white7.98837.93967.9198
Table 7. Results of noise attack evaluation.
Table 7. Results of noise attack evaluation.
ItemPSNR
RGB
“Guangzhou” Image33.277334.602432.9811
Gaussian31.012430.011929.9902
Speckle29.612330.875129.8859
Table 8. Results of occlude attack test.
Table 8. Results of occlude attack test.
ItemPSNR
RGB
“Guangzhou” Image33.895132.994734.0274
Gaussian33.811634.026432.9019
Speckle30.928631.077031.0285
Table 9. Results of correlation coefficients for the original and encrypted images using the proposed method compared to the two existing methods.
Table 9. Results of correlation coefficients for the original and encrypted images using the proposed method compared to the two existing methods.
ImageMethodsChannelPlain ImageCipher Image
HVDHVD
Image aProposed algorithmR0.98120.98680.9967−0.03250.0649−0.0529
G0.98750.99510.98780.06390.0893−0.0761
B0.98840.99820.9995−0.0554−0.05930.0562
Algorithm [23]R---−0.0432−0.0917−0.0638
G---−0.07430.0879−0.0730
B---−0.06490.05490.0791
Algorithm [22]R---−0.0464−0.0710−0.0574
G---−0.0706−0.08910.0843
B---−0.0534−0.0636−0.00694
Image bProposed algorithmR0.96870.96630.89560.0298−0.0493−0.0695
G0.88450.86370.93180.03230.0272−0.0458
B0.96300.89560.89360.01670.03510.0262
Algorithm [23]R---0.0313−0.0605−0.0470
G---−0.03820.0430−0.0556
B---−0.0282−0.0499−0.0463
Algorithm [22]R---−0.0354−0.05420.0794
G---−0.05590.03090.0691
B---−0.0216−0.04890.0317
Image cProposed algorithmR0.90460.90740.9613−0.01540.0638−0.0552
G0.90640.91690.91840.02370.03880.0439
B0.92410.96370.9125−0.02990.01560.0134
Algorithm [23]R---0.05570.0681−0.0693
G---−0.0384−0.0495−0.0647
B---−0.0393−0.02660.0398
Algorithm [22]R---0.02770.06930.0689
G---−0.06420.0494−0.0973
B---−0.03720.0362−0.0359
Table 10. Entropy values for cipher and plain images, part I.
Table 10. Entropy values for cipher and plain images, part I.
ImageChannelProposed Algorithm Image aScheme
[23]
Image a
Scheme [22]
Image a
Proposed Algorithm Image bScheme
[23]
Image b
Scheme
[22]
Image b
Plain
image
R6.9882--7.6067--
G6.8996--7.5345--
B6.6266--7.5323--
RGB7.1428--7.4024--
Cipher
image
R7.09947.06317.07597.55927.54017.5499
G7.59937.43017.48997.81917.79927.6999
B7.39927.42997.39227.69947.59967.6088
RGB7.19987.11877.11097.59987.48887.5532
Table 11. Entropy values for cipher and plain images, part II.
Table 11. Entropy values for cipher and plain images, part II.
ImageChanneldesigned Protocol Image cScheme
[23]
Image c
Scheme
[22]
Image c
Designed Protocol Image dScheme
[23]
Image d
Scheme
[22]
Image d
Plain
image
R6.9978--7.8157--
G6.6991--7.6524--
B6.5238--6.4623--
RGB6.7339--7.8918--
Cipher
image
R7.44937.43997.39967.66917.60667.6598
G7.36947.30877.35367.59937.49887.5211
B7.88927.81997.79927.78877.66387.6977
RGB7.70987.69557.69997.80947.80067.7963
Table 12. NPCR, UACI value on different locations (%), part I.
Table 12. NPCR, UACI value on different locations (%), part I.
LocationProposed Algorithm Location (12, 34)Technique [23]
Location (12, 34)
Technique [22]
Location (12, 34)
Proposed Algorithm Location (34, 56)Technique [23]
Location (34, 56)
Technique [22]
Location
(34, 56)
NPCR98.996298.301698.223898.966598.233598.4827
UACI32.955432.123332.476732.993232.493232.4850
Table 13. NPCR, UACI value on different locations (%), part II.
Table 13. NPCR, UACI value on different locations (%), part II.
LocationProposed Protocol Location (56, 78)Scheme [23]
Location (56, 78)
Scheme [22]
Location (56, 78)
Proposed Protocol Location (78, 90)Scheme [23]
Location (78, 90)
Scheme [22]
Location (78, 90)
NPCR98.994098.255698.602398.996198.466398.6223
UACI32.999632.266932.397932.972532.122132.4679
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.

Share and Cite

MDPI and ACS Style

Mirzajani, S.; Moafimadani, S.S.; Roohi, M. A New Encryption Algorithm Utilizing DNA Subsequence Operations for Color Images. AppliedMath 2024, 4, 1382-1403. https://doi.org/10.3390/appliedmath4040073

AMA Style

Mirzajani S, Moafimadani SS, Roohi M. A New Encryption Algorithm Utilizing DNA Subsequence Operations for Color Images. AppliedMath. 2024; 4(4):1382-1403. https://doi.org/10.3390/appliedmath4040073

Chicago/Turabian Style

Mirzajani, Saeed, Seyed Shahabeddin Moafimadani, and Majid Roohi. 2024. "A New Encryption Algorithm Utilizing DNA Subsequence Operations for Color Images" AppliedMath 4, no. 4: 1382-1403. https://doi.org/10.3390/appliedmath4040073

APA Style

Mirzajani, S., Moafimadani, S. S., & Roohi, M. (2024). A New Encryption Algorithm Utilizing DNA Subsequence Operations for Color Images. AppliedMath, 4(4), 1382-1403. https://doi.org/10.3390/appliedmath4040073

Article Metrics

Back to TopTop