Image encryption method, system, readable storage medium and computer

By performing image conversion, pixel position transformation and two-way diffusion on the plaintext image, an image encryption matrix is ​​constructed, which solves the problems of insufficient efficiency and security of traditional image encryption methods and achieves high-security transmission of images.

CN118264760BActive Publication Date: 2024-09-06JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410683184.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-06
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

Traditional image encryption methods have major drawbacks because of the high redundancy and correlation of image information, which limits encryption efficiency and security, and destroys the original storage method of images.

Method used

By performing image conversion on the plaintext image to form a scrambled image, perform pixel position transformation and two-way diffusion, construct an image encryption matrix, use the diffusion image and encryption matrix to perform image encryption processing, increase the key space, and improve the security of image encryption.

Benefits of technology

It improves the difficulty of deciphering encrypted images, increases information entropy, resists various deciphering attacks, and realizes safe transmission of images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118264760B
    Figure CN118264760B
Patent Text Reader

Abstract

The present invention provides an image encryption method, system, readable storage medium and computer, the method comprising: performing image conversion on a plaintext image to obtain a disordered image; performing pixel position transformation and bidirectional diffusion on the disordered image to obtain a diffused image; preprocessing the diffused image and the image encryption matrix to obtain image partitions and matrix partitions; encoding the image partitions and the matrix partitions, and reorganizing the encoded partitions to obtain an encrypted image. The present invention can improve the difficulty of decrypting the encrypted image by performing image conversion on the plaintext image to form a disordered image; performing pixel position transformation and bidirectional diffusion on the disordered image to achieve secondary processing of the image, further increasing information entropy, thereby resisting various types of decryption attacks and achieving the effect of secure image transmission; constructing an image encryption matrix, using the diffused image and the encryption matrix to perform image encryption processing, which can increase the key space and improve the security of image encryption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an image encryption method, system, readable storage medium and computer. Background Art

[0002] With the rapid development of science and technology and the improvement of people's living standards, more and more media information is widely disseminated on the Internet, allowing people to easily obtain various types of information. How to ensure the safe transmission of image information has become an issue that cannot be ignored at present.

[0003] The traditional image encryption method is to use text encryption technology directly applied to image information, so as to achieve effective protection of image information; however, due to the correlation and high redundancy of image information itself, the transmission of image information by text encryption technology will limit the efficiency and security of image encryption. At the same time, when text encryption technology is used to encrypt image information, it will destroy the original storage method of image information, which makes the image encryption method have great disadvantages. Summary of the invention

[0004] Based on this, the purpose of the present invention is to provide an image encryption method, system, readable storage medium and computer to at least solve the deficiencies in the above-mentioned technology.

[0005] The present invention provides an image encryption method, comprising:

[0006] Obtaining a plaintext image to be processed, and performing image conversion on the plaintext image to obtain a corresponding disordered image;

[0007] The pixel positions of the random image are transformed, and the random image after the pixel position transformation is bidirectionally diffused to obtain a corresponding diffused image, wherein the steps of transforming the pixel positions of the random image, and bidirectionally diffusing the random image after the pixel position transformation to obtain a corresponding diffused image include:

[0008] Transforming the pixel positions of the random image, and obtaining the secret code pixels of the random image after the pixel position transformation;

[0009] Based on the modulo algorithm and the secret code pixel, the disordered image after the pixel position transformation is bidirectionally diffused to obtain a corresponding diffused image:

[0010] ;

[0011] ;

[0012] In the formula, Indicates The disordered image after pixel position transformation, Indicates The diffused image is obtained by bidirectional diffusion of the disordered image after pixel position transformation. Indicates The dark code pixel of the disordered image after the pixel position is transformed;

[0013] An image encryption matrix is ​​constructed, and the diffusion image and the image encryption matrix are preprocessed to obtain image partitions of the diffusion image and matrix partitions of the image encryption matrix, wherein the step of constructing the image encryption matrix includes:

[0014] Defining a first encryption parameter, and performing sequence calculation on the first encryption parameter using a preset image encryption model to obtain a first encryption sequence;

[0015] defining a second encryption parameter, and performing sequence calculation on the second encryption parameter using a preset image encryption model to obtain a second encryption sequence;

[0016] Matrix construction is performed on the first encryption sequence and the second encryption sequence respectively to obtain a corresponding image encryption matrix, wherein the calculation formula of the image encryption matrix is:

