CN109635580B - Image encryption method and device, electronic equipment and computer storage medium - Google Patents

Image encryption method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN109635580B
CN109635580B CN201811504808.8A CN201811504808A CN109635580B CN 109635580 B CN109635580 B CN 109635580B CN 201811504808 A CN201811504808 A CN 201811504808A CN 109635580 B CN109635580 B CN 109635580B
Authority
CN
China
Prior art keywords
matrix
encryption
image
fractional order
plaintext image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811504808.8A
Other languages
Chinese (zh)
Other versions
CN109635580A (en
Inventor
熊建平
曹星宇
吴建华
马鲁娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Polytechnic
Original Assignee
Shenzhen Polytechnic
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Polytechnic filed Critical Shenzhen Polytechnic
Priority to CN201811504808.8A priority Critical patent/CN109635580B/en
Publication of CN109635580A publication Critical patent/CN109635580A/en
Application granted granted Critical
Publication of CN109635580B publication Critical patent/CN109635580B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/001Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention discloses an image encryption method, an image encryption device, electronic equipment and a computer readable storage medium. The method comprises the following steps: the method comprises the steps of obtaining a generating matrix and a fractional order matrix, wherein the generating matrix and the fractional order matrix are two-dimensional matrixes, and taking the generating matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image and generate a first encryption result of the plaintext image corresponding to the random fractional order discrete cosine transform encryption operation. The security and the efficiency of image encryption are improved.

Description

Image encryption method and device, electronic equipment and computer storage medium
Technical Field
The present invention relates to the field of image processing and information security technologies, and in particular, to an image encryption method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the advent of the internet era, people are increasingly faced with information security issues while enjoying the convenience of mass media and network technologies. The image, as a typical information carrier, may carry private data or commercial secrets and therefore needs to be properly protected during transmission and storage.
Today, numerous image encryption schemes are in force. Common image encryption methods include an image encryption method based on chaotic mapping, an image encryption method based on random fractional order discrete cosine transform and the like. However, there is a certain drawback in safety.
Such as: aiming at the image encryption method based on chaotic mapping, as the single scrambling can not change the statistical characteristics of a plaintext image, the method is easy to be attacked based on a histogram and information entropy analysis; if scrambling and diffusion are combined, the encryption speed is relatively slow and often requires multiple loop iterations. In addition, some chaotic mappings including Arnold mappings have periodic regularity, so that brute force cracking is possible. Aiming at the image encryption method based on random fractional order discrete cosine transform, because the generation sequence and the fractional order sequence are both one-dimensional sequences, the encryption of two-dimensional images has limitation, the chaos of the algorithm is low, and in addition, the method is not enough to resist the attack based on the plain text and the differential attack.
Disclosure of Invention
The embodiment of the invention provides an image encryption method, an image encryption device, electronic equipment and a computer readable storage medium, solves the technical problem that the existing image encryption method is low in safety, and improves the safety and the high efficiency of image encryption.
In a first aspect, an embodiment of the present invention provides an image encryption method, where the method includes:
acquiring a generator matrix and a fractional order matrix, wherein the generator matrix and the fractional order matrix are two-dimensional matrixes;
taking the generated matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image;
and generating a first encryption result of the plaintext image corresponding to the random fractional order discrete cosine transform encryption operation.
In a second aspect, an embodiment of the present invention further provides an image encryption apparatus, where the apparatus includes:
the device comprises a matrix generation module, a fractional order generation module and a fractional order generation module, wherein the matrix generation module is used for acquiring a generation matrix and a fractional order matrix, and the generation matrix and the fractional order matrix are two-dimensional matrixes;
the first encryption module is used for taking the generating matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted so as to carry out random fractional order discrete cosine transform encryption operation on the plaintext image;
and the first encryption result generation module is used for generating a first encryption result of the plaintext image corresponding to the random fractional discrete cosine transform encryption operation.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the image encryption method provided in the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable by the processor, where the processor executes the computer program to implement the image encryption method according to the embodiment of the present invention.
In the embodiment of the invention, a generation matrix and a fractional order matrix are obtained, wherein the generation matrix and the fractional order matrix are two-dimensional matrixes, and the generation matrix and the fractional order matrix are used as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image and generate a first encryption result of the plaintext image corresponding to the random fractional order discrete cosine transform encryption operation. The security and the efficiency of image encryption are improved.
Drawings
Fig. 1 is a schematic flowchart of an image encryption method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an encryption/decryption process provided by an embodiment of the invention;
FIG. 3 is a flow chart of another image encryption method provided by the embodiment of the invention;
FIG. 4 is a flow chart of another image encryption method provided by the embodiment of the invention;
fig. 5 is a schematic diagram of a sample picture of an encryption-decryption process according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an image encryption apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a schematic flowchart of an image encryption method according to an embodiment of the present invention, where the method may be executed by an electronic device according to an embodiment of the present invention, and the electronic device may be implemented in a software and/or hardware manner, and the method specifically includes the following steps:
step 110, obtaining a generator matrix and a fractional order matrix, wherein the generator matrix and the fractional order matrix are both two-dimensional matrices;
the generation method of the generator matrix and the fractional order matrix is as follows:
s1: acquiring a preset key parameter and a disturbance parameter of the plaintext image, wherein the disturbance parameter is calculated by the plaintext image and a preset formula, and the preset key parameter comprises a first preset key parameter and a second preset key parameter;
in this embodiment, the preset key parameter is x0′、y0′、z0', μ', upsilon ', γ'. Further, x is0′、y0', mu' as a first preset key parameter, z0', v ', and gamma ' as second preset key parameters. The method adopts the disturbance parameters related to the plaintext image to enhance the nonlinearity of the encryption system so as to resist the attack and the differential attack based on the plaintext, and the preset formula for calculating the disturbance parameters delta of the plaintext image I is as follows:
Figure BDA0001899170280000041
wherein the content of the first and second substances,
Figure BDA0001899170280000042
to be well knownThe mean value of the text image(s),
Figure BDA0001899170280000043
is a lower integer function.
Furthermore, the invention presets a key parameter x0′、y0′、z0Accuracy of 'mu', upsilon 'and gamma' are all 10-15Thus, the key space is 1090>>2298The key space is large enough to resist brute force. If a key parameter deviates 10-15And decrypting the image under the condition that other key parameters are not changed, wherein the decrypted image does not expose any information of the plaintext image. The key of the invention is thus proven to be sufficiently sensitive.
S2: obtaining a first encryption parameter of the plaintext image according to the first preset key parameter and the disturbance parameter;
in this embodiment, the parameters related to the plaintext image are obtained according to the preset key parameter and the disturbance parameter δ of the plaintext image, and a specific calculation formula is as follows:
Figure BDA0001899170280000051
wherein x is0、y0Mu is a first encryption parameter, z0And upsilon and gamma are second encryption parameters.
S3: and obtaining the generator matrix and the fractional order matrix according to the first encryption parameter and a preset two-dimensional adjustment logistic sine mapping function.
In this embodiment, a two-dimensional adjusted Logistic-adjusted sine map (2D Logistic-adjusted sine map) function is preset as follows:
Figure BDA0001899170280000052
wherein, mu ═ mu' + delta ∈ [0.44,0.93 ∈]To control the parameter, x0=x0′+δ∈(0,1),y0=y0' + δ ∈ (0,1) is an initial value. For theThe generation method of the N × N plaintext image, the generation matrix and the fractional order matrix is as follows:
1. iteration (1) formula K1+N2-1 time, K before discarding1The term is used to increase the chaos degree to obtain the sequence
Figure BDA0001899170280000053
Wherein, K1Used as a key, is a known value in an encryption operation.
2. The first N of the sequence x2The/2 terms are rearranged into a fractional order matrix A of NxN/2, then N2The/2 terms are uniformly mapped to integers 0,1, 2, 3, and rearranged into a generator matrix P of NxN/2.
3. The fractional order matrix B and the generator matrix Q of N/2 XN are derived in a similar manner from the sequence y.
Step 120, taking the generated matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted, so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image;
this step may include two substeps as follows:
s4: generating an intermediate image according to the row elements of the plaintext image and the corresponding row elements of the random fractional order discrete cosine transform kernel matrix;
s5: and carrying out random fractional order discrete cosine transform encryption operation on the plaintext image according to the column elements of the intermediate image and the corresponding column elements of the random fractional order discrete cosine transform kernel matrix.
The corresponding principles of the above S4 and S5 are as follows:
after obtaining the fractional order matrices a and B and generating the matrices P and Q, for the plaintext image I, if G represents an intermediate image, then performing a random fractional order discrete cosine transform encryption operation on the plaintext image may be described as:
Figure BDA0001899170280000061
correspondingly, the inverse operation can be described as:
Figure BDA0001899170280000062
where i denotes the ith row and j denotes the jth column.
It should be noted that, for simplifying the operation, N is an integer multiple of 4 corresponding to the N × N plaintext image I, and the random fractional order discrete cosine transform kernel matrix corresponding to the ith row of the plaintext image I is taken
Figure BDA0001899170280000063
Can be expressed as:
Figure BDA0001899170280000064
random fractional order discrete cosine transform kernel matrix corresponding to j row of plaintext image
Figure BDA0001899170280000065
Can be expressed as:
Figure BDA0001899170280000071
wherein the content of the first and second substances,
Figure BDA0001899170280000072
is a unitary matrix of unThe nth eigenvector of the standard N × N DCT (discrete cosine transform) matrix of class II. A and B are fractional order matrices, P and Q are generation matrices, A and P are of size N/2, B and Q are of size N/2N, and size is described in terms of number of rows x number of columns.
Figure BDA0001899170280000073
Is unThe characteristic angle of the corresponding characteristic root is in the value range of [0, pi]。
And step 130, generating a first encryption result of the plaintext image corresponding to the random fractional discrete cosine transform encryption operation.
Fig. 2 is a flowchart of the encryption/decryption process, in which E denotes a first encryption result.
Correspondingly, in FIG. 2
Figure BDA0001899170280000074
The decryption process is the inverse of the encryption process described above for the images generated in the decryption process.
According to the technical scheme of the embodiment, a generation matrix and a fractional order matrix are obtained, wherein the generation matrix and the fractional order matrix are two-dimensional matrixes, the generation matrix and the fractional order matrix are used as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted, so that random fractional order discrete cosine transform encryption operation is performed on the plaintext image, and a first encryption result of the plaintext image corresponding to the random fractional order discrete cosine transform encryption operation is generated. The security and the efficiency of image encryption are improved.
Fig. 3 is a schematic flow chart of another image encryption method according to an embodiment of the present invention, and referring to fig. 3, the method further includes the following steps:
and 310, scrambling the first encryption result of the plaintext image to generate a second encryption result of the plaintext image.
In this embodiment, the first encryption result E is quantized to obtain E1The corresponding quantization formula is:
Figure BDA0001899170280000081
then, the quantized image E is1And carrying out scrambling processing to obtain a second encryption result of the plaintext image.
It should be noted that the quantization is to limit the range of the first encryption result E to be between 0 and 255, so as to facilitate the subsequent diffusion operation, because in the diffusion operation, the pixel value of the image to be processed is required to be an integer between 0 and 255. The quantization process corresponds to a mapping, such as uniformly mapping values between 0 and 100 to values between 0 and 1, 100 to 1, 99 to 0.99.
Specifically, step 310 includes the following substeps:
s6: obtaining a second encryption parameter of the plaintext image according to the second preset key parameter and the disturbance parameter;
second encryption parameter z0υ, γ have been obtained from step 110 of the above example.
S7: obtaining a life game primary matrix and a random matrix according to the second encryption parameter and a preset chaotic mapping function;
s8: performing iterative operation on the life game primary matrix by adopting a preset life game algorithm to obtain a plurality of life game matrixes;
s9: and traversing the first encryption result of the plurality of life game matrixes respectively by adopting the row-column priority order to obtain a second encryption result of the plaintext image.
The preset chaotic map (1D Chaos map) function is as follows:
Figure BDA0001899170280000082
wherein υ ═ υ' + δ ∈ (0, 10)],γ=γ′+δ∈[8,20]To control the parameter, z0=z0' + delta E (0,1) is an initial value, upsilon ', gamma ' and z0' is used as a key.
The preset life game algorithm is as follows:
Figure BDA0001899170280000091
wherein S is a binary matrix of NxN, St(i, j) represents the state of the element at time (i, j) t. 1 indicates "raw", 0 indicates "dead", and sum is the number of elements whose state is "raw" in the neighborhood of (i, j). The Moore neighborhood and periodic boundary conditions are used in the algorithm to obtain maximum degree of chaos.
Based on the above two formulas (a preset Chaos mapping (1D Chaos map) function and a preset life game algorithm), assuming that the scrambling output is M, the process of scrambling is described as follows:
1. iteration (3) formula K2+2N2-1 time, K before discarding2The term is used to increase the chaos degree to obtain the sequence
Figure BDA0001899170280000092
Wherein, K2Used as a key, is a known value in an encryption operation.
2. For the first N of the sequence z2The terms are binarized by taking 0.5 as a threshold value and rearranged into an NxN life game primary matrix D0(ii) a The last N of the sequence z2The entries are uniformly mapped to integers 0,1, …, 255 and rearranged as an N × N random matrix C.
3. To D0Iterating for h times by the formula (2) to obtain D1,D2,…,Dh
4. Traverse D in row-first order1If D is an element of1When (i, j) is 1, M (i, j) is E (i, j).
5. For m 2, …, h, n 1, …, m-1, D is traversed in row-first ordermAnd DnIf D is an element ofm(i, j) ═ 1, and DnWhen (i, j) is 0, M (i, j) is E (i, j).
6. For m-1, …, h, traverse D in row-first ordermIf D is an element ofmWhen (i, j) is 0, M (i, j) is E (i, j).
7. Let E be M, re-execute the above steps 4, 5, 6 in the order of column priority.
In summary, M is the second encryption result. Correspondingly, the scrambling process also has a decryption process, the principle of the decryption process is the same as the encryption principle of the scrambling process, and the specific process is shown in fig. 2, and fig. 2
Figure BDA0001899170280000093
Figure BDA0001899170280000094
The decryption process is the inverse of the encryption process described above for the images generated in the decryption process.
According to the technical scheme of the embodiment, scrambling processing is further performed on the basis of random fractional order discrete cosine transform encryption operation, the scrambling processing adopts a life game algorithm based on chaotic mapping, the statistical characteristic of a first encryption result is changed, and therefore the security of image encryption is improved.
Fig. 4 is a schematic flowchart of another image encryption method according to an embodiment of the present invention, and referring to fig. 4, the method further includes the following steps:
and step 410, performing diffusion processing on the second encryption result of the plaintext image by using exclusive-or operation to obtain a ciphertext image of the plaintext image.
Specifically, step 410 includes the following 2 sub-steps:
s10, passing the second encryption result and the random matrix through a preset exclusive OR function to obtain diffusion output;
and S11, outputting the diffusion as the ciphertext image.
In this embodiment, the result of scrambling is further diffused by using an exclusive or operation, so that the histogram of the diffused image is approximately uniformly distributed, the information entropy is close to an ideal value, and the result is output as a final ciphertext image. The preset exclusive-or function employed by the diffusion process is as follows:
Figure BDA0001899170280000101
the corresponding inverse operation can be described as:
Figure BDA0001899170280000102
wherein C is the random matrix described above,
Figure BDA0001899170280000103
and R is a diffusion output, namely a final ciphertext image. The diffusion process also has a decryption process, a principle of the decryption process and an encryption of the diffusion processThe principle is the same, and the specific process is shown in figure 2. In addition, referring to fig. 5, the first column is three plaintext images; the second column is a corresponding random fractional order discrete cosine transform encrypted image; the third column is the corresponding scrambled and diffused image; the fourth column is the corresponding decrypted image.
It should be noted that the image encryption method provided by the invention can resist attacks based on adjacent pixel correlation coefficient analysis, can resist differential attacks, can resist certain noise attacks and clipping attacks, and has certain robustness.
According to the technical scheme of the embodiment, on the basis of the second encryption result M obtained through scrambling processing, diffusion processing is further performed, so that the histogram of the diffused image is approximately uniformly distributed, the information entropy is close to an ideal value, therefore, attacks based on information entropy analysis and attacks of histogram analysis can be resisted, and the security of image encryption is further improved.
Fig. 6 is a schematic structural diagram of an image encryption apparatus according to an embodiment of the present invention, which is suitable for executing an image encryption method according to any embodiment of the present invention, and as shown in fig. 6, the apparatus includes: a matrix generation module 610, a first encryption module 620 and a first encryption result generation module 630.
The matrix generating module 610 is configured to obtain a generator matrix and a fractional order matrix, where the generator matrix and the fractional order matrix are both two-dimensional matrices;
the first encryption module 620 is configured to use the generated matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted, so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image;
a first encryption result generating module 630, configured to generate a first encryption result of a plaintext image corresponding to the random fractional discrete cosine transform encryption operation.
On the basis of the above embodiment, the first encryption module 620 includes:
generating an intermediate image according to the row elements of the plaintext image and the corresponding row elements of the random fractional order discrete cosine transform kernel matrix;
and carrying out random fractional order discrete cosine transform encryption operation on the plaintext image according to the column elements of the intermediate image and the corresponding column elements of the random fractional order discrete cosine transform kernel matrix.
On the basis of the above embodiment, the matrix generation module 610 includes:
acquiring a preset key parameter and a disturbance parameter of the plaintext image, wherein the disturbance parameter is calculated by the plaintext image and a preset formula, and the preset key parameter comprises a first preset key parameter and a second preset key parameter;
obtaining a first encryption parameter of the plaintext image according to the first preset key parameter and the disturbance parameter;
and obtaining the generator matrix and the fractional order matrix according to the first encryption parameter and a preset two-dimensional adjustment logistic sine mapping function.
On the basis of the above embodiment, the method further includes:
and the second encryption result generation module is used for scrambling the first encryption result of the plaintext image to generate a second encryption result of the plaintext image.
On the basis of the above embodiment, the second encryption result generation module includes:
obtaining a second encryption parameter of the plaintext image according to the second preset key parameter and the disturbance parameter;
obtaining a life game primary matrix and a random matrix according to the second encryption parameter and a preset chaotic mapping function;
performing iterative operation on the life game primary matrix by adopting a preset life game algorithm to obtain a plurality of life game matrixes;
and traversing the first encryption result of the plurality of life game matrixes respectively by adopting the row-column priority order to obtain a second encryption result of the plaintext image.
On the basis of the above embodiment, the method further includes:
and the third encryption result generation module is used for performing diffusion processing on the second encryption result of the plaintext image by adopting XOR operation to obtain a ciphertext image of the plaintext image.
On the basis of the above embodiment, the third encryption result generation module includes:
the second encryption result and the random matrix pass through a preset exclusive OR function to obtain diffusion output;
and outputting the diffusion as the ciphertext image.
The image encryption device provided in this embodiment obtains a generator matrix and a fractional order matrix, where the generator matrix and the fractional order matrix are both two-dimensional matrices, and the generator matrix and the fractional order matrix are used as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted, so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image, and generate a first encryption result of the plaintext image corresponding to the random fractional order discrete cosine transform encryption operation. The security and the efficiency of image encryption are improved.
Embodiments of the present invention provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements an image encryption method as provided in all embodiments of the present invention: that is, the program when executed by the processor implements: the method comprises the steps of obtaining a generating matrix and a fractional order matrix, wherein the generating matrix and the fractional order matrix are two-dimensional matrixes, and taking the generating matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image and generate a first encryption result of the plaintext image corresponding to the random fractional order discrete cosine transform encryption operation.
Any combination of one or at least two computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or at least two wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or electronic device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device may be integrated with the image encryption apparatus according to the embodiment of the present invention. Referring to fig. 7, an electronic device 700 may include: the image encryption device comprises a memory 710, a processor 720 and a computer program which is stored on the memory 710 and can be run by the processor 720, wherein the processor 720 executes the computer program to realize the image encryption method according to the embodiment of the invention.
The electronic device provided by the embodiment of the invention obtains a generator matrix and a fractional order matrix, wherein the generator matrix and the fractional order matrix are two-dimensional matrices, and the generator matrix and the fractional order matrix are used as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image and generate a first encryption result of the plaintext image corresponding to the random fractional order discrete cosine transform encryption operation. The security and the efficiency of image encryption are improved.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. An image encryption method, comprising:
acquiring a generator matrix and a fractional order matrix, wherein the generator matrix and the fractional order matrix are two-dimensional matrixes;
taking the generated matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted so as to perform random fractional order discrete cosine transform encryption operation on the plaintext image;
generating a first encryption result of a plaintext image corresponding to the random fractional order discrete cosine transform encryption operation;
after the first encryption result of the plaintext image corresponding to the random fractional discrete cosine transform encryption operation is generated, the image encryption method further includes:
scrambling the first encryption result of the plaintext image to generate a second encryption result of the plaintext image, which specifically includes:
obtaining a second encryption parameter of the plaintext image according to a second preset key parameter and the disturbance parameter;
obtaining a life game primary matrix and a random matrix according to the second encryption parameter and a preset chaotic mapping function;
performing iterative operation on the life game primary matrix by adopting a preset life game algorithm to obtain a plurality of life game matrixes;
traversing the first encryption result of the plurality of life game matrixes respectively by adopting a row-column priority order to obtain a second encryption result of the plaintext image;
wherein the disturbance parameter is:
Figure FDA0003116852740000011
wherein the content of the first and second substances,
Figure FDA0003116852740000012
is the mean value of the plaintext image,
Figure FDA0003116852740000013
is a lower integer function;
the preset chaotic mapping parameters are as follows:
Figure FDA0003116852740000021
wherein υ ═ υ' + δ ∈ (0, 10)],γ=γ′+δ∈[8,20]To control the parameter, z0=z0' + delta E (0,1) is an initial value, upsilon ', gamma ' and z0' used as a key;
the life game algorithm is as follows:
Figure FDA0003116852740000022
wherein S is a binary matrix of NxN, St(i, j) represents the state of the element at time (i, j) t, 1 is "living", 0 is "dead", sum is the number of elements whose state is "living" in the neighborhood of (i, j), and the algorithm uses a Moore neighborhood and periodic boundary conditions.
2. The method according to claim 1, wherein the step of taking the generator matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted to perform a random fractional order discrete cosine transform encryption operation on the plaintext image comprises:
generating an intermediate image according to the row elements of the plaintext image and the corresponding row elements of the random fractional order discrete cosine transform kernel matrix;
and carrying out random fractional order discrete cosine transform encryption operation on the plaintext image according to the column elements of the intermediate image and the corresponding column elements of the random fractional order discrete cosine transform kernel matrix.
3. The method of claim 1, wherein obtaining a generator matrix and a fractional order matrix comprises:
acquiring a preset key parameter and a disturbance parameter of the plaintext image, wherein the disturbance parameter is calculated by the plaintext image and a preset formula, and the preset key parameter comprises a first preset key parameter and a second preset key parameter;
obtaining a first encryption parameter of the plaintext image according to the first preset key parameter and the disturbance parameter;
and obtaining the generator matrix and the fractional order matrix according to the first encryption parameter and a preset two-dimensional adjustment logistic sine mapping function.
4. The method of claim 1, wherein after performing a row-first traversal of the plurality of life game matrices to obtain a second encryption result of the plaintext image, the image encryption method further comprises:
and performing diffusion processing on the second encryption result of the plaintext image by adopting XOR operation to obtain a ciphertext image of the plaintext image.
5. The method according to claim 4, wherein performing a diffusion process on the second encryption result of the plaintext image by using an exclusive-or operation to obtain a ciphertext image of the plaintext image comprises:
the second encryption result and the random matrix pass through a preset exclusive OR function to obtain diffusion output;
and outputting the diffusion as the ciphertext image.
6. An image encryption apparatus characterized by comprising:
the device comprises a matrix generation module, a fractional order generation module and a fractional order generation module, wherein the matrix generation module is used for acquiring a generation matrix and a fractional order matrix, and the generation matrix and the fractional order matrix are two-dimensional matrixes;
the first encryption module is used for taking the generating matrix and the fractional order matrix as parameters of a random fractional order discrete cosine transform kernel matrix corresponding to a plaintext image to be encrypted so as to carry out random fractional order discrete cosine transform encryption operation on the plaintext image;
the first encryption result generation module is used for generating a first encryption result of a plaintext image corresponding to the random fractional discrete cosine transform encryption operation;
a second encryption result generation module, configured to perform scrambling processing on the first encryption result of the plaintext image to generate a second encryption result of the plaintext image, and specifically includes:
obtaining a second encryption parameter of the plaintext image according to a second preset key parameter and the disturbance parameter;
obtaining a life game primary matrix and a random matrix according to the second encryption parameter and a preset chaotic mapping function;
performing iterative operation on the life game primary matrix by adopting a preset life game algorithm to obtain a plurality of life game matrixes;
traversing the first encryption result of the plurality of life game matrixes respectively by adopting a row-column priority order to obtain a second encryption result of the plaintext image;
wherein the disturbance parameter is:
Figure FDA0003116852740000041
wherein the content of the first and second substances,
Figure FDA0003116852740000042
is the mean value of the plaintext image,
Figure FDA0003116852740000043
is a lower integer function;
the preset chaotic mapping parameters are as follows:
Figure FDA0003116852740000044
wherein υ ═ υ' + δ ∈ (0, 10)],γ=γ′+δ∈[8,20]To control the parameter, z0=z0' + delta E (0,1) is an initial value, upsilon ', gamma ' and z0' used as a key;
the life game algorithm is as follows:
Figure FDA0003116852740000045
wherein S is a binary matrix of NxN, St(i, j) represents the state of the element at time (i, j) t, 1 is "living", 0 is "dead", sum is the number of elements whose state is "living" in the neighborhood of (i, j), and the algorithm uses a Moore neighborhood and periodic boundary conditions.
7. A computer storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the image encryption method of any one of claims 1-5.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the image encryption method according to any one of claims 1 to 5 when executing the computer program.
CN201811504808.8A 2018-12-10 2018-12-10 Image encryption method and device, electronic equipment and computer storage medium Active CN109635580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811504808.8A CN109635580B (en) 2018-12-10 2018-12-10 Image encryption method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811504808.8A CN109635580B (en) 2018-12-10 2018-12-10 Image encryption method and device, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN109635580A CN109635580A (en) 2019-04-16
CN109635580B true CN109635580B (en) 2021-11-02

Family

ID=66072502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811504808.8A Active CN109635580B (en) 2018-12-10 2018-12-10 Image encryption method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN109635580B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110414250B (en) * 2019-07-29 2021-05-11 广东工业大学 Image encryption method and device based on discrete fractional transformation and chaotic function
CN110535623A (en) * 2019-08-09 2019-12-03 广东浪潮大数据研究有限公司 A kind of image encryption method, device, equipment and readable storage medium storing program for executing
CN111241568B (en) * 2020-02-06 2022-07-29 广州华迅网络科技有限公司 Encryption method, decryption device, computer equipment and storage medium
CN112182610B (en) * 2020-09-25 2023-05-23 深圳职业技术学院 Image encryption method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339976A (en) * 2016-08-16 2017-01-18 广东工业大学 Encryption method
CN106934755A (en) * 2017-03-06 2017-07-07 天津大学 A kind of image encrypting and decrypting method based on m-sequence

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339976A (en) * 2016-08-16 2017-01-18 广东工业大学 Encryption method
CN106934755A (en) * 2017-03-06 2017-07-07 天津大学 A kind of image encrypting and decrypting method based on m-sequence

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Pattern formation in mutation of "Game of Life";黄文高等;《浙江大学学报A(英文版)》;20051027;66-69 *
基于超混沌系统和DCT的图像压缩一加密算法;潘书敏;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180215;I138-1552 *
基于随机分数离散余弦变换的图像加密研究;张梦霞;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180215;第2.4.1及4章 *

Also Published As

Publication number Publication date
CN109635580A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN109635580B (en) Image encryption method and device, electronic equipment and computer storage medium
Dhawan et al. Analysis of various data security techniques of steganography: A survey
Liu et al. Image encryption algorithm based on chaotic system and dynamic S-boxes composed of DNA sequences
CN111105339B (en) Image encryption method based on multidimensional chaotic system and Joseph scrambling
Ahmed et al. A noisy channel tolerant image encryption scheme
US10778423B2 (en) Reusable fuzzy extractor based on the learning-with-error assumption secure against quantum attacks
Kannammal et al. Two level security for medical images using watermarking/encryption algorithms
JP2016012111A (en) Encryption processing method, encryption processing device, and encryption processing program
Kim Data hiding by an improved exploiting modification direction
Boussif et al. Securing DICOM images by a new encryption algorithm using Arnold transform and Vigenère cipher
CN110519037B (en) Image encryption method of hyperchaotic pseudorandom sequence
Koppu et al. A fast enhanced secure image chaotic cryptosystem based on hybrid chaotic magic transform
Xiao et al. Separable data hiding in encrypted image based on compressive sensing
JP6305638B2 (en) Cryptographic system and key generation device
Xiang et al. Cryptanalysis and improvement of a reversible data-hiding scheme in encrypted images by redundant space transfer
Liang et al. Color image encryption combining a reality-preserving fractional DCT with chaotic mapping in HSI space
Fan et al. User‐friendly XOR‐based visual secret sharing by random grid
KR101143192B1 (en) Randomized signal transforms and their applications
Vinoth Kumar et al. Encrypted separable reversible watermarking with authentication and error correction
Alsaedi Colored image encryption and decryption using multi-chaos 2D quadratic strange attractors and matrix transformations
Kumar et al. Image steganography using index based chaotic mapping
KR101608378B1 (en) Asymmetric based image authentication method using photon-counting double random phase encoding
Chang et al. Distortion‐free secret image sharing method with two meaningful shadows
US7505586B2 (en) Method for computer-based encryption and decryption of data
John et al. 6D Hyperchaotic Encryption Model for Ensuring Security to 3D Printed Models and Medical Images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant