Image encryption method and device based on chaotic system, and electronic equipment

By converting image data into one-dimensional arrays and multi-layer encryption using chaotic systems and DNA encoding rules, the problem of insufficient encryption dimensions and key space in the prior art is solved, and image encryption with high security and high robustness is achieved.

CN120475113APending Publication Date: 2025-08-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510827319.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-08-12

Smart Images

  • Figure CN120475113A_ABST
    Figure CN120475113A_ABST
Patent Text Reader

Abstract

The invention discloses an image encryption method and device based on a chaotic system and electronic equipment, and relates to privacy computing or other related fields, and the method comprises the steps: converting a target image into a three-channel grayscale image, and converting the three-channel grayscale image into a one-dimensional array; obtaining a first random key stream generated by the new four-dimensional chaotic system, and performing pixel value diffusion on the one-dimensional array; merging the diffused image arrays, generating a scrambling function based on chaotic tent mapping, and scrambling pixel positions of the merged arrays; obtaining a second random key stream, selecting a DNA coding rule, and coding the scrambling array into a DNA sequence; obtaining a third random key stream and selecting a DNA operation rule to perform encryption operation on the DNA sequence; and decoding the encrypted sequence into a decimal system, and combining channels to obtain a target encrypted image. Through the method and the device, the technical problem that the encryption information is easily attacked and cracked due to the fact that the sensitive data encryption method in the related technology is limited to the encryption dimension and the key space is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of privacy computing technology or other related fields, and specifically to an image encryption method and device, and electronic equipment based on a chaotic system. Background Art

[0002] With the rapid advancement of the internet and mobile communication technologies, the threshold of the information age has been crossed, and the transmission of information between individuals and entities has become unprecedentedly fast. The widespread use of services such as social media and online banking has accelerated this process, enabling people to access global networks anytime, anywhere to share, access, and exchange information. However, this double-edged sword hides significant risks in privacy-preserving computing. In the financial industry in particular, customer image data—including but not limited to digital copies of IDs and financial documents—is a key element in identity verification and transaction confirmation, and its security urgently requires more stringent measures.

[0003] Compared to text, image data has a complex structure. Each pixel represents a color, and images are arranged and combined in a matrix format. This creates a high level of redundancy and large amounts of data. While traditional encryption methods can address some of these challenges, they struggle to effectively process high-dimensional and structured information, and their encryption strength struggles to meet growing security demands.

[0004] In general, the current financial industry is facing security risks when processing sensitive image information in related technologies. In particular, financial institutions are extremely vulnerable to attacks when storing, transmitting and processing sensitive images such as customer identity information, payment credentials, bank card photos, etc., and insufficient protection capabilities make customer personal information extremely easy to be leaked and tampered with.

[0005] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0006] The main purpose of this application is to provide an image encryption method, device, and electronic device based on a chaotic system, so as to at least solve the technical problem in related technologies that the sensitive data encryption method is limited to the encryption dimension and key space, resulting in the encrypted information being easily attacked and cracked.

[0007] To achieve the above-mentioned objectives, according to one aspect of the present application, a method for image encryption based on a chaotic system is provided, the method comprising: converting a target image to be encrypted into R, G, and B three-channel grayscale images and converting them into one-dimensional arrays respectively; obtaining a first random key stream generated by a new four-dimensional chaotic system, and performing pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system refers to a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added; merging the diffused image arrays, and generating a scrambling function based on the chaotic tent mapping to scramble the pixel positions of the merged array to obtain a scrambled image array; obtaining a second random key stream based on the new four-dimensional chaotic system, and encoding the scrambled image array into a DNA sequence based on a DNA encoding rule selected by the second random key stream; obtaining a third random key stream based on the new four-dimensional chaotic system, and performing an encryption operation on the DNA sequence based on a DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; decoding the encrypted DNA sequence into decimal pixel values, and obtaining a target encrypted image after merging channels.

[0008] Furthermore, the step of performing pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array includes: for three one-dimensional arrays corresponding to three channels, matching the random key value in the first random key stream with each one-dimensional array according to the corresponding pixel position; based on the matching result, performing a modular addition operation on the pixel value in the one-dimensional array corresponding to each channel and the random key value corresponding to the channel to obtain an operation result; and when it is determined that all the operation results are within a preset value range, outputting the diffused image array based on all the operation results.

[0009] Furthermore, the step of generating a scrambling function based on the chaotic tent mapping, scrambling the pixel positions of the merged array, and obtaining a scrambled image array includes: determining an iteration range of the chaotic tent mapping based on the total length of the merged array, and iteratively calculating the chaotic tent mapping based on the iteration range to obtain a set of non-repeating position indexes; establishing a complete mapping relationship from each original pixel position to a new pixel position in the target image according to the position indexes to obtain the scrambling function; and substituting the merged array into the scrambling function to perform pixel position calculation to obtain the scrambled image array.

[0010] Furthermore, the step of encoding the scrambled image array into a DNA sequence based on the DNA encoding rule selected by the second random key stream includes: obtaining N pre-defined DNA encoding rules, wherein each of the DNA encoding rules is used to define a mapping relationship between binary values and DNA bases, and N is a positive integer less than or equal to 8; after obtaining the second random key stream, analyzing the current numerical characteristics of the second random key stream, and selecting a currently applicable target encoding rule from the N DNA encoding rules based on the current numerical characteristics; and according to the target encoding rule, converting each pixel value in the scrambled image array into a corresponding DNA base to form the DNA sequence.

[0011] Furthermore, the step of performing an encryption operation on the DNA sequence based on the DNA operation rules selected by the third random key stream to obtain an encrypted DNA sequence includes: obtaining M pre-defined DNA operation rules, wherein the DNA operation rules include at least: addition operation, subtraction operation, XOR operation and XOR operation, and M is a positive integer greater than or equal to 4; after obtaining the third random key stream, analyzing the current numerical characteristics of the third random key stream, and selecting the currently applicable target operation rule from the M DNA operation rules based on the current numerical characteristics; performing bit-by-bit calculation on each base in the DNA sequence according to the target operation rule to obtain the encrypted base corresponding to each base to form the encrypted DNA sequence.

[0012] Furthermore, the chaotic system-based image encryption method also includes a state update process of the new four-dimensional chaotic system, which includes: initializing the state variables and system parameters of the Lorenz four-dimensional chaotic system before the start of image encryption; keeping the initialized system parameters unchanged after the start of image encryption, and iteratively calculating the updated values of each state variable through four sets of mutually coupled nonlinear differential equations to obtain updated state parameters; and determining the updated state parameters as the data source of the random key stream.

[0013] Furthermore, the step of decoding the encrypted DNA sequence into decimal pixel values and merging channels to obtain a target encrypted image includes: decoding each base in the encrypted DNA sequence into a corresponding binary value according to the DNA encoding rule used in the encryption process; converting each of the binary values into a standard decimal pixel value, and reconstructing the converted pixel values according to the three channels of R, G, and B to obtain a two-dimensional pixel matrix; and merging the two-dimensional pixel matrices of the three channels to obtain the target encrypted image.

