Search

CN-122001990-A - Dynamic spiral and bidirectional diffusion image encryption method based on four-dimensional chaos

CN122001990ACN 122001990 ACN122001990 ACN 122001990ACN-122001990-A

Abstract

The invention discloses a dynamic spiral and bidirectional diffusion image encryption method based on four-dimensional chaos, which relates to the technical field of information security and comprises the steps of generating a high-entropy key stream related to a plaintext image based on SHA-512 hash and a four-dimensional chaos system, dynamically controlling the spiral traversing direction, starting point and step length by utilizing the key stream, carrying out layered spiral scrambling on image pixels to destroy space correlation, and carrying out forward and backward bidirectional diffusion on the scrambled image by using two independent chaos key sequences and combining a nonlinear feedback mechanism to realize confusion and diffusion of global pixel values. The invention overcomes the problems of insufficient randomness, static scrambling residual correlation and weak unidirectional diffusion avalanche effect of the low-dimensional chaotic system through the synergistic effect of the chaotic system, dynamic scrambling and bidirectional diffusion, and remarkably improves the safety, randomness and anti-attack capability of image encryption.

Inventors

  • XIAO KE
  • HU WENHUI
  • LIU WEIWEI
  • ZHENG CHENGCHENG
  • ZHOU XINJIE

Assignees

  • 重庆师范大学

Dates

Publication Date
20260508
Application Date
20251215

Claims (6)

  1. 1. The dynamic spiral and bidirectional diffusion image encryption method based on four-dimensional chaos is characterized by comprising the following steps of: Step S1, inputting an original image, calculating an SHA-512 hash value of the original image, initializing parameters and an initial state of a four-dimensional chaotic system by using the hash value, operating the four-dimensional chaotic system to generate a required chaotic sequence, and carrying out normalization processing on the chaotic sequence to obtain a key stream for replacement and diffusion; Step S2, dividing an original image into a plurality of spiral layers, dynamically determining parameters of each spiral layer by utilizing the key stream generated in the step S1, wherein the parameters comprise a traversing direction, a starting position and a replacement step length; Step S3, converting the scrambled image obtained in the step S2 into a one-dimensional pixel vector, generating two paths of independent key streams by utilizing the step S1, respectively performing forward diffusion and backward diffusion on the one-dimensional vector, wherein the encryption value of each pixel and the encryption result of the key stream and adjacent pixels are subjected to nonlinear operation, and reshaping the one-dimensional vector with the two-way diffusion into a two-dimensional matrix and outputting the two-dimensional matrix as a final encrypted image.
  2. 2. The four-dimensional chaotic based dynamic spiral and bi-directional diffusion image encryption method according to claim 1, wherein the four-dimensional chaotic system in the step S1 is defined by the following differential equation set: ; ; ; ; The meaning of the parameter a, b, c, d in the differential equation set is explained as follows: the parameter a is used for adjusting the chaotic oscillation intensity of the system to ensure that the generated key sequence has higher randomness, thereby improving the unpredictability of the ciphertext to external attack and enhancing the anti-riot cracking capability; the parameter b is used for enhancing the coupling degree among all state variables of the system, so that the chaotic sequence is extremely sensitive to the initial image and hash input, and completely different key streams are generated when the plaintext is changed slightly at will; The parameter c is used for controlling the contraction and divergence speed of the system energy, so that the chaotic system keeps a strong chaotic state for a long time and is not degraded into periodic behavior, and the key sequence is ensured to have long period and high entropy characteristics; And the parameter d is used for strengthening nonlinear feedback in the system to enable the chaotic track to present irreversible disturbance diffusion characteristics, so that the resistance of the key sequence to differential attack, statistical analysis and plaintext attack selection is effectively improved.
  3. 3. The four-dimensional chaotic based dynamic spiral and bi-directional diffusion image encryption method according to claim 1, wherein the dynamic spiral permutation in the step S2 specifically comprises: The number L of spiral layers is determined by the height H and the width W of the image, and the calculation formula is as follows: ; The traversing direction sequence D, the starting point sequence S and the step length sequence T are dynamically determined after specific calculation of the chaotic sequence generated in the step S1; the upward rounding symbol is used for ensuring that the spiral replacement process can cover the innermost pixel area of the image and ensuring encryption reversibility, and by adopting an upward rounding mechanism, the remaining central pixels are ensured to independently form an effective spiral layer, so that the dynamic spiral traversal can completely cover the whole image and avoid the phenomenon of unscrambling pixels; For each spiral layer k, generating a spiral path coordinate sequence of the layer according to the direction D (k), and carrying out circular right shift or left shift operation on pixels on the path according to the starting point S (k) and the step length T (k) to realize scrambling of pixel positions.
  4. 4. The four-dimensional chaotic based dynamic spiral and bi-directional diffusion image encryption method according to claim 1, wherein the enhanced bi-directional nonlinear diffusion in the step S3 is specifically: Let the one-dimensional pixel vector be p= [ p_1, p_2, ], p_n ], the forward key stream be k_1= [ k1_1, k1_2, ], the backward key stream be k_2= [ k2_1, k2_2, ], where p_1, p_2, ], p_n represents the one-dimensional pixel sequence developed after spiral scrambling, where each pi is the gray value of the corresponding pixel, is the input data of the diffusion process, k1_1, k1_2, ], k1_n represents the key sequence for forward diffusion, generated by the four-dimensional chaotic system and the image hash in cooperation, the pixels are encrypted pixel by pixel from P 1 to p_n, k2_1, k2_2, # k2_n represents the key sequence for reverse diffusion, and K1 is not repeated with each other, the pixels are offset in reverse diffusion from p_1 to p_n and the global diffusion force is strengthened in the reverse diffusion direction; Forward diffusion proceeds in order from p_1 to p_n, with the encryption formula: ; The back diffusion is performed in the order from p_n to p_1, and the encryption formula is: ; Each symbol in the diffusion formula has the following meaning: i, current pixel position index participating in diffusion operation; Nonlinear mixing operation, which is used for breaking the original gray rule; FB is a forward diffusion feedback value, and the diffusion result of the last pixel is updated to enable the diffusion to have a cascading avalanche effect; the FBr is a back diffusion feedback value, and the diffusion result of the next pixel is updated to enable the diffusion to have bidirectional propagation capability; C_i is a final ciphertext pixel sequence after finishing the bi-directional diffusion, and each pixel of the final ciphertext pixel sequence depends on p_i, k1_i, k2_i, FB and FBr at the same time, so that global pixel confusion is realized; Through the mechanism, any small change of pixels or keys can be transmitted to the whole image in a single operation, so that the strong avalanche effect and the high differential attack resistance are realized.
  5. 5. The four-dimensional chaos-based dynamic spiral and bidirectional diffusion image encryption method according to claim 1 is characterized in that a key space of the method is composed of an initial state/parameter of a chaos system, an SHA-512 hash value and a dynamic spiral parameter, the total space exceeds 2A 128, and exhaustive attacks including potential quantum computing attacks can be effectively resisted.
  6. 6. An image encryption system for implementing the encryption method according to any one of claims 1 to 5, characterized in that the system comprises: a memory for storing computer executable instructions; a processor configured to execute the instructions to implement the following modules: A chaotic key generating module for performing step S1 of claim 1; a dynamic spiral replacement module for performing step S2 in claim 1; a bi-directional nonlinear diffusion module for performing step S3 in claim 1; And the image input/output interface module is used for receiving the original image and outputting the encrypted image.

