β Author Profile: A research enthusiast and Matlab simulation developer, skilled in data processing, modeling simulation, program design, complete code acquisition, paper reproduction, and scientific simulation.
π Previous reviews, follow the personal homepage:Matlab Research Studio
π Personal motto: Investigate things to gain knowledge, complete Matlab code and simulation consultation available via private message.
π₯ Content Introduction
With the rapid development of information technology, digital images, as important carriers of information, have increasingly drawn attention to their security and privacy protection. During the transmission, storage, and application of images, how to effectively prevent unauthorized access and tampering has become an urgent problem to solve. Traditional encryption algorithms, such as DES and AES, have achieved significant success in the field of text data encryption, but due to the high correlation, large redundancy, and high real-time requirements of image data, directly applying them to image encryption often results in low efficiency and vulnerability to statistical analysis attacks. Therefore, researching efficient and secure encryption algorithms suitable for image characteristics is of great theoretical and practical significance.
In recent years, chaotic systems have shown great potential in the field of image encryption due to their high sensitivity to initial values and parameters, pseudo-randomness, and ergodicity. These characteristics of chaotic systems can effectively disrupt the correlation between image pixels, increasing the complexity and unpredictability of the encryption process. Meanwhile, DNA encoding operations in the biological field, with their high parallelism, vast storage capacity, and unique encoding methods, provide new ideas for image encryption. The four bases A, T, C, and G in DNA molecules can undergo various encoding combinations and operations, such as addition, subtraction, and XOR, which can further enhance the confusion and diffusion effects during the encryption process.
This article will delve into an image block encryption algorithm based on chaotic systems and DNA encoding operations. The algorithm aims to combine the good diffusion and confusion capabilities of chaotic systems with the high parallelism and complexity of DNA encoding operations to construct a more secure and efficient image encryption scheme. By processing images in blocks, the algorithm can reduce computational complexity, improve encryption speed, and enhance resistance to attacks.
Chapter 1: Image Encryption and Challenges
Digital images are a two-dimensional or three-dimensional data structure with high spatial correlation between pixel values. The gray values or color values of adjacent pixels are usually very close, which makes image data significantly redundant. Traditional bit-based encryption algorithms struggle to completely eliminate the correlation between pixels when dealing with such highly correlated image data, resulting in encrypted images that still retain some statistical features, making them vulnerable to statistical analysis attacks. For example, in grayscale images, if the encryption algorithm simply encrypts each pixel value without sufficiently disrupting the relationship between pixel positions or values, an adversary may infer information about the original image by analyzing the histogram or other statistical properties of the encrypted image.
Moreover, the real-time requirements of image data are also very high, especially in applications such as video communication and online image browsing. Excessive computational overhead of encryption algorithms can lead to delays, affecting user experience. Therefore, designing efficient image encryption algorithms is crucial.
The main challenges faced by image encryption include:
- Efficiency: The large volume of image data requires rapid completion of encryption and decryption processes.
- Security: The algorithm should be able to resist various known attacks, such as statistical analysis attacks, differential attacks, and brute force attacks.
- Robustness: The algorithm should have a certain tolerance for data loss or noise, meaning that damage to part of the encrypted data should not cause the entire decryption process to fail.
- Key Management: Complex encryption algorithms often require secure key management mechanisms.
To address these challenges, researchers are continuously exploring new encryption technologies, including methods based on chaotic systems and DNA encoding operations. The nonlinear characteristics of chaotic systems can effectively break the linear relationships between image pixels, while the parallelism and complexity of DNA encoding operations provide tools for constructing more robust encryption algorithms.
Chapter 2: Chaotic Systems and Image Encryption
Chaotic systems are a class of nonlinear dynamic systems whose behavior is extremely sensitive to initial conditions and parameters. Even a slight change in initial conditions or parameters can lead to significant differences in the long-term behavior of the system. This “butterfly effect” makes the output of chaotic systems appear random, but it is actually deterministic. The main characteristics of chaotic systems include:
- Sensitivity to Initial Values and Parameters: Small changes lead to large differences.
- Pseudo-randomness: The system output appears random but is generated by deterministic rules.
- Ergodicity: The system trajectory can traverse part or all of the phase space.
These characteristics make chaotic systems very suitable for application in image encryption. By using chaotic systems to generate pseudo-random sequences, they can be used to control pixel position permutation, value transformation, or key stream generation.
Currently, commonly used chaotic systems for image encryption include:
- Logistic Map: A one-dimensional nonlinear map that is simple in structure and easy to implement.
- Lorenz System: A three-dimensional nonlinear dynamic system with complex bifurcation behavior.
- Chen System: Another three-dimensional chaotic system with different chaotic attractor structures.
- Tent Map: A one-dimensional piecewise linear map with good ergodicity and uniform distribution characteristics.
In chaotic system-based image encryption algorithms, chaotic system state variables or output sequences are typically used to generate key streams or control the encryption process. For example, chaotic sequences can be used to determine the permutation order of pixels or to generate key streams for XOR operations with original pixel values. Due to the sensitivity of chaotic systems, even a slight change in the key (usually the initial values and parameters of the chaotic system) will result in a completely different key stream, thus ensuring the security of the encryption.
However, a single chaotic system may have some shortcomings in image encryption. For instance, one-dimensional chaotic systems have a smaller phase space and may have periodic points or weak chaotic regions, making them susceptible to phase space reconstruction attacks or periodic attacks. To overcome these issues, researchers have proposed using high-dimensional chaotic systems or coupled chaotic systems to enhance the complexity and security of the algorithm.
Chapter 3: DNA Encoding Operations
DNA molecules are carriers of genetic information stored within living organisms, composed of four bases: adenine (A), guanine (G), cytosine (C), and thymine (T). A pairs with T, and G pairs with C, which forms the basis of the DNA double helix structure. In addition to base pairing, DNA molecules can undergo various biochemical reactions, such as enzyme cutting, ligation, and polymerization. Encoding digital information into DNA sequences and utilizing these biochemical reactions for operations forms the field of DNA computing.
In image encryption, pixel values or pixel blocks can be encoded into DNA sequences. A common encoding scheme is to map the 256 gray values (0-255) or RGB color values to DNA sequences composed of A, T, C, and G. For example, the following encoding rules can be used:
- 00 -> A
- 01 -> T
- 10 -> C
- 11 -> G
By splitting the 8-bit gray value into two 2-bit binary numbers, each can be encoded into two DNA bases according to the above rules. For example, a gray value of 100 (binary 11001000) can be split into four 2-bit binary numbers: 11, 00, 10, 00, which can then be encoded as GCAG.
DNA encoding operations mainly include:
- DNA Addition: Simulating binary addition according to preset rules for base addition.
- DNA Subtraction: Simulating binary subtraction, which is the inverse operation of addition.
- DNA XOR: Simulating binary XOR operations according to preset rules for base XOR.
- DNA Complement: Utilizing base pairing rules (A-T, G-C) for complementary operations.
These DNA encoding operations can be applied in the image encryption process. For example, the DNA encoding of the encrypted image can be added to or XORed with the DNA encoding of the key stream to achieve pixel value transformation. Due to the high parallelism of DNA encoding operations, it is theoretically possible to process a large number of DNA sequences simultaneously, thus improving encryption speed. Additionally, the diversity of DNA encoding and the complexity of operation rules also provide possibilities for constructing more difficult-to-crack encryption algorithms.
However, applying theoretical DNA computing to practical image encryption systems still faces challenges. Current DNA computing mainly remains in the laboratory stage, with complex practical operations that are easily affected by errors in biochemical reactions. Therefore, in image encryption, we often simulate the ideas of DNA encoding and operations, implementing algorithms on digital computers.
Chapter 4: Image Block Encryption Algorithm Based on Chaotic Systems and DNA Encoding Operations
The image block encryption algorithm proposed in this article is based on chaotic systems and DNA encoding operations, with the core idea of dividing the original image into several sub-blocks and then independently encrypting each sub-block. This block processing method can reduce computational complexity, improve encryption efficiency, and enhance the robustness of the algorithm to some extent, as damage to a single sub-block will not affect the decryption of other sub-blocks.
The algorithm mainly includes the following steps:
- Image Block Division: Divide the original image into sub-blocks of size M x N. Depending on the image size and the desired block size, the image can be divided into several sub-blocks.
- Chaotic Sequence Generation: Select one or more chaotic systems, set initial values and parameters as encryption keys, and generate chaotic sequences for image scrambling and diffusion. For example, sequences can be generated to control the scrambling of sub-blocks and the diffusion of pixel values.
- Sub-block Scrambling: Use the chaotic sequence to scramble the positions of the image’s sub-blocks. The sub-blocks can be viewed as a two-dimensional matrix, and a scrambling index generated by the chaotic sequence can be used to rearrange the positions of the sub-blocks.
- Internal Pixel Scrambling of Sub-blocks: For each scrambled sub-block, use another chaotic sequence to scramble the positions of the pixels within that sub-block. This will further disrupt the correlation between pixels.
- DNA Encoding: Perform DNA encoding on the pixel values of the scrambled sub-blocks. According to preset encoding rules, convert each pixel value (e.g., gray value) into a DNA sequence.
- DNA Operation Diffusion: Use the chaotic sequence to generate a key stream for DNA operations. Perform DNA operations, such as addition, subtraction, or XOR, between the DNA-encoded pixel sequence and the DNA sequence of the key stream. This process achieves pixel value diffusion, meaning that a change in one pixel value will affect the changes in multiple other pixel values.
- DNA Decoding: Decode the DNA sequence after DNA operations back into digital pixel values.
- Merge Sub-blocks: Reassemble all encrypted sub-blocks in their original order to form the final encrypted image.
The specific implementation details of the algorithm, such as the choice of chaotic systems, parameter settings, chaotic sequence lengths, DNA encoding rules, DNA operation rules, and key stream generation methods, need to be carefully designed and optimized according to actual needs and security requirements.
Chapter 5: Algorithm Analysis and Performance Evaluation
To verify the effectiveness and security of the algorithm, comprehensive analysis and evaluation are required. Common evaluation metrics include:
-
Security Analysis:
- Key Space Analysis: The key space of the algorithm should be large enough to resist brute force attacks. The key space of algorithms based on chaotic systems typically depends on the precision of the initial values and parameters of the chaotic system. Combining DNA encoding operations can further increase the complexity of the keys.
- Statistical Analysis: Analyze the histogram, correlation, and other statistical features of the encrypted image, comparing them with the original image. A secure encryption algorithm should eliminate the statistical features of the image, making the encrypted image appear like random noise.
- Differential Attack Analysis: Analyze the impact of slight changes in the original image on the encrypted image. A small change in one pixel should lead to significant changes in the encrypted image, indicating a good avalanche effect.
- Resistance to Shear Attack Analysis: Test the impact of partial loss of encrypted data on decryption. Block encryption algorithms can resist shear attacks to some extent, as each sub-block is independently encrypted.
-
Performance Analysis:
- Encryption and Decryption Time: Measure the computational efficiency of the algorithm. Block processing and parallelization can improve the speed of the algorithm.
- Image Quality Assessment: Evaluate the similarity between the decrypted image and the original image, typically using metrics such as Peak Signal-to-Noise Ratio (PSNR) or Structural Similarity Index (SSIM).
β³οΈ Running Results
π References
[1] Ma Xuefen. A Color Image Encryption Algorithm Based on Fuzzy Integral Fusion DNA Encoding Operations [J]. Manufacturing Automation, 2014, 000(011):1-5. DOI:10.3969/j.issn.1009-0134.2014.06(δΈ).01.
[2] Yang Kang. Design and Implementation of Image Encryption Algorithm Based on Chaotic Systems [D]. Henan University [2025-04-24]. DOI:CNKI:CDMD:2.1016.201909.
π£ Partial Code
π Some theoretical references are from online literature; please contact the author for removal if there is any infringement.
π Follow me to receive a wealth of Matlab e-books and mathematical modeling materials
π The team specializes in guiding customized Matlab simulations in various research fields, helping to realize research dreams:
π Various intelligent optimization algorithm improvements and applications
Production scheduling, economic scheduling, assembly line scheduling, charging optimization, workshop scheduling, departure optimization, reservoir scheduling, three-dimensional packing, logistics site selection, cargo location optimization, bus scheduling optimization, charging pile layout optimization, workshop layout optimization, container ship loading optimization, pump combination optimization, medical resource allocation optimization, facility layout optimization, visual domain base station and drone site selection optimization, knapsack problem, wind farm layout, time slot allocation optimization, optimal distributed generation unit allocation, multi-stage pipeline maintenance, factory-center-demand point three-level site selection problem, emergency life material distribution center site selection, base station site selection, road lamp pole arrangement, hub node deployment, transmission line typhoon monitoring devices, container scheduling, unit optimization, investment optimization portfolio, cloud server combination optimization, antenna linear array distribution optimization, CVRP problem, VRPPD problem, multi-center VRP problem, multi-layer network VRP problem, multi-center multi-vehicle VRP problem, dynamic VRP problem, two-layer vehicle routing planning (2E-VRP), electric vehicle routing planning (EVRP), oil-electric hybrid vehicle routing planning, hybrid flow shop problem, order splitting scheduling problem, bus scheduling optimization problem, flight shuttle vehicle scheduling problem, site selection path planning problem, port scheduling, port shore bridge scheduling, parking space allocation, airport flight scheduling, leak source localization
π Machine learning and deep learning time series, regression, classification, clustering, and dimensionality reduction
2.1 BP time series, regression prediction, and classification
2.2 ENS voice neural network time series, regression prediction, and classification
2.3 SVM/CNN-SVM/LSSVM/RVM support vector machine series time series, regression prediction, and classification
2.4 CNN|TCN|GCN convolutional neural network series time series, regression prediction, and classification
2.5 ELM/KELM/RELM/DELM extreme learning machine series time series, regression prediction, and classification
2.6 GRU/Bi-GRU/CNN-GRU/CNN-BiGRU gated neural network time series, regression prediction, and classification
2.7 Elman recurrent neural network time series, regression prediction, and classification
2.8 LSTM/BiLSTM/CNN-LSTM/CNN-BiLSTM long short-term memory neural network series time series, regression prediction, and classification
2.9 RBF radial basis neural network time series, regression prediction, and classification
2.10 DBN deep belief network time series, regression prediction, and classification
2.11 FNN fuzzy neural network time series, regression prediction
2.12 RF random forest time series, regression prediction, and classification
2.13 BLS broad learning time series, regression prediction, and classification
2.14 PNN pulse neural network classification
2.15 Fuzzy wavelet neural network prediction and classification
2.16 Time series, regression prediction, and classification
2.17 Time series, regression prediction, and classification
2.18 XGBOOST ensemble learning time series, regression prediction, and classification
2.19 Transform various combinations of time series, regression prediction, and classification
Directions cover wind power prediction, photovoltaic prediction, battery life prediction, radiation source identification, traffic flow prediction, load forecasting, stock price prediction, PM2.5 concentration prediction, battery health status prediction, electricity consumption prediction, water body optical parameter inversion, NLOS signal identification, precise prediction of subway stops, transformer fault diagnosis
π In the field of image processing
Image recognition, image segmentation, image detection, image hiding, image registration, image stitching, image fusion, image enhancement, image compressed sensing
π In the field of path planning
Traveling salesman problem (TSP), vehicle routing problem (VRP, MVRP, CVRP, VRPTW, etc.), three-dimensional path planning for drones, drone collaboration, drone formation, robot path planning, grid map path planning, multimodal transport problems, electric vehicle routing planning (EVRP), two-layer vehicle routing planning (2E-VRP), oil-electric hybrid vehicle routing planning, ship trajectory planning, full path planning, warehouse patrol
π In the field of drone applications
Drone path planning, drone control, drone formation, drone collaboration, drone task allocation, online optimization of safe communication trajectories for drones, vehicle collaborative drone path planning
π In the field of communication
Sensor deployment optimization, communication protocol optimization, routing optimization, target localization optimization, Dv-Hop localization optimization, Leach protocol optimization, WSN coverage optimization, multicast optimization, RSSI localization optimization, underwater communication, communication upload and download allocation
π In the field of signal processing
Signal recognition, signal encryption, signal denoising, signal enhancement, radar signal processing, signal watermark embedding and extraction, electromyography signals, electroencephalography signals, signal timing optimization, electrocardiogram signals, DOA estimation, encoding and decoding, variational mode decomposition, pipeline leakage, filters, digital signal processing + transmission + analysis + denoising, digital signal modulation, bit error rate, signal estimation, DTMF, signal detection
π In the field of power systems
Microgrid optimization, reactive power optimization, distribution network reconstruction, energy storage configuration, orderly charging, MPPT optimization, household electricity, electric/cold/heat load forecasting, power equipment fault diagnosis, battery management system (BMS) SOC/SOH estimation (particle filtering/Kalman filtering), multi-objective optimization in power system dispatch, photovoltaic MPPT control algorithm improvement (perturbation observation method/incremental conductance method)
π In the field of cellular automata
Traffic flow, crowd evacuation, virus spread, crystal growth, metal corrosion
π In the field of radar
Kalman filter tracking, trajectory association, trajectory fusion, SOC estimation, array optimization, NLOS identification
π In workshop scheduling
Zero-wait flow shop scheduling problem (NWFSP), Permutation flow shop scheduling problem (PFSP), Hybrid flow shop scheduling problem (HFSP), zero idle flow shop scheduling problem (NIFSP), distributed permutation flow shop scheduling problem (DPFSP), blocking flow shop scheduling problem (BFSP)
π