[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an image encryption device based on a chaotic system is also provided, which includes: a conversion unit, used to convert the target image to be encrypted into an R, G, B three-channel grayscale image and convert them into a one-dimensional array respectively; a diffusion unit, used to obtain a first random key stream generated by a new four-dimensional chaotic system, and perform pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system refers to a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added; a scrambling unit, used to merge the diffused image arrays, and based on the chaotic tent mapping, A mapping generates a scrambling function, scrambles the pixel positions of the merged array, and obtains a scrambled image array; an encoding unit is used to obtain a second random key stream based on the new four-dimensional chaotic system, and encode the scrambled image array into a DNA sequence based on a DNA encoding rule selected by the second random key stream; an encryption unit is used to obtain a third random key stream based on the new four-dimensional chaotic system, and perform an encryption operation on the DNA sequence based on a DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; a merging unit is used to decode the encrypted DNA sequence into a decimal pixel value, and obtain a target encrypted image after merging channels.

[0015] Furthermore, the diffusion unit includes: a matching module, used to match the random key value in the first random key stream with each one-dimensional array according to the corresponding pixel position for the three one-dimensional arrays corresponding to the three channels; a first operation module, used to perform a modular addition operation on the pixel value in the one-dimensional array corresponding to each channel and the random key value corresponding to the channel based on the matching result to obtain an operation result; and an output module, used to output the diffused image array based on all the operation results when it is determined that all the operation results are within a preset value range.

[0016] Furthermore, the scrambling unit includes: a second operation module, used to determine the iteration range of the chaotic tent map based on the total length of the merged array, and iteratively calculate the chaotic tent map based on the iteration range to obtain a set of non-repeating position indexes; an establishment module, used to establish a complete mapping relationship from each original pixel position to the new pixel position in the target image according to the position index to obtain the scrambling function; and a substitution module, used to substitute the merged array into the scrambling function to perform pixel position calculation to obtain the scrambled image array.

[0017] Furthermore, the encoding unit includes: a first acquisition module, used to obtain N pre-defined DNA encoding rules, wherein each of the DNA encoding rules is used to define a mapping relationship between binary values and DNA bases, and N is a positive integer less than or equal to 8; a first selection module, used to analyze the current numerical characteristics of the second random key stream after obtaining the second random key stream, and select the currently applicable target encoding rule from the N DNA encoding rules based on the current numerical characteristics; a conversion module, used to convert each pixel value in the scrambled image array into a corresponding DNA base according to the target encoding rule to form the DNA sequence.

[0018] Furthermore, the encryption unit includes: a second acquisition module, used to obtain M pre-defined DNA operation rules, wherein the DNA operation rules include at least: addition operation, subtraction operation, exclusive-OR operation and exclusive-OR operation, and M is a positive integer greater than or equal to 4; a second selection module, used to analyze the current numerical characteristics of the third random key stream after obtaining the third random key stream, and select the currently applicable target operation rule from the M types of DNA operation rules based on the current numerical characteristics; a first calculation module, used to perform bit-by-bit calculation on each base in the DNA sequence according to the target operation rule to obtain the encrypted base corresponding to each base to form the encrypted DNA sequence.

[0019] Furthermore, the image encryption device based on the chaotic system also includes: an update unit for executing the state update process of the new four-dimensional chaotic system, and the update unit includes: an initialization module for initializing the state variables and system parameters of the Lorenz four-dimensional chaotic system before the start of image encryption; a second calculation module for keeping the initialized system parameters unchanged after the start of image encryption, and iteratively calculating the updated values of each state variable through four sets of mutually coupled nonlinear differential equations to obtain updated state parameters; a determination module for determining the updated state parameters as the data source of the random key stream.

[0020] Furthermore, the merging unit includes: a decoding module, used to decode each base in the encrypted DNA sequence into a corresponding binary value according to the DNA coding rules used in the encryption process; a reconstruction module, used to convert each of the binary values into a standard decimal pixel value, and reconstruct the converted pixel values according to the three channels of R, G, and B to obtain a two-dimensional pixel matrix; a merging module, used to merge the two-dimensional pixel matrices of the three channels to obtain the target encrypted image.

[0021] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned chaotic system-based image encryption methods.

[0022] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned chaotic system-based image encryption methods.

[0023] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer program product is further provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, the steps of any one of the above-mentioned chaotic system-based image encryption methods are implemented.

[0024] The present invention proposes an image encryption method based on a chaotic system. The method comprises the following steps: first, converting a target image to be encrypted into a three-channel grayscale image of R, G, and B and converting each of the three channels into a one-dimensional array; obtaining a first random key stream generated by a new four-dimensional chaotic system, and performing pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system refers to a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added; merging the diffused image arrays, and generating a scrambling function based on the chaotic tent mapping to scramble the pixel positions of the merged array to obtain a scrambled image array; obtaining a second random key stream based on the new four-dimensional chaotic system, and encoding the scrambled image array into a DNA sequence based on a DNA encoding rule selected by the second random key stream; obtaining a third random key stream based on the new four-dimensional chaotic system, and performing an encryption operation on the DNA sequence based on a DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; decoding the encrypted DNA sequence into decimal pixel values, and merging the channels to obtain a target encrypted image.

[0025] In the present invention, an innovative image encryption strategy is adopted, which integrates chaotic systems and bioinformatics. By constructing and utilizing a Lorenz four-dimensional chaotic system with a chaotic tent mapping added thereto, a highly random and unpredictable first random key stream is generated, and a deep diffusion process is performed on the image to be encrypted at the pixel value level, thereby achieving the initial encryption confusion of the image data. The purpose is not only to break the dimensional limitation of traditional encryption technology, but also to significantly expand the key space and improve the encryption strength. Subsequently, a scrambling function is further designed using the chaotic tent mapping to completely scramble the pixel positions of the diffused image array to obtain a scrambled image array, thereby enhancing the untraceability of the image and further strengthening the encryption defense line. After completing the dual encryption of pixel values and positions, the encryption level is further deepened, and the second random key stream is used to encrypt the image. DNA coding rules are selected to encode the image data into DNA sequences. By drawing on the redundancy and stability of DNA in bioinformatics and utilizing the complexity of DNA coding, this serves as another barrier to encryption. Next, the encoded DNA sequence is encrypted using DNA operation rules based on the third random key stream to generate the final encrypted DNA sequence. At this point, the image data has undergone multi-level and multi-dimensional encryption to form a unique data form of encrypted DNA sequence. Finally, the encrypted DNA sequence is decoded back to decimal pixel values, and after channel merging, a new and unbreakable target encrypted image is presented, thereby solving the technical problem that the sensitive data encryption method in related technologies is limited to the encryption dimension and key space, which makes the encrypted information easy to attack and crack.

[0026] The technical effect of this invention lies in that, through the deep integration of high-dimensional chaotic systems and DNA algorithms, it not only significantly improves the security and robustness of image encryption, but also creates a new paradigm in encryption technology, greatly broadens the encryption dimension, enriches the key space, effectively resists various attacks against traditional encryption methods, and ensures the absolute security of bank customer image data during storage and transmission. The establishment of this system not only meets the current urgent demand for higher encryption standards in the field of privacy computing, but also provides strong technical support for the protection of sensitive data. Through this invention, sensitive data encryption methods are able to break through the limitations of dimension and key space, significantly enhancing the ability of encrypted information to resist attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0028] Figure 1 The present invention shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing an image encryption method based on a chaotic system;

[0029] Figure 2 is a flow chart of an optional image encryption method based on a chaotic system according to an embodiment of the present invention;

[0030] Figure 3 is an optional image encryption flow chart according to an embodiment of the present invention;

[0031] Figure 4 is a schematic diagram of an optional image encryption device based on a chaotic system according to an embodiment of the present invention;

[0032] Figure 5 The present invention is a structural block diagram of an electronic device for executing an image encryption method based on a chaotic system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] To facilitate those skilled in the art to understand the present invention, some of the terms or nouns involved in the embodiments of the present invention are explained below:

[0036] A chaotic system is a nonlinear dynamical system whose behavioral state parameters are extremely sensitive to initial values and parameters; even small differences can lead to significant changes in long-term behavior. Typical characteristics of chaotic systems are seemingly random behavior patterns and the impossibility of long-term prediction. The chaotic system mentioned in this invention, particularly the Lorenz system, is one of the most famous examples in chaos theory, known for its butterfly effect in three-dimensional space.

[0037] The chaotic tent map is a simple chaotic dynamics model defined on the interval [0, 1]. It behaves as a ramp-shaped function and can generate chaotic sequences. The tent map is characterized by its combination of simplicity and chaotic behavior, making it suitable for applications in fields such as cryptography and signal processing.

[0038] DNA algorithm, a product of the intersection of bioinformatics and computational science, simulates the encoding and decoding process of DNA and utilizes the complementary pairing rules of DNA for data processing and encryption. Its advantages lie in its huge data storage potential, parallel processing capabilities and highly complex computing mechanism, making it particularly suitable for processing large amounts of data and high-dimensional information.

[0039] It should be noted that the image encryption method based on a chaotic system and the device thereof in this application can be used in the field of privacy computing technology when encrypting image data, and can also be used in any field other than the field of privacy computing technology when encrypting image data. In this application, the application field of the image encryption method based on a chaotic system and the device thereof is not limited.

[0040] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, processing, transmission, provision, disclosure, use and processing of the relevant data comply with the laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and the relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.

[0041] The information collection (for example, user voice, video, and text collection) and analysis operations involved in this application have provided users with corresponding operation entrances when they are executed, allowing users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.

[0042] The following embodiments of the present invention can be applied to various systems, applications, and devices that require encryption and decryption of sensitive banking customer image data, particularly in online banking, mobile payments, and electronic document storage. They enable efficient and secure encryption products based on chaotic systems and DNA algorithms. This invention utilizes the nonlinear dynamics of chaotic systems to generate random keys, performs pixel-level obfuscation and diffusion on image data, then converts the diffused image data into DNA sequences and applies DNA algorithms for encryption, effectively protecting image information from unauthorized access and malicious attacks.

[0043] This invention not only innovates the encryption algorithm but also ensures flexibility and reliability through dynamic monitoring and intelligent adjustment of the keystream. During decryption, the invention also provides a sophisticated reverse engineering process to ensure lossless restoration of encrypted images, providing a convenient image decryption experience for legitimate users and facilitating subsequent image recognition and data analysis.

[0044] The present invention will be described in detail below with reference to various embodiments.

[0045] Example 1

[0046] According to an embodiment of the present invention, an embodiment of an image encryption method based on a chaotic system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0047] The chaotic system-based image encryption method provided in the first embodiment of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure diagram of a computer terminal (or mobile device) for implementing an image encryption method based on a chaotic system is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (illustrated as 102a, 102b, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0048] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0049] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the chaotic system-based image encryption method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned chaotic system-based image encryption method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0050] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0051] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0052] Under the above operating environment, the present invention provides Figure 2The image encryption method based on the chaotic system shown in the figure is implemented by the chaos-DNA encryption system. It combines the chaotic system with the DNA algorithm technology and is used in the encryption scenario of sensitive image data of bank customers. In particular, it solves the problems of low encryption dimension and small key space faced by image data during transmission and storage. By constructing a new four-dimensional chaotic system and applying the chaotic tent mapping method, specifically converting the target image into an RGB three-channel grayscale image, obtaining the first, second, and third random key streams for pixel value diffusion, position scrambling, DNA encoding and encryption operations, the complexity and security of image encryption are improved to prevent sensitive data from being illegally accessed or cracked.

