Quantum image encryption method based on BRQI model and national cipher SM3

By combining the BRQI model, Guomi SM3 algorithm and quantum Logistic chaotic system, an efficient and quantum attack-resistant image encryption method was designed, which solved the problem of insufficient security of traditional encryption algorithms in quantum computing environments and achieved high-intensity encryption protection for image data.

CN119814278AActive Publication Date: 2025-04-11NANJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202510267531.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-04-11
Estimated Expiration
2045-03-07

AI Technical Summary

Technical Problem

In the face of the powerful computing power of quantum computing, traditional image encryption algorithms have potential risks, and it is difficult to effectively protect the confidentiality and integrity of image data.

Method used

Using a quantum image encryption method based on the BRQI model and Guomi SM3, combined with the quantum Logistic chaotic system, high-intensity encrypted ciphertext images are generated through quantum encoding, arrangement of odd-even pixel bit planes, quantum coordinate scrambling and XOR operations.

Benefits of technology

It significantly improves the security and reliability of image data, can quickly complete encryption and decryption operations in quantum environments, meet the needs of large-scale image data processing, and comply with national cryptographic standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814278A_ABST
    Figure CN119814278A_ABST
Patent Text Reader

Abstract

The invention discloses a quantum image encryption method based on a BRQI model and a national cipher SM3. The quantum image encryption method comprises the following steps: converting a color image into a quantum image represented by BRQI through quantum coding; the method comprises the following steps of: processing a plaintext quantum image by using a color information scrambling algorithm, then performing coordinate information scrambling on the processed image, generating an original key quantum image by using quantum Logistic mapping and national cipher SM3, and then performing quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image; and finally, performing XOR operation on the scrambled quantum image and the quantum key image to generate a ciphertext image corresponding to the original color image. According to the invention, the BRQI model, the SM3 cryptographic algorithm and the quantum Logistic chaotic system are combined, an efficient and anti-quantum-attack image encryption algorithm is provided, and the security and reliability of encryption are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of multimedia security and digital image confidentiality, and in particular to a quantum image encryption method based on a BRQI model and national secret SM3. Background Art

[0002] With the rapid development of information technology, image data is becoming increasingly important in communication, storage, and processing. However, due to the openness of network communications and potential security threats, how to protect the confidentiality and integrity of image data has become a research hotspot in the field of information security. Traditional image encryption algorithms are mostly based on classical cryptographic thinking and chaotic mapping, but they have potential risks when facing the powerful computing power of quantum computing technology. The development of quantum computing poses a severe challenge to traditional cryptographic algorithms, so the development of image encryption algorithms that are resistant to quantum computing attacks has become a key research direction.

[0003] BRQI (Bit-level Representation for Quantum Images) is an effective quantum image representation model that can efficiently express and process image data in a quantum computing environment. Compared with classical image representation methods, the BRQI model has higher storage and processing efficiency, providing a basis for the research of quantum image encryption algorithms. In addition, the SM3 hash algorithm, as a national secret standard algorithm, is widely used in fields such as data integrity protection and digital signatures due to its excellent anti-collision and anti-pre-mapping attack capabilities. Combining the characteristics of quantum computing and the national secret algorithm standards, the design of a quantum image encryption algorithm based on SM3 can not only improve the security of image data, but also meet the requirements of cryptographic standards.

[0004] On the other hand, chaotic systems have broad application potential in the field of image encryption due to their sensitivity to initial values ​​and pseudo-randomness. Quantum chaotic systems, especially quantum logistic chaotic systems, combine the unique properties of classical chaotic systems with quantum computing, and can generate more complex and random key sequences, significantly enhancing the anti-attack capabilities of encryption algorithms. If the quantum chaotic system can be combined with the BRQI model and the national secret SM3 algorithm, it will inevitably be possible to construct an efficient and secure quantum image encryption algorithm, thereby achieving high-intensity encryption protection for image data in a quantum environment.

[0005] Therefore, studying a quantum image encryption algorithm based on the BRQI model, the national secret SM3 algorithm and the quantum logistic chaotic system is not only an important demand in the field of quantum computing security, but also in line with the inevitable trend of the development of image encryption technology in the future quantum computing era. Summary of the invention

[0006] The present invention aims to solve one of the technical problems existing in the related art at least to a certain extent.

[0007] One object of the present invention is to provide a quantum image encryption method based on the BRQI model and the national secret SM3, and to construct an efficient and secure quantum image encryption algorithm by combining the BRQI quantum representation model and the national secret SM3 quantum logistic chaotic system, thereby achieving high-intensity encryption protection for image data in a quantum environment.

[0008] In order to achieve the above-mentioned purpose, the present invention provides a quantum image encryption method based on the BRQI model and the national secret SM3, comprising the following steps: S100, acquiring a color image, and converting the color image into a quantum image represented by BRQI through quantum coding; S200, performing an arrangement operation of the bit plane of the odd and even value pixels on the obtained quantum image, changing the three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image; S300, performing a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in step S200, scrambling the coordinate information of the plaintext quantum image; S400, using quantum logistic mapping and national secret SM3 to generate an original key quantum image, and then performing quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image; S500, performing an XOR operation on the quantum image scrambled in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image.

