Quantum Image Encryption Method Based on BRQI Model and National Cryptography SM3

By using the BRQI model and Guomi SM3 combined with the quantum Logistic chaotic system method in the quantum computing environment, the problem of insufficient security of traditional encryption algorithms in the quantum computing environment is solved, and efficient and secure encryption of quantum images is achieved, meeting the needs of the future quantum computing era.

CN119814278BActive Publication Date: 2025-06-17NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional image encryption algorithms have potential risks when facing the powerful computing power of quantum computing technology, and it is difficult to achieve high-intensity encryption protection of image data in quantum environments.

Method used

The quantum image encryption method based on the BRQI model and Guomi SM3 is adopted, and combined with the quantum Logistic chaotic system, the quantum image is efficiently encrypted through quantum encoding, arrangement of odd-even pixel bit planes, quantum coordinate scrambling and quantum key generation.

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 CN119814278B_ABST
    Figure CN119814278B_ABST
Patent Text Reader

Abstract

The present invention discloses a quantum image encryption method based on the BRQI model and the national cryptographic SM3, which includes: converting the color image into a quantum image represented by BRQI through quantum coding; processing the plaintext quantum image using a color information scrambling algorithm, and then scrambling the coordinates of the processed image. Additionally, using a quantum Logistic map and the national cryptographic SM3 to generate an original key quantum image, and then performing a quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image; finally, performing an XOR operation on the scrambled quantum image and the quantum key image to generate a ciphertext image corresponding to the original color image. The present invention combines the BRQI model, the SM3 algorithm, and the quantum Logistic chaotic system, and proposes an efficient and quantum-attack-resistant image encryption algorithm, significantly improving the security and reliability of encryption.
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 particularly relates to a quantum image encryption method based on the BRQI model and the national cryptographic SM3 algorithm. Background Art

[0002] With the rapid development of information technology, the importance of image data in communication, storage, and processing has been increasing day by day. However, due to the openness of network communication 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 cryptography 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. Therefore, developing image encryption algorithms 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, as a national cryptographic standard algorithm, the SM3 hash algorithm is widely used in fields such as data integrity protection and digital signature due to its excellent collision resistance and preimage attack resistance. Combining the characteristics of quantum computing and the national cryptographic algorithm standard, designing 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, due to its sensitivity to initial values and pseudo-randomness, the chaotic system has broad application potential in the field of image encryption. Quantum chaotic systems, especially the quantum Logistic chaotic system, combine the unique properties of classical chaotic systems and quantum computing, and can generate more complex and random key sequences, significantly enhancing the anti-attack ability of encryption algorithms. If a quantum chaotic system can be combined with the BRQI model and the national cryptographic SM3 algorithm, an efficient and secure quantum image encryption algorithm will surely be constructed, thereby achieving high-strength encryption protection for image data in a quantum environment.

[0005] Therefore, researching a quantum image encryption algorithm based on the BRQI model, the national cryptographic SM3 algorithm, and the quantum Logistic chaotic system is not only an important requirement in the field of quantum computing security but also conforms to 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 at least one of the technical problems existing in the related art to some extent.

[0007] An object of the present invention is to provide a quantum image encryption method based on the BRQI model and the national cryptography SM3. By combining the BRQI quantum representation model and the national cryptography SM3 quantum Logistic chaotic system, an efficient and secure quantum image encryption algorithm is constructed, so as to achieve high-strength encryption protection for image data in the quantum environment.

[0008] In order to achieve the above object, on the one hand, the present invention provides a quantum image encryption method based on the BRQI model and the national cryptography SM3, including the following steps:

[0009] S100. Obtain a color image and convert the color image into a quantum image represented by BRQI through quantum coding;

[0010] S200. Perform an arrangement operation on the parity pixel bit planes of the obtained quantum image, change the three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image;

[0011] S300. Perform a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in step S200, and scramble the coordinate information of the plaintext quantum image;

[0012] S400. Generate an original key quantum image using the quantum Logistic mapping and the national cryptography SM3, and then perform a quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image;

[0013] S500. Perform 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.

[0014] 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 through quantum coding, and the specific method is:

[0015] For a color image, it is represented in the BRQI representation method as:

[0016]

[0017] Among them, and respectively store the horizontal coordinate information and the vertical coordinate information of the input image; is the th bit plane, is the binary color of the bit plane image, Indicates the RGB channel.

[0018] Preferably, in step S200, an operation of arranging the parity value pixel bit planes of the obtained quantum image is performed. The specific method is as follows:

[0019] S210. Let be the pixel position, be the basis for dividing odd and even pixels, be the bit plane, be the color channel, be the binary color;

[0020] S220. For even pixels, that is, , first use the SWAP gate to swap the information of and . Then, according to the value of , it is divided into two cases: if , then perform a NOT gate operation on . If , then perform a NOT gate operation on . Finally, perform NOT gate operations on , and respectively;