[0053] The embodiment of the present invention aims to create a more powerful image encryption framework, the core of which is the combination of the Lorenz four-dimensional chaotic system enhanced by chaotic tent mapping and the DNA algorithm. First, the image is decomposed and converted into a one-dimensional array form, and then the key stream generated by the chaotic system is diffused to break the correlation between pixels; then, the randomness of the chaotic tent mapping is used to scramble the pixel positions to further increase the uncertainty of the image data; on this basis, the scrambled image array is converted into a DNA sequence through the DNA coding rules, and then the DNA operation rules are used to perform encryption operations to generate an encrypted DNA sequence; finally, the encrypted DNA sequence is decoded into decimal pixel values and reassembled into an encrypted image. The entire encryption process is carefully designed to break the limitations of existing encryption technology, especially for the encryption needs of high-dimensional data and the expansion of the key space to resist advanced attacks, thereby providing a more reliable data security mechanism for the financial industry.

[0054] The embodiment of the present invention is described in detail below with reference to various specific steps.

[0055] Figure 2 is a flow chart of an optional image encryption method based on a chaotic system according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:

[0056] Step S201 : converting the target image to be encrypted into three-channel grayscale images of R, G, and B and converting them into one-dimensional arrays respectively.

[0057] Specifically, target images to be encrypted refer to any image file requiring security protection. These images can originate from a variety of sources, including but not limited to real-time images captured by cameras, photos transmitted over the internet, and customer profile images stored in databases. In the field of financial privacy computing, particularly in banking and financial environments, these images often carry highly sensitive information, such as personal identification, account details, or transaction receipts.

[0058] In an embodiment of the present invention, the target image is first converted into an RGB three-channel grayscale image before entering the encryption process. This involves decomposing the original color image into three independent grayscale images, corresponding to the three color channels of red (Red), green (Green), and blue (Blue). The grayscale image of each channel retains the information of the corresponding color channel in the original image, but eliminates the influence of other colors, thereby simplifying the color representation of the image and making it easier to perform subsequent mathematical operations and encryption processing. This conversion method can effectively separate and analyze the different color components of the image, which helps the encryption algorithm to provide more detailed protection for each color channel separately.

[0059] Furthermore, converting the RGB three-channel grayscale image into a one-dimensional array means "flattening" the original two-dimensional matrix image data into a long sequence. The purpose is to simplify the data structure and facilitate encryption processing using chaotic systems and DNA algorithms. As a linear data structure, a one-dimensional array can arrange each pixel in the image in sequence, with each element representing the grayscale value of a pixel. This method makes complex image data easier to traverse and manipulate, especially when performing iterative calculations in encryption algorithms, significantly improving processing efficiency and algorithm feasibility. In addition, the use of a one-dimensional array also facilitates subsequent key distribution and data obfuscation, ensuring a smooth encryption process and the validity of the encryption results.

[0060] In the encryption method of the embodiment of the present invention, the operation of converting the image into an RGB three-channel grayscale image and further converting it into a one-dimensional array is the basic preparatory step for the entire encryption process. This step provides a well-structured data source for subsequent key generation, data diffusion, and DNA encoding through color decomposition and data linearization, thereby ensuring that the encryption algorithm can run effectively on high-dimensional image data while maintaining the speed and accuracy of the encryption processing. This preprocessing strategy, combined with the encryption mechanism of the chaotic system and the DNA algorithm, together constitutes the basis of the image encryption technology of the present invention, aiming to provide an efficient, secure, and complex encryption scheme to address the increasingly severe data security challenges in the financial field.

[0061] Step S202: Obtain a first random key stream generated by a new four-dimensional chaotic system, and perform pixel value diffusion processing on a one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system refers to a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added.

[0062] It should be noted that the new four-dimensional chaotic system is the core encryption tool in the embodiment of the present invention, which is composed of the classic Lorenz four-dimensional chaotic system combined with the chaotic tent mapping. As one of the cornerstones of chaos theory, the Lorenz system is famous for its complex dynamic behavior in high-dimensional space. It can generate sequences that appear random but are extremely sensitive to initial conditions and system parameters. The embodiment of the present invention can further enhance the randomness of the system and the size of the key space by adding a chaotic tent mapping on the basis of the Lorenz system, thereby improving the encryption strength and security. The chaotic tent mapping is a simple chaotic iterative function with the characteristic of being able to generate uniformly distributed chaotic sequences within the domain of definition, providing a richer and more uniform source of random numbers for key generation in the encryption process.

[0063] In an embodiment of the present invention, the Lorenz system is extended to four dimensions by adding an additional state variable, which not only increases the dimension of the system but also expands the key space, making the generated random number stream more complex and more difficult to predict or copy, thereby significantly improving the security of the encryption algorithm.

[0064] Specifically, the first random key stream is generated through system iteration within the new four-dimensional chaotic system. It consists of a series of chaotic variables whose values change with each iteration, exhibiting a high degree of randomness and unpredictability. The generation of the key stream is highly sensitive to initial conditions and system parameters. Even slight differences in parameters or initial values can result in a completely different key stream, providing strong security for the encryption process. This ensures that even with the same encryption algorithm, different initial keys will produce completely different encryption results, significantly increasing the difficulty of cracking the encryption.

[0065] Pixel value diffusion is a key encryption step. By using a first random key stream to modify the pixel values in a one-dimensional array, the goal is to break the correlation between image pixels. Even small changes to the encrypted image will result in significant changes in the global pixel values, improving the robustness of image encryption and its resistance to replay attacks. During the diffusion process, each pixel value is calculated based on the corresponding value in the key stream, which may be addition, subtraction, XOR, or other operations to achieve the desired obfuscation and encryption effects.

[0066] Furthermore, the chaotic tent map is a chaotic iterative function defined on the interval [0, 1] that generates a uniformly distributed chaotic sequence. The mapped graph resembles the outline of a tent. The characteristic of this mapping is that the output varies dramatically with even small changes in the input. This sensitivity makes the tent map an ideal tool for generating key streams. In an embodiment of the present invention, the chaotic tent map works together with the Lorenz four-dimensional chaotic system to provide more complex and variable chaotic behavior for the encryption process, thereby enhancing the unpredictability and security of image encryption.

[0067] Optionally, in the image encryption method based on a chaotic system provided in an embodiment of the present invention, the step of performing pixel value diffusion processing on a one-dimensional array based on a first random key stream to obtain a diffused image array includes: for three one-dimensional arrays corresponding to three channels, matching the random key value in the first random key stream with each one-dimensional array according to the corresponding pixel position; based on the matching result, performing a modular addition operation on the pixel value in the one-dimensional array corresponding to each channel and the random key value corresponding to the channel to obtain an operation result; and when it is determined that all operation results are within a preset value range, outputting the diffused image array based on all operation results.

[0068] It should be further explained that the decomposition of the first random key stream obtained from the new four-dimensional chaotic system to ensure that the random key value matches each pixel position in the one-dimensional array corresponding to the RGB three channels is based on the length of the key stream and the image array, wherein the length of the random key stream is sufficient to cover the entire image array, ensuring that each pixel is affected by an independent random value. The purpose of the matching is to associate each pixel value with an independent random key value in subsequent operations, thereby introducing a high degree of randomness and unpredictability in the pixel value diffusion process. In the embodiment of the present invention, a key stream preferably includes three random key values as the first random key stream.

[0069] Next, a modular addition operation is performed on the one-dimensional array of each channel (R, G, B). Modular addition is a mathematical operation performed within a limited range that ensures that the encrypted pixel value remains within the legal pixel value range (i.e., the preset numerical range), usually between 0 and 255. The specific operation is to add the pixel value to the random key value at the corresponding position, and then take the modulo 256 (because pixel values are 8 bits in computer image processing, modulo 256 ensures that the result remains 8 bits). This operation process not only improves the randomness of the image pixel values, but also ensures that the encrypted pixel values do not exceed the normal numerical range of image processing through modular operations, ensuring the storability and transmittability of the encrypted image.

[0070] After completing the modular addition operation on all pixels, the results are checked to see if they are within the preset numerical range. If all the results are within the legal pixel value range of 0 to 255, the diffused image array is output based on these results. The diffused image array now contains more random pixel values, significantly reducing the correlation between pixel values. Even visually, the similarity between the encrypted and unencrypted images is greatly reduced, improving the image's security and anti-attack capabilities.

[0071] The diffusion processing step in the embodiment of the present invention not only increases the security of image encryption but also takes into account the robustness and compatibility of the image, providing comprehensive protection for the sensitive image data of bank customers. It not only realizes the secure storage and transmission of encrypted images at the technical level, but also provides additional protection to prevent image information from being illegally accessed and cracked.

[0072] Step S203 , merging the diffused image arrays, generating a scrambling function based on the chaotic tent mapping, scrambling the pixel positions of the merged array, and obtaining a scrambled image array.

[0073] The image data set obtained after the pixel value diffusion processing in step S202 is the diffused image array. This processing process encrypts and diffuses all pixel values of each dimensional array, namely the R, G, and B grayscale channels, greatly enhancing the image's ability to resist statistical analysis. Because the diffused image array exhibits a uniform distribution on the histogram, it is difficult for attackers to infer the content of the original image through traditional statistical means.

[0074] It should be noted that the scrambling function is an algorithm for changing the positions of pixels in an image array, generated based on the chaotic tent mapping. The chaotic tent mapping is a chaotic iterative function that generates a uniformly distributed chaotic sequence based on given parameters and initial values. In the context of image encryption, the scrambling function maps the position of each pixel to another random position. This mapping follows the characteristics of the chaotic tent mapping, namely, it is extremely sensitive to parameters and initial values. Therefore, the generated scrambling function is highly random and unpredictable. The scrambling process ensures that even if the pixel values of the encrypted image are cracked, the attacker cannot easily recover the true pixel positions, thereby further enhancing the security of the image.

[0075] In step S203, the diffused RGB channel image arrays are first merged into an array containing all the image information. Subsequently, the pixel positions of this merged array are randomly permuted using a scrambling function. Pixel position scrambling involves rearranging the pixel positions in the merged array according to a random order generated by a chaotic tent mapping. This does not change the pixel values themselves, but rather their relative positions within the array. The pixel position distribution of the scrambled image array is completely random and unrelated to the pixel position distribution of the original image. This prevents an attacker from reconstructing the complete appearance of the image even if they know some of the pixel values, significantly improving the security of image encryption.

[0076] In the embodiments of the present invention, the generation and application of a scrambling function is a key step in ensuring the security of image encryption. The randomness and sensitivity of the chaotic tent map ensure that each encryption operation produces a unique pixel position map. Even using the same algorithm and key, the encryption results can be completely different due to slight differences in the initial conditions. This scrambling mechanism, combined with pixel value diffusion processing, constitutes a dual-layer defense for the image encryption technology in the embodiments of the present invention. This not only obfuscates pixel values but also disrupts their physical locations, thereby comprehensively improving the complexity and security of the encrypted image. It effectively resists various types of attacks, including statistical and location-based attacks, and provides a solid security guarantee for the transmission and storage of sensitive image data in the financial sector.

[0077] Optionally, in the image encryption method based on a chaotic system provided in an embodiment of the present invention, a scrambling function is generated based on a chaotic tent mapping, and the pixel positions of the merged array are scrambled to obtain a scrambled image array, including: determining an iteration range of the chaotic tent mapping based on the total length of the merged array, and iteratively calculating the chaotic tent mapping based on the iteration range to obtain a set of non-repeating position indexes; establishing a complete mapping relationship from each original pixel position to the new pixel position in the target image according to the position index to obtain a scrambling function; substituting the merged array into the scrambling function to perform pixel position calculation to obtain the scrambled image array.

[0078] It's important to note that the range of chaotic tent mapping iterations is determined by the total length of the combined image array (i.e., the total number of pixels in the image). The chaotic tent mapping is a nonlinear iterative function whose results exhibit chaotic properties, namely, extreme sensitivity to initial values and parameters, making the generated sequence unpredictable and complex. The iteration range, or the number of chaotic tent mapping iterations, should be equal to the total number of pixels in the image to ensure that the generated position index covers every pixel.

[0079] Next, the chaotic tent map is iterated over the iteration range to generate a set of unique position indices that guide the pixel position scrambling. By controlling the parameters and initial values of the chaotic tent map, the indices generated in each iteration correspond to the pixel positions in the merged array, ensuring that each pixel position has a unique and random new position throughout the iteration.

[0080] Once the unique position indices are generated, a mapping relationship between the original pixel positions and the new pixel positions can be established based on these indices, forming a scrambling function. The scrambling function is a mapping table that records the corresponding position of each pixel position in the merged array after the pixel positions are scrambled. The randomness and non-repetitiveness of the chaotic tent mapping ensure that the pixel position scrambling process is unpredictable.

[0081] The combined image array is then fed into a scrambling function to calculate pixel positions. Each pixel is moved to a new position based on the mapping relationship in the scrambling function. The pixel positions of the scrambled image array are completely randomized and no longer directly correlate to the pixel positions of the original image, significantly increasing the complexity of image encryption.

[0082] The pixel position scrambling technology based on chaotic tent mapping in the embodiment of the present invention not only solves the problem of position security in image encryption at the technical level, but also enhances the concealment and anti-attack capabilities of the encrypted image by introducing the characteristics of the chaotic system, providing a solid technical foundation for the protection of sensitive image data.

[0083] Step S204: obtaining a second random key stream based on the new four-dimensional chaotic system, and encoding the scrambled image array into a DNA sequence based on the DNA encoding rule selected by the second random key stream.

[0084] Specifically, the second random key stream is also generated by the new four-dimensional chaotic system in the encryption process, providing key parameters and control signals for the DNA encoding process. Unlike a single or a group of static keys in traditional encryption methods, the chaotic system can produce a continuously changing key sequence with a high degree of randomness and unpredictability, and is extremely sensitive to system parameters and initial conditions. Each item in the second random key stream (in the embodiment of the present invention, a key stream containing three random key values is preferably used as the second random key stream corresponding to the RGB three-channel grayscale image) is used to guide the selection and application of DNA encoding rules, thereby making the encoding process more dynamic and complex, and difficult to reverse engineer and crack. This key stream not only increases the key space of the encryption algorithm, but also ensures that the DNA encoding of each pixel is unique, further enhancing the anti-attack capability of the encrypted image.

[0085] It's also worth noting that DNA encoding is a data conversion technology that draws on the structure and properties of biological DNA, converting digital information into a DNA base sequence (A, T, C, G). In image encryption, it's used to convert grayscale values into a DNA-like sequence. Different encoding rules are applied to different pixels, guided by a second random key stream.

[0086] DNA encoding was introduced because it provides an additional layer of encryption, increasing data complexity while also leveraging DNA's inherent complementary pairing and computational rules to enhance the concealment and obfuscation of the encryption process. Table 1 below shows eight DNA encoding rules. The first rule, for example, includes 00→A, 01→C, 10→G, 11→T, and their complementary rules, which serve as the encoding rules for converting pixel values to DNA sequences.

[0087] Table 1 DNA encoding and decoding rules

[0088]

[0089] Furthermore, the DNA sequence is the final encrypted form generated in step S204. It is a string of DNA bases (A, T, C, G) that represents the data encoded in DNA form after the scrambled image array. The generation of the DNA sequence is a multi-step process: first, the pixel values are scrambled through the guidance of a second random key stream; then, according to the DNA encoding rules indicated by the key stream, the pixel values are converted to the corresponding DNA bases. This makes the DNA sequence difficult to crack by traditional cryptanalysis methods. At the same time, because the length and complexity increase linearly with the image size and color depth, even large, high-resolution images can be effectively encrypted through this process.

[0090] Through step S204, the second random key stream can not only determine the specific application of the DNA coding rules, but also guide the construction process of the DNA sequence, thereby forming a highly personalized and unpredictable encryption result. It not only utilizes the nonlinear dynamic characteristics of the chaotic system, but also fully taps the potential of DNA coding, bringing unprecedented complexity and security to image encryption.

[0091] Optionally, in the image encryption method based on a chaotic system provided in an embodiment of the present invention, the step of encoding the scrambled image array into a DNA sequence based on the DNA coding rule selected by the second random key stream includes: obtaining N pre-defined DNA coding rules, wherein each DNA coding rule is used to define a mapping relationship between binary values and DNA bases, and N is a positive integer less than or equal to 8; after obtaining the second random key stream, analyzing the current numerical characteristics of the second random key stream, and selecting a currently applicable target coding rule from the N DNA coding rules based on the current numerical characteristics; according to the target coding rule, converting each pixel value in the scrambled image array into a corresponding DNA base to form a DNA sequence.

[0092] It should be further explained that the predefined DNA encoding rules define the mapping relationship between binary values and DNA bases (A, T, C, G). For example, the rules may be 00 maps to A, 01 maps to C, 10 maps to G, 11 maps to T, and their complementary rules (for example, 00 maps to T, 01 maps to G, 10 maps to C, and 11 maps to A). The purpose of the predefined rules is to enable the dynamic selection of a rule for conversion according to the instructions of the key stream during the subsequent DNA encoding process, thereby increasing the randomness and complexity of the encryption.

[0093] After obtaining the second random key stream, the algorithm analyzes its current numerical characteristics, which can include numerical values, combinations of numerical values, or statistical properties of numerical values. Based on this analysis, the algorithm selects the currently applicable target encoding rule from a variety of predefined DNA encoding rules. This selection process is dynamic, meaning that the DNA encoding rule used for each pixel value conversion may be different, depending on the numerical characteristics of the key stream at the corresponding pixel location. By closely linking the random key stream generated by the chaotic system, the selection of DNA encoding rules increases the key space and randomness of the encryption algorithm, making the encryption process more difficult to predict and crack.

[0094] After selecting the target encoding rule, each pixel value in the scrambled image array is converted to a corresponding DNA base to form a DNA sequence. This involves first converting each pixel value into binary form and then further converting it into DNA bases according to the selected DNA encoding rule. Because the pixel values have lost their original positional association after scrambling, this step further destroys the direct connection between the pixel values and the original image content.

[0095] In the embodiment of the present invention, the encryption step of dynamically selecting DNA coding rules and forming a DNA sequence based on the second random key stream not only effectively solves the security problem of image data encryption from a technical perspective, but also further enhances the concealment and anti-attack capabilities of the encrypted image by introducing the non-traditional data processing method of DNA coding, providing a new and efficient security mechanism for sensitive image data of bank customers.

[0096] Step S205: obtaining a third random key stream based on the new four-dimensional chaotic system, and performing encryption operation on the DNA sequence based on the DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence.

