A two-dimensional code decoding method and system based on quantum key encryption and decryption

By encrypting and decrypting QR code content using quantum key encryption and decryption technology, and generating and comparing the business activation code, the problems of quantum computing risks and low transaction efficiency faced by QR codes are solved, achieving higher security and shorter transaction time.

CN119728097BActive Publication Date: 2025-11-21CHINA TELECOM SHANGHAI IDEAL INFORMATION IND GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411806381.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-11-21
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Existing QR code encryption methods face the risk of being compromised by quantum computing, and the transaction environment is insecure and inefficient. Existing quantum key distribution methods are complex and strongly coupled with business systems, increasing transaction time.

Method used

The QR code content is encrypted using quantum key encryption and decryption technology to generate a business activation code. The code is then compared with the scanning terminal, and secure decryption is achieved by combining a quantum key generator with a U-shield or TF card, thus eliminating the need for reusing QR codes.

Benefits of technology

It effectively resists quantum computing attacks, improves security, prevents QR code copying and fraud, shortens transaction time, and is suitable for scenarios with high security requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728097B_ABST
    Figure CN119728097B_ABST
Patent Text Reader

Abstract

The application relates to a two-dimensional code decoding method and system based on quantum key encryption and decryption, and the two-dimensional code decoding method based on quantum key encryption and decryption comprises the following steps: a two-dimensional code generation end obtains a quantum key generated by a quantum key distribution protocol, generates a first service start code based on original data before coding of a two-dimensional code and the quantum key, and encrypts the original data before coding of the two-dimensional code by using the quantum key to obtain ciphertext; the two-dimensional code generation end simultaneously attaches the ciphertext to a two-dimensional code ID to generate a two-dimensional code image; a two-dimensional code scanning end determines the two-dimensional code ID, queries a corresponding quantum password of the two-dimensional code ID from a local quantum key machine, decrypts the ciphertext to obtain plaintext, generates a service start code based on the plaintext and the quantum key to generate a second service start code; and the two-dimensional code scanning end compares the first service start code and the second service start code, and if the two service start codes are consistent, subsequent service operation is performed. The application can solve the problems of low payment environment safety and low transaction efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of quantum key encryption and decryption. In particular, it relates to a two-dimensional code decoding method and system based on quantum key encryption and decryption. BACKGROUND

[0002] With the development of information technology, two-dimensional codes are widely used in various fields due to their low cost, large storage capacity, and fast recognition speed. The rapid development of mobile communication technology and devices has further promoted the application of two-dimensional code technology, greatly improving people's way of life. Two-dimensional code technology has unique advantages and is widely used in retail and payment, logistics and warehousing, media and entertainment, industrial manufacturing, medical health, agriculture and food safety, and other fields. With the widespread use of two-dimensional codes, the phenomenon of payment two-dimensional code replacement and coverage misbrushing, as well as the increase in camera theft, has become increasingly common.

[0003] In the prior art, two-dimensional code encryption mainly relies on asymmetric encryption methods such as RSA, using the public key of the other party or the private key of the user to encrypt the data part of the two-dimensional code, or using symmetric encryption methods, both parties negotiating a symmetric key to encrypt the data area, or combining both methods, using asymmetric key encryption to place the symmetric key in a specific position in the two-dimensional code. The asymmetric key encryption method is complex and has low efficiency. With the development of quantum computers, some existing classical asymmetric encryption methods such as RSA and symmetric key distribution algorithms such as DH are at risk of being broken by quantum computing. Current quantum computing-resistant encryption methods (PQC) have very long keys and very large computational loads, limiting their widespread application.

[0004] Currently, to prevent two-dimensional code copying and distribution, a timestamp is usually used to place the current timestamp information in the two-dimensional code data, then encode it to generate a two-dimensional code image. When scanning, the timestamp in the two-dimensional code is parsed and compared with the current system time. If it is within a reasonable time interval, usually 1 minute is set for the convenience of the holder from generation to scanning, but with the prevalence of portable photography and monitoring, it is also easy to be stolen during this period.