[0021] S230. For odd pixels, that is, , first use the SWAP gate to swap the information of and . Then, according to the value of , it is divided into two cases: if , then perform a NOT gate operation on . If , then perform a NOT gate operation on . Finally, perform NOT gate operations on , and respectively.

[0022] Preferably, the specific method of the quantum coordinate scrambling operation in step S300 is as follows:

[0023] S310. First, generate an integer sequence A = {1, 2, 3,..., n}, where n is the number of quantum bits representing the coordinate information in the BRQI image;

[0024] S320. Use the shuffle Fisher-Yates algorithm to shuffle the integer sequence A to obtain the sequence B, and use the sequence B to encode the coordinates in the BRQI image;

[0025] S330. Shuffle the integer sequence A twice again using the Fisher - Yates algorithm to obtain two shuffled sequences V and Z;

[0026] S340. Compare the values of sequences A, B, V, and Z bit - by - bit. If two or more identical values are found between two sequences, cyclically shift the repeated part of one sequence one position to the right; if there is only one repeated value, swap this repeated value with the first value or the last value in the sequence;

[0027] S350. Establish the rule: When At this time, And Represent the i - th values in sequences V and Z respectively. Use the quantum bit corresponding to As the control bit, and the quantum bit corresponding to As the target bit to construct a CNOT gate; when At this time, use a SWAP gate to swap the quantum bits corresponding to And ;

[0028] S360. Construct the operator According to the rule established in step S350. After being perturbed by the operator , the change in the coordinate information of the quantum image is expressed as:

[0029] ;

[0030] In the formula, Represents the coordinate information in the quantum image, where And Are the horizontal coordinate information and vertical coordinate information of the image respectively.

[0031] Preferably, the specific method for generating the original key quantum image using the quantum Logistic map and the national cryptographic algorithm SM3 in step S400 is as follows:

[0032] S410. The user sets the adjustable parameter And the dissipation parameter ;

[0033] S420. Use the adjustable parameter To perform the national cryptographic algorithm SM3 operation to generate the initial values , , Of the quantum Logistic map; including:

[0034] S421. Use the national cryptographic algorithm SM3 to calculate the hash value of the adjustable parameter To obtain a 64 - bit hexadecimal sequence L;

[0035] S422. Shuffle the sequence L using the Fisher - Yates shuffle algorithm to obtain , and then use to record the indices in L for obtaining the sequence during decryption;

[0036] S423. Construct the initial value of the quantum Logistic map through the following formula:

[0037] ;

[0038] ;

[0039] ;

[0040] where , , respectively represent the initial values of the quantum Logistic maps of the three two - dimensional matrices , , of the color image; The function is used to convert a hexadecimal number to a decimal number;

[0041] S430. Use the initial value , the adjustable parameter and the dissipation parameter to generate the original ciphertext image through quantum Logistic mapping, including:

[0042] S431. Use the initial value , the adjustable parameter and the dissipation parameter to perform quantum Logistic mapping to generate three pseudo - random sequences , , , with length . The quantum Logistic mapping relation is expressed as:

[0043] ;

[0044] In the formula, represents the average value of the quantum state, belonging to the classical part, describes the dynamic coupling effect between the main quantum state and , and at the same time includes the dissipation characteristics of the system, representing uncertainty, represents the quantum correlation, representing non - classicality; , and are complex numbers respectively 、 and 's complex conjugates; if the initial value of the system is real, then all iteratively obtained values will also be real. Set 、 and ; represents the base of the natural logarithm, e≈2.71828;

[0045] S432. Adjust the sequences 、 、 to integers between 0 and 255 to generate the sequence , then combine and reshape the three pseudo-random sequences into a three-dimensional array, and perform quantum encoding on the array to generate the original key quantum image, denoted as:

[0046] ;

[0047] wherein, function represents rounding down, function performs a modulo 256 operation on the result of rounding down to ensure that the result is within the range of [0, 255].

[0048] Preferably, 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 as follows:

[0049] S441. First, generate an integer sequence A = {1, 2, 3,..., n}, where n is the number of quantum bits representing the coordinate information in the original key quantum image;

[0050] S442. Use the shuffle Fisher-Yates algorithm to shuffle the integer sequence A to obtain the sequence , and use the sequence to encode the coordinates in the original key quantum image;

[0051] S443. Shuffle the integer sequence A twice again through the shuffle Fisher-Yates algorithm to obtain two shuffled sequences 、 ;

[0052] S444. Compare the sequences A, 、 and The value, if two or more identical values are found between two sequences, cyclically shift the repeated part of one sequence one position to the right; if there is only one repeated value, swap this repeated value with the first value or the last value in the sequence;

[0053] S445. Establish a rule: If , use the corresponding qubit as the control qubit and the corresponding qubit as the target qubit to construct a CNOT gate; if , use the SWAP gate to swap the two corresponding qubits of and ;

[0054] S446. Construct an operator according to the rule established in step S445 . After being perturbed by the operator , the change in the coordinate information of the quantum image is expressed as:

[0055] ;

[0056] In the formula, represents the coordinate information in the quantum image, where and are the horizontal coordinate information and vertical coordinate information of the image respectively.

[0057] Preferably, step S500 specifically performs an XOR operation on the color binary values of the same bit plane in the same color channel with the same coordinate information between 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

[0058] On the other hand, the present invention provides a non-transitory computer-readable storage medium, on which computer instructions are stored, and the computer instructions cause the computer to execute the above-mentioned quantum image encryption method based on the BRQI model and the national cryptography SM3.

[0059] On yet another aspect, the present invention provides an electronic device, including: 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 logical instructions in the memory to execute the above-mentioned quantum image encryption method based on the BRQI model and the national cryptography SM3.

[0060] On still another aspect, the present invention provides a computer program product, the computer program product includes a computer program, the computer program is stored on a non-transitory computer-readable storage medium, and 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 cryptography SM3.

[0061] Beneficial effects: The present invention combines the BRQI model, the national cryptographic 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 uses a quantum chaotic system to generate a high-complexity key, combines the strong collision resistance of SM3, and significantly improves the security and reliability of encryption. At the same time, based on the efficient processing ability of the BRQI model, the algorithm can quickly complete the encryption and decryption operations in a quantum environment, meeting the requirements of large-scale image data processing. In addition, the algorithm conforms to national cryptographic standards, is applicable to multiple fields, and has broad promotion value. Description of the Drawings

[0062] Figure 1 It is a flowchart of the quantum image encryption method based on the BRQI model and the national cryptographic SM3 of the present invention;

[0063] Figure 2 They are the encrypted and decrypted images of Plane, Pepper, and Baboon in Example 1;

[0064] Figure 3 They are the gray-scale distributions of Plane, Pepper, and Baboon in Example 1, and the gray-scale histograms of the R, G, and B channels before and after encryption;

[0065] Figure 4 They are the horizontal and vertical correlations of the original images and encrypted images of Plane, Pepper, and Baboon in Example 1;

[0066] Figure 5 They are the decrypted images of the Baboon ciphertext image after adding different amounts of salt-and-pepper noise in Example 1;

[0067] Figure 6 They are the decrypted images of the Baboon ciphertext image after being blocked in different situations in Example 1;

[0068] Figure 7 They are the decrypted images of the Baboon ciphertext image after being cropped to different degrees in Example 1. Detailed Implementation Manner

[0069] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them, and they should not be construed as limiting the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to 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 the purpose of description and cannot be construed as indicating or implying relative importance.

[0070] The following will describe Figures 1-7 the quantum image encryption method provided by the present invention based on the BRQI model and the national cryptographic SM3.

[0071] Embodiment 1: This embodiment provides a quantum image encryption method based on the BRQI model and the national cryptographic SM3. Its process is as Figure 1 shown. It mainly includes five stages: image quantum encoding, color information scrambling, coordinate information scrambling, quantum key image generation, and ciphertext image generation.

[0072] The overall objective is:

[0073] Input: Color image I, set the adjustable parameters and the dissipation parameter of the quantum Logistic chaotic system;

[0074] Output: Encrypted image .

[0075] The following will elaborate on the specific processing methods for each stage in detail.

[0076] Step 1, image quantum encoding, that is: converting the color image into a quantum image represented by BRQI through quantum encoding. In the BRQI representation method, n + 6 quantum bits are used, where n quantum bits store coordinate information, 1 stores the color dichromatic value, 3 store bit plane information, and 2 store color channel information.

[0077] For a color image, in this embodiment, an image of 256×256 is taken as an example, n = 16, k = 8; represented in the BRQI representation method as:

[0078]

[0079] Among them, and store the horizontal coordinate information and vertical coordinate information of the input image respectively; is the least significant bit plane, is the binary color of the bit plane image, representing the RGB channels.

[0080] Step 2: Color information scrambling, that is, perform an arrangement operation on the parity pixel bit planes of the obtained quantum image.

[0081] 2.1. Let be the pixel position, be the basis for dividing odd and even pixels, be the bit plane, be the color channel, be the binary color;

[0082] 2.2. For even pixels, that is, , first use the SWAP gate to swap the information of and ; then, according to the value of , it is divided into two cases: if , then perform a NOT gate operation on , if , then perform a NOT gate operation on ; finally, perform NOT gate operations on , and respectively;

[0083] 2.3. For odd pixels, that is, , first use the SWAP gate to swap the information of and , then, according to the value of , it is divided into two cases: if , then perform a NOT gate operation on , if , then perform a NOT gate operation on ; finally, perform NOT gate operations on , and respectively.

[0084] Step 3: Coordinate information scrambling, that is, perform a quantum coordinate scrambling operation on the coordinate information of the quantum image.

[0085] 3.1. First, generate an integer sequence A = {1, 2, 3,..., 16}, representing the quantum bits of the coordinate information in the BRQI image, the highest 16 bits;

[0086] 3.2. Shuffle the integer sequence A using the Fisher-Yates algorithm to obtain sequence B = {10, 13, 6, 8, 2, 5, 11, 3, 16, 1, 9, 4, 15, 12, 14, 7}, and use sequence B to encode the coordinates in the BRQI image;

[0087] 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};

[0088] 3.4. Compare the values of sequences A, B, V, and Z bit by bit. If two or more identical values are found between two sequences, cyclically shift the repeated part of one sequence one position to the right; if there is only one repeated value, swap this 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.

[0089] 3.5. Establish the rule: When At this time, , respectively represent the i-th value in sequences V and Z. Use The corresponding qubit as the control qubit, The corresponding qubit as the target qubit to construct a CNOT gate; when At this time, use the SWAP gate to swap And The corresponding qubits;

[0090] 3.6. Construct the operator according to the rule established in step 3.5. After being perturbed by the operator , the change in the coordinate information of the quantum image is expressed as:

[0091] ;

[0092] In the formula, represents the coordinate information in the quantum image, where and are the horizontal coordinate information and vertical coordinate information of the image respectively.

[0093] Step 4. Generation of the quantum key image, that is, use the quantum Logistic map and the national cipher SM3 to generate the original key quantum image, and then perform quantum coordinate scrambling operation on the original key quantum image to generate the quantum key image.

[0094] 4.1. User sets adjustable parameters and dissipation parameters ;

[0095] 4.2. Use the adjustable parameters to perform the national secret SM3 operation to generate the initial value of the quantum Logistic map , , ; including:

[0096] 4.2.1. Use the national secret SM3 to calculate the hash value of the adjustable parameters to obtain a 64-bit hexadecimal sequence L;

[0097] 4.2.2. Use the shuffle Fisher-Yates algorithm to shuffle the sequence L to obtain , and then use to record the index of in L for obtaining the sequence during decryption;

[0098] 4.2.3. Construct the initial value of the quantum Logistic map through the following formula:

[0099] ;

[0100] ;

[0101] ;

[0102] where , , respectively represent the initial values of the quantum Logistic maps of the three two-dimensional matrices , , of the color image; The function is used to convert hexadecimal numbers to decimal numbers.

[0103] 4.3. Use the initial value , adjustable parameters and dissipation parameters to perform the quantum Logistic map to generate the original ciphertext image, including:

[0104] 4.3.1. Use the initial value , adjustable parameters and dissipation parameters to perform the quantum Logistic map to generate three pseudo-random sequences , , , with the length , the quantum Logistic mapping relation is expressed as:

[0105] ;

[0106] In the formula, represents the average value of the quantum state, belonging to the classical part, describes the main quantum state and the dynamic coupling effect between them, and at the same time includes the dissipation characteristics of the system (controlled by the parameter ), represents uncertainty, represents quantum correlation, representing non-classicality; , and are the complex conjugates of the complex numbers , and respectively; if the initial value of the system is real, then all the values obtained by iteration will also be real. Set , and ; represents the base of the natural logarithm, e≈2.71828;

[0107] 4.3.2. Adjust the sequences , , to integers between 0 and 255 to generate the sequence , and then combine and reshape the three pseudo-random sequences into a three-dimensional array, and perform quantum encoding on the array to generate the original key quantum image, which is expressed as:

[0108] ;

[0109] Among them, the function represents rounding down, the function performs a modulo 256 operation on the result of rounding down to ensure that the result is within the range of [0, 255].

[0110] 4.4. Perform quantum coordinate scrambling operation on the original key quantum image to obtain the quantum key image. The method is similar to that in Step 4, but the difference lies in the constructed operator, which specifically includes:

[0111] 4.4.1. First, generate an integer sequence A = {1, 2, 3,..., 16};

[0112] 4.4.2. Use the shuffled Fisher-Yates algorithm to shuffle the integer sequence A to obtain the sequence , and use the sequence Encode the coordinates in the original key quantum image;

[0113] 4.4.3. Shuffle the integer sequence A twice again through the Shuffle Fisher-Yates algorithm to obtain two shuffled sequences 、 ;

[0114] 4.4.4. Compare the values of sequence A, 、 and bit by bit. If two or more identical values are found between two sequences, cyclically shift the repeated part of one sequence one position to the right; if there is only one repeated value, swap this repeated value with the first value or the last value in the sequence;

[0115] 4.4.5. Establish the rule: If , use the corresponding qubit as the control qubit and the corresponding qubit as the target qubit to construct a CNOT gate; if , use the SWAP gate to swap the two corresponding qubits of and ;

[0116] 4.4.6. Construct the operator according to the rule established in step 4.4.5. After being perturbed by the operator , the change in the coordinate information of the quantum image is expressed as:

[0117] .

[0118] Step 5. Generate the ciphertext image.

[0119] Perform an XOR operation on the color binary values of the same bit plane in the same color channel with the same coordinate information between the quantum image scrambled in step 3 and the quantum key image generated in step 4 to generate a ciphertext image corresponding to the original color image.

[0120] Next, conduct experimental verification and security analysis on the quantum image encryption method based on the BRQI model and the national cipher SM3 proposed in this embodiment.

[0121] 1. Feasibility detection of the algorithm:

[0122] In this embodiment, several color images are selected for encryption, decryption, and related security test experiments. The main test images are "Plane", "Pepper", and "Baboon", all with a size of 256×256×3. The encryption and decryption results are as Figure 2As shown, the encrypted image cannot convey valid information, while the decrypted image is identical to the original image, thus verifying the feasibility of the encryption and decryption algorithm.

[0123] 2. Key Sensitivity Analysis:

[0124] An effective encryption algorithm must have a high degree of key sensitivity, that is, a slight change in the key will result in a significant difference in the output result. The higher the key sensitivity, the larger the key space, thus enhancing the resistance to brute-force attacks. The key generation mechanism of this embodiment is based on the combination of a quantum Logistic chaotic system and the national cryptographic SM3 hash function. Therefore, the key sensitivity not only reflects the characteristics of the chaotic system but also benefits from the irreversibility and diffusion of the hash function. The quantum Logistic chaotic system is a high-dimensional nonlinear system that is highly sensitive to small perturbations in the initial conditions and parameters. The SM3 hash function will cause a significant change in the output when there is a slight change in the input information (avalanche effect). Therefore, the keys generated by combining these two mechanisms have extremely high sensitivity and unpredictability. This initial value sensitivity ensures the uniqueness of the generated keys for different inputs and effectively increases the difficulty of deciphering. In addition, the introduction of the national cryptographic SM3 further enhances the collision resistance and randomness of the keys, making the generated keys completely different even for minor adjustments to the initial conditions or input information and difficult to be predicted or reproduced by attackers. This shows that the proposed key generation scheme based on the quantum Logistic chaotic system and SM3 can provide significant advantages in terms of key sensitivity and anti-attack ability, laying a solid foundation for the security of the image encryption algorithm.

[0125] 3. Key Space Analysis

[0126] The key space refers to the entire range of possible values of the keys generated in the 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, taking the decryption key as an example, for a 256×256 image, the Fisher-Yates algorithm is used to shuffle the sequence A = {1, 2,..., 16} to generate the sequence B. When using the Fisher-Yates algorithm to randomly shuffle the sequence A, there are a total of 16! (16 factorial) different shuffling results. Therefore, the initial key space of the sequence B generated by the Fisher-Yates algorithm is 16!. Assuming the and precision is , the size of the key space of this scheme is . This shows that the encryption scheme has a sufficiently large key space, ensuring the security of the image information.

[0127] 4. Information Entropy Analysis

[0128] 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 as follows:

[0129] ;

[0130] where represents the proportion of the gray pixel distribution within the image. Theoretically, the reasonable entropy value of the encrypted image data should be close to 8. Table 1 shows the information entropy of various cipher images of the encryption algorithm and the comparison results of the information entropy. According to Table 1, the average information entropy of a single channel of all encrypted images with a size of 256×256×3 exceeds 7.99 and is close to 8. This indicates that the pixel distribution in these encrypted images is uniform and random, and its information is disordered, showing that the encryption algorithm has a good encryption effect.

[0131] Table 1 Information Entropy of Encrypted Images

[0132]

[0133] 5. Gray Histogram Analysis

[0134] The gray histogram describes the distribution of pixel values within the image. The more uniform the pixel value distribution of the image is, the more difficult it is to perform statistical analysis. The histograms of three images and their corresponding ciphertext images are as Figure 3 shown. It can be seen from the figure that the pixel value distributions of the three channels in the original image are not uniform and show a specific distribution pattern. While the pixel value distribution of the encrypted image is relatively uniform, and the pixel values are distributed within 0 to 255. This indicates that the image after the encryption algorithm hides any statistical features in the image, proving the resistance of the algorithm to statistical attacks.

[0135] 6. Pixel Correlation Analysis

[0136] Statistical attack is a relatively common type of attack in information transmission. 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 inclined adjacent pixels in the image. The calculation formula for the correlation coefficient is as follows:

[0137] ;

[0138] 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, 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 4Describes the correlation between the original image and its encrypted image. Table 2 compares the correlation coefficients between the original image and the encrypted image.

[0139] Table 2 Comparison of the Correlation between the Original Image and the Ciphertext Image

[0140]

[0141] By Figure 4 It can be intuitively found that there is a strong correlation between adjacent pixels of the plaintext image, while the correlation between pixels of 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 no correlation between adjacent pixels at present. Therefore, this result proves that the encryption method proposed in the present invention will significantly reduce the correlation between pixels, making the ciphertext image show a chaotic distribution in all three directions, greatly enhancing its ability to resist statistical attacks.

[0142] 7. Analysis of the Ability to Resist Differential Attacks

[0143] The purpose of differential attack is to infer the possible values of the key by comparing the differences between a pair of plaintext and ciphertext. A qualified encryption algorithm should be able to effectively resist differential attacks. The number of pixel change rate (NPCR) and the unified average change intensity (UACI) can be used to quantify this ability. Their calculation formulas are as follows:

[0144] ;

[0145] ;

[0146] M and N respectively represent the length and width of the image, D ( i , j ) is the difference indicator function. If two images are different at the pixel position ( i , j ), then D ( i , j ) = 1, otherwise it is 0; and C and C' represent the encrypted images that differ from the original image by one pixel. The ideal theoretical values of NPCR and UACI are 99.6094% and 33.4635% respectively. Table 3 shows the relevant results and comparisons.

[0147] Table 3 Comparison of the Correlation between the Original Image and the Ciphertext Image

[0148]

[0149] It can be found from the table that the encrypted images of the present invention all meet the corresponding standards, indicating that when there are slight changes in the plaintext image, there will be significant differences in the ciphertext image, that is, the encryption algorithm has good differential attack resistance.

[0150] 8. Analysis of anti-noise attack ability

[0151] During the transmission of image data, in addition to various malicious attacks, environmental interference is an important reason for information loss. Communication noise is a type of environmental interference that is relatively easy to occur during image transmission. If the image is damaged by noise, some information will be lost after decryption, and even the image cannot be decrypted. In this embodiment, salt-and-pepper noise is selected for simulation experiments on Baboon (256*256). This detection will respectively use 1%, 3%, 5%, 10%, 30%, and 50% of salt-and-pepper noise to interfere with the encrypted image. The comparison diagrams after decryption are as Figure 5 shown. It can be seen from the results that for the present image encryption algorithm, when the ciphertext is interfered by noise, the basic information of the plaintext image can still be obtained from the decrypted image, intuitively proving that the encryption algorithm has a certain anti-noise attack ability. At the same time, from Table 4, it can be found that the PSNR after noise attack still has a relatively good performance.

[0152] Table 4 Comparison of the correlation between the original image and the salt-and-pepper noise attack on the ciphertext image

[0153]

[0154] 9. Analysis of anti-cropping attack ability

[0155] In addition to possible noise pollution during the transmission of Internet images, data loss is another reason for the reuse of image information. During the transmission of images, situations such as network congestion, packet loss, or data transmission protocol defects may occur, resulting in incomplete data received by the terminal. Image data loss can usually be divided into two categories: blocking attack and cropping attack. The former is the loss of a part of a single channel, while the latter is the loss of all pixel values in a region. In this paper, simulation experiments are carried out on both types. After encryption, the blocking attack causes different channel values in different regions of the Baboon image to be lost. The cropping attack will delete 10%, 30%, 50%, and 80% of the encrypted Baboon image. Figure 6 and Figure 7 The comparison between them describes the decrypted image. By Figure 6It can be seen that although the blocking attack will cause the loss of channel information in different channels, most of the information of the decrypted image can still be obtained. The cropping attack does not show obvious changes before 50% of the image is lost. When the lost area is greater than 50%, although the image becomes relatively blurred, the basic outline and content of the image can still be obtained. Therefore, intuitively, this encryption algorithm has good resistance to 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 full-channel, it can still remain above 18; in the cropping attack, although the PSNR will drop sharply as the cropping area increases, when 80% is lost, the PSNR is still above 10. Therefore, this encryption algorithm has a good performance in confusing the pixel positions and can better resist data attacks.

[0156] Table 5 Correlation Comparison of Blocking Attacks between Original Image and Ciphertext Image

[0157]

[0158] Table 6 Correlation Comparison of Cropping Attacks between Original Image and Ciphertext Image

[0159]

[0160] From the above tests, it can be found that the quantum image encryption method based on the BRQI model and the national cryptography SM3 proposed in this embodiment generates keys through the quantum Logistic chaotic system and the national cryptography SM3, performs diffusion and scrambling operations on the image, and destroys the pixel correlation at the bit level, better realizing 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 a 256×256 image is stable above 7.99. It has good performance against noise attacks and cropping attacks, thus proving that the correlation between pixel points is extremely small and the security of its encryption algorithm is strong.

[0161] In summary, the present invention combines the BRQI model, the national cryptography SM3 algorithm and the quantum Logistic chaotic system to realize an efficient and quantum-attack-resistant image encryption algorithm. This algorithm uses the quantum chaotic system to generate high-complexity keys and combines the strong collision resistance of SM3 to significantly improve the security and reliability of encryption. At the same time, based on the high-efficiency processing ability of the BRQI model, the algorithm can quickly complete the encryption and decryption operations in the quantum environment and meet the requirements of large-scale image data processing. In addition, the algorithm conforms to the national cryptography standard, is applicable to multiple fields, and has broad promotion value.

[0162] Example 2: This example provides a non-transitory computer-readable storage medium, on which computer instructions are stored. The computer instructions cause the computer to execute a quantum image encryption method based on the BRQI model and the national cryptographic algorithm SM3. The method includes the following steps:

[0163] S100. Obtain a color image and convert the color image into a quantum image represented by BRQI through quantum encoding;

[0164] S200. Perform an arrangement operation on the parity value pixel bit planes of the obtained quantum image, change three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image;

[0165] S300. Perform a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in S200, and scramble the coordinate information of the plaintext quantum image;

[0166] S400. Generate an original key quantum image using quantum Logistic mapping and the national cryptographic algorithm SM3, and then perform a quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image;

[0167] S500. Perform an XOR operation on the quantum image scrambled in S300 and the quantum key image generated in S400 to generate a ciphertext image corresponding to the original color image.

[0168] Example 3: This example provides an electronic device, which may include: a processor, a communications interface, a memory, and a communication bus. Among them, the processor, the communications interface, and the memory complete communication with each other through the communication bus. The processor can call the logical instructions in the memory to execute a quantum image encryption method based on the BRQI model and the national cryptographic algorithm SM3. The method includes the following steps:

[0169] S100. Obtain a color image and convert the color image into a quantum image represented by BRQI through quantum encoding;

[0170] S200. Perform an arrangement operation on the parity value pixel bit planes of the obtained quantum image, change three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image;

[0171] S300. Perform a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in S200, and scramble the coordinate information of the plaintext quantum image;

[0172] S400. Generate the original key quantum image using the quantum Logistic mapping and the national cryptography SM3, and then perform a quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image;

[0173] S500. Perform an XOR operation on the scrambled quantum image in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image.

[0174] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs and other various media that can store program codes.

[0175] Embodiment 4: This embodiment provides a computer program product. The computer program product 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 cryptography SM3. The method includes the following steps:

[0176] S100. Obtain a color image and convert the color image into a quantum image represented by BRQI through quantum coding;

[0177] S200. Perform an arrangement operation on the parity value pixel bit planes of the obtained quantum image to change the three quantum bits representing the bit plane information, so as to transform the color information of each pixel of the plaintext quantum image;

[0178] S300. Perform a quantum coordinate scrambling operation on the coordinate information of the quantum image after the operation in step S200 to scramble the coordinate information of the plaintext quantum image;

[0179] S400. Generate the original key quantum image using the quantum Logistic mapping and the national cryptography SM3, and then perform a quantum coordinate scrambling operation on the original key quantum image to generate a quantum key image;

[0180] S500. Perform an XOR operation on the scrambled quantum image in step S300 and the quantum key image generated in step S400 to generate a ciphertext image corresponding to the original color image.

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

[0182] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to enable 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.

[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate 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; The specific method of using quantum Logistic mapping and national secret SM3 to generate the original key quantum image is: S410, the user sets the adjustable parameter γ and the dissipation parameter β; S420, using the adjustable parameter γ to perform the national secret SM3 operation to generate the initial values ​​μ1, μ2, μ3 of the quantum Logistic map; include: S421. Use the national encryption SM3 to calculate the hash value of the adjustable parameter γ and obtain a 64-bit hexadecimal sequence L; S422, shuffle the sequence L using the shuffled Fisher-Yates algorithm to obtain L′, and then use L″ to record the index of L′ in L, which is used to obtain the L′ sequence during decryption; S423. Construct the initial value of the quantum Logistic map by the following formula: <h2 style=";text-align:left;direction:ltr">μ1 = hex2dec(l′1l′2l′3l′4l′5l′6l′7l′8l′9)×10<h2 style=";text-align:left;direction:ltr"> -11 <h2 style=";text-align:left;direction:ltr"> ; μ2=hex2dec(l′ 10 the 11 the 12 the 13 the 14 the 15 the 16 the 17 the 18 )×10 -11 ; μ3=hex2dec(l′ 19 the 20 the 21 the 22 the 23 the 24 the 25 the 26 the 27 )×10 -11 ; Where μ1, μ2, and μ3 represent the three two-dimensional matrices I of the color image. r ,I g ,I b The initial value of the quantum logistic map; the hex2dec function is used to convert hexadecimal numbers to decimal numbers; S430, using the initial value μ i , adjustable parameter γ and dissipation parameter β are used to perform quantum Logistic mapping to generate the original ciphertext image, including: S431, use the initial value μ i , adjustable parameter γ and dissipation parameter β to perform quantum Logistic mapping to generate three pseudo-random sequences U, Y, W with a length of 2 n , the quantum Logistic mapping relationship is expressed as: In the formula, U represents the average value of the quantum state, which belongs to the classical part, Y describes the dynamic coupling effect between the main quantum state U and W, and also contains the dissipative characteristics of the system, representing uncertainty, and W represents quantum correlation, representing non-classicality; and The plural U i , Y i and W i 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 U0 = μ i +0.0001i, Y0=2*U0+0.001i and e represents the base of natural logarithm, e≈2.71828; S432, adjust the sequences U, Y, and W to integers between 0 and 255 to generate a sequence H i ′, then combine the three pseudo-random sequences to reshape into a three-dimensional array, perform quantum encoding on the array, and generate the original key quantum image, which is expressed as: H i ′=floor(U i +Y i +W i )mod256,H i ′∈[0,255]; The floor function represents rounding down, and the mod function performs a modulo-256 operation on the result after rounding down to ensure that the result is in the range of [0,255]. 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 2 n-k ×2 k The color image of is expressed as follows using the BRQI representation method: Among them, |x>=|x0,x1..x n-k-1 > and |y>=|y0,y1...y k-1 >stores the horizontal coordinate information and vertical coordinate information of the input image respectively; |l> is the lth bit plane, g(x,y)∈{0,1} is the binary color of the bit plane image, and |ch> represents the RGB channel.

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, let |xy> be the pixel position, |y0> be the basis for dividing odd and even pixels, |l i > is the bit plane, |ch> is the color channel, |c> is the binary color; S220, for even pixels, i.e., |y0>=0, first use the SWAP gate to exchange the information of |l0> and |l2>; then, according to the value of l0>, it is divided into two cases: if l0>=0, then perform a NOT gate operation on |l1>; if l0>=1, then perform a NOT gate operation on |l2>; finally, perform NOT gate operations on l0>, l1> and |l2> respectively; S230. For odd pixels, i.e., |y0>=1, first use the SWAP gate to exchange the information of l0> and l1>, and then divide it into two cases according to the value of |l2>: if |l2>=0, perform a NOT gate operation on l0>; if |l2>=1, perform a NOT gate operation on l1>; finally, perform NOT gate operations on l0>, l1> and |l2> respectively.

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 is the number of qubits representing the coordinate information |yx> in the BRQI image; 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 v i >z i When i 、z i Represents the i-th value in the sequence V and Z respectively, using v i The corresponding qubit is used as the control bit, z i The corresponding qubit is used as the target bit to construct the CNOT gate; when v i <z i When , use SWAP gate to switch v i and z i The corresponding qubit; S360, constructing operator S1 according to the rule established in step S350. After being disturbed by operator S1, the coordinate information change of the quantum image is expressed as: S1∣yx>=S1∣y k-1 …y0x n-k-1 x n-k …x0>=∣y k-1 ′…y0′x n-k-1 ′…x0′>; In the formula, |yx> represents the coordinate information in the quantum image, where |x>=|x0,x1..x n-k-1 > and |y>=|y0,y1...y k-1 > 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: 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 is the number of quantum bits representing the coordinate information |yx> in the original key quantum image; S442, 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 original key quantum image; S443, shuffle the integer sequence A twice again using the Fisher-Yates shuffle algorithm to obtain two shuffled sequences V′ and Z′; S444, 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; S445. Establish rules: If (v′ i +z′ i )mod 2=0, the corresponding v i 'Qubit as control bit, the corresponding z i 'Qubit is used as the target bit to construct a CNOT gate; if (v′ i +z′ i )mod 2=1, use SWAP gate to swap v i ' and z i 'The two corresponding qubits; S446. Operator S2 is constructed according to the rule established in step S445. After being disturbed by operator S2, the coordinate information change of the quantum image is expressed as: S2∣yx>=S2∣y k-1 …y0x n-k-1 x n-k …x0>=∣y k-1 ′…y0′x n-k-1 ′…x0′>; In the formula, |yx> represents the coordinate information in the quantum image, where |x>=|x0,x1..x n-k-1 > and |y>=|y0,y1...y k-1 > are the horizontal coordinate information and vertical coordinate information of the image respectively.

6. 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.

7. 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-6.

8. 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-6.

9. 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 6.

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