[0097] Specifically, during this encryption phase, a third random key stream controls the selection of algorithms for the DNA sequence, determining which algorithm is applied to each DNA base pair. This further enhances the dynamic and random nature of the encryption process, thereby creating the unique properties of the encrypted DNA sequence. Unlike traditional encryption techniques that use static keys, the key stream generated by the chaotic system changes with each iteration and is used to guide DNA operations, ensuring that the generation of the encrypted DNA sequence is not only complex but also highly unpredictable.

[0098] Alternatively, DNA operations in embodiments of the present invention include addition, subtraction, XOR, and XOR. These operations are performed between DNA base pairs, based on the complementary pairing rules of DNA in biology and binary operations in computer science. Tables 2 through 5 detail these four basic operations in DNA operations.

[0099] Table 2 DNA addition operation rules

[0100]

[0101] Table 3 DNA subtraction operation rules

[0102]

[0103] Table 4 DNA XOR operation rules

[0104]

[0105] Table 5 DNA XOR operation rules

[0106]

[0107] This operation encrypts the base pairs in the DNA sequence with specific values in the keystream, resulting in an encrypted DNA sequence. The choice of DNA operation rules is directly determined by the third random keystream, ensuring that each operation is unique. This increases the complexity of the encrypted DNA sequence, not only increasing the degree of data obfuscation but also leveraging the redundancy and complementarity of DNA encoding, adding another layer of security to the encryption process.

[0108] The encrypted DNA sequence represents the final encrypted form of the original image after diffusion, scrambling, and DNA encoding. It relies on the guidance of a third random key stream and the DNA sequence formed in the previous step. Due to the random selection and application of DNA algorithms, each base pair in the encrypted sequence is generated through a complex nonlinear process, making the sequence itself a highly encrypted data stream.

[0109] The formation of an encrypted DNA sequence not only enhances the encrypted image's resistance to decryption but also makes it resistant to attacks based on statistical analysis. Due to the random combination and calculation of DNA bases, even if an attacker obtains partial DNA sequence information, it is difficult to reverse engineer the original image array or pixel values.

[0110] Optionally, in the image encryption method based on a chaotic system provided in an embodiment of the present invention, an encryption operation is performed on a DNA sequence based on a DNA operation rule selected based on a third random key stream to obtain an encrypted DNA sequence, including: obtaining M predefined DNA operation rules, wherein the DNA operation rules include at least: addition operation, subtraction operation, XOR operation and XOR operation, and M is a positive integer greater than or equal to 4; after obtaining the third random key stream, analyzing the current numerical characteristics of the third random key stream, and selecting the currently applicable target operation rule from the M DNA operation rules based on the current numerical characteristics; performing bit-by-bit calculation on each base in the DNA sequence according to the target operation rule to obtain the encrypted base corresponding to each base to form an encrypted DNA sequence.

[0111] It should be further explained that the preset DNA operation rules include at least addition, subtraction, XOR, and XOR, which are used to define the operation logic between DNA bases (A, T, C, G). Each operation rule provides a method to modify the bases in the DNA sequence. By performing these operations, the original state of the bases in the sequence can be changed, increasing the complexity of the sequence. For example, the addition operation combines two bases based on specific rules, and the result may be a new base, while the XOR operation uses another rule to determine whether two bases are the same, thereby deciding whether to change the resulting base.

[0112] When the third random key stream is obtained, the current numerical characteristics of the key stream are analyzed. These characteristics can include numerical values at specific locations within the key stream, numerical distributions, or statistical properties. Dynamically selecting the currently applicable target DNA algorithm based on the current numerical characteristics of the key stream means that each base in the DNA sequence is processed using a different algorithm as indicated by the key stream, thereby generating an encrypted DNA sequence. Selecting the DNA algorithm using the third random key stream generated by the chaotic system increases the dynamics and randomness of the encryption algorithm, making the encryption process more unpredictable and the encryption results more irreversible.

[0113] After selecting a target DNA algorithm, each base in the DNA sequence is calculated bit by bit. Following the selected DNA algorithm may involve interactions with other key streams or specific values, ensuring that the encryption result of each base is based on the dynamic selection of the chaotic system and random key stream. The resulting encrypted base replaces the bases in the original DNA sequence, forming an encrypted DNA sequence. This sequence significantly alters the order and state of the bases compared to the original DNA sequence, making it difficult to discern the original image information even at the DNA level.

[0114] The step of selecting DNA operation rules based on the third random key stream and generating an encrypted DNA sequence in the embodiment of the present invention not only effectively solves the security problem of image data encryption, but also further enhances the complexity, irreversibility and resistance to statistical attacks of the encrypted image through the combination of dynamic rule selection and DNA operation.

[0115] Step S206: Decode the encrypted DNA sequence into decimal pixel values, and merge the channels to obtain the target encrypted image.

[0116] It's important to note that in the final stage of image encryption, channel merging refers to the process of recombining the previously encrypted RGB grayscale image channels into a complete color image. In the previous steps, the original image was decomposed into three independent grayscale images (R (red), G (green), and B (blue), each undergoing a complex series of processes such as diffusion, scrambling, DNA encoding, and encryption. Once the data from these three channels is converted into encrypted DNA sequences and decoded back into decimal pixel values, the channel merging step is responsible for integrating these independent data streams into a unified image format, namely the RGB color image.

[0117] During the channel merging process, the decimal pixel values of the R, G, and B channels are precisely placed at the designated locations in the image to restore the color association between them. Each pixel will contain the decoded pixel values from the R, G, and B channels, and the image constructed in this way is the encrypted target image. It is worth noting that channel merging is not simply superimposing the three grayscale images together. Instead, it requires maintaining the integrity of the encrypted DNA sequence during the decoding and recombination process, ensuring that the decoded pixel values can correctly reflect the effect of the encryption algorithm while maintaining the color balance and visual perception of the image.

[0118] The target encrypted image is the final product of the entire encryption process, containing all the information after the encrypted DNA sequence is decoded into decimal pixel values and processed through channel merging. This image appears completely different from the original image, even completely unrecognizable, because the encryption algorithm deeply encrypts it through multiple steps, including pixel value diffusion, position scrambling, DNA encoding, and calculations. The encrypted image displays a uniform color distribution on the histogram, indicating that the original correlation between pixel values has been completely broken, significantly reducing the readability and recoverability of the image data.

[0119] The target encrypted image is highly secure and resilient, effectively maintaining its encrypted state even in the face of powerful statistical analysis attacks, preventing unauthorized access and decryption attempts. Furthermore, after converting the encrypted image's pixel values back to decimal, the range and distribution of their values still meet standard image processing requirements, indicating that the encrypted image can be stored and transmitted without arousing suspicion and accurately restored to the original image upon decryption. Through this series of carefully designed encryption steps, sensitive image data is rigorously protected, providing a reliable security barrier for banks and financial institutions when processing customer image information.

[0120] Optionally, in the image encryption method based on a chaotic system provided in an embodiment of the present invention, the step of decoding the encrypted DNA sequence into decimal pixel values and merging channels to obtain the target encrypted image includes: decoding each base in the encrypted DNA sequence into a corresponding binary value according to the DNA coding rules used in the encryption process; converting each binary value into a standard decimal pixel value, and reconstructing the converted pixel values according to the three channels of R, G, and B to obtain a two-dimensional pixel matrix; and merging the two-dimensional pixel matrices of the three channels to obtain the target encrypted image.

[0121] It's important to further clarify that each base in the encrypted DNA sequence is decoded into its corresponding binary value according to the DNA encoding rules used during encryption. Because the encryption phase utilizes dynamic DNA encoding rules (mapping binary values to DNA bases), the decoding process requires reversing this mapping, converting the A, T, C, and G bases in the DNA sequence back to their pre-encrypted binary form. This reverse conversion requires the complete preservation of the keystream and DNA encoding rules to ensure accurate decoding.

[0122] After decoding the DNA bases into binary values, these binary values are further converted to standard decimal pixel values. This is based on conventional binary-to-decimal mathematical conversion, ensuring that each binary value is accurately converted to an 8-bit (or higher, depending on the image format) decimal pixel value, typically ranging from 0 to 255 (or higher, depending on specific requirements). Through this conversion, the DNA sequence information is converted into a numerical format commonly used in image processing, allowing further operations such as image merging.

[0123] Next, the converted pixel values are reconstructed based on the R, G, and B channels. The pixel values of each channel are organized into a two-dimensional pixel matrix, restoring the channel structure of the image before encryption. The reconstruction process requires clear recording and identification of the pixel values of each channel to ensure that they are accurately placed in the corresponding position in the two-dimensional matrix. Finally, the three independent two-dimensional pixel matrices (corresponding to the R, G, and B channels, respectively) are merged to form a complete color image, namely the target encrypted image. The merging operation is based on the principle of color channel synthesis in image processing, fusing the three independent grayscale images into an image containing complete color information.

[0124] The process of decoding a DNA sequence into decimal pixel values and reconstructing and merging channels to form a target encrypted image in the embodiment of the present invention not only ensures the security and reversibility of the encrypted image data, but also improves the efficiency of encryption and decryption through efficient data processing, while enhancing the compatibility and applicability of the encrypted image.