[0017] ;

[0018] ;

[0019] ;

[0020] ;

[0021] In the formula, represents the rounding function, represents the matrix transformation function, when hour, , represents the first encryption parameter defined by the one-dimensional chaos algorithm, represents the first encryption coefficient obtained by processing the first encryption parameter by the image encryption model, represents the first encryption sequence, represents the first image encryption matrix, Indicates the size of the plaintext image to be processed;

[0022] when hour, , represents the second encryption parameter defined by the one-dimensional chaos algorithm, represents the second encryption coefficient obtained by processing the second encryption parameter by the image encryption model, represents the second encryption sequence, represents the second image encryption matrix, Indicates the size of the plaintext image to be processed;

[0023] The image partitions and the matrix partitions are coded to correspond to each other, and the coded partitions obtained are reorganized to obtain an encrypted image of the plaintext image to be processed.

[0024] Furthermore, the steps of obtaining a plaintext image to be processed and performing image conversion on the plaintext image to obtain a corresponding disordered image include:

[0025] Dividing the plaintext image to be processed into a number of sub-images of the same size, and iteratively generating an image conversion sequence using a logical mapping algorithm;

[0026] The relative positions of the sub-images are adjusted according to the image conversion sequence to obtain corresponding disordered images.

[0027] The present invention also provides an image encryption system, comprising:

[0028] An image conversion module is used to obtain a plaintext image to be processed and perform image conversion on the plaintext image to obtain a corresponding disordered image;

[0029] An image processing module is used to perform pixel position transformation on the disordered image and to perform bidirectional diffusion on the disordered image after pixel position transformation to obtain a corresponding diffused image, wherein the image processing module includes:

[0030] A position transformation unit, used for performing pixel position transformation on the random image and obtaining the secret code pixels of the random image after the pixel position transformation;

[0031] The image diffusion unit is used to perform bidirectional diffusion on the disordered image after the pixel position transformation based on the modulus algorithm and the secret code pixel to obtain a corresponding diffused image:

[0032] ;

[0033] ;

[0034] In the formula, Indicates The disordered image after pixel position transformation, Indicates The diffused image is obtained by bidirectional diffusion of the disordered image after pixel position transformation. Indicates The dark code pixel of the disordered image after the pixel position is transformed;

[0035] A preprocessing module is used to construct an image encryption matrix and preprocess the diffusion image and the image encryption matrix to obtain image partitions of the diffusion image and matrix partitions of the image encryption matrix, wherein, further, the preprocessing module includes:

[0036] A first sequence calculation unit, used for defining a first encryption parameter, and performing sequence calculation on the first encryption parameter using a preset image encryption model to obtain a first encryption sequence;

[0037] A second sequence calculation unit, used for defining a second encryption parameter, and performing sequence calculation on the second encryption parameter using a preset image encryption model to obtain a second encryption sequence;

[0038] The matrix construction unit is used to perform matrix construction on the first encryption sequence and the second encryption sequence respectively to obtain a corresponding image encryption matrix, wherein the calculation formula of the image encryption matrix is:

[0039] ;

[0040] ;

[0041] ;

[0042] ;

[0043] In the formula, represents the rounding function, represents the matrix transformation function, when hour, , represents the first encryption parameter defined by the one-dimensional chaos algorithm, represents the first encryption coefficient obtained by processing the first encryption parameter by the image encryption model, represents the first encryption sequence, represents the first image encryption matrix, Indicates the size of the plaintext image to be processed;

[0044] when hour, , represents the second encryption parameter defined by the one-dimensional chaos algorithm, represents the second encryption coefficient obtained by processing the second encryption parameter by the image encryption model, represents the second encryption sequence, represents the second image encryption matrix, Indicates the size of the plaintext image to be processed;

[0045] The image encryption module is used to encode the image partitions and the matrix partitions and to reorganize the obtained encoded partitions to obtain an encrypted image of the plaintext image to be processed.

[0046] Furthermore, the image conversion module includes:

[0047] An image division unit, used for dividing the plaintext image to be processed into a number of sub-images of the same size, and iteratively generating an image conversion sequence using a logical mapping algorithm;

[0048] A position adjustment unit is used to adjust the relative position between the sub-images according to the image conversion sequence to obtain corresponding disordered images.

[0049] The present invention also provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned image encryption method is implemented.

