Quantum image encryption method and device, computer equipment and computer readable storage medium
The quantum key image is generated through quantum chaos mapping and DNA encryption processing to encrypt the image, which solves the problems of short key length and low security of traditional image encryption schemes, and achieves higher image encryption security and data integrity.
Patent Information
- Application Number
- CN202410852431.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-29
AI Technical Summary
Traditional digital image encryption schemes use short key lengths and are susceptible to attacks such as brute force cracking, resulting in low key security.
Generate the first chaotic sequence and the second chaotic sequence through quantum chaos mapping, perform DNA encryption processing, generate a mixed DNA sequence, and generate a quantum key image based on the mixed DNA sequence, encrypt the quantum image to be encrypted, and utilize the complexity of the quantum key image Degree and randomness improve image encryption security.
The security of image encryption and data integrity are enhanced, the complexity and randomness of image encryption are improved, and the security of image encryption is effectively improved.
Smart Images

Figure CN118869894A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer information security technology, and in particular to a quantum image encryption method, device, computer equipment and computer-readable storage medium. Background Art
[0002] With the rapid development of network technology and multimedia technology, digital images, as one of the most important information carriers, have been increasingly used in the fields of commerce and finance. For example, large banks store a large amount of customer ID cards and transaction image information. Therefore, the security research of digital images has received widespread attention.
[0003] Traditional digital image encryption schemes are mainly implemented by computers and electronic devices for digital signal processing, and usually use shorter key lengths. However, shorter key lengths mean that they are more vulnerable to attacks such as brute force cracking, and the key security is lower. Summary of the invention
[0004] Based on this, it is necessary to provide a quantum image encryption method, device, computer equipment and computer-readable storage medium that can improve the security of image encryption in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a quantum image encryption method, comprising:
[0006] A first chaotic sequence and a second chaotic sequence are respectively generated by quantum chaotic mapping; the first chaotic sequence is obtained by one-dimensional mapping, and the second chaotic sequence is obtained by polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence;
[0007] Performing DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence;
[0008] A quantum key image is generated based on a mixed DNA sequence, and the quantum image to be encrypted is encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
[0009] In one embodiment, the step of performing DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence includes:
[0010] Normalizing the first chaotic sequence and the second chaotic sequence respectively, and converting the normalized first chaotic sequence and the second chaotic sequence to obtain corresponding first binary sequence and second binary sequence;
[0011] Performing DNA encoding processing on the first binary sequence and the second binary sequence respectively to obtain corresponding first DNA sequence and second DNA sequence;
[0012] DNA operation processing is performed on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence.
[0013] In one embodiment, the step of performing DNA encoding on the first binary sequence comprises:
[0014] The first m binary numbers in the first binary sequence are encoded according to a first encoding scheme; m is a random even number greater than 0 and less than the sequence length of the first binary sequence; the first encoding scheme is that every two adjacent binary numbers are encoded according to 00 as A, 11 as T, 01 as C, and 10 as G;
[0015] The binary numbers from the m+1th to the last in the first binary sequence are encoded according to the second encoding scheme; the second encoding scheme is to encode every two adjacent binary numbers according to 00 as C, 11 as G, 01 as A, and 10 as T.
[0016] In one embodiment, the step of performing DNA operation processing on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence includes:
[0017] For two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, a DNA addition operation is performed on the two DNA codes to obtain a mixed DNA code corresponding to the index position;
[0018] When the index position is an even number, DNA subtraction operation is performed on the two DNA codes to obtain the mixed DNA code corresponding to the index position;
[0019] According to the mixed DNA codes corresponding to all index positions, a mixed DNA sequence is obtained.
[0020] In one embodiment, the step of generating a quantum key image based on a mixed DNA sequence comprises:
[0021] Perform DNA decoding on the mixed DNA sequence to obtain the target chaotic sequence;
[0022] According to the target chaotic sequence, a quantum key matrix is generated; each chaotic value in the target chaotic sequence is used as an element value in the quantum key matrix;
[0023] The element values in the quantum key matrix are converted into quantum states to obtain a quantum key image.
[0024] In one embodiment, the step of generating a quantum key matrix according to a target chaotic sequence includes:
[0025] Determining the matrix dimension of the quantum key matrix to be generated;
[0026] Fill the chaotic values in the target chaotic sequence into the matrix columns corresponding to the matrix dimensions in sequence.
[0027] In one embodiment, the step of encrypting the quantum image to be encrypted according to the quantum key image includes:
[0028] For two pixels located at the same pixel position in the quantum key image and the quantum image to be encrypted, the grayscale value information of the pixel corresponding to the quantum key image is used as the control quantum bit, and the grayscale value information of the pixel corresponding to the quantum image to be encrypted is used as the target quantum bit, and quantum calculation is performed on the control quantum bit and the target quantum bit.
[0029] In a second aspect, the present application also provides a quantum image encryption device, comprising:
[0030] A sequence generation module is used to generate a first chaotic sequence and a second chaotic sequence respectively through quantum chaotic mapping; the first chaotic sequence is obtained through one-dimensional mapping, and the second chaotic sequence is obtained through polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence;
[0031] A hybrid encryption module is used to perform DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a hybrid DNA sequence;
[0032] The quantum encryption module is used to generate a quantum key image based on a mixed DNA sequence, and to encrypt the quantum image to be encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method steps of any one of the first aspects are implemented.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements any one of the method steps in the first aspect when the computer program is executed by a processor.
[0035] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which implements any one of the method steps in the first aspect when executed by a processor.
[0036] The above-mentioned quantum image encryption method, device, computer equipment, computer-readable storage medium and computer program product respectively generate a first chaotic sequence and a second chaotic sequence through quantum chaotic mapping, perform DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence. Since the first chaotic sequence is obtained through one-dimensional mapping and the second chaotic sequence is obtained through polynomial mapping, by performing mixed encryption on the two chaotic sequences, the encrypted mixed DNA sequence has higher complexity and randomness, further enhancing the security of the data. Afterwards, a quantum key image is generated based on the mixed DNA sequence, and the quantum image to be encrypted is encrypted according to the quantum key image. Since image encryption is based on quantum technology, the integrity of the image information can be ensured, thereby effectively improving the security of image encryption. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A diagram showing an application environment of a quantum image encryption method in one embodiment;
[0039] Figure 2 A schematic diagram of a flow chart of a quantum image encryption method in one embodiment;
[0040] Figure 3 A schematic diagram of a flow chart of a quantum image encryption method in one embodiment;
[0041] Figure 4 It is a structural block diagram of a quantum image encryption device in one embodiment;
[0042] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The quantum image encryption method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 is used to generate a first chaotic sequence and a second chaotic sequence respectively through quantum chaotic mapping, the first chaotic sequence is obtained by one-dimensional mapping, the second chaotic sequence is obtained by polynomial mapping, the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence, the first chaotic sequence and the second chaotic sequence are subjected to DNA encryption processing to obtain a mixed DNA sequence, a quantum key image is generated based on the mixed DNA sequence, and the quantum image to be encrypted is encrypted according to the quantum key image, and the quantum image to be encrypted is obtained by performing a quantum image representation on the image to be encrypted. Among them, the quantum image to be encrypted is stored in the server 104. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0045] In an exemplary embodiment, Figure 2 As shown, a quantum image encryption method is provided, which is applied to Figure 1 The terminal 102 in the example is used for explanation, and the steps include the following steps 202 to 206.
[0046] in:
[0047] S202: Generate a first chaotic sequence and a second chaotic sequence respectively through quantum chaotic mapping; the first chaotic sequence is obtained through one-dimensional mapping, and the second chaotic sequence is obtained through polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence.
[0048] Optionally, the first chaotic sequence is a chaotic sequence obtained by logistic mapping, which is a simple one-dimensional mapping based on a simple iterative formula. By adjusting parameters, different states such as cycle, bifurcation and chaos can be displayed. The second chaotic sequence is a chaotic sequence obtained by Chebyshev mapping, which is a mapping based on Chebyshev polynomials. When used for chaotic sequence generation, Chebyshev mapping can generate a sequence with chaotic characteristics through iterative operations and parameter adjustment. It should be noted that since the sequence length of the chaotic sequence mainly depends on the number of iterations, in order to ensure consistency during hybrid encryption, the first chaotic sequence and the second chaotic sequence with equal sequence length are generated by quantum chaotic mapping.
[0049] Exemplarily, the expression of Logistic mapping is:
[0050]
[0051] Among them, β is the dissipation parameter, r is the control parameter, x, y, z are the initial parameters (i.e. x0, y0.z0), x * and z * are the complex conjugates of x and z respectively. As the number of iterations increases, y n , z n Gradually tends to 0, x n Entering a chaotic state, we get x 0 、x 1 、x 2 ...the chaotic sequence formed.
[0052] The expression of Chebyshev map is:
[0053] x n+1 = cos(k cos -1 x n )
[0054] Among them, x n ∈[-1, 1], when k ≥ 2 (k is the order, here k = 4), no matter how close the initial values are, the iterated sequences are unrelated to each other, that is, they are chaotic within this range.
[0055] S204: Perform DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence.
[0056] Optionally, DNA encryption processing refers to converting a chaotic sequence into a DNA sequence through DNA coding technology. For example, 00 in binary data can be mapped to A, 01 to T, 10 to C, and 11 to G. In this way, each binary bit pair can be represented by a DNA base. The mixed DNA sequence is obtained by mixing DNA sequences after DNA encryption. For the first chaotic sequence and the second chaotic sequence, DNA encryption processing is performed respectively, and then DNA operation is performed on the two encrypted DNA sequences to obtain a mixed DNA sequence.
[0057] S206: Generate a quantum key image based on the mixed DNA sequence, and encrypt the quantum image to be encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
[0058] Optionally, the quantum key image refers to a hybrid DNA sequence converted based on a quantum key, wherein the quantum key is composed of a series of quantum bits, and the quantum key is combined with the hybrid DNA sequence, and the DNA sequence is encoded into the same quantum state to generate a quantum key image. Further, the grayscale information of the pixels in the quantum image to be encrypted is encrypted by the quantum key image to achieve image encryption, wherein the grayscale information of the pixels in the quantum key image is represented in the form of a quantum state, and the grayscale information of the pixels in the image to be encrypted is also converted into a quantum state by performing a quantum image representation on the image to be encrypted, and according to the information in the quantum key image, a quantum gate operation is performed on the quantum state representing the grayscale information of the pixels to achieve an encryption effect, and the encrypted image maintains a high degree of security during transmission or storage.
[0059] In the above-mentioned quantum image encryption method, the first chaotic sequence and the second chaotic sequence are respectively generated by quantum chaotic mapping, and the first chaotic sequence and the second chaotic sequence are subjected to DNA encryption processing to obtain a mixed DNA sequence. Since the first chaotic sequence is obtained by one-dimensional mapping and the second chaotic sequence is obtained by polynomial mapping, by performing mixed encryption on the two chaotic sequences, the encrypted mixed DNA sequence has higher complexity and randomness, further enhancing the security of the data. Afterwards, a quantum key image is generated based on the mixed DNA sequence, and the quantum image to be encrypted is encrypted according to the quantum key image. Since image encryption is based on quantum technology, the integrity of the image information can be ensured, thereby effectively improving the security of image encryption.
[0060] In an exemplary embodiment, the steps of performing DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence include: normalizing the first chaotic sequence and the second chaotic sequence respectively, and converting the normalized first chaotic sequence and the second chaotic sequence to obtain corresponding first binary sequence and second binary sequence; performing DNA encoding processing on the first binary sequence and the second binary sequence respectively to obtain corresponding first DNA sequence and second DNA sequence; performing DNA operation processing on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence.
[0061] Optionally, in order to ensure the randomness of the chaotic sequence, before DNA encryption, the first chaotic sequence and the second chaotic sequence are respectively normalized, and the normalization process includes removing the sequence data of the first specified number of bits of the chaotic sequence and selecting only the sequence of the middle segment, for example, removing the sequence data of the first 2000 bits of the chaotic sequence and selecting 2 2n The bit sequence data is used as the chaotic sequence after normalization. In addition, the normalization process can also include rounding the chaotic sequence. It should be noted that if the sequence length of the first chaotic sequence and the sequence length of the second chaotic sequence are not equal, the selected chaotic sequence can ensure that the sequence length is consistent through normalization.
[0062] Exemplarily, the normalization formula can be expressed as:
[0063] y i =floor[mod(x i ×256,256)],i∈[0,2 2n ]
[0064] Among them, floor and mod represent the rounding down and modulo operations respectively, x i is the chaotic number in the original chaotic sequence, y i is the normalized chaos number.
[0065] Furthermore, the normalized first chaotic sequence and the second chaotic sequence are converted into binary sequences. Under the premise of retaining the cryptographic features of the chaotic sequences, the pixel values (0 to 255) in the grayscale image are decomposed into binary to facilitate subsequent encoding processing.
[0066] Optionally, the first binary sequence and the second binary sequence obtained by conversion are subjected to DNA encoding processing respectively. During encoding, each two adjacent binary digits in the binary sequence are encoded as a DNA encoding value, usually represented by A, T, G, and C. The encoded first DNA sequence and the second DNA sequence are subjected to DNA operation according to DNA operation rules, and finally a mixed DNA sequence is obtained.
[0067] In this embodiment, by converting the normalized chaotic sequence into a binary sequence and performing DNA encoding on the two binary sequences respectively, and by utilizing the complexity and uniqueness of the DNA sequence to map the binary data onto the DNA sequence, high-level encryption and covert storage of data can be achieved. By performing operations on the two encoded DNA sequences to obtain a hybrid DNA sequence, the security of the data can be further enhanced.
[0068] In an exemplary embodiment, the steps of performing DNA encoding on the first binary sequence include: encoding the first m binary numbers in the first binary sequence according to a first encoding scheme; m is a random even number greater than 0 and less than the sequence length of the first binary sequence; the first encoding scheme is that every two adjacent binary numbers are encoded as A for 00, T for 11, C for 01, and G for 10; encoding the binary numbers from the (m + 1)-th to the last in the first binary sequence according to a second encoding scheme; the second encoding scheme is that every two adjacent binary numbers are encoded as C for 00, G for 11, A for 01, and T for 10.
[0069] Optionally, the processes of performing DNA encoding on the first binary sequence and on the second binary sequence are the same. Taking the DNA encoding of the first binary sequence as an example for illustration, since traditional encoding methods are relatively single and easy to be cracked, in this embodiment, a DNA random segmentation encoding method is adopted for encoding. By generating random numbers to segment the binary sequence, different DNA encoding schemes are respectively used for encoding.
[0070] Optionally, assuming that the sequence length of the first binary sequence is n and the generated random number is m, for the first m binary numbers in the first binary sequence, encoding is performed according to the first encoding scheme, and for the binary numbers from the (m + 1)-th to the last in the first binary sequence, encoding is performed according to the second encoding scheme, where m is a random even number greater than 0 and less than the sequence length of the first binary sequence (i.e., 0 < m < n and m is even).
[0071] Exemplarily, assuming that a certain segment in the first binary sequence is represented as: 10110111, the encoding result according to the first encoding scheme is: GTCT, and the encoding result according to the second encoding scheme is: TGAG.
[0072] In this embodiment, by combining two encoding schemes to perform DNA encoding on the binary sequence, the problem that a single encoding method is easy to be cracked is avoided, the cracking difficulty of the DNA sequence is increased, and thus the security of image encryption is effectively improved.
[0073] In an exemplary embodiment, the step of performing DNA operation processing on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence includes: for two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, performing a DNA addition operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; when the index position is an even number, performing a DNA subtraction operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; and obtaining a mixed DNA sequence based on the mixed DNA codes corresponding to all index positions.
[0074] Optionally, when performing DNA operations, in order to further increase the difficulty of cracking and ensure encryption security, this embodiment combines the index position of each DNA code in the DNA sequence and adopts two operation methods to perform operation processing.
[0075] Specifically, for two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, a DNA addition operation is performed on the two DNA codes, and when the index position is an even number, a DNA subtraction operation is performed on the two DNA codes. The operation rules of the DNA addition operation are shown in Table 1 below, and the operation rules of the DNA subtraction operation are shown in Table 2 below:
[0076] Table 1
[0077] DNA addition A G C T A A G C T G G A T C C C T G A T T C A G
[0078] Table 2
[0079] DNA subtraction A G C T A A G C T G G A C T C C T A G T T C G A
[0080] In this embodiment, by using corresponding operation methods according to the index position of each DNA code in the DNA sequence when the index position is an odd number or an even number, the cracking difficulty can be further increased, data security can be ensured, and the image encryption security can be effectively improved.
[0081] In an exemplary embodiment, the step of generating a quantum key image based on a mixed DNA sequence includes: performing DNA decoding processing on the mixed DNA sequence to obtain a target chaotic sequence; generating a quantum key matrix according to the target chaotic sequence; each chaotic value in the target chaotic sequence is used as an element value in the quantum key matrix; and converting the element value in the quantum key matrix into a quantum state to obtain a quantum key image.
[0082] Optionally, according to the encoding method of the DNA sequence, the mixed DNA sequence is subjected to DNA decoding processing, and the mixed DNA sequence is decoded into a target chaotic sequence. At this time, the target chaotic sequence can be understood as a mixed sequence of the first chaotic sequence and the second chaotic sequence, and each chaotic value in the target chaotic sequence is mapped to a grayscale value of a pixel, which is between 0 and 255.
[0083] Furthermore, the target chaotic sequence is mapped to a quantum key matrix, and each element in the quantum key matrix is represented in the form of a quantum state, thereby obtaining a quantum key image, wherein the quantum key image contains the quantum state information (i.e., grayscale value) corresponding to all element values in the quantum key matrix.
[0084] In this embodiment, by mapping the target chaotic sequence into a quantum key matrix, each element value in the matrix represents the grayscale value of a pixel, and converting the element value in the quantum key matrix into a quantum state, a quantum key image is obtained, which can ensure the complexity of the quantum key matrix and make it difficult to crack. Combined with the quantum state for representation, the quantum key image has the characteristics of the quantum state, further enhancing the security of encryption.
[0085] In an exemplary embodiment, the step of generating a quantum key matrix according to a target chaotic sequence includes: determining a matrix dimension of the quantum key matrix to be generated; and sequentially filling chaotic values in the target chaotic sequence into matrix columns corresponding to the matrix dimension.
[0086] Optionally, when mapping the target chaotic sequence into a quantum key matrix, it is first necessary to determine the matrix dimension of the quantum key matrix to be generated, and then fill the chaotic values in the target chaotic sequence into the matrix columns corresponding to the matrix dimensions in sequence according to the column arrangement method, wherein the column arrangement method refers to filling the chaotic values in the target chaotic sequence into the first column and first row, the first column and second row of the matrix in sequence, and after the first row is filled, fill in the second column and first row, the second column and second row, etc., until the entire matrix is filled to obtain the quantum key matrix.
[0087] In this embodiment, by filling the chaotic values in the target chaotic sequence into the matrix columns corresponding to the matrix dimensions in sequence, since each element in the key matrix is random and unpredictable, the key matrix generated using the chaotic sequence also has these characteristics, which can ensure that each element in the key matrix is random and unpredictable, further enhancing the security of the key.
[0088] In an exemplary embodiment, the step of encrypting a quantum image to be encrypted according to a quantum key image includes: for two pixel points located at the same pixel position in the quantum key image and the quantum image to be encrypted, using the grayscale value information of the pixel point corresponding to the quantum key image as the control quantum bit, and using the grayscale value information of the pixel point corresponding to the quantum image to be encrypted as the target quantum bit, and performing quantum calculation on the control quantum bit and the target quantum bit.
[0089] Optionally, the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted. The quantum image representation can be implemented by a NEQR (N-qubit Entangled Quantum Representation) model. The NEQR model uses a quantum bit sequence to represent two types of information, position information and gray value information, in a classical image. Assuming that the size of a classical image is 2 n *2 n , the grayscale range is [0,2 q-1 ], two p-length qubit sequences are needed to represent the position information, and a q-length qubit sequence is needed to represent the gray value information. Then the quantum image |I> can be expressed as:
[0090]
[0091] in, Represents the grayscale value of the pixel in the quantum image, |XY>=|X>|Y>=|X n-1 , X n-2 , ..., X 0 >|Y n-1 , Y n-2 , ..., Y 0 > represents the pixel position of a pixel in the quantum image, where, K = q-1, q-2, ..., 0, Y t , X t ∈{0, 1}.
[0092] For example, taking a grayscale image of size 2x2 as an example, the grayscale value information and position information of each grayscale pixel are marked in the figure, and the corresponding NEQR expression is as follows:
[0093]
[0094] Exemplarily, the quantum key image |A> can be expressed as:
[0095]
[0096] Among them, A XY =N ij (i,j∈[0,2n -1]), N represents the quantum key matrix, N ij represents the quantum state information (i.e., the grayscale value of the pixel) corresponding to the element value in the quantum key matrix, |XY>=|X>|Y>=|X n-1 ,X n-2 ,...,X 0 >|Y n-1 ,Y n-2 ,...,Y 0 > represents the pixel position of a pixel in the quantum key image.
[0097] Optionally, encrypting the quantum image to be encrypted according to the quantum key image refers to performing a CNOT operation on the grayscale value information in the quantum image to be encrypted, wherein the CNOT operation (controlled NOT gate) is a two-qubit gate, in which one quantum bit serves as a control bit and the other serves as a target bit. When the control bit is 1, the CNOT gate flips the state of the target bit, and if the control bit is 0, the state of the target bit remains unchanged.
[0098] For example, the quantum key image is represented as |A>, and the quantum image to be encrypted is represented as |I>. CNOT operation is performed at two pixels located at the same pixel position in the quantum image to be encrypted |I> and the quantum key image |A>. Among them, the gray value information bit of the pixel of the quantum key image |A> is the control quantum bit, the gray value information bit of the pixel in the quantum image |I> to be encrypted is the target quantum bit, where i = 0, 1, ..., 7. The quantum encrypted image |IA> after the CNOT operation can be expressed as:
[0099]
[0100] in, Represents the gray value of the pixel in the quantum image to be encrypted, A XY =N ij (i,j∈[0,2 n -1]), N represents the quantum key matrix, N ij Represents the quantum state information corresponding to the element value in the quantum key matrix (i.e., the gray value of the pixel),
[0101] In this embodiment, by encrypting the quantum image to be encrypted according to the quantum key image, since the image encryption is based on quantum technology, the integrity of the image information can be ensured, thereby effectively improving the security of image encryption.
[0102] In an exemplary embodiment, Figure 3As shown, a quantum image encryption method is provided, the method comprising the following steps:
[0103] A first chaotic sequence and a second chaotic sequence are respectively generated by quantum chaotic mapping; the first chaotic sequence is obtained by one-dimensional mapping, and the second chaotic sequence is obtained by polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence;
[0104] Normalizing the first chaotic sequence and the second chaotic sequence respectively, and converting the normalized first chaotic sequence and the second chaotic sequence to obtain corresponding first binary sequence and second binary sequence;
[0105] Performing DNA encoding processing on the first binary sequence and the second binary sequence respectively to obtain corresponding first DNA sequence and second DNA sequence;
[0106] The first m binary numbers in the first binary sequence are encoded according to the first encoding scheme; m is a random even number greater than 0 and less than the sequence length of the first binary sequence; the first encoding scheme is that every two adjacent binary numbers are encoded according to 00 as A, 11 as T, 01 as C, and 10 as G;
[0107] The binary numbers from the m+1th to the last in the first binary sequence are encoded according to the second encoding scheme; the second encoding scheme is to encode every two adjacent binary numbers according to 00 as C, 11 as G, 01 as A, and 10 as T.
[0108] For two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, a DNA addition operation is performed on the two DNA codes to obtain a mixed DNA code corresponding to the index position;
[0109] When the index position is an even number, DNA subtraction operation is performed on the two DNA codes to obtain the mixed DNA code corresponding to the index position;
[0110] According to the mixed DNA codes corresponding to all index positions, a mixed DNA sequence is obtained.
[0111] Perform DNA decoding on the mixed DNA sequence to obtain the target chaotic sequence;
[0112] Determining the matrix dimension of the quantum key matrix to be generated;
[0113] Fill the chaotic values in the target chaotic sequence into the matrix columns corresponding to the matrix dimensions in sequence; each chaotic value in the target chaotic sequence is used as an element value in the quantum key matrix;
[0114] The element values in the quantum key matrix are converted into quantum states to obtain a quantum key image.
[0115] For two pixel points located at the same pixel position in the quantum key image and the quantum image to be encrypted, the grayscale value information of the pixel points corresponding to the quantum key image is used as the control quantum bit, and the grayscale value information of the pixel points corresponding to the quantum image to be encrypted is used as the target quantum bit, and quantum calculation is performed on the control quantum bit and the target quantum bit; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
[0116] In this embodiment, a first chaotic sequence and a second chaotic sequence are respectively generated by quantum chaotic mapping, and DNA encryption processing is performed on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence. Since the first chaotic sequence is obtained by one-dimensional mapping and the second chaotic sequence is obtained by polynomial mapping, the two chaotic sequences are mixed and encrypted so that the encrypted mixed DNA sequence has higher complexity and randomness, further enhancing the security of the data. Afterwards, a quantum key image is generated based on the mixed DNA sequence, and the quantum image to be encrypted is encrypted according to the quantum key image. Since image encryption is based on quantum technology, the integrity of the image information can be ensured, thereby effectively improving the security of image encryption.
[0117] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0118] Based on the same inventive concept, the embodiment of the present application also provides a quantum image encryption device for implementing the quantum image encryption method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more quantum image encryption device embodiments provided below can refer to the limitations of the quantum image encryption method above, and will not be repeated here.
[0119] In an exemplary embodiment, Figure 4As shown, a quantum image encryption device is provided, comprising: a sequence generation module 10, a hybrid encryption module 20 and a quantum encryption module 30, wherein:
[0120] The sequence generation module 10 is used to generate a first chaotic sequence and a second chaotic sequence respectively through quantum chaotic mapping; the first chaotic sequence is obtained through one-dimensional mapping, and the second chaotic sequence is obtained through polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence.
[0121] The hybrid encryption module 20 is used to perform DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a hybrid DNA sequence.
[0122] The quantum encryption module 30 is used to generate a quantum key image based on the mixed DNA sequence, and encrypt the quantum image to be encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
[0123] In an exemplary embodiment, the hybrid encryption module 20 is also used to normalize the first chaotic sequence and the second chaotic sequence, respectively, and convert the normalized first chaotic sequence and the second chaotic sequence to obtain corresponding first binary sequence and second binary sequence; perform DNA encoding on the first binary sequence and the second binary sequence, respectively, to obtain corresponding first DNA sequence and second DNA sequence; perform DNA operation on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence.
[0124] In an exemplary embodiment, the hybrid encryption module 20 is also used to encode the first m binary numbers in a first binary sequence according to a first coding scheme; m is a random even number greater than 0 and less than the sequence length of the first binary sequence; the first coding scheme is to encode every two adjacent binary numbers according to 00 as A, 11 as T, 01 as C, and 10 as G; for the binary numbers from the m+1th to the last in the first binary sequence, they are encoded according to a second coding scheme; the second coding scheme is to encode every two adjacent binary numbers according to 00 as C, 11 as G, 01 as A, and 10 as T.
[0125] In an exemplary embodiment, the hybrid encryption module 20 is also used to perform a DNA addition operation on two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, to obtain a mixed DNA code corresponding to the index position; when the index position is an even number, perform a DNA subtraction operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; and obtain a mixed DNA sequence based on the mixed DNA codes corresponding to all index positions.
[0126] In an exemplary embodiment, the quantum encryption module 30 is also used to perform DNA decoding processing on the mixed DNA sequence to obtain a target chaotic sequence; generate a quantum key matrix based on the target chaotic sequence; each chaotic value in the target chaotic sequence is used as an element value in the quantum key matrix; and the element value in the quantum key matrix is converted into a quantum state to obtain a quantum key image.
[0127] In an exemplary embodiment, the quantum encryption module 30 is further used to determine the matrix dimension of the quantum key matrix to be generated; and fill the chaotic values in the target chaotic sequence into the matrix columns corresponding to the matrix dimension in sequence.
[0128] In an exemplary embodiment, the quantum encryption module 30 is also used to perform quantum calculations on two pixel points located at the same pixel position in the quantum key image and the quantum image to be encrypted, using the grayscale value information of the pixel point corresponding to the quantum key image as the control quantum bit and the grayscale value information of the pixel point corresponding to the quantum image to be encrypted as the target quantum bit.
[0129] Each module in the above quantum image encryption device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0130] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a quantum image encryption method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0131] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0132] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: respectively generating a first chaotic sequence and a second chaotic sequence through quantum chaotic mapping; the first chaotic sequence is obtained through one-dimensional mapping, and the second chaotic sequence is obtained through polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence; performing DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence; generating a quantum key image based on the mixed DNA sequence, and encrypting the quantum image to be encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
[0133] In one embodiment, when a processor executes a computer program, DNA encryption processing is performed on a first chaotic sequence and a second chaotic sequence to obtain a mixed DNA sequence, including: normalizing the first chaotic sequence and the second chaotic sequence respectively, and converting the normalized first chaotic sequence and the second chaotic sequence to obtain corresponding first binary sequences and second binary sequences; performing DNA encoding processing on the first binary sequence and the second binary sequence respectively to obtain corresponding first DNA sequences and second DNA sequences; performing DNA operation processing on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence.
[0134] In one embodiment, the step of performing DNA encoding processing on a first binary sequence when a processor executes a computer program includes: encoding the first m binary numbers in the first binary sequence according to a first encoding scheme; m is a random even number greater than 0 and less than the sequence length of the first binary sequence; the first encoding scheme is to encode every two adjacent binary numbers according to 00 as A, 11 as T, 01 as C, and 10 as G; encoding the binary numbers from the m+1th to the last in the first binary sequence according to a second encoding scheme; the second encoding scheme is to encode every two adjacent binary numbers according to 00 as C, 11 as G, 01 as A, and 10 as T.
[0135] In one embodiment, the processor performs DNA operation processing on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence when executing a computer program, including: for two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, performing a DNA addition operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; when the index position is an even number, performing a DNA subtraction operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; and obtaining a mixed DNA sequence according to the mixed DNA codes corresponding to all index positions.
[0136] In one embodiment, the generation of a quantum key image based on a mixed DNA sequence involved in the execution of a computer program by a processor includes: performing DNA decoding processing on the mixed DNA sequence to obtain a target chaotic sequence; generating a quantum key matrix according to the target chaotic sequence; each chaotic value in the target chaotic sequence is used as an element value in the quantum key matrix; and converting the element value in the quantum key matrix into a quantum state to obtain a quantum key image.
[0137] In one embodiment, the processor generates a quantum key matrix according to a target chaotic sequence when executing a computer program, including: determining a matrix dimension of the quantum key matrix to be generated; and sequentially filling chaotic values in the target chaotic sequence into matrix columns corresponding to the matrix dimension.
[0138] In one embodiment, the processor executes a computer program involving encrypting a quantum image to be encrypted according to a quantum key image, including: for two pixel points located at the same pixel position in the quantum key image and the quantum image to be encrypted, using the grayscale value information of the pixel point corresponding to the quantum key image as a control quantum bit, and using the grayscale value information of the pixel point corresponding to the quantum image to be encrypted as a target quantum bit, and performing quantum calculations on the control quantum bit and the target quantum bit.
[0139] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: a first chaotic sequence and a second chaotic sequence are respectively generated by quantum chaotic mapping; the first chaotic sequence is obtained by one-dimensional mapping, and the second chaotic sequence is obtained by polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence; DNA encryption processing is performed on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence; a quantum key image is generated based on the mixed DNA sequence, and the quantum image to be encrypted is encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
[0140] In one embodiment, when a computer program is executed by a processor, the steps of performing DNA encryption processing on a first chaotic sequence and a second chaotic sequence to obtain a mixed DNA sequence include: normalizing the first chaotic sequence and the second chaotic sequence, respectively, and converting the normalized first chaotic sequence and the second chaotic sequence to obtain corresponding first binary sequences and second binary sequences; performing DNA encoding processing on the first binary sequence and the second binary sequence, respectively, to obtain corresponding first DNA sequences and second DNA sequences; performing DNA operation processing on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence.
[0141] In one embodiment, the steps of performing DNA encoding processing on a first binary sequence when the computer program is executed by a processor include: encoding the first m binary numbers in the first binary sequence according to a first encoding scheme; m is a random even number greater than 0 and less than the sequence length of the first binary sequence; the first encoding scheme is to encode every two adjacent binary numbers according to 00 as A, 11 as T, 01 as C, and 10 as G; encoding the binary numbers from the m+1th to the last in the first binary sequence according to a second encoding scheme; the second encoding scheme is to encode every two adjacent binary numbers according to 00 as C, 11 as G, 01 as A, and 10 as T.
[0142] In one embodiment, when the computer program is executed by a processor, the steps of performing DNA operations on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence include: for two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, performing a DNA addition operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; when the index position is an even number, performing a DNA subtraction operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; and obtaining a mixed DNA sequence based on the mixed DNA codes corresponding to all index positions.
[0143] In one embodiment, the computer program, when executed by a processor, involves generating a quantum key image based on a mixed DNA sequence, including: performing DNA decoding processing on the mixed DNA sequence to obtain a target chaotic sequence; generating a quantum key matrix based on the target chaotic sequence; each chaotic value in the target chaotic sequence is used as an element value in the quantum key matrix; and converting the element value in the quantum key matrix into a quantum state to obtain a quantum key image.
[0144] In one embodiment, when a computer program is executed by a processor, the steps involved in generating a quantum key matrix according to a target chaotic sequence include: determining a matrix dimension of the quantum key matrix to be generated; and sequentially filling chaotic values in the target chaotic sequence into matrix columns corresponding to the matrix dimension.
[0145] In one embodiment, when a computer program is executed by a processor, the method involves encrypting a quantum image to be encrypted according to a quantum key image, including: for two pixel points located at the same pixel position in the quantum key image and the quantum image to be encrypted, using the grayscale value information of the pixel point corresponding to the quantum key image as the control quantum bit, and using the grayscale value information of the pixel point corresponding to the quantum image to be encrypted as the target quantum bit, and performing quantum calculations on the control quantum bit and the target quantum bit.
[0146] In one embodiment, a computer program product is provided, comprising a computer program, which implements the following steps when executed by a processor: generating a first chaotic sequence and a second chaotic sequence respectively through quantum chaotic mapping; the first chaotic sequence is obtained through one-dimensional mapping, and the second chaotic sequence is obtained through polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence; performing DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence; generating a quantum key image based on the mixed DNA sequence, and encrypting the quantum image to be encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
[0147] In one embodiment, when a computer program is executed by a processor, the steps of performing DNA encryption processing on a first chaotic sequence and a second chaotic sequence to obtain a mixed DNA sequence include: normalizing the first chaotic sequence and the second chaotic sequence, respectively, and converting the normalized first chaotic sequence and the second chaotic sequence to obtain corresponding first binary sequences and second binary sequences; performing DNA encoding processing on the first binary sequence and the second binary sequence, respectively, to obtain corresponding first DNA sequences and second DNA sequences; performing DNA operation processing on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence.
[0148] In one embodiment, the steps of performing DNA encoding processing on a first binary sequence when the computer program is executed by a processor include: encoding the first m binary numbers in the first binary sequence according to a first encoding scheme; m is a random even number greater than 0 and less than the sequence length of the first binary sequence; the first encoding scheme is to encode every two adjacent binary numbers according to 00 as A, 11 as T, 01 as C, and 10 as G; encoding the binary numbers from the m+1th to the last in the first binary sequence according to a second encoding scheme; the second encoding scheme is to encode every two adjacent binary numbers according to 00 as C, 11 as G, 01 as A, and 10 as T.
[0149] In one embodiment, when the computer program is executed by a processor, the steps of performing DNA operations on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence include: for two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, performing a DNA addition operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; when the index position is an even number, performing a DNA subtraction operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; and obtaining a mixed DNA sequence based on the mixed DNA codes corresponding to all index positions.
[0150] In one embodiment, the computer program, when executed by a processor, involves generating a quantum key image based on a mixed DNA sequence, including: performing DNA decoding processing on the mixed DNA sequence to obtain a target chaotic sequence; generating a quantum key matrix based on the target chaotic sequence; each chaotic value in the target chaotic sequence is used as an element value in the quantum key matrix; and converting the element value in the quantum key matrix into a quantum state to obtain a quantum key image.
[0151] In one embodiment, when a computer program is executed by a processor, the steps involved in generating a quantum key matrix according to a target chaotic sequence include: determining a matrix dimension of the quantum key matrix to be generated; and sequentially filling chaotic values in the target chaotic sequence into matrix columns corresponding to the matrix dimension.
[0152] In one embodiment, when a computer program is executed by a processor, the method involves encrypting a quantum image to be encrypted according to a quantum key image, including: for two pixel points located at the same pixel position in the quantum key image and the quantum image to be encrypted, using the grayscale value information of the pixel point corresponding to the quantum key image as the control quantum bit, and using the grayscale value information of the pixel point corresponding to the quantum image to be encrypted as the target quantum bit, and performing quantum calculations on the control quantum bit and the target quantum bit.
[0153] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0154] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above 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 application.
[0155] The above-described 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 present application. 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. A quantum image encryption method, characterized in that: The method comprises: Generate a first chaotic sequence and a second chaotic sequence respectively through quantum chaotic mapping; the first chaotic sequence is obtained through one-dimensional mapping, and the second chaotic sequence is obtained through polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence; Performing DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence; A quantum key image is generated based on the mixed DNA sequence, and the quantum image to be encrypted is encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
2. The method according to claim 1, characterized in that The step of performing DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a mixed DNA sequence comprises: Normalizing the first chaotic sequence and the second chaotic sequence respectively, and converting the normalized first chaotic sequence and the second chaotic sequence to obtain corresponding first binary sequence and second binary sequence; Performing DNA encoding processing on the first binary sequence and the second binary sequence respectively to obtain corresponding first DNA sequence and second DNA sequence; DNA operation processing is performed on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence.
3. The method according to claim 2, characterized in that The step of performing DNA encoding processing on the first binary sequence comprises: The first m binary numbers in the first binary sequence are encoded according to a first encoding scheme; m is a random even number greater than 0 and less than the sequence length of the first binary sequence; the first encoding scheme is that every two adjacent binary numbers are encoded according to 00 as A, 11 as T, 01 as C, and 10 as G; The binary numbers from the m+1th to the last in the first binary sequence are encoded according to a second encoding scheme; the second encoding scheme is to encode every two adjacent binary numbers according to 00 as C, 11 as G, 01 as A, and 10 as T.
4. The method according to claim 2, characterized in that: The step of performing DNA operation processing on the first DNA sequence and the second DNA sequence to obtain a mixed DNA sequence comprises: For two DNA codes located at the same index position in the first DNA sequence and the second DNA sequence, when the index position is an odd number, performing a DNA addition operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; When the index position is an even number, performing a DNA subtraction operation on the two DNA codes to obtain a mixed DNA code corresponding to the index position; According to the mixed DNA codes corresponding to all index positions, a mixed DNA sequence is obtained.
5. The method according to claim 1, characterized in that The step of generating a quantum key image based on the mixed DNA sequence comprises: Performing DNA decoding processing on the mixed DNA sequence to obtain a target chaotic sequence; Generate a quantum key matrix according to the target chaotic sequence; each chaotic value in the target chaotic sequence is used as an element value in the quantum key matrix; The element values in the quantum key matrix are converted into quantum states to obtain a quantum key image.
6. The method according to claim 5, characterized in that The step of generating a quantum key matrix according to the target chaotic sequence comprises: Determining the matrix dimension of the quantum key matrix to be generated; The chaotic values in the target chaotic sequence are sequentially filled into the matrix columns corresponding to the matrix dimensions.
7. The method according to claim 1, characterized in that The step of encrypting the quantum image to be encrypted according to the quantum key image comprises: For two pixel points located at the same pixel position in the quantum key image and the quantum image to be encrypted, the grayscale value information of the pixel points corresponding to the quantum key image is used as the control quantum bit, and the grayscale value information of the pixel points corresponding to the quantum image to be encrypted is used as the target quantum bit, and quantum calculation is performed on the control quantum bit and the target quantum bit.
8. A quantum image encryption device, characterized in that: The device comprises: A sequence generation module, used to generate a first chaotic sequence and a second chaotic sequence respectively through quantum chaotic mapping; the first chaotic sequence is obtained through one-dimensional mapping, and the second chaotic sequence is obtained through polynomial mapping; the sequence length of the first chaotic sequence is equal to the sequence length of the second chaotic sequence; A hybrid encryption module, used for performing DNA encryption processing on the first chaotic sequence and the second chaotic sequence to obtain a hybrid DNA sequence; A quantum encryption module is used to generate a quantum key image based on the mixed DNA sequence, and to encrypt the quantum image to be encrypted according to the quantum key image; the quantum image to be encrypted is obtained by performing quantum image representation on the image to be encrypted.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method and system for repairing audio data loss in AI recording scene
CN119943090A
Image processing method and device, equipment, medium and product
CN121585772A