[0125] Optionally, the image encryption method based on a chaotic system provided in an embodiment of the present invention also includes a state update process of a new four-dimensional chaotic system, and the state update process includes: initializing the state variables and system parameters of the Lorenz four-dimensional chaotic system before the start of image encryption; keeping the initialized system parameters unchanged after the start of image encryption, and iteratively calculating the updated values of each state variable through four sets of mutually coupled nonlinear differential equations to obtain updated state parameters; and determining the updated state parameters as the data source of the random key stream.

[0126] It's important to note that before image encryption begins, the Lorenz four-dimensional chaotic system must be initialized. This involves setting the system's initial state variables (typically represented as X, Y, Z, and W) and system parameters (typically a, b, c, d, as well as b1, b2, b3, and b4). This initialization process is the starting point of the encryption algorithm. The choice of initial state variables and parameters directly influences the results of subsequent iterative calculations and, consequently, the characteristics of the resulting random key stream. The initial system parameters remain unchanged during the encryption process, ensuring the continuity and stability of the system's internal dynamics.

[0127] After initialization, the updated values of each state variable are iteratively calculated using four sets of mutually coupled nonlinear differential equations. These nonlinear differential equations describe the dynamic evolution of the system state over time, reflecting the chaotic system's sensitive dependence on initial conditions and parameters. The calculation process involves performing differential operations on the current state variables and updating the state variables based on the results. With each iterative calculation, the values of the state variables undergo nonlinear changes, resulting in a set of highly random and unpredictable state parameters, which provide the data foundation for the subsequent generation of a random key stream.

[0128] The updated state parameters determine the source of the random key stream. This means that after each iteration, the newly generated state parameters are used as part of the key stream to encrypt different pixels in the image. Because the state parameters change with each iteration and are highly random, each key stream generation is independent and unpredictable, thereby increasing the key space and security of image encryption. The key stream generation is closely linked to the chaotic system state update, forming a dynamic key mechanism in the encryption process.

[0129] In the embodiment of the present invention, the dynamic key generation mechanism in the state update process of the new four-dimensional chaotic system not only effectively solves the key management and security problems in traditional encryption methods, but also further enhances the anti-attack capability of the encrypted image, the simplicity of key management and the encryption efficiency by introducing the nonlinear dynamic characteristics of chaos theory.

[0130] Figure 3 is an optional image encryption flow chart according to an embodiment of the present invention, such as Figure 3 As shown in the figure, the image encryption process begins with the input of the original color image. The image is first decomposed into three channels, R, G, and B, and converted into a one-dimensional pixel array. The new four-dimensional chaotic system synchronously generates the first set of random key streams K1, K2, and K3, which are respectively subjected to modular addition diffusion processing with the pixel arrays of the three channels, causing nonlinear changes in the pixel values. After the diffusion is completed, the three-channel arrays are merged into a single array. At this time, the chaotic tent mapping begins to work. Through iterative calculation, a set of non-repeating position indexes are generated, and a pixel scrambling function is constructed to completely disrupt the spatial distribution of the original pixels.

[0131] Entering the DNA encryption phase, the new four-dimensional chaotic system starts up again, generating a second set of key streams, K4, K5, and K6. Based on the key stream, the system dynamically selects the currently applicable conversion rule from the eight preset DNA encoding rules, converting the scrambled pixel values into the corresponding DNA base sequence. The system then generates a third key stream, K7, and dynamically selects the target algorithm from the four DNA operation rules of addition, subtraction, XOR, and XOR. It performs bit-by-bit encryption calculations on the DNA base sequence, continuously verifying that the key quantity fully covers all pixels to ensure encryption integrity.

[0132] The final stage converts the encrypted DNA sequence back into binary values according to the encoding rules, then into standard decimal pixel values. The two-dimensional matrices of the R, G, and B channels are reconstructed and merged to output the fully encrypted target image. This entire process, through the synergy of chaotic systems and DNA algorithms, achieves triple encryption protection: pixel value diffusion, position scrambling, and biomolecular computation.

[0133] Through the above steps S201 to S206, the target image to be encrypted can be first converted into R, G, and B three-channel grayscale images and then converted into one-dimensional arrays respectively; a first random key stream generated by the new four-dimensional chaotic system is obtained, and pixel value diffusion processing is performed on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system refers to a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added; the diffused image arrays are merged, and a scrambling function is generated based on the chaotic tent mapping to scramble the pixel positions of the merged array to obtain a scrambled image array; a second random key stream is obtained based on the new four-dimensional chaotic system, and the scrambled image array is encoded into a DNA sequence based on a DNA encoding rule selected by the second random key stream; a third random key stream is obtained based on the new four-dimensional chaotic system, and an encryption operation is performed on the DNA sequence based on a DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; the encrypted DNA sequence is decoded into decimal pixel values, and the target encrypted image is obtained after merging the channels.

[0134] In the embodiment of the present invention, an innovative image encryption strategy is adopted, which integrates chaotic systems and bioinformatics. By constructing and utilizing a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added, a highly random and unpredictable first random key stream is generated, and a deep diffusion process is performed on the image to be encrypted at the pixel value level, thereby achieving the initial encryption confusion of the image data. The purpose is not only to break the dimensional limitation of traditional encryption technology, but also to significantly expand the key space and improve the encryption strength. Subsequently, a scrambling function is further designed using chaotic tent mapping to completely scramble the pixel positions of the diffused image array to obtain a scrambled image array, thereby enhancing the untraceability of the image and further strengthening the encryption defense line. After completing the dual encryption of pixel values and positions, the encryption level is further deepened, and a second random key is used to encrypt the image. The key stream selects DNA coding rules and encodes the image data into a DNA sequence. By drawing on the redundancy and stability of DNA in bioinformatics and utilizing the complexity of DNA coding, it serves as another barrier to encryption. Then, based on the third random key stream, the DNA operation rules are used to perform encryption operations on the encoded DNA sequence to generate the final encrypted DNA sequence. At this point, the image data has undergone multi-level and multi-dimensional encryption to form a unique data form of encrypted DNA sequence. Finally, the encrypted DNA sequence is decoded back to decimal pixel values, and after channel merging, a new and unbreakable target encrypted image is presented, thereby solving the technical problem that the sensitive data encryption method in related technologies is limited to the encryption dimension and key space, which makes the encrypted information easy to attack and crack.

[0135] The technical effect of the embodiments of the present invention is that, through the deep integration of high-dimensional chaotic systems and DNA algorithms, it not only significantly improves the security and robustness of image encryption, but also creates a new paradigm for encryption technology, greatly broadens the encryption dimension, enriches the key space, effectively resists various attacks against traditional encryption methods, and ensures the absolute security of bank customer image data during storage and transmission. The establishment of this system not only meets the current urgent demand for higher encryption standards in the field of privacy computing, but also provides strong technical support for the protection of sensitive data. Through this invention, sensitive data encryption methods are able to break through the limitations of dimension and key space, significantly enhancing the ability of encrypted information to resist attacks.

[0136] The present invention is described below in conjunction with another optional embodiment.

[0137] Example 2

[0138] An embodiment of the present invention also provides an image encryption device based on a chaotic system. It should be noted that the image encryption device based on a chaotic system in an embodiment of the present invention includes multiple implementation units, which can be used to execute the image encryption method based on a chaotic system provided in the above-mentioned embodiment one, and each implementation unit corresponds to each implementation step in the above-mentioned embodiment one.

[0139] Figure 4 is a schematic diagram of an optional image encryption device based on a chaotic system according to an embodiment of the present invention, such as Figure 4 As shown, the device may include: a conversion unit 41, a diffusion unit 42, a scrambling unit 43, an encoding unit 44, an encryption unit 45, and a merging unit 46.

[0140] The conversion unit 41 is used to convert the target image to be encrypted into an R, G, B three-channel grayscale image and convert them into a one-dimensional array respectively; the diffusion unit 42 is used to obtain a first random key stream generated by the new four-dimensional chaotic system, and perform pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system refers to a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added; the scrambling unit 43 is used to merge the diffused image arrays, and generate a scrambling function based on the chaotic tent mapping to perform pixel value diffusion processing on the merged array. The system is scrambled to obtain a scrambled image array; the encoding unit 44 is used to obtain a second random key stream based on the new four-dimensional chaotic system, and encode the scrambled image array into a DNA sequence based on the DNA encoding rule selected by the second random key stream; the encryption unit 45 is used to obtain a third random key stream based on the new four-dimensional chaotic system, and perform encryption operation on the DNA sequence based on the DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; the merging unit 46 is used to decode the encrypted DNA sequence into decimal pixel values, and obtain the target encrypted image after merging channels.

[0141] The above-mentioned image encryption device based on the chaotic system can first convert the target image to be encrypted into an R, G, B three-channel grayscale image through the conversion unit 41 and convert them into a one-dimensional array respectively, and then obtain the first random key stream generated by the new four-dimensional chaotic system through the diffusion unit 42, and perform pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system refers to the Lorenz four-dimensional chaotic system to which the chaotic tent mapping has been added, and then merge the diffused image arrays through the scrambling unit 43, and generate a scrambling function based on the chaotic tent mapping to perform scrambling on the merged array. The pixel positions of the pixels are scrambled to obtain a scrambled image array, and then the encoding unit 44 obtains a second random key stream based on the new four-dimensional chaotic system, and based on the DNA encoding rule selected by the second random key stream, the scrambled image array is encoded into a DNA sequence. Then, the encryption unit 45 obtains a third random key stream based on the new four-dimensional chaotic system, and based on the DNA operation rule selected by the third random key stream, an encryption operation is performed on the DNA sequence to obtain an encrypted DNA sequence. Finally, the merging unit 46 decodes the encrypted DNA sequence into a decimal pixel value, and the target encrypted image is obtained after merging the channels.