[0009] A further preferred technical solution of the present invention is that in step S100, the color image is converted into a quantum image represented by BRQI by quantum coding, and the specific method is: For a The color image of is expressed as follows using the BRQI representation method:

[0010] in, and Store the horizontal coordinate information and vertical coordinate information of the input image respectively; It is bit planes, is the binary color of the bit plane image, Represents RGB channels.

[0011] Preferably, in step S200, the obtained quantum image is subjected to an arrangement operation of the odd-even pixel bit plane, and the specific method is as follows: S210, set is the pixel position, As the basis for dividing odd and even pixels, is the bit plane, is the color channel, is a binary color; S220, for even pixels, that is, , first use the SWAP gate to swap and information; then according to The value of is divided into two cases: , then Perform NOT gate operation, such as , then Perform NOT gate operation; finally, , and Perform NOT gate operation; S230, for odd pixels, that is, , first use the SWAP gate to swap and information, and then according to The value of is divided into two cases: , then Perform NOT gate operation, such as , then Perform NOT gate operation; finally, , and Perform NOT gate operation.

[0012] Preferably, the specific method of the quantum coordinate scrambling operation in step S300 is: S310, first generate an integer sequence A = {1, 2, 3, ..., n}, where n represents the coordinate information in the BRQI image The number of qubits; S320, using the shuffled Fisher-Yates algorithm to shuffle the integer sequence A to obtain a sequence B, and using the sequence B to encode the coordinates in the BRQI image; S330, shuffle the integer sequence A twice again using the Fisher-Yates algorithm to obtain two shuffled sequences V and Z; S340, compare the values ​​of the sequences A, B, V, and Z bit by bit, and if two or more identical values ​​are found between the two sequences, cyclically shift the repeated portion of one sequence to the right by one position; if there is only one repeated value, exchange the repeated value with the first value or the last value in the sequence; S350, establish rules: when hour, , Represents the i-th value in the sequence V and Z respectively, using The corresponding qubit is used as the control bit, The corresponding qubit is used as the target bit to construct the CNOT gate; when When using SWAP gate and The corresponding qubit; S360: Construct an operator based on the rule established in step S350 , in the operator After the disturbance, the coordinate information change of the quantum image is expressed as: ; In the formula, represents the coordinate information in the quantum image, where and They are the horizontal coordinate information and vertical coordinate information of the image respectively.

[0013] As a preference, the specific method of using quantum logistic mapping and national secret SM3 to generate the original key quantum image in step S400 is: S410, User-set adjustable parameters and dissipation parameters ; S420, using adjustable parameters Perform the national secret SM3 operation to generate the initial value of the quantum logistic map , , ;include: S421, use the national secret SM3 to calculate adjustable parameters The hash value of is obtained as a 64-bit hexadecimal sequence L; S422, use the shuffled Fisher-Yates algorithm to shuffle the sequence L, and obtain , and then use Record L The index of sequence; S423. Construct the initial value of the quantum Logistic map by the following formula: ; ; ; in , , Three two-dimensional matrices representing color images , , The initial value of the quantum Logistic map; The function is used to convert a hexadecimal number to a decimal number; S430, using initial value , adjustable parameters and dissipation parameters Perform quantum Logistic mapping to generate the original ciphertext image, including: S431, use initial value , adjustable parameters and dissipation parameters Perform quantum Logistic mapping to generate three pseudo-random sequences , , ,length , the quantum Logistic mapping relationship is expressed as: ; In the formula, represents the average value of the quantum state, which belongs to the classical part, Describing the principal quantum state and The dynamic coupling effect between them, including the dissipative characteristics of the system, represents uncertainty, represents quantum correlation and represents non-classicality; , and The plural , and The complex conjugate of; if the initial value of the system is a real number, then all the iterative values ​​will also be real numbers, set , and ; represents the base of natural logarithm, e≈2.71828; S432, sequence , , Adjust to an integer between 0 and 255 to generate a sequence , and then combine the three pseudo-random sequences to reshape them into a three-dimensional array, perform quantum encoding on the array, and generate the original key quantum image, which is expressed as: ; in, The function represents rounding down. The function performs a modulo 256 operation on the result after rounding down to ensure that the result is in the range of [0, 255].

[0014] Preferably, in step S400, a quantum coordinate scrambling operation is performed on the original key quantum image to generate a quantum key image, and the specific method is: S441. First, generate an integer sequence A = {1, 2, 3, ..., n}, where n represents the coordinate information in the original key quantum image. The number of qubits; S442. Use the shuffled Fisher-Yates algorithm to shuffle the integer sequence A and obtain the sequence , using the sequence Encoding the coordinates in the original key quantum image; S443, shuffle the integer sequence A twice again using the Fisher-Yates algorithm to obtain two shuffled sequences , ; S444, bit by bit comparison sequence A, , and If two or more identical values ​​are found between the two sequences, the repeated portion of one sequence is cyclically shifted one position to the right; if there is only one repeated value, the repeated value is swapped with the first value or the last value in the sequence; S445. Establish rules: If , the corresponding The qubit is used as a control bit, and the corresponding The qubit is used as the target bit to construct a CNOT gate; if , use the SWAP gate to swap and The two corresponding qubits of S446: Construct an operator based on the rule established in step S445 , in the operator After the disturbance, the coordinate information change of the quantum image is expressed as: ; In the formula, represents the coordinate information in the quantum image, where and They are the horizontal coordinate information and vertical coordinate information of the image respectively.