[0005] At present, there is also a method of using quantum key to detect whether the payment environment is safe (such as the invention application with the application number 202211037836.X and the name of "payment protection method, device and equipment based on quantum encryption and storage medium"): it records that the multiple parties of the transaction will initiate application information to the quantum shield system, the quantum shield system sends the key and quantum random number to the transaction party based on the quantum key distribution technology, the transaction parties encrypt the random number according to the key, and the digital renminbi system judges the encryption output result. If the results are consistent, it proves that the two-dimensional code environment is not a problem. However, the implementation steps of this patent are complex, and the coupling with the business system is strong, which increases the transaction time; and according to the principle of QKD system, it is impossible to send quantum random number directly through quantum key distribution technology, which needs to be realized through other means. QKD (Quantum Key Distribution) is a secure communication method that uses quantum systems as information carriers for transmission and extraction of shared secure keys, such as using single photons as carriers, sending end loading coded information, receiving end detecting and decoding information, and then extracting shared secure keys. The basic principles of quantum mechanics ensure the security of communication. For example, based on the uncertainty principle, the attacker cannot accurately measure the quantum state, and any eavesdropping behavior will inevitably cause unavoidable system disturbance, so that the QKD user can find the attack traces. Therefore, quantum key distribution can provide a secure communication method in principle.

[0006] Therefore, how to avoid the risk of two-dimensional code being broken by quantum computing, improve the security of payment environment and transaction efficiency according to the principle of QKD system, and shorten the transaction time, is a problem to be solved. SUMMARY

[0007] The application provides a two-dimensional code decoding method and system based on quantum key encryption and decryption to solve the problems of low payment environment security and low transaction efficiency.

[0008] To achieve the above purpose, in a first aspect, the application provides a two-dimensional code decoding method based on quantum key encryption and decryption, which is used in a system with at least a two-dimensional code generation end and a two-dimensional code scanning end, including:

[0009] The two-dimensional code generation end obtains the quantum key generated by the quantum key distribution protocol, generates a first business start code based on the original data before encoding of the two-dimensional code and the quantum key, and encrypts the original data before encoding of the two-dimensional code using the quantum key to obtain ciphertext;

[0010] The two-dimensional code generation end attaches the ciphertext to the two-dimensional code ID to generate a two-dimensional code image;

[0011] The two-dimensional code scanning end scans and decodes the two-dimensional code image to determine the two-dimensional code ID, and then queries the corresponding quantum password from the local quantum key machine through the two-dimensional code ID to decrypt the ciphertext to obtain the plaintext, and generates a service start code from the plaintext and the quantum key to generate a second service start code.

[0012] The two-dimensional code scanning end obtains the first service start code of the two-dimensional code generation end, compares the first service start code with the second service start code, and if they are consistent, performs subsequent business operations.

[0013] Preferably, the two-dimensional code generation end obtains the quantum key generated by the quantum key distribution protocol, wherein the two-dimensional code generation end and the two-dimensional code scanning end are connected to the QKD network through a quantum key machine to obtain the quantum key generated by the quantum key distribution protocol, or the two-dimensional code generation end and the two-dimensional code scanning end are inserted with a U disk or a TF card pre-charged with a quantum key to obtain the quantum key generated by the quantum key distribution protocol.

[0014] Preferably, the two-dimensional code generation end generates a first service start code from the two-dimensional code content and the quantum key generated by the quantum key distribution protocol, specifically including: the two-dimensional code generation end uses a quantum key ID or a UUID or a random number as a two-dimensional code ID to encode the original data before the two-dimensional code, and generates a service start code from the quantum key obtained from the quantum key machine.

[0015] Preferably, the two-dimensional code scanning end obtains the first service start code of the two-dimensional code generation end, specifically including: the first service start code of the two-dimensional code generation end is provided for the two-dimensional code scanning end to scan again by generating a normal two-dimensional code, or the two-dimensional code scanning end receives the message verification code of the two-dimensional code generation end, and takes the modulus of the required number of digits of the message verification code as the first service start code in a digital manner.