Description

Dynamic spiral and bidirectional diffusion image encryption method based on four-dimensional chaos Technical Field The invention belongs to the technical field of image information security and cryptography, in particular to a method for encrypting an image by using a chaotic system, and particularly relates to a high-security image encryption scheme combining dynamic spiral pixel scrambling and bidirectional nonlinear pixel diffusion. Background With the rapid development of 5G, internet of things (IoT) and internet of vehicles (V2X) technologies, digital images are increasingly playing a role as key information carriers in the fields of smart medicine, military reconnaissance, financial payment, smart monitoring and the like. These images often contain a large amount of sensitive information that can have serious consequences once stolen or tampered with during transmission or storage. Conventional encryption algorithms, such as Advanced Encryption Standard (AES) and Data Encryption Standard (DES), have significant drawbacks when applied directly to image data, although they have good security for text data. The image data has the characteristics of large data volume, high redundancy, strong correlation between adjacent pixels and the like, so that the traditional encryption algorithm is low in efficiency, the encrypted image is not ideal in statistical characteristics, and the image is easy to attack by statistical analysis, differential password analysis and the like. The chaotic system is widely applied to image encryption due to the extreme sensitivity, ergodic property and quasi-random property of the chaotic system to initial conditions and control parameters, and the chaotic system is highly matched with the requirements of cryptography. A typical chaotic image encryption system generally comprises three core parts, chaotic sequence generation, pixel position scrambling and pixel value diffusion. However, the existing chaotic image encryption scheme still has a plurality of limitations: (1) Many schemes adopt a low-dimensional chaotic system, the dynamic behavior is relatively simple, the chaotic parameter range is narrow, the chaotic system is easily degraded into a short-period sequence due to the limited precision effect when being realized in a digital domain, and the safety is not enough. (2) During the pixel scrambling phase, a fixed, predefined scan path (e.g., a line scan, a Hilbert curve, or a fixed-direction helical scan) is often employed. Such static scrambling may not completely break the inherent spatial correlation of the image, and an attacker may restore some information by analyzing statistical rules. (3) In the pixel value diffusion phase, many schemes employ linear or unidirectional diffusion mechanisms. This mechanism typically requires multiple iterations to achieve adequate diffusion, is inefficient, and has an insufficient avalanche effect (i.e., the property of small changes in plaintext that result in large changes in ciphertext), and is weak against differential attacks. Therefore, a new image encryption scheme capable of comprehensively solving the above problems is urgently needed, namely, a larger key space, stronger pixel scrambling capability and a more efficient diffusion mechanism are provided while encryption and decryption efficiency is ensured. Disclosure of Invention The invention aims to overcome the defects of the prior art and provide a chaotic image encryption method with high safety and good efficiency based on dynamic spiral displacement and bidirectional nonlinear diffusion. Aiming at the problems of easy degradation, insufficient safety, static solidification in a scrambling mode, low diffusion efficiency, insufficient avalanche effect and the like of a low-dimensional chaotic system in the background technology, the invention provides a high-safety image encryption scheme combining 'four-dimensional chaotic driving dynamic spiral pixel scrambling' and 'bidirectional nonlinear pixel diffusion', which can realize extremely strong statistical safety and differential attack resistance while ensuring the calculation efficiency. The method comprises the steps of constructing a four-dimensional continuous chaotic system with a strong nonlinear coupling relation, generating a key stream with high entropy and high long period in a double-sensitive mode on an initial key and image hash information, avoiding the problem that the low-dimensional chaotic system is easy to degrade in digital implementation, then dynamically controlling a direction sequence, a starting point sequence and a step sequence of spiral traversal by using a chaotic sequence, realizing self-adaptive spiral scrambling of the whole image, and effectively breaking the inherent spatial correlation of the image without depending on any fixed scanning path, and then introducing a bidirectional nonlinear diffusion mechanism driven by forward and reverse key streams together, so that a ciphertext re