[0050] The present invention also provides a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned image encryption method when executing the computer program.

[0051] The image encryption method, system, readable storage medium and computer of the present invention can further improve the difficulty of decrypting the encrypted image by converting the plaintext image into a disordered image; the pixel position transformation and bidirectional diffusion of the disordered image can realize secondary processing of the image, further increase the information entropy, thereby resisting various decryption attacks and achieving the effect of secure image transmission; constructing an image encryption matrix and using the diffused image and the encryption matrix to perform image encryption processing can increase the key space and improve the security of image encryption. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 is a flow chart of an image encryption method in a first embodiment of the present invention;

[0053] Figure 2 for Figure 1 Detailed flow chart of step S101;

[0054] Figure 3 for Figure 1 Detailed flow chart of step S102;

[0055] Figure 4 for Figure 1 Detailed flow chart of step S103;

[0056] Figure 5 is a structural block diagram of an image encryption system in a second embodiment of the present invention;

[0057] Figure 6 FIG. 4 is a structural block diagram of a computer in a third embodiment of the present invention.

[0058] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0059] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0061] Embodiment 1

[0062] See also Figure 1 , which shows an image encryption method in a first embodiment of the present invention, and the method specifically includes steps S101 to S104:

[0063] S101, obtaining a plaintext image to be processed, and performing image conversion on the plaintext image to obtain a corresponding disordered image;

[0064] For further information, see Figure 2 , the step S101 specifically includes steps S1011~S1012:

[0065] S1011, dividing the plaintext image to be processed into a number of sub-images of the same size, and iteratively generating an image conversion sequence using a logical mapping algorithm;

[0066] S1012: Adjust the relative positions of the sub-images according to the image conversion sequence to obtain corresponding out-of-order images.

[0067] In a specific implementation, a plaintext image to be processed uploaded by a user through a communication device is obtained, wherein the communication device includes but is not limited to a mobile phone, a computer, a server and other devices with communication functions, and the obtained plaintext image to be processed is divided into a plurality of sub-images of the same size, wherein the size of each sub-image is , and are equal and are both integer multiples of 8.

[0068] Specifically, control parameters of a preset logic mapping algorithm are defined, and the logic mapping algorithm is iterated according to the control parameters to generate an image conversion sequence, and the image conversion sequence is used to adjust the relative positions between the color component matrices of each sub-image, thereby obtaining a corresponding disordered image.

[0069] S102, performing pixel position transformation on the random image, and performing bidirectional diffusion on the random image after the pixel position transformation, so as to obtain a corresponding diffused image;

[0070] For further information, see Figure 3 , the step S102 specifically includes steps S1021~S1022:

[0071] S1021, performing pixel position transformation on the random image, and obtaining the secret code pixels of the random image after the pixel position transformation;

[0072] S1022, bidirectionally diffuse the disordered image after the pixel position transformation based on a modulus algorithm and the secret code pixel to obtain a corresponding diffused image.

[0073] In the specific implementation, the pixel position of the random image obtained above is transformed by the nonlinear transformation formed by the mod operation to reduce the correlation between the pixels in the random image, and the dark pixel of the random image after the pixel position transformation is obtained, and the dark pixel is defined as , based on the modulus algorithm and the obtained secret code pixels, the disordered image after the pixel position transformation is bidirectionally diffused to obtain the corresponding diffused image:

[0074] ;

[0075] ;

[0076] In the formula, Indicates The disordered image after pixel position transformation, Indicates The diffused image is obtained by bidirectional diffusion of the disordered image after pixel position transformation. Indicates The secret pixels of the random image after the pixel positions are transformed.

[0077] S103, constructing an image encryption matrix, and preprocessing the diffusion image and the image encryption matrix to obtain image partitions of the diffusion image and matrix partitions of the image encryption matrix;

[0078] For further information, see Figure 4, the step S103 specifically includes steps S1031 to S1033:

[0079] S1031, defining a first encryption parameter, and performing sequence calculation on the first encryption parameter using a preset image encryption model to obtain a first encryption sequence;

[0080] S1032, defining a second encryption parameter, and performing sequence calculation on the second encryption parameter using a preset image encryption model to obtain a second encryption sequence;

[0081] S1033: construct matrices for the first encryption sequence and the second encryption sequence respectively to obtain corresponding image encryption matrices.