[0016] Preferably, after the two-dimensional code scanning end scans the two-dimensional code, the business server of the business management platform records the two-dimensional code ID, and if a specific condition is met, the two-dimensional code is invalidated, and the specific condition includes that a specific person has scanned or scanned a certain number of times.

[0017] To achieve the above object, in a second aspect, the application provides a two-dimensional code decoding system based on quantum key encryption and decryption, at least including a two-dimensional code generation end and a two-dimensional code scanning end, the two-dimensional code generation end including a first service start code generation module, an encryption module and a two-dimensional code generation module, and the two-dimensional code scanning end including a second service start code generation module and a start code comparison module.

[0018] The first service start code generation module is configured to acquire quantum keys generated by a quantum key distribution protocol, and generate a first service start code based on original data before encoding of a two-dimensional code and the quantum keys.

[0019] The encryption module is configured to encrypt the original data before encoding of the two-dimensional code by using the quantum keys to obtain ciphertext.

[0020] The two-dimensional code generation module is configured to attach the ciphertext to a two-dimensional code ID by the two-dimensional code generation terminal, and generate a two-dimensional code image after data analysis, encoding, error correction and mask calculation of the two-dimensional code.

[0021] The second service start code generation module is configured to scan and decode the two-dimensional code image, determine the two-dimensional code ID, query a corresponding quantum password of the two-dimensional code ID from a local quantum key machine, decrypt the ciphertext by using the quantum password to obtain plaintext, and generate a service start code based on the plaintext and the quantum keys to generate a second service start code.

[0022] The start code comparison module is configured to acquire the first service start code of the two-dimensional code generation terminal, compare the first service start code with the second service start code, and perform subsequent service operations if the first service start code is consistent with the second service start code.

[0023] Preferably, the first service start code generation module is specifically configured to:

[0024] The two-dimensional code generation terminal and the two-dimensional code scanning terminal are connected to a QKD network through a quantum key machine to acquire quantum keys generated by a quantum key distribution protocol, or the two-dimensional code generation terminal and the two-dimensional code scanning terminal are inserted with a U disk or a TF card pre-charged with quantum keys to acquire quantum keys generated by a quantum key distribution protocol.

[0025] The first service start code is generated based on original data before encoding of a two-dimensional code and the quantum keys, and the original data before encoding of the two-dimensional code is encrypted by using the quantum keys to obtain ciphertext.

[0026] Preferably, the first service start code generation module specifically includes: using a quantum key ID or a UUID or a random number as a two-dimensional code ID to encode original data before encoding of a two-dimensional code, using quantum keys acquired from the quantum key machine to generate a first service start code, and using the quantum keys to encrypt the original data before encoding of the two-dimensional code to obtain ciphertext.

[0027] Preferably, the two-dimensional code scanning end obtains the first service start code of the two-dimensional code generation end, specifically including: the first service start code of the two-dimensional code generation end is provided for the two-dimensional code scanning end to scan again by generating a general two-dimensional code, or the two-dimensional code scanning end receives the message verification code of the two-dimensional code generation end, and the first service start code is obtained by taking the modulus of the required number of digits of the message verification code as a number.

[0028] Preferably, in the second service start code generation module, the two-dimensional code ID is also sent to the service server of the service management platform for recording after the two-dimensional code is scanned by the two-dimensional code scanning end, and the two-dimensional code is abandoned when a specific condition is met, and the specific condition includes that a specific person has scanned or scanned a certain number of times.

[0029] The two-dimensional code decoding method and system based on quantum key encryption and decryption provided by the application have the following beneficial effects compared with the prior art:

[0030] 1. The quantum key QKD is used to distribute quantum keys to encrypt the two-dimensional code content, which can effectively resist quantum computing, has high security, and is suitable for business scenarios with higher security requirements.

[0031] 2. The service start code is generated according to the quantum key and the two-dimensional code content, and the service start code is compared by the scanning side, and the business operation is performed only when the comparison is passed. Therefore, the problem of copying, stealing or covering the two-dimensional code outside the two-dimensional code can be effectively solved.

[0032] 3. In the case of higher security requirements, the service start code can be encrypted by the generation side using the quantum key again to generate a two-dimensional code for the scanning side to scan, thereby providing stronger security.

[0033] 4. To achieve stronger security, the service end can also record the two-dimensional code ID, and the two-dimensional code is abandoned according to certain rules after being safely scanned, thereby preventing replay attacks. BRIEF DESCRIPTION OF DRAWINGS

[0034] Figure 1 The method flowchart of the two-dimensional code decoding method based on quantum key encryption and decryption in the first embodiment of the application is shown in the figure.

[0035] Figure 2 The system composition diagram of the first embodiment and the second embodiment of the application is shown in the figure.

[0036] Figure 3 The two-dimensional code generation and scanning sequence diagram based on the quantum key two-dimensional code decoding method based on quantum key encryption and decryption in the first embodiment of the application is shown in the figure.

[0037] Figure 4 is a structure diagram of a two-dimensional code decoding system based on quantum key encryption and decryption in Embodiment Two of the present application. DETAILED DESCRIPTION

[0038] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely intended for the purpose of explanation of the present application and are not limitations of the present application. In addition, it should be noted that only the parts related to the present application are shown in the accompanying drawings for the purpose of description.

[0039] Embodiment One

[0040] A two-dimensional code decoding method based on quantum key encryption and decryption, please refer to Figures 1-3 , for a system with a two-dimensional code generation end and a two-dimensional code scanning end, as Figure 2 shown in the present embodiment, the system mainly consists of three parts, a two-dimensional code terminal, a business management platform and a quantum key service platform, the two-dimensional code terminal includes a two-dimensional code generation end and a two-dimensional code scanning end, the business management platform performs business authentication and authorization and business processing on the two-dimensional code terminal, and the quantum key service platform mainly performs quantum device access identity authentication and quantum key generation and distribution, and the platform includes a quantum key machine, a QKD network and a quantum key management service. The present embodiment includes the following steps: S10 to S40.

[0041] S10: The two-dimensional code generation end obtains the quantum key generated by the quantum key distribution protocol, generates a first business start code based on the original data before encoding of the two-dimensional code and the quantum key, and encrypts the original data before encoding of the two-dimensional code using the quantum key to obtain ciphertext.

[0042] In the present embodiment, the two-dimensional code generation end obtains the quantum key generated by the quantum key distribution protocol, wherein the two-dimensional code generation end and the two-dimensional code scanning end are connected to the QKD network through the quantum key machine to obtain the quantum key generated by the quantum key distribution protocol, or the two-dimensional code generation end and the two-dimensional code scanning end are inserted with a U disk or a TF card pre-charged with quantum keys to obtain the quantum key generated by the quantum key distribution protocol.

[0043] The two-dimensional code generation end generates a first business start code using the quantum key generated by the quantum key distribution protocol, and the two-dimensional code content and the quantum key, specifically including: the two-dimensional code generation end uses the quantum key ID or UUID or random number as the two-dimensional code ID to generate a business start code using the quantum key obtained from the quantum key machine for the original data before encoding of the two-dimensional code.

[0044] S20: The two-dimensional code generation end attaches the ciphertext to the two-dimensional code ID at the same time, and generates a two-dimensional code image after data analysis, encoding, error correction and mask calculation of the two-dimensional code.

[0045] S30: The two-dimensional code scanning end scans and decodes the two-dimensional code image to determine the two-dimensional code ID, and then queries the corresponding quantum password of the local quantum key machine through the two-dimensional code ID to decrypt the ciphertext to obtain the plaintext, and generates a business start code with the plaintext and the quantum key to generate a second business start code.

[0046] Among them, after the two-dimensional code scanning end scans the two-dimensional code, the business server of the business management platform records the two-dimensional code ID, and if a specific condition is met, the two-dimensional code is invalidated. The specific conditions include that a specific person has scanned or scanned a certain number of times.

[0047] S40: The two-dimensional code scanning end obtains the first business start code of the two-dimensional code generating end, compares the first business start code with the second business start code, and if they are consistent, performs subsequent business operations.

[0048] Among them, the two-dimensional code scanning end obtains the first business start code of the two-dimensional code generating end, specifically including: the first business start code of the two-dimensional code generating end is provided to the two-dimensional code scanning end for re-scanning by generating a normal two-dimensional code, or the two-dimensional code scanning end receives the message verification code of the two-dimensional code generating end, and takes the modulus of the number of digits of the message verification code as the first business start code. The two-dimensional code scanning end compares the two business start codes, and only if they are consistent, the subsequent business operation is performed.

[0049] In an example, the two-dimensional code terminal is connected to the quantum key machine, the two-dimensional code generating end directly uses the quantum key ID or UUID or random number as the two-dimensional code ID, then generates the business start code A = HMAC(M, K) using the quantum key K on the two-dimensional code original data M, and then encrypts M to obtain C'

[0050] =C', and finally generates a two-dimensional code picture after the steps of two-dimensional code data analysis, encoding, error correction, and mask calculation; the two-dimensional code scanning end decodes the two-dimensional code picture, extracts the two-dimensional code ID, then requests the corresponding key from the quantum key management platform, then decrypts the ciphertext M = D(C', K), and then calculates the business start code A = HMAC(M, K). The scanning end inquires the business start code from the generating end for comparison. The generating end can generate a normal two-dimensional code again according to the business start code A agreed by both parties. When the security requirement is higher, the business start code can be encrypted again using the quantum key to generate a normal two-dimensional code (at this time, the two-dimensional code ID is not carried), or a four-digit verification code can be generated by taking the modulus of the value of the message verification code A, such as N = MOD(A, 10000). The generating end displays the two-dimensional code again or informs the scanning end of the four-digit verification code. The scanning end calculates and compares the business start code A in the same way, and only after the verification is correct, the business operation is performed.

[0051] Example Two

[0052] A QR code decoding system based on quantum key encryption and decryption, such as Figure 2 and 4 As shown, it includes a QR code generation terminal 71 and a QR code scanning terminal 72, as follows: Figure 2 The system in this embodiment consists of three main parts: a QR code terminal, a business management platform, and a quantum key service platform. The QR code terminal includes a QR code generator 71 and a QR code scanner 72. The business management platform performs business authentication and authorization and business processing on the QR code terminal. The quantum key service platform mainly performs access identity authentication for quantum devices and generates and distributes quantum keys. The platform includes a quantum key machine, a QKD network, and a quantum key management service.

[0053] The QR code generation terminal 71 includes a first service activation code generation module 711, an encryption module 712, and a QR code generation module 713. The QR code scanning terminal 72 includes a second service activation code generation module 721 and an activation code comparison module 722. Figure 2 The system in this embodiment consists of three main parts: a QR code terminal, a business management platform, and a quantum key service platform. The QR code terminal includes a QR code generator and a QR code scanner. The business management platform performs business authentication and authorization and business processing on the QR code terminal. The quantum key service platform mainly performs access authentication for quantum devices and generates and distributes quantum keys. The platform includes a quantum key machine, a QKD network, and a quantum key management service.

[0054] The first service activation code generation module 711 is used to obtain the quantum key generated by the quantum key distribution protocol from the QR code generation end, and generate the first service activation code based on the original data before QR code encoding and the quantum key.

[0055] The encryption module 712 is used to encrypt the original data of the QR code before encoding using a quantum key to obtain ciphertext.

[0056] The QR code generation module 713 is used by the QR code generator to attach a QR code ID to the encrypted text, perform data analysis, encoding, error correction and mask calculation of the QR code, and then generate a QR code image.

[0057] The second service activation code generation module 721 is used to scan and decode the QR code image, determine the QR code ID, query the corresponding quantum key from the local quantum key generator using the QR code ID, decrypt the ciphertext to obtain the plaintext, and generate a service activation code from the plaintext and the quantum key to generate the second service activation code.

[0058] The startup code comparison module 722 is used to obtain the first business startup code from the QR code generator, compare the first business startup code with the second business startup code, and if they match, proceed with subsequent business operations.

[0059] In some embodiments, the first service key generation module 711 is specifically configured to:

[0060] The two-dimensional code generation end and the two-dimensional code scanning end are connected to the QKD network through a quantum key machine to obtain quantum keys generated by a quantum key distribution protocol, or the two-dimensional code generation end and the two-dimensional code scanning end are inserted with a U disk or a TF card pre-charged with quantum keys to obtain quantum keys generated by a quantum key distribution protocol.

[0061] The first service start code is generated based on the original data before encoding of the two-dimensional code and the quantum key, and the original data before encoding of the two-dimensional code is encrypted using the quantum key to obtain ciphertext.

[0062] In some embodiments, the first service key generation module 711 specifically includes: using a quantum key ID or a UUID or a random number as a two-dimensional code ID to encrypt the original data before encoding of the two-dimensional code, using the quantum key obtained from the quantum key machine to generate the first service start code, and using the quantum key to encrypt the original data before encoding of the two-dimensional code to obtain ciphertext.

[0063] In some embodiments, the two-dimensional code scanning end obtains the first service start code of the two-dimensional code generation end, specifically including: the first service start code of the two-dimensional code generation end is provided for the two-dimensional code scanning end to scan again by generating a normal two-dimensional code, or the two-dimensional code scanning end receives the message verification code of the two-dimensional code generation end, and the message verification code needs to be modulated according to the number of bits to obtain the first service start code.

[0064] In some embodiments, the second service start code generation module 721 is further configured to: after the two-dimensional code is scanned by the two-dimensional code scanning end, send the two-dimensional code ID to the service server of the service management platform for recording, and if a specific condition is met, the two-dimensional code is abandoned, and the specific condition includes that a specific person has scanned or scanned a certain number of times.

[0065] It should be noted that in this paper, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.

[0066] The above merely describes the preferred embodiments of the present application, and is not intended to limit the patent scope of the present application, and any equivalent structure or equivalent process conversion, or direct or indirect application in other related technical fields, which are made by using the content of the present application specification and drawings, are also included in the patent protection scope of the present application.

Claims

1. A QR code decoding method based on quantum key encryption and decryption, used in a system with at least a QR code generation end and a QR code scanning end, characterized in that, include: The QR code generator obtains the quantum key generated by the quantum key distribution protocol, generates a first service activation code based on the original data of the QR code before encoding and the quantum key, and uses the quantum key to encrypt the original data of the QR code before encoding to obtain ciphertext. The QR code generator appends a QR code ID to the encrypted text to generate a QR code image. The QR code scanning terminal scans and decodes the QR code image to determine the QR code ID. Then, it queries the local quantum key machine for the corresponding quantum key through the QR code ID, decrypts the ciphertext to obtain the plaintext, and generates a service activation code from the plaintext and the quantum key to generate a second service activation code. The QR code scanning terminal obtains the first service activation code from the QR code generating terminal, compares the first service activation code with the second service activation code, and if they match, proceeds with subsequent service operations.

2. The QR code decoding method based on quantum key encryption and decryption according to claim 1, characterized in that, The QR code generating end obtains the quantum key generated by the quantum key distribution protocol. Both the QR code generating end and the QR code scanning end are connected to the QKD network through a quantum key machine to obtain the quantum key generated by the quantum key distribution protocol. Alternatively, both the QR code generating end and the QR code scanning end are equipped with a U-shield or TF card pre-loaded with the quantum key to obtain the quantum key generated by the quantum key distribution protocol.

3. The QR code decoding method based on quantum key encryption and decryption according to claim 1, characterized in that, The QR code generator uses a quantum key generated by a quantum key distribution protocol to generate a first service activation code for the QR code content and the quantum key. Specifically, the QR code generator uses a quantum key ID, a UUID, or a random number as the QR code ID to encode the original data before the QR code, and uses the quantum key obtained from the quantum key generator to generate the service activation code.