[0015] Preferably, step S500 specifically performs an XOR operation on the color binary values ​​of the same bit plane of the same color channel under the same coordinate information on the quantum image scrambled in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image. On the other hand, the present invention provides a non-transitory computer-readable storage medium having computer instructions stored thereon, which enable a computer to execute the above-mentioned quantum image encryption method based on the BRQI model and the national encryption SM3.

[0016] Yet another aspect of the present invention provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus, and the processor calls the logic instructions in the memory to execute the above-mentioned quantum image encryption method based on the BRQI model and the national encryption SM3.

[0017] On the other hand, the present invention provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer executes the above-mentioned quantum image encryption method based on the BRQI model and the national encryption SM3.

[0018] Beneficial effects: The present invention combines the BRQI model, the national secret SM3 algorithm and the quantum logistic chaotic system to propose an efficient and quantum attack-resistant image encryption algorithm. The image encryption method of the present invention utilizes a quantum chaotic system to generate a high-complexity key, combined with the strong anti-collision property of SM3, which significantly improves the security and reliability of encryption. At the same time, based on the efficient processing capability of the BRQI model, the algorithm can quickly complete encryption and decryption operations in a quantum environment, meeting the needs of large-scale image data processing. In addition, the algorithm complies with national cryptographic standards, is applicable to multiple fields, and has broad promotion value. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flow chart of the quantum image encryption method based on the BRQI model and the national encryption SM3 of the present invention; Figure 2 It is the encrypted and decrypted image of Plane, Pepper, and Baboon in Example 1; Figure 3 The grayscale distribution of Plane, Pepper, and Baboon in Example 1 and the grayscale histograms before and after the encryption of the three channels of R, G, and B; Figure 4 is the horizontal and vertical correlation between the original images and the encrypted images of Plane, Pepper, and Baboon in Example 1; Figure 5 It is the decrypted image after adding different salt and pepper noises to the Baboon ciphertext image in Example 1; Figure 6 It is the decrypted image of the Baboon ciphertext image in Example 1 after being blocked in different situations; Figure 7 These are the decrypted images of the Baboon ciphertext image in Example 1 after being cropped to different degrees. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0021] Combine the following Figure 1-Figure 7 The present invention describes a quantum image encryption method based on the BRQI model and the national encryption SM3.

[0022] Embodiment 1: This embodiment provides a quantum image encryption method based on the BRQI model and the national secret SM3. The process is as follows Figure 1 It mainly includes five stages: image quantum coding, color information scrambling, coordinate information scrambling, quantum key image generation and ciphertext image generation.

[0023] The overall objectives are: Input: color image I, set the adjustable parameters of the quantum logistic chaotic system and dissipation parameters ; Output: Encrypted image .

[0024] The specific processing methods for each stage are described in detail below.

[0025] Step 1: image quantum coding, that is, converting the color image into a quantum image represented by BRQI through quantum coding. In the BRQI representation method, n+6 quantum bits are used, of which n quantum bits store coordinate information, 1 stores color binary values, 3 store bit plane information, and 2 store color channel information.

[0026] For a A color image of 256×256 is taken as an example in this embodiment. n =16, k =8; expressed in BRQI format:

[0027] in, and Store the horizontal coordinate information and vertical coordinate information of the input image respectively; It is bit planes, is the binary color of the bit plane image, Represents RGB channels.

[0028] Step 2: scrambling the color information, that is, performing an operation of arranging the odd-even pixel bit planes of the obtained quantum image.

[0029] 2.1, assumption is the pixel position, As the basis for dividing odd and even pixels, is the bit plane, is the color channel, is a binary color; 2.2. For even pixels, that is , first use the SWAP gate to swap and information; then according to The value of is divided into two cases: , then Perform NOT gate operation, such as , then Perform NOT gate operation; finally, , and Perform NOT gate operation; 2.3. For odd pixels, that is , first use the SWAP gate to swap and information, and then according to The value of is divided into two cases: , then Perform NOT gate operation, such as , then Perform NOT gate operation; finally, , and Perform NOT gate operation.

[0030] Step 3: scrambling the coordinate information, that is, performing a quantum coordinate scrambling operation on the coordinate information of the quantum image.

