Image Encryption via DDPM Skipping-Step Diffusion Based on a Six-Dimensional Hyperchaotic System with Feedback Control Authors: Songran Wang, Hanqing Zhao, Wei He, Tao Wang, Zhiben Zhuang, Tianfu Zhang, Jiacheng Xu Published: 2026 ABSTRACT In this paper, we propose a novel image encryption algorithm that integrates a six-dimensional hyperchaotic system with the forward diffusion process of denoising diffusion probabilistic models (DDPMs). The proposed framework synergistically combines the hyperchaotic system’s high sensitivity to initial conditions with the DDPM’s Markov chain-based skipping-step diffusion mechanism, thereby enabling dual-level confusion-diffusion operations at both the pixel and bit levels. This dual-strategy approach significantly enhances plaintext sensitivity and ciphertext randomness. Comprehensive simulations demonstrate that the algorithm achieves superior performance in key space expansion, histogram uniformity, adjacent pixel correlation reduction, information entropy optimization, and resistance to differential attacks. The algorithm exhibits strong resilience against various attack vectors, including brute-force attacks, statistical analysis, chosen-plaintext attacks and common image degradation factors (e.g., noise contamination and cropping). These characteristics establish the proposed method as a highly secure and practical solution for image data protection in cloud-IoT environments. 1. Introduction The proliferation of digital imaging technologies in cloud computing and IoT applications has exposed massive image data to escalating security threats during transmission and storage. Conventional cryptographic algorithms, such as AES and DES, are effective for textual data but demonstrate inherent limitations in processing digital images characterized by high data redundancy, strong pixel correlation, and low entropy [1,2]. Matrix transformation-based approaches such as the Arnold transform [3] and Baker mapping [4] use elementary geometric transformations to disrupt pixel arrangements. However, these methods suffer from periodicity issues that allow image recovery through repeated transformations, and their invariant histogram properties make them vulnerable to statistical analysis. The application of chaotic systems in cryptography, pioneered by Matthews [5], has led to extensive research on chaos-based encryption schemes [6,7,8,9]. Traditional chaotic encryption uses sensitivity to the initial conditions and pseudo-randomness of low-dimensional chaotic systems (e.g., Logistic map and Lorenz system) for pixel permutation. However, these approaches encounter critical challenges, including period degradation in low-dimensional chaos and vulnerability to chosen-plaintext attacks caused by linear confusion structures. Recent advancements in artificial intelligence have introduced novel paradigms for image encryption. Researchers have explored hybrid architectures that integrate chaotic systems with deep learning models [10]. Representative works include chaotic encryption with simple perceptrons [11], convolutional neural network (CNN)-integrated chaotic encryption [12], and multidimensional chaotic-CNN frameworks [13,14]. Despite this progress, a significant research gap remains in exploiting emerging generative models such as the denoising diffusion probabilistic model (DDPM) for cryptographic applications. DDPMs represent a groundbreaking class of generative models that progressively transform data into Gaussian noise through a Markov chain-based forward diffusion process [15]. The reverse denoising process enables high-quality data generation, whereas the forward diffusion process possesses unique cryptographic properties: (1) path irreversibility: the diffusion process is theoretically irreversible without knowledge of the noise trajectory and (2) structured randomness: the Markov chain generates noise sequences with high ergodicity and complex correlations. In this paper, we present a novel encryption framework that synergistically integrates the DDPM forward process with a six-dimensional hyperchaotic system. We summarize the key contributions of this study as follows: (1) Markov Chain Skipping-Step Diffusion Mechanism: We innovatively adapt the DDPM forward diffusion process for encryption by introducing a skipping-step strategy. Unlike the standard DDPM, which requires extensive iterations for generation, the proposed method selectively executes critical diffusion steps guided by hyperchaotic sequences. This strategy enables rapid and controllable mapping from plaintext to the noise domain while reducing computational overhead. Importantly, the skipping intervals and paths are determined by the hyperchaotic system, which introduces additional key dimensions and enhances security. (2) Hyperchaos-Driven Anisotropic Diffusion: The Gaussian noise injection in the skipping-step process is dynamically modulated by sequences generated by the six-dimensional hyperchaotic system. This transforms the diffusion process from isotropic to anisotropic, thereby introducing spatial and channel-specific variations in noise characteristics. The resulting complexity in plaintext-ciphertext relationships significantly strengthens resistance to differential and statistical attacks. (3) Dual-Domain Confusion-Diffusion Architecture: A hierarchical encryption structure is established through synergistic operations at both the pixel and bit levels. In the pixel domain, hyperchaos-driven diffusion ensures the global dispersion of information. At the bit level, bit-plane scrambling is applied using hyperchaotic sequences to achieve the precise rearrangement of individual bits. This dual-level approach ensures the comprehensive concealment of statistical and structural features of the plaintext. (4) Security-Efficiency Synergy: By leveraging the skipping-step mechanism and high-dimensional chaos, the algorithm achieves a balance between security and computational efficiency. The reduced diffusion steps make it suitable for real-time applications, and the hyperchaotic system provides a robust source of randomness with an expansive key space, thereby ensuring resilience against brute-force attacks and chaos-based cryptanalysis. To summarize, this study represents a significant advancement in image encryption by reinterpreting the theoretical foundations of DDPM for cryptographic purposes. Through the integration of hyperchaotic systems, bit-level operations, and the skipping-step diffusion mechanism, the proposed framework offers a novel, secure, and practical solution for protecting digital images in cloud-IoT environments. The remainder of this paper is organized as follows: In Section 2, we introduce the foundational concepts. In Section 3, we describe the six-dimensional hyperchaotic system. In Section 4, we explain the proposed encryption algorithm. In Section 5, we present the simulation results and performance analysis. Finally, in Section 6, we report the conclusions. 2. Preliminaries 2.1. SHA-256 SHA-256 is a one-way Hash function, which has a pivotal position in the field of cryptography and information security, and its main role is to convert a message of arbitrary length into a message digest of 256-bit length. Therefore, it can map different images to different information digests and enhance the randomness of image encryption. The SHA-256 algorithm has four features: (1) the input length is variable, but the output length is fixed; (2) operation efficiency is high and the hash value can be calculated quickly; (3) different messages must have different message digests; and (4) the message digests cannot be inverted to the message [16]. 2.2. The Mathematics of DDPM Forward Diffusion The amount of noise added at each step of the forward diffusion process is very small; hence, it can be assumed that the difference between the previous image and the subsequent image is very small. This small change can be modeled well by a Gaussian distribution; hence, q(xt∣xt−1) is used to indicate that a small amount of noise has been added, and the added noise εt∼N(0,I) belongs to Gaussian noise. The slightly noisier image xt in the forward diffusion process is computed based on the noisier image xt−1 in the previous step; that is, the final pure noise xT is sampled from the conditional distribution q(xt∣xt−1). Thus, the process of adding Gaussian noise gradually to the original image x0 can be represented as(1)x1∼q(x1∣x0),x2∼q(x2∣x1),…,xT∼q(xT∣xT−1). At the end of the noise addition, xt becomes pure Gaussian noise with no information about the original image. Figure 1 illustrates this process. The variance scheduling table β is a set of predefined βt values that determines how much noise is added at each step of the diffusion process, where βt has to satisfy 0<β1<β2<…<βT<1. βt is not constant at each time step t. For example, it can be linear, cosine, sigmoid, or quadratic scheduling. In the original DDPM paper, the authors proposed linear scheduling, whereas Nichol et al. introduced the use of βt values in a cosine scheduling form. The core idea of cosine scheduling is that βt values vary over time steps according to a cosine function. This approach offers the advantage of smoothing the noise addition process at both ends [17]. Based on the above, to enhance the randomness of the encryption process, we input the hyperchaotic sequence generated by the hyperchaotic system into the improved cosine scheduling formula to control the value of the scheduling parameter β sequence. The process of forward diffusion gradually adds a certain amount of Gaussian noise to the original image x0 for t=1,…,T time steps, thereby generating a probability distribution of xt−1 as follows:(2)q(xt∣xt−1)=N(xt;1−βtxt−1,βtI). The proportion of diffusion is controlled by the variance βt at each time step t. The variable xt depends only on the Gaussian noise εt added by xt−1·q(xt∣xt−1) at each time step. The diffusion equation is(3)xt=1−βtxt−1+βtεt−1. In practical calculations, the reparameterization technique is typically used. Instead of computing x1,x2,…,xt step by step, we can directly compute xt after adding noise at any moment using only the known variance scheduler β and Gaussian noise εt∼N(0,I). Let αt=1−βt and α¯T=∏i=1nαi. Bringing αt into the diffusion Equation (3) yields the following equation:(4)xt=αtxt−1+1−αtεt−1. Then, we obtain(5)xt−1=αt−1xt−2+1−αt−1εt−2. By the Equations (4) and (5),(6)xt=αtαt−1xt−2+αt(1−αt−1)εt−2+1−αtεt−1. As we know, two independent Gaussian distributions are added together and the result is still a Gaussian distribution; that is, if X∼N(μX,σX2),Y∼N(μY,σY2), then X+Y∼N(μX+μY,σX2+σY2), where X and Y are random variables. If we combine αt(1−αt−1)×εt−2 and 1−αt×εt−1 into a new Gaussian distribution, its variance is(7)αt(1−αt−1)+(1−αt)=1−αtαt−1. Therefore, its standard deviation is 1−αtαt−1 and the Gaussian term obtained after merging is 1−αtαt−1ε′; hence, xt can be rewritten as(8)xt=αtαt−1xt−2+1−αtαt−1ε′,ε′∼N(0,I). This is the continuation of the calculation that expands this chain, which can be expanded all the way up to x0, expanding as follows:(9)xt=αtαt−1…α1x0+1−αtαt−1…α1ε0′. Finally, the following is obtained after the application of the reparameterization technique:(10)xt=α¯Tx0+1−α¯Tε. Therefore, instead of gradual diffusion from x0,x1,x2,…,xt, we generate x0 directly from x0 for any time step. Unlike the reparameterization strategy of the standard DDPM, our proposed strategy has a β sequence construction mechanism based on a continuous product to reduce the time of the encryption and decryption processes. To increase the randomness of encrypted images, we require that the jump rules of Markov chains must be satisfied during this process. 2.3. Box–Muller Algorithm The Box–Muller Algorithm can efficiently generate random numbers with mean 0 and variance 1. It entails mapping two independent uniformly distributed random variables into two independent normally distributed random variables by varying the polar coordinates. The main process is to first obtain two independent sequences U1 and U2, and then compute theirs intermediate variables R and θ using the formula(11a)R=−2lnU1;(11b)θ=2πU2. In this case, the intermediate variable R obeys a Rayleigh distribution and the intermediate variable θ obeys a uniform distribution on [0,2π). The trigonometric functions are then used to convert U1 and U2 to normal distributions in the following manner:(12a)Z0=Rcosθ;(12b)Z1=Rsinθ. The final generated Z0 and Z1 are independent and obey N(0,1). 2.4. Bit-Plane Scrambling Method Bit-plane scrambling is a method for disambiguating an image by splitting it into multiple bit planes according to the bits. It is based on the fact that a single pixel value of 0∼255 occupies 8 bits and an RGB image has three channels; hence, a color image can be split into 24-bit planes. The advantage is that not only can the disambiguation operation be performed in a single bit plane but the order of the 24-bit planes can also be exchanged to further uncorrelate the neighboring pixels and the three channels. 3. New Six-Dimensional Hyperchaotic System Reference [18] introduces two feedback controllers based on the Lorenz system and constructs a new five-dimensional chaotic system. Its equations are as follows:(13)x˙=ay−bx−csin(u),y˙=dx−exv2,z˙=fxy−gz,u˙=hyz−iu,v˙=ju−kv, where a,b,c,d,e,f,g,h,i,j and k are control parameters. The maximum Lyapunov exponent of most of the reported hyperchaotic systems is less than 4, and the larger the maximum Lyapunov exponent, the better the randomness. Therefore, based on system (13), we add one controller v and construct a new six-dimensional hyperchaotic system as follows:(14)x˙=ay−bx−csin(u),y˙=dx−exv2,z˙=fxy−gz,u˙=hyz−iu,v˙=ju−kv,w˙=ly, where a,b,c,d,e,f,g,h,i,j,k and l are control parameters. Compared with system (13), system (14) has a more complex topological structure. Additionally, system (13) is only an ordinary chaotic system, whereas system (14) is a hyperchaotic system. Simultaneously, the maximum Lyapunov exponent of system (14) is greater than 5.7. The initial values used in Section 3.1, Section 3.2, Section 3.3 and Section 3.4 are y0=[0.1,0.2,0.1,0.1,0.3,0.2]. 3.1. Lyapunov Exponential and Randomness Analysis The primary dynamical properties of a chaotic system can be characterized by its Lyapunov exponent spectrum. For the parameter values a=10,b=11,c=1,d=31,e=1,f=1,g=11/3,h=1,i=3,j=1,k=9,l=1, the corresponding Lyapunov exponent spectrum is shown in Figure 2. Figure 2 demonstrates that the system is hyperchaotic, with two positive Lyapunov exponents of approximately 6 and 1, respectively, which indicates that the system exhibits strong randomness and high complexity. The Lyapunov exponents are λ1=6.121584, λ2=1.183124, λ3=0, λ4=−3.556723, λ5=−8.894189, and λ6=−18.248423. The cumulative sums of the Lyapunov exponents are as follows:S1=λ1=6.121584,S2=λ1+λ2=7.304708,S3=λ1+λ2+λ3=7.304708,S4=λ1+λ2+λ3+λ4=3.747985,S5=λ1+λ2+λ3+λ4+λ5=−5.146204. Because S5 is less than zero, we set j=4 and apply the Kaplan–Yorke formula DKY=j+∑i=1jλj/|λj+1|, which yields DKY=4.42095. DKY is not an integer, which further illustrates the existence of singular attractors in the system (14) from a dimensional perspective, thereby indicating that the system is in a chaotic state. The dimension of the attractor is between 4 and 5, thereby indicating that the geometric complexity of the attractor is higher than four dimensions. We also conducted 0−1 tests on the hyperchaotic sequence. The results are shown in Table 1. The table shows that the hybrid system has good randomness. 3.2. Phase Diagram Analysis For the parameter values a=10,b=11,c=1,d=31,e=1,f=1,g=11/3,h=1,i=3,j=1,k=9,l=1, the multi-band multi-wing two-dimensional (2D) and three-dimensional (3D) phase portraits generated by system (14) are presented in Figure 3 and Figure 4, respectively. These phase portraits demonstrate that the chaotic system generates multiple frequency bands and wings in various directions. 3.3. Time Series Chart For the parameter values a=10,b=11,c=1,d=31,e=1,f=1,g=11/3,h=1,i=3,j=1,k=9,l=1, the time series of x,y,z,u,v,w for system (14) are shown in Figure 5, which indicates that the system is in a chaotic state. 3.4. Poincaré Section A Poincaré section is formed by selecting a plane in the phase space and collecting the intersection points where the system trajectory crosses this plane in a prescribed direction. For the parameter values a=10,b=11,c=1,d=31,e=1,f=1,g=11/3,h=1,i=3,j=1,k=9,l=1, the Poincaré section of system (14) is taken at x=0,y=0,u=0,v=0, which retains only the crossings in the positive direction. The resulting section is presented in Figure 6. 4. Algorithm Descriptions 4.1. Encryption Process The flow chart of the encryption process is shown in Figure 7. Given an M×N×3 color plaintext image I, the encryption steps are as follows: Step 1: Input the M×N×3 color plaintext image I and the customized string keyStr, and convert its keyStr to UTF-8 byte format. Step 2: Read the binary data imgData of I and splice the keyStr to the front of imgData to obtain the spliced data cData. Step 3: To ensure data integrity and prevent arbitrary tampering, use the SHA-256 algorithm to generate a 32 byte digest hash for cData. Step 4: Extract the byte segments whose indices are located in the range of (i−1)×4+1 to i×4(1≤i≤8) in the hash and convert them to the 32-bit unsigned integer decV. Step 5: Map decV to the range 0–10 and retain four decimals places; hence, the key sequence keys are generated. Select six of the eight values as the keys. The formula is(15)keyi=decV(232−1)×10. Step 6: Output key sequence keys=[key1,key2,key3,key4,key5,key6]. The key sequence keys are used as the initial condition of the chaotic system (14). Call the ODE45 program under the conditions of a relative tolerance of 10−3 and an absolute tolerance of 10−6. Set the step size to 0.01, discard the first 500 values, and calculate the total time T1=0.01×(M×N×3)+500. Step 7: Diffusion encryption is based on the probabilistic diffusion model for the forward diffusion process of noise injection. Set the total number of diffusion steps to T=800. Step 8: Generate sequence β, where sequence β controls the noise increment at each time step. Use a chaotic system to generate T elements of sequence β, arranged in ascending order and satisfying the condition 0<β1<β2<β3<…<βT−1<βT<1. Step 9: Obtain the α sequence from α=1−β. The α sequence represents the mixing ratio of the data. Because the diffusion probability model is a Markov chain process, it can be used without iterative diffusion, and the closed-form solution at any time step can be obtained using the reparameterization technique to directly inject the final noisy image into images, whereupon we can pre-accumulate the concatenated multiplications and obtain the value α¯T of the cumulative T-steps of the α-sequence α¯T using α¯T=∏i=1Tαi. Step 10: Generate the noisy image. Use the key sequence keys as the initial value of the chaotic system (14) and select its first state variable x to generate the sequence to obtain the pseudo-random sequence U1. Then, add a small perturbation to the initial value keys to ensure the independence of the pseudo-random sequence, obtain the initial value k=[key1+0.00001,key2,key3,key4,key5,key6+0.00001], and generate the pseudo-random sequence U2 with k as the initial value of the chaotic system (14), where U2 is a hyperchaotic sequence generated by the sixth state variable w. Step 11: Using sequences U1 and U2, generate the Gaussian-distributed noise sequence via the Box–Muller transform formula, and use the sequence N normalized to the range [0,1] to generate the noise image ε that accumulates up to T time steps. The noise image ε is also a color image of M×N×3. Repeat the above steps to generate sufficient noisy images. Step 12: Inject noise. This process is a noise diffusion operation performed in the fractional domain. First, normalize the plaintext image I to the range [0,1] to obtain the value X0 at step 0 of the diffusion process, and then diffuse the noise image ε accumulated up to the time step T into X0. Thus, a closed-form solution of the time step T is obtained using the reparametrization technique; that is, the image XT after the injection of noise, which is defined in the process(16)XT=α¯T×X0+1−α¯T×ε. Step 13: In the confusion encryption stage, because confusion encryption is a differential encryption operation based on bitwise operations, first convert the image XT after noise injection to Uint8 format to obtain the adjusted image Idiff. Step 14: Generate a sequence using key sequence keys as the initial values of the chaotic system (14) and select its second state variable y, mapping it to the [0,255] range and converting to Uint8 format to obtain the M×N×3 dissimilarity sequence S. Step 15: Perform the XOR operation on the pixel values of all three channels of the image using the XOR operation:(17)Ixor=Idiff⊕S. Step 16: Get the final image Ixor converted to Unit8. Step 17: To break the correlation between the three RGB channels, scramble Ixor. Because the image has 8 bits for one pixel and three channels, it can be disassembled into 24-bit planes. In this paper, we preset 24!-10 disassembling methods, such as [14, 3, 22, 9, 17, 5, 24, 12, 7, 19, 2, 16, 8, 21, 11, 4, 23, 15, 6, 13, 20, 1, 18, 10]. The selection of rules is controlled by chaotic sequences. Using the preset exchange rules, rearrange the 24-bit planes in random order. Then, within each bit plane, first use the Zigzag method to extract the bit plane into a one-dimensional bit sequence from the top-left corner. Next, place the sequence back into the bit plane according to the rule of bottom-to-top and right-to-left. Repeat this internal scrambling process three times and then the image Ienc encrypted after the bit plane is obtained. Encryption is complete. Figure 8 is the Zigzag scrambling and inverse transform operation diagram. 4.2. Decryption Process The flow chart of the decryption process is shown in Figure 9. The decryption step is the inverse process of the encryption step. Given an M×N×3 ciphertext image Ienc, the decryption step is as follows: Step 1: Input the ciphertext image Ienc and the corresponding key keys. Step 2: Follow the inverse method of bit-plane scrambling to recover to before bit-plane scrambling. Step 3: For XOR reduction, use the key sequence keys as the initial values of the chaotic system (14), select its second state variable y to generate the sequence, map it to the range [0,255], and convert it to the uint8 format to obtain the XOR-sequence S of M×N×3, which is the same as that at the time of encryption. The XOR-reduced image Irexor is obtained by the XOR operation. XOR operation equation is as follows:(18)Irexor=Ienc⊕S. Step 4: For diffusion reduction, generate a sequence β identical to the encryption using a chaotic system. Obtain the α sequence from α=1−β, obtain the value of the accumulated T steps of the α-sequence α¯T using α¯T=∏i=1Tαi, and obtain the value of the accumulated T steps of the α-sequence α¯T. Step 5: Generate the sequence using the key sequence keys as the initial values of the chaotic system (14) and select its first state variable x. Because the key and the key in encryption are phase diagrammed, the same pseudo-random sequences U1 and U2 can be obtained. Step 6: Generate the M×N×3 noisy image ε using the Box–Muller transform formula and normalize it to the range of [0,1]. The noisy image ε is the same as that used for encryption. Step 7: Normalize the image Irexor and then use the diffusion formula corresponding to the reduction formula:(19)Xrec=Irexor−1−α¯T×εα¯T. Step 8: Obtain the decrypted and restored image Xrec, convert it back to Uint8 format, and output the decrypted and restored image Xrec. 5. Experimental Results 5.1. Experimental Platforms The PC machine configuration was as follows: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60 Ghz (8 CPUs), 16 GB of RAM, and Windows 10 64-bit OS. We wrote a single threaded program in MATLAB 2014a to implement the above simulation experiment. 5.2. Results The classic test images selected for the experiment were the color images of an Airplane (F-16), a Mandrill, and Peppers, all with a size of 512×512×3. Based on the parameters in Section 3, the plaintext image, ciphertext image, and decrypted image of the experiment are shown in Figure 10. Figure 10 shows that the algorithm achieved good encryption performance. 6. Security Analysis 6.1. Key Security Analysis The key space is one of the most important factors for determining the strength of an image encryption algorithm. To resist an exhaustive attack, the size of the key space should be larger than 2128. In this paper, the key consists of the 256 bits of the SHA-256 function. The system parameters are a,b,c,d,e,f,g,h,i,j,k,l and the initial value of the system is [key1,key2,key3,key4,key5,key6]; hence, the key space of this algorithm is 10270(calculated with a computer precision of 10−15), which is sufficient to resist an exhaustive attack. Therefore, the key security of this algorithm is sufficient. Simultaneously, the 0–1 test can effectively detect the randomness of encrypted images. The test results of the three experimental images in this study are shown in Table 2. Table 2 shows that the test values of the three images were close to 1, which indicates that the randomness of the ciphertext images was very good. 6.2. Chosen Plaintext Attack Analysis When evaluating the ability of image encryption algorithms to resist selective plaintext attacks, extreme monochrome images such as all black or all white are typically used as test plaintexts. A secure encryption algorithm should ensure that the ciphertext image of such special plaintext still exhibits pseudo-random noise characteristics, the ciphertext histogram distribution is uniform, and the information entropy is close to the theoretical maximum value of 8. In this study, we conducted encryption experiments on pure black and pure white images. The visual effect of the encrypted image is shown in Figure 11. For further histogram analysis of the ciphertext image, taking the R channel as an example, the pixel value distribution is shown in Figure 12. The experimental results show that the ciphertexts of pure black and pure white images exhibited a noise-like distribution visually and the histograms exhibited a high degree of uniformity. The global information entropy of both images reached 7.9993. The above qualitative and quantitative analysis fully demonstrates that the proposed algorithm effectively resisted the chosen-plaintext attack. 6.3. Histogram Analysis The histogram reflects the distribution of pixels in the region from 0 to 255 very well. When the image pixels are uniform, it can resist statistical attacks very well. The flatter the histogram appears in the region from 0 to 255, the more uniform it is. Figure 13 shows the histogram of the plaintext image and ciphertext image of the Airplane (F-16) color image. The plaintext image pixels are concentrated regularly, but after encryption, the ciphertext image pixels are evenly distributed. Hence, the encryption algorithm increases the resistance to statistical attacks. We used a chi-square goodness-of-fit test to quantitatively analyze the uniformity of the ciphertext histogram for each channel of the three test images: Mandrill, Airplane (F-16), and Peppers. The null hypothesis of the test is that the ciphertext pixel values follow a uniform distribution, with the expected frequency set to E, which denotes the value of the total number of pixels divided by 256. The chi-square statistic is calculated using the formula χ2=∑i=0255Oi−E2E, with 255 degrees of freedom. At a significance level of α=0.05, when the statistic is less than the critical value (i.e., p>0.05), the null hypothesis is accepted. As shown in Table 3, the test results for the three images across all channels satisfy p>0.05, which indicates that their ciphertext histograms all follow a uniform distribution, thereby verifying that the algorithm possesses strong resistance against statistical attacks. 6.4. Information Entropy Analysis Information entropy can be used to measure uncertainty. The higher the information entropy, the greater the uncertainty of image information and the lower the amount of visual information. The formula for information entropy is(20)H=−∑i=1Lp(xi)log2p(xi), where p(xi) is the probability that the value of the pixel xi occurs in the range 0–255. For a color image, when the gray level of the pixel’s R, G, B channel is L=256, the maximum value of information entropy is 8. The closer the information entropy of the encrypted image is to 8, the more random the encryption algorithm. A comparison of information entropy analysis is shown in Table 4. Global information entropy may obscure the local regularities of an image. If the entropy value of a local region is low, this indicates the presence of residual low-frequency structures, which suggests insufficient encryption. To address this, in this paper, we use a sliding window to compute the local information entropy of pixel neighborhoods, thereby compensating for the limitations of global entropy detection. As shown in Table 5, the local entropy test results for all images are satisfactory, with no residual low-frequency structures, which demonstrates that the encryption algorithm is sufficiently thorough and offers high security. 6.5. Correlation Analysis Between Neighboring Pixel Points To compare the adjacent pixel correlation of plaintext and ciphertext images, 5000 pairs of pixel points are randomly selected from the plaintext image and ciphertext image, and the adjacent pixel grayscale values of the horizontal, vertical, and diagonal directions of the image are analyzed. The analysis is performed using the following formula:(21a)E(u)=1N∑i=1Nui2;(21b)D(u)=1N∑i=1N(ui−E(u))2;(21c)Cov(u,v)=1N∑i=1N(ui−E(u))(vi−E(v));(21d)ruv=Cov(u,v)D(u)D(v). Figure 14, Figure 15 and Figure 16 show the correlation analysis of yhe Airplane (F-16), Maddrill and Peppers images before and after R-channel encryption in three directions, respectively. The figures show that the adjacent pixel gray values in the horizontal, vertical, and diagonal directions of the plaintext image exhibit obvious linear correlation, and the encrypted image does not show any obvious strong correlation of the adjacent pixel gray values in all directions. Table 6 demonstrates the correlation coefficients of different images in all directions. Table 6 shows that the correlation coefficients of plaintext images are close to 1 in all directions and the correlation coefficients of the encrypted ciphertext images are lower than 0.002 in all directions, which indicates that the proposed encryption method achieved very good encryption performance. 6.6. Key Sensitivity Analysis A small change in the key leads to a great difference in the ciphertext, which shows the sensitivity of the key. Take the color image of the Mandrill as an example: the key obtained by SHA-256, key0, and key1=key0+[0.000000000000001,0,0,0,0,0]. For encryption with key0 and decryption with key0 and key1, respectively, the comparison diagram is shown in Figure 17. The figure shows that there is only a small change between key0 and key1, but the encrypted picture can only be decrypted correctly using key0 and cannot be decrypted correctly using key1. The difference between two maps can also be measured in terms of the pixel change rate (NPCR) and normalized average change intensity (UACI). The equations for NPCR and UACI are (22b) and (23), respectively:(22a)D(i,j)=0,C1(i,j)≠C2(i,j),1,C1(i,j)=C2(i,j);(22b)NPCR=1M×N∑i,jM,ND(i,j)×100%;(23)UACI=∑i,jM,N|C1(i,j)−C2(i,j)|M×N×255×100%. where M and N are the sizes of the images, and C1(i,j) and C2(i,j) are the pixel values of the two images at the position of (i,j), respectively. The greater the value of the NPCR and UACI, the larger the difference between the two images. The theoretical values of NPCR and UACI are 99.6094% and 33.4635%, respectively; that is, the closer to the ideal value, the greater the difference between the two images. In this study, we encrypted the classic test image, 512×512×3 pixels, color Mandrill, using key0 and key1 to obtain the NPCR and UACI values of the two cipher images, respectively. We made minor modifications to the six initial values, with a modification value of 0.000000000000001. The test results are shown in Table 7. Table 7 shows that the values of NPCR and UACI for different test images are close to the ideal values; hence, the proposed key system has good key sensitivity. 6.7. Differential Attack Analysis In a differential attack, the value attacker compares the difference between the encrypted ciphertext of the original image and the encrypted ciphertext of the changed image by slightly changing the plaintext, and then determines the relationship between the corresponding plaintext and ciphertext images. NPCR and UACI metrics can also be used to test the ability of image encryption schemes against differential attacks. We conducted differential attack analysis on the Airplane (F-16), Mandrill, and Peppers images by modifying one pixel, one row, one column, an 8×8 block, flipping the highest bit of one pixel, flipping the middle bit of one pixel, flipping the lowest bit of one pixel, and swapping the R and B channels. The test results are shown in Table 8. Table 8 shows that the NPCR of the encrypted images are all close to 99.5597% and the UACI are close to 33.4079%. Table 9 is its comparison table. 6.8. Anti-Noise Attack In the process of encrypted image transmission, the image can be damaged by noise interference. Additionally, the attacker can use the noise attack to destroy the integrity of the encrypted image and prevent the receiver from decrypting it successfully. Taking the plaintext image Peppers as an example, we simulated a noise attack on its ciphertext image with different degrees and obtained a slightly different decrypted image after decryption. The test results are shown in Figure 18. After the ciphertext image is added with the salt-and-pepper noise with the noise strength of 0.01, 0.03 and 0.06, the decrypted images are shown in Figure 18 from the left to the right, in order. PSNR, SSIM and bit-error rate analysis are shown in Table 10 and Figure 19. 6.9. Anti-Clipping Attack In the process of ciphertext image transmission, part of the image information may be cropped by the attacker, thereby resulting in information integrity being affected or even a scenario in which the receiver cannot quickly decrypt the correct image information. A secure encryption algorithm can resist the cropping attack effectively. The test results for the ciphertext image of the plaintext image Peppers under a data cropping attack are shown in Figure 20. The results clearly show that the proposed algorithm decrypted the plaintext image successfully after different degrees of cropping attacks and retained the original text information well, with high security and robustness. Figure 20 shows three different cropping attacks: corner data cropping, 12-data cropping, and center data cropping. PSNR, SSIM and cropped area analysis are shown in Figure 21 and Table 11. 6.10. Computational Complexity and Time Analysis To evaluate the computational efficiency of the algorithm, we conducted single-threaded encryption and decryption experiments on images of three sizes (128×128×3, 256×256×3, and 512×512×3) in the environment of I7 6700HQ CPU, Windows 10, and MATLAB. As shown in Table 12, when the pixel count increased by a factor of 4, the average encryption time rose from 0.1663 s to 0.6583 s (approximately 3.95 times) and from 0.6583 s to 2.5771 s (approximately 3.91 times), whereas the decryption time growth rates were 3.78 and 3.93, respectively, with trends largely consistent with encryption. The time growth rates closely approximate the pixel growth rates, which indicates that the proposed algorithm’s time complexity is O(N) (where N is the total number of pixels), which means that each pixel undergoes only O(1) basic operations. Additionally, the encryption and decryption time consumption and growth trends exhibited high symmetry, which validates the algorithm’s structural symmetry and consistency. To summarize, the proposed algorithm has low time complexity and can meet the processing efficiency requirements in practical applications. 7. Conclusions In this paper, we proposed a new hyperchaotic system and constructed a new image encryption scheme by combining the forward diffusion process of SHA-256 and DDPM. We conducted a theoretical analysis and numerical simulation experiments to characterize the basic dynamics of this chaotic system, including an attractor, Lyapunov exponential spectrum, time series diagram, phase diagram, and Poincare section. The relevant analysis in the study indicates that the system is hyperchaotic. Using SHA-256 to link image information with key acquisition, and combining the sensitivity of chaotic systems to initial values and the unpredictability of chaotic sequences, a hyperchaotic sequence that follows the Gaussian noise distribution during the diffusion stage can be generated, which can increase the randomness of ciphertext images. In the encryption process, to further increase the randomness of the ciphertext image, we combined the DDPM forward diffusion method with the skip mechanism of the Markov chain to diffuse the hyperchaotic sequence following the Gaussian noise distribution into the plaintext image, thereby achieving the goal of changing pixel values. Then, we used the pseudo-random sequence generated by the chaotic system for the XOR encryption operation to further encrypt the image. Finally, we independently scrambled the 24-bit planes using the bit plane scrambling method. The simulation experiment results and security analysis show that this method achieved good encryption performance.