[0082] In the specific implementation, the first encryption parameter of the image encryption model is defined. The image encryption model is formed by connecting two logical chaos models and a sine chaos model in parallel. A sequence calculation is performed according to the image encryption model and the first encryption parameter to generate a first encryption sequence. At the same time, a second encryption parameter is defined, and a sequence calculation is performed according to the second encryption parameter to obtain a second encryption sequence. The first encryption sequence and the second encryption sequence are respectively constructed as matrices to obtain a corresponding image encryption matrix. The calculation formula of the image encryption matrix is:

[0083] ;

[0084] ;

[0085] ;

[0086] ;

[0087] In the formula, represents the rounding function, represents the matrix transformation function, when hour, , represents the first encryption parameter defined by the one-dimensional chaos algorithm, represents the first encryption coefficient obtained by processing the first encryption parameter by the image encryption model, represents the first encryption sequence, represents the first image encryption matrix, Indicates the size of the plaintext image to be processed;

[0088] when hour, , represents the second encryption parameter defined by the one-dimensional chaos algorithm, represents the second encryption coefficient obtained by processing the second encryption parameter by the image encryption model, represents the second encryption sequence, represents the second image encryption matrix, Indicates the size of the plaintext image to be processed.

[0089] Furthermore, the first image encryption matrix and the diffusion image obtained above are preprocessed to split each diffusion image, thereby obtaining image partitions of the diffusion image and matrix partitions of the image encryption matrix, wherein the diffusion image and the image encryption matrix are divided into the same number of partition blocks.

[0090] S104, encoding the image partitions and the matrix partitions, and reorganizing the obtained encoding partitions to obtain an encrypted image of the plaintext image to be processed.

[0091] In the specific implementation, the coding numbers corresponding to the image partitions and the matrix partitions are DNA-encoded to obtain the corresponding coding partitions, and the obtained coding partitions are subjected to DNA operations. The operated coding partitions and the previous sub-partitions are subjected to DNA operations again, and each coding partition is processed one by one. The processed coding partitions are reorganized to obtain a complete image, and the complete image is XOR-operated with the second image encryption matrix to obtain an encrypted image of the plaintext image.

[0092] In summary, the image encryption method in the above embodiments of the present invention can further improve the difficulty of decrypting the encrypted image by converting the plaintext image into a disordered image; the pixel position transformation and bidirectional diffusion of the disordered image can realize secondary processing of the image, further increase the information entropy, thereby resisting various types of decryption attacks and achieving the effect of secure image transmission; constructing an image encryption matrix and using the diffused image and the encryption matrix to perform image encryption processing can increase the key space and improve the security of image encryption.

[0093] Embodiment 2

[0094] Another aspect of the present invention is to provide an image encryption system. Figure 5 , shown is an image encryption system in a second embodiment of the present invention, the system comprising:

[0095] The image conversion module 11 is used to obtain a plaintext image to be processed and perform image conversion on the plaintext image to obtain a corresponding disordered image;

[0096] Furthermore, the image conversion module 11 includes:

[0097] An image division unit, used for dividing the plaintext image to be processed into a number of sub-images of the same size, and iteratively generating an image conversion sequence using a logical mapping algorithm;

[0098] A position adjustment unit is used to adjust the relative position between the sub-images according to the image conversion sequence to obtain corresponding disordered images.

[0099] An image processing module 12, used for performing pixel position transformation on the disordered image, and performing bidirectional diffusion on the disordered image after pixel position transformation, so as to obtain a corresponding diffused image;

[0100] Furthermore, the image processing module 12 includes:

[0101] A position transformation unit, used for performing pixel position transformation on the random image and obtaining the secret code pixels of the random image after the pixel position transformation;

[0102] The image diffusion unit is used to perform bidirectional diffusion on the disordered image after the pixel position transformation based on the modulo algorithm and the secret code pixel to obtain a corresponding diffused image.

[0103] A preprocessing module 13, used for constructing an image encryption matrix, and preprocessing the diffusion image and the image encryption matrix to obtain image partitions of the diffusion image and matrix partitions of the image encryption matrix;

[0104] Furthermore, the preprocessing module 13 includes:

[0105] A first sequence calculation unit, used for defining a first encryption parameter, and performing sequence calculation on the first encryption parameter using a preset image encryption model to obtain a first encryption sequence;