[0142] In the embodiment of the present invention, an innovative image encryption strategy is adopted, which integrates chaotic systems and bioinformatics. By constructing and utilizing a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added, a highly random and unpredictable first random key stream is generated, and a deep diffusion process is performed on the image to be encrypted at the pixel value level, thereby achieving the initial encryption confusion of the image data. The purpose is not only to break the dimensional limitation of traditional encryption technology, but also to significantly expand the key space and improve the encryption strength. Subsequently, a scrambling function is further designed using chaotic tent mapping to completely scramble the pixel positions of the diffused image array to obtain a scrambled image array, thereby enhancing the untraceability of the image and further strengthening the encryption defense line. After completing the dual encryption of pixel values and positions, the encryption level is further deepened, and a second random key is used to scramble the image array. The key stream selects DNA coding rules and encodes the image data into a DNA sequence. By drawing on the redundancy and stability of DNA in bioinformatics and utilizing the complexity of DNA coding, it serves as another barrier to encryption. Then, based on the third random key stream, the DNA operation rules are used to perform encryption operations on the encoded DNA sequence to generate the final encrypted DNA sequence. At this point, the image data has undergone multi-level and multi-dimensional encryption to form a unique data form of encrypted DNA sequence. Finally, the encrypted DNA sequence is decoded back to decimal pixel values, and after channel merging, a new and unbreakable target encrypted image is presented, thereby solving the technical problem that the sensitive data encryption method in related technologies is limited to the encryption dimension and key space, which makes the encrypted information easy to attack and crack.

[0143] The technical effect of the embodiments of the present invention is that, through the deep integration of high-dimensional chaotic systems and DNA algorithms, it not only significantly improves the security and robustness of image encryption, but also creates a new paradigm for encryption technology, greatly broadens the encryption dimension, enriches the key space, effectively resists various attacks against traditional encryption methods, and ensures the absolute security of bank customer image data during storage and transmission. The establishment of this system not only meets the current urgent demand for higher encryption standards in the field of privacy computing, but also provides strong technical support for the protection of sensitive data. Through this invention, sensitive data encryption methods are able to break through the limitations of dimension and key space, significantly enhancing the ability of encrypted information to resist attacks.

[0144] Optionally, the diffusion unit includes: a matching module, used to match the random key value in the first random key stream with each one-dimensional array according to the corresponding pixel position for the three one-dimensional arrays corresponding to the three channels; a first operation module, used to perform a modular addition operation on the pixel value in the one-dimensional array corresponding to each channel and the random key value corresponding to the channel based on the matching result to obtain an operation result; and an output module, used to output the diffused image array based on all operation results when it is determined that all operation results are within a preset value range.

[0145] Optionally, the scrambling unit includes: a second operation module, used to determine the iteration range of the chaotic tent map based on the total length of the merged array, and iteratively calculate the chaotic tent map based on the iteration range to obtain a set of non-repeating position indexes; an establishment module, used to establish a complete mapping relationship from each original pixel position to the new pixel position in the target image according to the position index to obtain a scrambling function; and a substitution module, used to substitute the merged array into the scrambling function to perform pixel position calculation to obtain a scrambled image array.

[0146] Optionally, the encoding unit includes: a first acquisition module, used to obtain N pre-defined DNA encoding rules, wherein each DNA encoding rule is used to define a mapping relationship between binary values and DNA bases, and N is a positive integer less than or equal to 8; a first selection module, used to analyze the current numerical characteristics of the second random key stream after obtaining the second random key stream, and select the currently applicable target encoding rule from the N DNA encoding rules based on the current numerical characteristics; a conversion module, used to convert each pixel value in the scrambled image array into a corresponding DNA base according to the target encoding rule to form a DNA sequence.

[0147] Optionally, the encryption unit includes: a second acquisition module, used to obtain M pre-defined DNA operation rules, wherein the DNA operation rules include at least: addition operation, subtraction operation, exclusive-OR operation and exclusive-OR operation, and M is a positive integer greater than or equal to 4; a second selection module, used to analyze the current numerical characteristics of the third random key stream after obtaining the third random key stream, and select the currently applicable target operation rule from the M DNA operation rules based on the current numerical characteristics; a first calculation module, used to perform bit-by-bit calculation on each base in the DNA sequence according to the target operation rule to obtain the encrypted base corresponding to each base to form an encrypted DNA sequence.

[0148] Optionally, the image encryption device based on the chaotic system also includes: an update unit for executing the state update process of the new four-dimensional chaotic system, and the update unit includes: an initialization module for initializing the state variables and system parameters of the Lorenz four-dimensional chaotic system before the image encryption starts; a second calculation module for keeping the initialized system parameters unchanged after the image encryption starts, and iteratively calculating the updated values of each state variable through four sets of mutually coupled nonlinear differential equations to obtain the updated state parameters; a determination module for determining the updated state parameters as the data source of the random key stream.

[0149] Optionally, the merging unit includes: a decoding module, used to decode each base in the encrypted DNA sequence into a corresponding binary value according to the DNA coding rules used in the encryption process; a reconstruction module, used to convert each binary value into a standard decimal pixel value, and reconstruct the converted pixel values according to the three channels of R, G, and B to obtain a two-dimensional pixel matrix; a merging module, used to merge the two-dimensional pixel matrices of the three channels to obtain a target encrypted image.

[0150] It should be noted that the above-mentioned conversion unit 41, diffusion unit 42, scrambling unit 43, encoding unit 44, encryption unit 45, and merging unit 46 correspond to steps S201 to S204 in the first embodiment. The examples and application scenarios implemented by the above-mentioned units and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned first embodiment. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above-mentioned modules or units can also be part of a device and can be run in the computer terminal 10 provided in the first embodiment.

[0151] The present invention is described below in conjunction with another optional embodiment.

[0152] Example 3

[0153] An embodiment of the present invention may further provide an electronic device, Figure 5 is a structural block diagram of an electronic device that performs an image encryption method based on a chaotic system according to an embodiment of the present invention. Figure 5 As shown, the electronic device may include: one or more ( Figure 5 Only one is shown) processor 502, memory 504, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0154] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the chaotic system-based image encryption method and device in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned chaotic system-based image encryption method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranet, local area network, mobile communication network and combinations thereof.

[0155] The processor can call information and applications stored in the memory through the transmission device to perform the following steps: converting the target image to be encrypted into three-channel grayscale images of R, G, and B and converting them into one-dimensional arrays respectively; obtaining a first random key stream generated by the new four-dimensional chaotic system, and performing pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system is a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added; merging the diffused image arrays, and generating a scrambling function based on the chaotic tent mapping to scramble the pixel positions of the merged array to obtain a scrambled image array; obtaining a second random key stream based on the new four-dimensional chaotic system, and encoding the scrambled image array into a DNA sequence based on a DNA encoding rule selected by the second random key stream; obtaining a third random key stream based on the new four-dimensional chaotic system, and performing encryption operation on the DNA sequence based on a DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; decoding the encrypted DNA sequence into decimal pixel values, and obtaining a target encrypted image after merging channels.

[0156] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: for the three one-dimensional arrays corresponding to the three channels, the random key value in the first random key stream is matched with each one-dimensional array according to the corresponding pixel position; based on the matching result, the pixel value in the one-dimensional array corresponding to each channel is subjected to a modular addition operation with the random key value corresponding to the channel to obtain an operation result; when it is determined that all the operation results are within a preset value range, the diffused image array is output based on all the operation results.

[0157] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: determining the iteration range of the chaotic tent map based on the total length of the merged array, and iteratively calculating the chaotic tent map based on the iteration range to obtain a set of non-repeating position indexes; establishing a complete mapping relationship from each original pixel position to the new pixel position in the target image based on the position index to obtain a scrambling function; substituting the merged array into the scrambling function to perform pixel position calculation to obtain a scrambled image array.

[0158] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: obtain N pre-defined DNA encoding rules, where each DNA encoding rule is used to define the mapping relationship between binary values and DNA bases, and N is a positive integer less than or equal to 8; after obtaining the second random key stream, analyze the current numerical characteristics of the second random key stream, and select the currently applicable target encoding rule from the N DNA encoding rules based on the current numerical characteristics; according to the target encoding rule, convert each pixel value in the scrambled image array into the corresponding DNA base to form a DNA sequence.

[0159] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: obtain M pre-defined DNA operation rules, wherein the DNA operation rules include at least: addition operation, subtraction operation, exclusive-OR operation and exclusive-OR operation, and M is a positive integer greater than or equal to 4; after obtaining the third random key stream, analyze the current numerical characteristics of the third random key stream, and select the currently applicable target operation rule from the M DNA operation rules based on the current numerical characteristics; calculate each base in the DNA sequence bit by bit according to the target operation rule to obtain the encrypted base corresponding to each base, and form an encrypted DNA sequence.