4. The QR code decoding method based on quantum key encryption and decryption according to claim 1, characterized in that, The acquisition of the first service activation code by the QR code generator by the QR code scanning terminal specifically includes: the first service activation code of the QR code generator is generated into a regular QR code for the QR code scanning terminal to scan again, or the QR code scanning terminal receives the message verification code from the QR code generator and takes the modulo of the number of bits required by the message verification code in a digital manner as the first service activation code.

5. The QR code decoding method based on quantum key encryption and decryption according to claim 1, characterized in that, After the QR code is scanned at the QR code scanning terminal, the business server of the business management platform records the QR code ID. If certain conditions are met, the QR code is invalidated. The specific conditions include that a specific person has scanned the code or that the code has been scanned a certain number of times.

6. A QR code decoding system based on quantum key encryption and decryption, characterized in that, It includes at least a QR code generation end and a QR code scanning end. The QR code generation end includes a first business activation code generation module, an encryption module, and a QR code generation module. The QR code scanning end includes a second business activation code generation module and an activation code comparison module. The first service activation code generation module is used to obtain the quantum key generated by the quantum key distribution protocol from the QR code generation terminal, and generate the first service activation code based on the original data of the QR code before encoding and the quantum key. The encryption module is used to encrypt the original data of the QR code before encoding using the quantum key to obtain ciphertext; The QR code generation module is used by the QR code generation terminal to attach a QR code ID to the encrypted text to generate a QR code image. The second service activation code generation module is used to scan and decode the QR code image, determine the QR code ID, query the corresponding quantum key from the local quantum key machine through the QR code ID, decrypt the ciphertext to obtain plaintext, and generate a service activation code from the plaintext and the quantum key to generate the second service activation code. The activation code comparison module is used to obtain the first service activation code from the QR code generator, compare the first service activation code with the second service activation code, and if they match, proceed with subsequent service operations.

7. A QR code decoding system based on quantum key encryption and decryption according to claim 6, characterized in that: The first service at least generation module is specifically used for: Both the QR code generator and the QR code scanner are connected to the QKD network via a quantum key generator to obtain the quantum key generated by the quantum key distribution protocol, or both the QR code generator and the QR code scanner are equipped with a U-shield or TF card pre-loaded with the quantum key to obtain the quantum key generated by the quantum key distribution protocol. A first service activation code is generated based on the original data before encoding of the QR code and the quantum key. The original data before encoding of the QR code is then encrypted using the quantum key to obtain ciphertext.

8. A QR code decoding system based on quantum key encryption and decryption according to claim 6, characterized in that: The first service code generation module specifically includes: using a quantum key ID, UUID, or random number as the QR code ID to encode the original data before the QR code; using a quantum key obtained from the quantum key generator to generate a first service activation code; and using the quantum key to encrypt the original data before the QR code encoding to obtain ciphertext.

9. A QR code decoding system based on quantum key encryption and decryption according to claim 6, characterized in that: The acquisition of the first service activation code by the QR code generator by the QR code scanning terminal specifically includes: the first service activation code of the QR code generator is generated into a regular QR code for the QR code scanning terminal to scan again, or the QR code scanning terminal receives the message verification code from the QR code generator and takes the modulo of the number of bits required by the message verification code in a digital manner as the first service activation code.

10. A QR code decoding system based on quantum key encryption and decryption according to claim 6, characterized in that: The second business activation code generation module is further configured to: after scanning the QR code at the QR code scanning terminal, send the QR code ID to the business server of the business management platform for recording, and invalidate the QR code if certain conditions are met, including that a specific person has scanned the code or that the code has been scanned a certain number of times.

Citation Information

Patent Citations

  • Payment protection method and device based on quantum encryption, equipment and storage medium

    CN115358748A

  • Equipment two-dimensional code point inspection system

    CN118657511A