[0031] 3.1. First, generate an integer sequence A = {1, 2, 3, ..., 16}, which represents the coordinate information in the BRQI image. The number of quantum bits is up to 16 bits; 3.2. Use the shuffled Fisher-Yates algorithm to shuffle the integer sequence A to obtain the sequence B = {10, 13, 6, 8, 2, 5, 11, 3, 16, 1, 9, 4, 15, 12, 14, 7}. Use the sequence B to encode the coordinates in the BRQI image. 3.3. Shuffle the integer sequence A twice again using the Fisher-Yates algorithm to obtain two shuffled sequences V = {7, 10, 13, 1, 16, 2, 8, 6, 5, 3, 4, 9, 14, 12, 15, 11} and sequence Z = {15, 7, 3, 10, 11, 8, 13, 14, 2, 6, 12, 5, 9, 1, 4, 16}; 3.4. Compare the values ​​of the sequences A, B, V and Z bit by bit. If two or more identical values ​​are found between the two sequences, cyclically shift the repeated part of one sequence to the right by one position; if there is only one repeated value, swap the repeated value with the first value or the last value in the sequence; in this embodiment, the sequences A, B, V and Z generated above have been adjusted, so this step is skipped.

[0032] 3.5. Establish rules: When hour, , Represents the i-th value in the sequence V and Z respectively, using The corresponding qubit is used as the control bit, The corresponding qubit is used as the target bit to construct the CNOT gate; when When using SWAP gate and The corresponding qubit; 3.6. Construct operators based on the rules established in step 3.5 , in the operator After the disturbance, the coordinate information change of the quantum image is expressed as: ; In the formula, represents the coordinate information in the quantum image, where and They are the horizontal coordinate information and vertical coordinate information of the image respectively.

[0033] Step 4: Quantum key image generation, that is, using quantum logistic mapping and national secret SM3 to generate the original key quantum image, and then performing quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image.

[0034] 4.1、User-set adjustable parameters and dissipation parameters ; 4.2. Using adjustable parameters Perform the national secret SM3 operation to generate the initial value of the quantum logistic map , , ;include: 4.2.1. Use the National Encryption SM3 to calculate adjustable parameters The hash value of is obtained as a 64-bit hexadecimal sequence L; 4.2.2. Use the shuffled Fisher-Yates algorithm to shuffle the sequence L and obtain , and then use Record L The index of sequence; 4.2.3. Construct the initial value of the quantum Logistic map by the following formula: ; ; ; in , , Three two-dimensional matrices representing color images , , The initial value of the quantum Logistic map; The function is used to convert a hexadecimal number to a decimal number.

[0035] 4.3. Using initial values , adjustable parameters and dissipation parameters Perform quantum Logistic mapping to generate the original ciphertext image, including: 4.3.1. Using initial values , adjustable parameters and dissipation parameters Perform quantum Logistic mapping to generate three pseudo-random sequences , , ,length , the quantum Logistic mapping relationship is expressed as: ; In the formula, represents the average value of the quantum state, which belongs to the classical part, Describing the principal quantum state and The dynamic coupling effect between them, as well as the dissipative characteristics of the system (given by the parameter control), represents uncertainty, represents quantum correlation and represents non-classicality; , and The plural , and The complex conjugate of; if the initial value of the system is a real number, then all the iterative values ​​will also be real numbers, set , and ; represents the base of natural logarithm, e≈2.71828; 4.3.2. Change the sequence , , Adjust to an integer between 0 and 255 to generate a sequence , and then combine the three pseudo-random sequences to reshape them into a three-dimensional array, perform quantum encoding on the array, and generate the original key quantum image, which is expressed as: ; in, The function represents rounding down. The function performs a modulo 256 operation on the result after rounding down to ensure that the result is in the range of [0, 255].

[0036] 4.4. Use quantum coordinate scrambling operation on the original key quantum image to obtain the quantum key image. The method is similar to step 4, except that the constructed operators are different, including: 4.4.1. First, generate an integer sequence A = {1, 2, 3, ..., 16}; 4.4.2. Use the shuffled Fisher-Yates algorithm to shuffle the integer sequence A and obtain the sequence , using the sequence Encoding the coordinates in the original key quantum image; 4.4.3. Shuffle the integer sequence A twice again using the Fisher-Yates algorithm to obtain two shuffled sequences. , ; 4.4.4、Bit-by-bit comparison sequence A、 , and If two or more identical values ​​are found between the two sequences, the repeated portion of one sequence is cyclically shifted one position to the right; if there is only one repeated value, the repeated value is swapped with the first value or the last value in the sequence; 4.4.5. Establish rules: If , the corresponding The qubit is used as a control bit, and the corresponding The qubit is used as the target bit to construct a CNOT gate; if , use the SWAP gate to swap and The two corresponding qubits of 4.4.6. Construct operators based on the rules established in step 4.4.5 , in the operator After the disturbance, the coordinate information change of the quantum image is expressed as: .

[0037] Step 5: Generate ciphertext image.

[0038] The quantum image scrambled in step 3 and the quantum key image generated in step 4 are subjected to an XOR operation (exclusive OR operation) on the color binary values ​​of the same bit plane of the same color channel under the same coordinate information to generate a ciphertext image corresponding to the original color image.

[0039] The following is an experimental verification and security analysis of the quantum image encryption method based on the BRQI model and the national encryption SM3 proposed in this embodiment.