[0160] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: initialize the state variables and system parameters of the Lorenz four-dimensional chaotic system before the image encryption starts; keep the initialized system parameters unchanged after the image encryption starts, and iteratively calculate the updated values of each state variable through four sets of mutually coupled nonlinear differential equations to obtain updated state parameters; determine the updated state parameters as the data source of the random key stream.

[0161] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: decode each base in the encrypted DNA sequence into a corresponding binary value according to the DNA coding rules used in the encryption process; convert each binary value into a standard decimal pixel value, and reconstruct the converted pixel values according to the three channels of R, G, and B to obtain a two-dimensional pixel matrix; merge the two-dimensional pixel matrices of the three channels to obtain the target encrypted image.

[0162] An embodiment of the present invention provides an image encryption scheme based on a chaotic system. An innovative image encryption strategy is adopted, which integrates chaotic systems and bioinformatics. By constructing and utilizing a Lorenz four-dimensional chaotic system with a chaotic tent mapping added thereto, a highly random and unpredictable first random key stream is generated, and a deep diffusion process is performed on the image to be encrypted at the pixel value level, thereby achieving the initial encryption confusion of the image data. The purpose is not only to break the dimensional limitation of traditional encryption technology, but also to significantly expand the key space and improve the encryption strength. Subsequently, a scrambling function is further designed using the chaotic tent mapping to completely scramble the pixel positions of the diffused image array to obtain a scrambled image array, thereby enhancing the untraceability of the image and further strengthening the encryption defense line. After completing the double encryption of pixel values and positions, the encryption level is further deepened, and the second random key stream is selected. DNA coding rules are used to encode image data into DNA sequences, which serve as another encryption barrier by drawing on the redundancy and stability of DNA in bioinformatics and utilizing the complexity of DNA coding. Then, the encoded DNA sequence is encrypted using DNA operation rules based on the third random key stream to generate the final encrypted DNA sequence. At this point, the image data has undergone multi-level and multi-dimensional encryption to form a unique data form of encrypted DNA sequence. Finally, the encrypted DNA sequence is decoded back to decimal pixel values, and after channel merging, a new and unbreakable target encrypted image is presented, thereby solving the technical problem that the sensitive data encryption method in related technologies is limited to the encryption dimension and key space, which makes the encrypted information easy to attack and crack.

[0163] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the electronic device may also be a terminal device such as a smart phone, a tablet computer, a PDA, a mobile Internet device (MID), or a PAD. Figure 5 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 5 Different configurations shown.

[0164] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0165] The present invention is described below in conjunction with another optional embodiment.

[0166] Example 4

[0167] The embodiment of the present invention further provides a computer-readable storage medium. Optionally, in the embodiment of the present invention, the computer-readable storage medium can be used to store the program code executed by the chaotic system-based image encryption method provided in the first embodiment.

[0168] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0169] An embodiment of the present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of an image encryption method based on a chaotic system: converting a target image to be encrypted into three-channel grayscale images of R, G, and B and converting each into a one-dimensional array; obtaining a first random key stream generated by a new four-dimensional chaotic system, and performing pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system is a Lorenz four-dimensional chaotic system to which a chaotic tent mapping has been added; merging the diffused image arrays, and generating a scrambling function based on the chaotic tent mapping to scramble the pixel positions of the merged array to obtain a scrambled image array; obtaining a second random key stream based on the new four-dimensional chaotic system, and encoding the scrambled image array into a DNA sequence based on a DNA encoding rule selected by the second random key stream; obtaining a third random key stream based on the new four-dimensional chaotic system, and performing an encryption operation on the DNA sequence based on a DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; decoding the encrypted DNA sequence into decimal pixel values, and obtaining a target encrypted image after merging the channels.

[0170] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0171] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0172] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0173] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0174] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0176] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An image encryption method based on a chaotic system, characterized in that: include: Convert the target image to be encrypted into a three-channel grayscale image of R, G, and B and convert them into a one-dimensional array respectively; Obtaining a first random key stream generated by a new four-dimensional chaotic system, and performing pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system is a Lorenz four-dimensional chaotic system to which a chaotic tent map has been added; Merging the diffused image arrays, generating a scrambling function based on the chaotic tent mapping, and scrambling pixel positions of the merged array to obtain a scrambled image array; Obtaining a second random key stream based on the new four-dimensional chaotic system, and encoding the scrambled image array into a DNA sequence based on a DNA encoding rule selected by the second random key stream; Obtaining a third random key stream based on the new four-dimensional chaotic system, and performing encryption operation on the DNA sequence based on a DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; The encrypted DNA sequence is decoded into decimal pixel values, and the target encrypted image is obtained after merging the channels.

2. The image encryption method according to claim 1, wherein: The step of performing pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array includes: For the three one-dimensional arrays corresponding to the three channels, matching the random key value in the first random key stream with each one-dimensional array according to the corresponding pixel position; Based on the matching result, performing a modular addition operation on the pixel value in the one-dimensional array corresponding to each channel and the random key value corresponding to the channel to obtain an operation result; When it is determined that all the operation results are within a preset numerical range, a diffused image array is output based on all the operation results.

3. The image encryption method according to claim 1, wherein: The steps of generating a scrambling function based on the chaotic tent mapping, scrambling the pixel positions of the merged array, and obtaining a scrambled image array include: Determining an iteration range of the chaotic tent map based on the total length of the merged array, and performing iterative calculation on the chaotic tent map based on the iteration range to obtain a set of non-repeated position indexes; Establishing a complete mapping relationship from each original pixel position to a new pixel position in the target image according to the position index to obtain the scrambling function; Substitute the merged array into the scrambling function to calculate the pixel position to obtain the scrambled image array.

4. The image encryption method according to claim 1, wherein: The step of encoding the scrambled image array into a DNA sequence based on a DNA encoding rule selected by a second random key stream comprises: Obtaining N predefined DNA encoding rules, wherein each of the DNA encoding rules is used to define a mapping relationship between a binary value and a DNA base, and N is a positive integer less than or equal to 8; After obtaining the second random key stream, analyzing the current numerical characteristics of the second random key stream, and selecting a currently applicable target encoding rule from the N DNA encoding rules based on the current numerical characteristics; According to the target encoding rule, each pixel value in the scrambled image array is converted into a corresponding DNA base to form the DNA sequence.

5. The image encryption method according to claim 1, wherein: The step of performing encryption operation on the DNA sequence based on the DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence includes: Obtaining predefined M DNA operation rules, wherein the DNA operation rules at least include: addition operation, subtraction operation, XOR operation and XOR operation, and M is a positive integer greater than or equal to 4; After obtaining the third random key stream, analyzing the current numerical characteristics of the third random key stream, and selecting a currently applicable target operation rule from the M DNA operation rules based on the current numerical characteristics; Each base in the DNA sequence is calculated bit by bit according to the target operation rule to obtain the encrypted base corresponding to each base, thereby forming the encrypted DNA sequence.

6. The image encryption method according to claim 1, wherein: The image encryption method based on the chaotic system also includes a state update process of the new four-dimensional chaotic system, and the state update process includes: Initializing the state variables and system parameters of the Lorenz four-dimensional chaotic system before image encryption begins; After the image encryption starts, the initialization system parameters are kept unchanged, and the updated values of each state variable are iteratively calculated through four sets of mutually coupled nonlinear differential equations to obtain the updated state parameters; The updated state parameter is determined as the data source of the random key stream.

7. The image encryption method according to claim 1, wherein: The steps of decoding the encrypted DNA sequence into decimal pixel values and merging channels to obtain a target encrypted image include: Decoding each base in the encrypted DNA sequence into a corresponding binary value according to the DNA encoding rules used in the encryption process; Convert each of the binary values into a standard decimal pixel value, and reconstruct the converted pixel values according to the R, G, and B channels to obtain a two-dimensional pixel matrix; The two-dimensional pixel matrices of the three channels are combined to obtain the target encrypted image.

8. An image encryption device based on a chaotic system, characterized in that: include: A conversion unit, used to convert the target image to be encrypted into R, G, B three-channel grayscale images and convert them into one-dimensional arrays respectively; a diffusion unit, configured to obtain a first random key stream generated by a new four-dimensional chaotic system, and perform pixel value diffusion processing on the one-dimensional array based on the first random key stream to obtain a diffused image array, wherein the new four-dimensional chaotic system is a Lorenz four-dimensional chaotic system to which a chaotic tent map has been added; a scrambling unit, configured to merge the diffused image arrays, generate a scrambling function based on the chaotic tent mapping, scramble the pixel positions of the merged array, and obtain a scrambled image array; an encoding unit, configured to obtain a second random key stream based on the new four-dimensional chaotic system, and encode the scrambled image array into a DNA sequence based on a DNA encoding rule selected by the second random key stream; an encryption unit, configured to obtain a third random key stream based on the new four-dimensional chaotic system, and perform an encryption operation on the DNA sequence based on a DNA operation rule selected by the third random key stream to obtain an encrypted DNA sequence; The merging unit is used to decode the encrypted DNA sequence into decimal pixel values and obtain a target encrypted image after merging channels.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the image encryption method based on a chaotic system according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the image encryption method based on a chaotic system as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Encryption processing method and device for potential secret-related image of port and medium

    CN121262327A

  • A method and device for encrypting potential secret images in a port, and a medium

    CN121262327B

  • Multi-dimensional image encryption method and system based on chaotic coding and global diffusion

    CN121619398A

  • Secure storage method and system based on multi-dimensional encryption

    CN121814320A