[0106] A second sequence calculation unit, used for defining a second encryption parameter, and performing sequence calculation on the second encryption parameter using a preset image encryption model to obtain a second encryption sequence;

[0107] The matrix construction unit is used to perform matrix construction on the first encryption sequence and the second encryption sequence respectively to obtain corresponding image encryption matrices.

[0108] The image encryption module 14 is used to encode the image partitions and the matrix partitions, and to reorganize the obtained encoded partitions to obtain an encrypted image of the plaintext image to be processed.

[0109] The functions or operation steps implemented when the above modules and units are executed are generally the same as those in the above method embodiments, and will not be repeated here.

[0110] The image encryption system provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0111] Embodiment 3

[0112] The present invention also provides a computer, see Figure 6 , shown is a computer in the third embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, the above-mentioned image encryption method is implemented.

[0113] The memory 10 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10 may be an internal storage unit of a computer, such as a hard disk of the computer. In other embodiments, the memory 10 may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. Further, the memory 10 may also include both an internal storage unit of the computer and an external storage device. The memory 10 may be used not only to store application software and various types of data installed in the computer, but also to temporarily store data that has been output or is to be output.

[0114] Among them, in some embodiments, the processor 20 can be an electronic control unit (Electronic Control Unit, abbreviated as ECU, also known as a vehicle computer), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 10 or process data, such as executing access restriction programs, etc.

[0115] It should be pointed out that Figure 6 The structure shown does not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0116] The embodiment of the present invention further provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the image encryption method as described above is implemented.

[0117] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0118] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0119] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0120] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0121] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An image encryption method, characterized in that: include: Obtaining a plaintext image to be processed, and performing image conversion on the plaintext image to obtain a corresponding disordered image; The pixel positions of the random image are transformed, and the random image after the pixel position transformation is bidirectionally diffused to obtain a corresponding diffused image, wherein the steps of transforming the pixel positions of the random image, and bidirectionally diffusing the random image after the pixel position transformation to obtain a corresponding diffused image include: Transforming the pixel positions of the random image, and obtaining the secret code pixels of the random image after the pixel position transformation; Based on the modulo algorithm and the secret code pixel, the disordered image after the pixel position transformation is bidirectionally diffused to obtain a corresponding diffused image: ; ; In the formula, Indicates The disordered image after pixel position transformation, Indicates The diffused image is obtained by bidirectional diffusion of the disordered image after the pixel position transformation. Indicates The dark code pixel of the disordered image after the pixel position is transformed; An image encryption matrix is ​​constructed, and the diffusion image and the image encryption matrix are preprocessed to obtain image partitions of the diffusion image and matrix partitions of the image encryption matrix, wherein the step of constructing the image encryption matrix includes: Defining a first encryption parameter, and performing sequence calculation on the first encryption parameter using a preset image encryption model to obtain a first encryption sequence; defining a second encryption parameter, and performing sequence calculation on the second encryption parameter using a preset image encryption model to obtain a second encryption sequence; Matrix construction is performed on the first encryption sequence and the second encryption sequence respectively to obtain a corresponding image encryption matrix, wherein the calculation formula of the image encryption matrix is: ; ; ; ; In the formula, represents the rounding function, represents the matrix transformation function, when hour, , represents the first encryption parameter defined by the one-dimensional chaos algorithm, represents the first encryption coefficient obtained by processing the first encryption parameter by the image encryption model, represents the first encryption sequence, represents the first image encryption matrix, Indicates the size of the plaintext image to be processed; when hour, , represents the second encryption parameter defined by the one-dimensional chaos algorithm, represents the second encryption coefficient obtained by processing the second encryption parameter by the image encryption model, represents the second encryption sequence, represents the second image encryption matrix, Indicates the size of the plaintext image to be processed; The image partitions are coded to correspond with the matrix partitions, and the coded partitions are reorganized to obtain an encrypted image of the plaintext image to be processed, wherein the steps of coding the image partitions to correspond with the matrix partitions, and reorganizing the coded partitions to obtain an encrypted image of the plaintext image to be processed include: The coding numbers corresponding to the image partition and the matrix partition are DNA-encoded to obtain the corresponding coding partitions respectively, and the coding partitions are subjected to DNA operation, and the coding partitions after the DNA operation are subjected to DNA operation again with the previous sub-partition, and each coding partition is processed one by one, and the processed coding partitions are reorganized to obtain a complete image, and the complete image is XOR-operated with the second image encryption matrix to obtain the encrypted image of the plaintext image.

2. The image encryption method according to claim 1, characterized in that: The steps of obtaining a plaintext image to be processed and performing image conversion on the plaintext image to obtain a corresponding disordered image include: Dividing the plaintext image to be processed into a number of sub-images of the same size, and iteratively generating an image conversion sequence using a logical mapping algorithm; The relative positions of the sub-images are adjusted according to the image conversion sequence to obtain corresponding disordered images.

3. An image encryption system, characterized in that: include: An image conversion module is used to obtain a plaintext image to be processed and perform image conversion on the plaintext image to obtain a corresponding disordered image; An image processing module is used to perform pixel position transformation on the disordered image and to perform bidirectional diffusion on the disordered image after pixel position transformation to obtain a corresponding diffused image, wherein the image processing module includes: A position transformation unit, used for performing pixel position transformation on the random image and obtaining the secret code pixels of the random image after the pixel position transformation; The image diffusion unit is used to perform bidirectional diffusion on the disordered image after the pixel position transformation based on the modulus algorithm and the secret code pixel to obtain a corresponding diffused image: ; ; In the formula, Indicates The disordered image after pixel position transformation, Indicates The diffused image is obtained by bidirectional diffusion of the disordered image after the pixel position transformation. Indicates The dark code pixel of the disordered image after the pixel position is transformed; A preprocessing module is used to construct an image encryption matrix and preprocess the diffusion image and the image encryption matrix to obtain image partitions of the diffusion image and matrix partitions of the image encryption matrix, wherein the preprocessing module includes: A first sequence calculation unit, used for defining a first encryption parameter, and performing sequence calculation on the first encryption parameter using a preset image encryption model to obtain a first encryption sequence; A second sequence calculation unit, used for defining a second encryption parameter, and performing sequence calculation on the second encryption parameter using a preset image encryption model to obtain a second encryption sequence; The matrix construction unit is used to perform matrix construction on the first encryption sequence and the second encryption sequence respectively to obtain a corresponding image encryption matrix, wherein the calculation formula of the image encryption matrix is: ; ; ; ; In the formula, represents the rounding function, represents the matrix transformation function, when hour, , represents the first encryption parameter defined by the one-dimensional chaos algorithm, represents the first encryption coefficient obtained by processing the first encryption parameter by the image encryption model, represents the first encryption sequence, represents the first image encryption matrix, Indicates the size of the plaintext image to be processed; when hour, , represents the second encryption parameter defined by the one-dimensional chaos algorithm, represents the second encryption coefficient obtained by processing the second encryption parameter by the image encryption model, represents the second encryption sequence, represents the second image encryption matrix, Indicates the size of the plaintext image to be processed; An image encryption module is used to encode the image partitions and the matrix partitions, and to reorganize the obtained encoded partitions to obtain an encrypted image of the plaintext image to be processed, wherein the image encryption module is specifically used to: The coding numbers corresponding to the image partition and the matrix partition are DNA-encoded to obtain the corresponding coding partitions respectively, and the coding partitions are subjected to DNA operation, and the coding partitions after the DNA operation are subjected to DNA operation again with the previous sub-partition, and each coding partition is processed one by one, and the processed coding partitions are reorganized to obtain a complete image, and the complete image is XOR-operated with the second image encryption matrix to obtain the encrypted image of the plaintext image.

4. The image encryption system according to claim 3, characterized in that: The image conversion module comprises: An image division unit, used for dividing the plaintext image to be processed into a number of sub-images of the same size, and iteratively generating an image conversion sequence using a logical mapping algorithm; A position adjustment unit is used to adjust the relative position between the sub-images according to the image conversion sequence to obtain corresponding disordered images.

5. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the image encryption method as described in any one of claims 1 to 2 is implemented.

6. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the image encryption method according to any one of claims 1 to 2 is implemented.

Citation Information

Patent Citations

  • Image scrambling method based on solutions to Kirkman's schoolgirl problem

    CN102915520A

  • Chaotic image encryption method with double-direction diffusion mechanism

    CN103281504A

  • Low-density high-coding-capcity lattice two-dimensional code integrated with chaos encryption technology

    CN105095935A

  • Anti-counterfeit identification method for tiny diffusion imprints

    CN108647980A

  • Image encryption method, computer equipment and computer readable storage medium

    CN111461952A