[0040] 1. Feasibility test of the algorithm: This example selects several color images for encryption and decryption and related security testing experiments. The main test images are "Plane", "Pepper", and "Baboon", all of which are 256×256×3 in size. The encryption and decryption results are as follows: Figure 2 As shown in the figure, the encrypted image cannot convey valid information, while the decrypted image is consistent with the original image, that is, the feasibility of the encryption and decryption algorithm is verified.

[0041] 2. Key sensitivity analysis: An effective encryption algorithm must have a high degree of key sensitivity, that is, a slight change in the key will lead to a significant difference in the output result. The higher the sensitivity of the key, the larger the key space, thereby improving the resistance to brute force attacks. The key generation mechanism of this embodiment is based on the combination of the quantum logistic chaotic system and the national secret SM3 hash function, so the sensitivity of the key not only reflects the characteristics of the chaotic system, but also benefits from the irreversibility and diffusivity of the hash function. The quantum logistic chaotic system is a high-dimensional nonlinear system that is highly sensitive to small perturbations of initial conditions and parameters. The SM3 hash function will cause significant changes in the output (avalanche effect) when the input information changes slightly. Therefore, the key generated by combining these two mechanisms has extremely high sensitivity and unpredictability. This initial value sensitivity ensures that the generated key is unique for different inputs, while effectively increasing the difficulty of decryption. In addition, the introduction of the national secret SM3 further enhances the anti-collision and randomness of the key, so that even if the initial conditions or input information are slightly adjusted, the generated key is completely different and difficult to be predicted or reproduced by attackers. This shows that the key generation scheme based on quantum logistic chaotic system and SM3 proposed in this paper can provide significant advantages in key sensitivity and anti-attack capability, laying a solid foundation for the security of image encryption algorithm.

[0042] 3. Key space analysis The key space refers to the entire range of possible values ​​for generating keys in an encryption algorithm. The size of the key space directly affects the security of the encryption algorithm, because a sufficiently large key space can effectively resist brute force attacks. In the scheme of this embodiment, the decryption key used is sequence B as an example. For a 256×256 image, the Fisher-Yates algorithm is applied to shuffle the sequence A = {1, 2, ..., 16} to generate sequence B. When the Fisher-Yates algorithm is used to randomly shuffle sequence A, there are a total of 16! (16 factorial) different shuffling results. Therefore, the initial key space of sequence B generated by the Fisher-Yates algorithm is 16! . Assuming the key and The accuracy is , the key space size of this scheme is This shows that the encryption scheme has a large enough key space to ensure the security of image information.

[0043] 4. Information entropy analysis Information entropy refers to the average amount of information contained in each received message. A qualified encrypted image should have sufficient randomness. The formula for information entropy is: ; in, Indicates the proportion of grayscale pixel distribution in the image. Theoretically, the reasonable entropy value of encrypted image data should be close to 8. Table 1 shows the information entropy of various cipher images of the encryption algorithm and the information entropy comparison results. According to Table 1, the average information entropy of a single channel of all encrypted images of size 256×256×3 exceeds 7.99, which is close to 8. This shows that the pixels in these encrypted images are evenly and randomly distributed, and their information is disordered, indicating that the encryption algorithm has a good encryption effect.

[0044] Table 1 Information entropy of encrypted images

[0045] 5. Grayscale histogram analysis The grayscale histogram describes the distribution of pixel values ​​in an image. The more uniform the distribution of pixel values ​​in an image, the more difficult it is to perform statistical analysis. The histograms of the three images and their corresponding ciphertext images are shown in Figure 1. Figure 3 As shown in the figure, it can be seen that the pixel values ​​of the three channels in the original image are unevenly distributed, showing a specific distribution pattern. The pixel values ​​of the encrypted image are more evenly distributed, ranging from 0 to 255. This shows that the image after the encryption algorithm hides any statistical features in the image, proving the algorithm's resistance to statistical attacks.

[0046] 6. Pixel Correlation Analysis Statistical attacks are a common attack method in information transmission. In order to resist statistical attacks, an excellent image encryption algorithm must have a low correlation between adjacent images. The correlation coefficient reflects the relationship between horizontal, vertical, and oblique adjacent pixels in the image. The calculation formula of the correlation coefficient is as follows: ; The correlation coefficient is positively correlated with the correlation between adjacent pixels. The greater the correlation of a pixel, the closer its coefficient is to 1. Therefore, in order to ensure the security of the encoded image, its horizontal, vertical and diagonal correlation coefficients should be as low as possible, indicating that there is no correlation between adjacent pixels. Figure 4 The correlation between the original image and its encrypted image is described. Table 2 compares the correlation coefficients between the original image and the encrypted image.

[0047] Table 2 Correlation comparison between original image and ciphertext image

[0048] pass Figure 4It can be intuitively found that there is a strong correlation between adjacent pixels in the plaintext image, while the correlation between pixels in the ciphertext image is significantly reduced. The results in Table 2 also support this conclusion. There is a strong correlation between adjacent pixels in the original image, so its correlation coefficient is close to 1. However, the correlation coefficient of the encoded image is significantly reduced, and its average value is less than 0.01, indicating that there is currently no correlation between adjacent pixels. Therefore, this result proves that the encryption method proposed in the present invention will significantly reduce the correlation between pixels, so that the ciphertext image presents a chaotic distribution in three directions, greatly enhancing its ability to resist statistical attacks.

[0049] 7. Analysis of Anti-Differential Attack Capability The purpose of a differential attack is to infer the possible value of a key by comparing the difference between a pair of plaintext and ciphertext. A qualified encryption algorithm should be able to effectively resist differential attacks. The number of pixels change rate (NPCR) and uniform change intensity (UACI) can be used to quantify this ability. Their calculation formulas are as follows: ; ; M and N represent the length and width of the image respectively. D ( i , j ) is the difference indicator function. If the two images are at the pixel position ( i , j ) is different, then D ( i , j )=1, otherwise 0; and C and C' represent the encrypted images that differ by one pixel from the original images. The ideal theoretical values ​​of NPCR and UACI are 99.6094% and 33.4635%, respectively. Table 3 shows the relevant results and comparisons.

[0050] Table 3 Correlation comparison between original image and ciphertext image

[0051] It can be found from the table that the images encrypted by the present invention all meet the corresponding standards, indicating that when the plaintext image undergoes a slight change, the ciphertext image will have a large difference, that is, the encryption algorithm has a good ability to resist differential attacks.

[0052] 8. Analysis of noise attack resistance In the process of image data transmission, in addition to various malicious attacks, environmental interference is an important cause of information loss. Communication noise is a type of environmental interference that is more likely to occur during image transmission. If the image is damaged by noise, some information will be lost after decryption, or even the image cannot be decrypted. This embodiment selects salt and pepper noise to conduct simulation experiments on Baboon (256*256). The test will select 1%, 3%, 5% and 10%, 30%, 50% salt and pepper noise to interfere with the encrypted image respectively. The comparison chart after decryption is as follows: Figure 5 As shown in the figure. From the results, it can be seen that when the ciphertext is interfered by noise, the decrypted image can still obtain the basic information of the plaintext image, which intuitively proves that the encryption algorithm has a certain ability to resist noise attacks. At the same time, from Table 4, it can be found that the PSNR after the noise attack still has a relatively good performance.

[0053] Table 4 Correlation comparison of original image and ciphertext image under salt and pepper noise attack

[0054] 9. Analysis of the ability to resist cropping attacks In addition to the noise pollution that may occur during Internet image transmission, data loss is another reason for the reuse of image information. During the transmission process, images may encounter network congestion, packet loss, or data transmission protocol defects, resulting in incomplete data received by the terminal. Image data loss can generally be divided into two categories: blocking attack and cropping attack. The former is the loss of part of a single channel, while the latter is the loss of all pixel values ​​in a region. This paper conducts simulation experiments on both types. After encryption, the blocking attack causes the Baboon image to lose different channel values ​​in different areas. The cropping attack will delete 10%, 30%, 50%, and 80% of the encrypted Baboon image. Figure 6 and Figure 7 The comparison between describes the decrypted image. Figure 6It can be seen that although the blocking attack will cause the loss of channel information of different channels, the decrypted image can still obtain most of its information. There is no obvious change in the cropping attack before the image loses 50%. When the lost area is greater than 50%, although the image becomes more blurred, the basic outline and content of the image can still be obtained. Therefore, intuitively, the encryption algorithm has a good ability to resist cropping attacks. At the same time, Tables 5 and 6 give the PSNR values ​​of the decrypted images after the attack. It can be found that in the blocking attack, although the PSNR value of the three-channel combination with the largest loss is much lower than that of the single channel and the full channel, it can still be maintained above 18; in the cropping attack, although the PSNR will drop sharply with the increase of the cropping area, in the case of 80% loss, the PSNR is still above 10. Therefore, the encryption algorithm has a good performance in the case of confusing pixel positions, and it can also better resist data attacks.

[0055] Table 5 Correlation comparison of blocking attacks between original image and ciphertext image

[0056] Table 6 Correlation comparison between original image and ciphertext image cropping attack

[0057] From the above tests, it can be found that the quantum image encryption method based on the BRQI model and the national secret SM3 proposed in this embodiment generates keys through the quantum Logistic chaotic system and the national secret SM3, diffuses and scrambles the image, destroys the pixel correlation at the bit level, and better achieves the scrambling effect. The key space of this encryption algorithm is large, the key sensitivity is strong, the gray value distribution of the encrypted image is relatively uniform, and the single channel information entropy of the 256×256 image is stable at more than 7.99. It has good performance in the face of noise attacks and cropping attacks, which proves that the correlation between its pixels is extremely small and the security of its encryption algorithm is relatively strong.

[0058] In summary, the present invention realizes an efficient and quantum attack-resistant image encryption algorithm by combining the BRQI model, the national secret SM3 algorithm and the quantum logistic chaotic system. The algorithm uses the quantum chaotic system to generate high-complexity keys, combined with the strong anti-collision property of SM3, which significantly improves the security and reliability of encryption. At the same time, based on the efficient processing capability of the BRQI model, the algorithm can quickly complete encryption and decryption operations in a quantum environment, meeting the needs of large-scale image data processing. In addition, the algorithm complies with national cryptographic standards, is applicable to multiple fields, and has broad promotion value.

[0059] Embodiment 2: This embodiment provides a non-transitory computer-readable storage medium, on which computer instructions are stored, the computer instructions enable the computer to execute a quantum image encryption method based on the BRQI model and the national secret SM3, the method comprising the following steps: S100, acquiring a color image, and converting the color image into a quantum image represented by BRQI through quantum coding; S200, performing an arrangement operation of the bit plane of the odd and even value pixels on the obtained quantum image, changing the three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image; S300, performing a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in step S200, scrambling the coordinate information of the plaintext quantum image; S400, using quantum logistic mapping and national secret SM3 to generate an original key quantum image, and then performing quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image; S500, performing an XOR operation on the quantum image scrambled in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image.

[0060] Embodiment 3: This embodiment provides an electronic device, which may include: a processor, a communications interface, a memory, and a communication bus, wherein the processor, the communications interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute a quantum image encryption method based on the BRQI model and the national encryption SM3, and the method includes the following steps: S100, acquiring a color image, and converting the color image into a quantum image represented by BRQI through quantum coding; S200, performing an arrangement operation of the bit plane of the odd and even value pixels on the obtained quantum image, changing the three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image; S300, performing a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in step S200, scrambling the coordinate information of the plaintext quantum image; S400, using quantum logistic mapping and national secret SM3 to generate an original key quantum image, and then performing quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image; S500, performing an XOR operation on the quantum image scrambled in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image.

[0061] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0062] Embodiment 4: This embodiment provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a quantum image encryption method based on the BRQI model and the national encryption SM3. The method includes the following steps: S100, acquiring a color image, and converting the color image into a quantum image represented by BRQI through quantum coding; S200, performing an arrangement operation of the bit plane of the odd and even value pixels on the obtained quantum image, changing the three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image; S300, performing a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in step S200, scrambling the coordinate information of the plaintext quantum image; S400, using quantum logistic mapping and national secret SM3 to generate an original key quantum image, and then performing quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image; S500, performing an XOR operation on the quantum image scrambled in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image.

[0063] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0064] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A quantum image encryption method based on the BRQI model and the national secret SM3, characterized in that: The steps include: S100, acquiring a color image, and converting the color image into a quantum image represented by BRQI through quantum coding; S200, performing an arrangement operation of the bit plane of the odd and even value pixels on the obtained quantum image, changing the three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image; S300, performing a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in step S200, scrambling the coordinate information of the plaintext quantum image; S400, using quantum logistic mapping and national secret SM3 to generate an original key quantum image, and then performing quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image; S500, performing an XOR operation on the quantum image scrambled in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image.

2. The quantum image encryption method based on the BRQI model and the national secret SM3 according to claim 1 is characterized in that: In step S100, the color image is converted into a quantum image represented by BRQI through quantum coding, and the specific method is as follows: For a The color image of is expressed as follows using the BRQI representation method: ; in, and Store the horizontal coordinate information and vertical coordinate information of the input image respectively; It is bit planes, is the binary color of the bit plane image, Represents RGB channels.

3. The quantum image encryption method based on the BRQI model and the national secret SM3 according to claim 2 is characterized in that: In step S200, the obtained quantum image is subjected to an arrangement operation of the odd and even value pixel bit planes, and the specific method is as follows: S210, set is the pixel position, As the basis for dividing odd and even pixels, is the bit plane, is the color channel, is a binary color; S220, for even pixels, that is, , first use the SWAP gate to swap and information; then according to The value of is divided into two cases: , then Perform NOT gate operation, such as , then Perform NOT gate operation; finally, , and Perform NOT gate operation; S230, for odd pixels, that is, , first use the SWAP gate to swap and information, and then according to The value of is divided into two cases: , then Perform NOT gate operation, such as , then Perform NOT gate operation; finally, , and Perform NOT gate operation.

4. The quantum image encryption method based on the BRQI model and the national secret SM3 according to claim 1 is characterized in that: The specific method of the quantum coordinate scrambling operation in step S300 is: S310, first generate an integer sequence A = {1, 2, 3, ..., n}, where n represents the coordinate information in the BRQI image The number of qubits; S320, using the shuffled Fisher-Yates algorithm to shuffle the integer sequence A to obtain a sequence B, and using the sequence B to encode the coordinates in the BRQI image; S330, shuffle the integer sequence A twice again using the Fisher-Yates algorithm to obtain two shuffled sequences V and Z; S340, compare the values ​​of the sequences A, B, V, and Z bit by bit, and if two or more identical values ​​are found between the two sequences, cyclically shift the repeated portion of one sequence to the right by one position; if there is only one repeated value, exchange the repeated value with the first value or the last value in the sequence; S350, establish rules: when hour, , Represents the i-th value in the sequence V and Z respectively, using The corresponding qubit is used as the control bit, The corresponding qubit is used as the target bit to construct the CNOT gate; when When using SWAP gate and The corresponding qubit; S360: Construct an operator based on the rule established in step S350 , in the operator After the disturbance, the coordinate information change of the quantum image is expressed as: ; In the formula, represents the coordinate information in the quantum image, where and They are the horizontal coordinate information and vertical coordinate information of the image respectively.

5. The quantum image encryption method based on the BRQI model and the national secret SM3 according to claim 1 is characterized in that: The specific method of using quantum logistic mapping and national secret SM3 to generate the original key quantum image in step S400 is: S410, User-set adjustable parameters and dissipation parameters ; S420, using adjustable parameters Perform the national secret SM3 operation to generate the initial value of the quantum logistic map , , ;include: S421, use the national secret SM3 to calculate adjustable parameters The hash value of is obtained as a 64-bit hexadecimal sequence L; S422, use the shuffled Fisher-Yates algorithm to shuffle the sequence L, and obtain , and then use Record L The index of sequence; S423. Construct the initial value of the quantum Logistic map by the following formula: ; ; ; in , , Three two-dimensional matrices representing color images , , The initial value of the quantum Logistic map; The function is used to convert a hexadecimal number to a decimal number; S430, using initial value , adjustable parameters and dissipation parameters Perform quantum Logistic mapping to generate the original ciphertext image, including: S431, use initial value , adjustable parameters and dissipation parameters Perform quantum Logistic mapping to generate three pseudo-random sequences , , ,length , the quantum Logistic mapping relationship is expressed as: ; In the formula, represents the average value of the quantum state, which belongs to the classical part, Describing the principal quantum state and The dynamic coupling effect between them, including the dissipative characteristics of the system, represents uncertainty, represents quantum correlation and represents non-classicality; , and The plural , and The complex conjugate of; if the initial value of the system is a real number, then all the iterative values ​​will also be real numbers, set , and ; represents the base of natural logarithm, e≈2.71828; S432, sequence , , Adjust to an integer between 0 and 255 to generate a sequence , and then combine the three pseudo-random sequences to reshape them into a three-dimensional array, perform quantum encoding on the array, and generate the original key quantum image, which is expressed as: ; in, The function represents rounding down. The function performs a modulo 256 operation on the result after rounding down to ensure that the result is in the range of [0, 255].

6. The quantum image encryption method based on the BRQI model and the national secret SM3 according to claim 1 is characterized in that: In step S400, a quantum coordinate scrambling operation is performed on the original key quantum image to generate a quantum key image. The specific method is: S441. First, generate an integer sequence A = {1, 2, 3, ..., n}, where n represents the coordinate information in the original key quantum image. The number of qubits; S442. Use the shuffled Fisher-Yates algorithm to shuffle the integer sequence A and obtain the sequence , using the sequence Encoding the coordinates in the original key quantum image; S443, shuffle the integer sequence A twice again using the Fisher-Yates algorithm to obtain two shuffled sequences , ; S444, bit by bit comparison sequence A, , and If two or more identical values ​​are found between the two sequences, the repeated portion of one sequence is cyclically shifted one position to the right; if there is only one repeated value, the repeated value is swapped with the first value or the last value in the sequence; S445. Establish rules: If , the corresponding The qubit is used as a control bit, and the corresponding The qubit is used as the target bit to construct a CNOT gate; if , use the SWAP gate to swap and The two corresponding qubits of S446: Construct an operator based on the rule established in step S445 , in the operator After the disturbance, the coordinate information change of the quantum image is expressed as: ; In the formula, represents the coordinate information in the quantum image, where and They are the horizontal coordinate information and vertical coordinate information of the image respectively.

7. The quantum image encryption method based on the BRQI model and the national secret SM3 according to claim 1 is characterized in that: Step S500 specifically performs an XOR operation on the color binary values ​​of the same bit plane of the same color channel under the same coordinate information on the quantum image scrambled in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image.

8. A non-transitory computer-readable storage medium, characterized in that: Computer instructions are stored thereon, which enable the computer to execute the quantum image encryption method based on the BRQI model and the national encryption SM3 as described in any one of claims 1-7.

9. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus, and the processor calls the logic instructions in the memory to execute the quantum image encryption method based on the BRQI model and the national encryption SM3 as described in any one of claims 1-7.

10. A computer program product, characterized in that The computer program product includes a computer program, which is stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer executes the quantum image encryption method based on the BRQI model and the national encryption SM3 as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Quantum image encryption method based on two-dimensional cross mapping and dynamic diffusion

    CN114978487A

  • Quantum image encryption and decryption method based on quantum DNA codec

    CN116150777A

  • Image encryption communication algorithm based on two-dimensional lag-complex logistic mapping, and image decryption communication algorithm based on two-dimensional lag-complex logistic mapping

    WO2022077793A1

Cited By

  • Mobile phone encryption communication method integrated with optical quantum random number generator

    CN120785643A