QR code decoding method and system based on quantum key encryption and decryption

The integration of quantum key distribution for encrypting and decrypting 2D code data addresses vulnerabilities to quantum computing and improves transaction efficiency by ensuring secure and authorized operations in payment environments.

CN119728097AActive Publication Date: 2025-03-28CHINA TELECOM SHANGHAI IDEAL INFORMATION IND GRP

Patent Information

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

AI Technical Summary

Technical Problem

Current two-dimensional code (2D code) encryption methods, such as RSA and symmetric key distribution, are vulnerable to quantum computing attacks, and existing quantum key distribution (QKD) solutions are complex and inefficient, leading to security and transaction time issues in payment environments.

Method used

A method and system utilizing quantum key distribution (QKD) for encrypting and decrypting 2D code data, where the 2D code generation end encrypts original data with a quantum key, and the scanning end decrypts it using a corresponding quantum password, with additional business startup codes for secure transaction verification.

Benefits of technology

This approach enhances payment environment security by resisting quantum computing attacks and reduces transaction time by ensuring only authorized parties can perform business operations, effectively preventing code duplication and theft.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728097A_ABST
    Figure CN119728097A_ABST
Patent Text Reader

Abstract

The invention relates to a two-dimensional code decoding method and system based on quantum key encryption and decryption, and the method comprises the steps: obtaining a quantum key generated by a quantum key distribution protocol through a two-dimensional code generation end, generating a first service starting code based on the original data of the two-dimensional code before encoding and the quantum key, and encrypting the original data of the two-dimensional code before encoding by using the quantum key to obtain a ciphertext; the two-dimensional code generation end adds a two-dimensional code ID to the ciphertext at the same time to generate a two-dimensional code image; the two-dimensional code scanning end determines a two-dimensional code ID, inquires a quantum password corresponding to the two-dimensional code ID from a local quantum key machine through the two-dimensional code ID, decrypts the ciphertext to obtain a plaintext, and generates a service starting code for the plaintext and the quantum key to generate a second service starting code; and the two-dimensional code scanning end compares the first service starting code with the second service starting code, and if the first service starting code and the second service starting code are consistent, subsequent service operation is carried out. According to the invention, the problems of low payment environment security and low transaction efficiency can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of quantum key encryption and decryption, and in particular to a two-dimensional code decoding method and system based on quantum key encryption and decryption. Background Art

[0002] With the development of information technology, QR codes have been 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 equipment has pushed the application of QR code technology to a new high, greatly improving people's lifestyles. With its unique advantages, QR code technology has been widely used in retail and payment, logistics and warehousing, media and entertainment, industrial manufacturing, medical health, agriculture and food safety, etc. With the widespread application of QR codes, the phenomenon of payment QR codes being replaced and covered by mistake and payment QR codes being stolen and swiped frequently occurs with the increase of cameras.

[0003] In the prior art, QR code encryption mainly relies on asymmetric encryption methods such as RSA, using the other party's public key or one's own private key to encrypt the data part of the QR code, or using symmetric encryption methods, the two parties negotiate a symmetric key to encrypt the data area, and another is to combine the two, using an asymmetric key to encrypt the symmetric key in a specific position of the QR code. Among them, the asymmetric key encryption method is complex and inefficient, and with the development of quantum computers, some existing classic asymmetric encryption methods such as RSA and symmetric key distribution algorithms such as DH are at risk of being cracked by quantum computing at any time. However, the current quantum computing-resistant encryption method (PQC) has a very long key and a very large amount of calculation, which limits its wide application.

[0004] Currently, in order to prevent the copying and distribution of QR codes, the current timestamp information is usually placed in the QR code data using a timestamp method, and then encoded to generate a QR code image. When scanning, the timestamp in the QR code is parsed and compared with the current time of the system. If it is within a reasonable time interval, it is usually set to 1 minute from the generation to the scanning end for the convenience of the holder. However, with the prevalence of portable photography and monitoring, it is easy to be stolen during this period.

[0005] At present, there is also a method that proposes to use quantum keys to detect whether the payment environment is safe (such as the application number 202211037836.X, the name is "Payment protection method, device, equipment and storage medium based on quantum encryption" invention application): it records that multiple parties to the transaction will initiate application information to the quantum shield system, and the quantum shield system will send keys and quantum random numbers to the transaction parties based on quantum key distribution technology. The transaction parties encrypt the random numbers according to the keys, and the digital RMB system determines the encrypted output results. If the results are consistent, it proves that there is no problem with the QR code environment. However, the implementation steps of this patent are complicated, and it is strongly coupled with the business system, which increases the transaction time; and according to the principle of the QKD system, it is impossible to directly send quantum random numbers through quantum key distribution technology, and it needs to be implemented by other means. Among them, QKD (Quantum Key Distribution) is a confidential communication method that uses quantum systems as information carriers to transmit and extract shared security keys. For example, single photons are used as carriers, the sending end loads the encoded information, and the receiving end detects the decoded information, and then extracts the shared security key. The basic principles of quantum mechanics ensure the security of communication. For example, based on the uncertainty principle, attackers cannot accurately measure quantum states, and any eavesdropping on measurements will inevitably lead to unavoidable system disturbances, which will lead to the discovery of attack traces by QKD users. Therefore, quantum key distribution can provide a communication method that is unconditionally secure in principle.

[0006] Therefore, how to avoid the risk of QR codes being hacked by quantum computing and improve the security of the payment environment and transaction efficiency and shorten transaction time through quantum keys based on the principles of the QKD system is an urgent problem to be solved. Summary of the invention

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

[0008] To achieve the above objectives, in a first aspect, the present invention provides a two-dimensional code decoding method based on quantum key encryption and decryption, which is used in a system having at least a two-dimensional code generating end and a two-dimensional code scanning end, comprising:

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

[0010] The two-dimensional code generating end adds the two-dimensional code ID to the ciphertext 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 local quantum key machine for its corresponding quantum password through the two-dimensional code ID, decrypts the ciphertext to obtain plaintext, and generates a service startup code for the plaintext and the quantum key to generate a second service startup code;

[0012] The two-dimensional code scanning end obtains the first service activation code from the two-dimensional code generating end, compares the first service activation code with the second service activation code, and performs subsequent service operations if they are consistent.

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

[0014] Preferably, the QR code generating end uses the quantum key generated by the quantum key distribution protocol to generate a first service startup code for the QR code content and the quantum key, specifically including: the QR code generating end uses the quantum key ID or 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 machine to generate a service startup code.

[0015] Preferably, the two-dimensional code scanning end obtains the first service startup code of the two-dimensional code generating end, specifically including: the first service startup code of the two-dimensional code generating end is provided to the two-dimensional code scanning end for scanning again by generating an ordinary two-dimensional code, or the two-dimensional code scanning end receives the message verification code of the two-dimensional code generating end, and digitally moduloses the required number of digits of the message verification code as the first service startup code.

[0016] Preferably, after the QR code is scanned by the QR code scanning terminal, the business server of the business management platform records the QR code ID and cancels the QR code when specific conditions are met. The specific conditions include that a specific person has scanned the code or the code has been scanned a certain number of times.

[0017] To achieve the above-mentioned object, in a second aspect, the present invention provides a two-dimensional code decoding system based on quantum key encryption and decryption, comprising at least a two-dimensional code generating end and a two-dimensional code scanning end, wherein the two-dimensional code generating end comprises a first service at least generating module, an encryption module and a two-dimensional code generating module, and the two-dimensional code scanning end comprises a second service startup code generating module and a startup code comparing module;

[0018] The first service at least generating module is used for the two-dimensional code generating end to obtain the quantum key generated by the quantum key distribution protocol, and generate a first service starting code based on the original data before the encoding of the two-dimensional code and the quantum key;

[0019] The encryption module is used to encrypt the original data of the two-dimensional code before encoding using the quantum key to obtain a ciphertext;

[0020] The two-dimensional code generation module is used for the two-dimensional code generation end to add the two-dimensional code ID to the ciphertext, perform data analysis, encoding, error correction and mask calculation on the two-dimensional code, and then generate a two-dimensional code image;

[0021] The second service startup code generation module is used to scan and decode the two-dimensional code image, determine the two-dimensional code ID, query the local quantum key machine for its corresponding quantum password through the two-dimensional code ID, decrypt the ciphertext to obtain plaintext, and generate a service startup code for the plaintext and the quantum key to generate a second service startup code;

[0022] The activation code comparison module is used to obtain the first service activation code from the QR code generating end, compare the first service activation code with the second service activation code, and perform subsequent service operations if they are consistent.

[0023] Preferably, the first business at least generates a module, specifically used for:

[0024] The two-dimensional code generation end and the two-dimensional code scanning end are both 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 both inserted with a U shield or TF card pre-filled with a quantum key to obtain the quantum key generated by the quantum key distribution protocol;

[0025] A 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 a ciphertext.

[0026] Preferably, the first service at least generation module specifically includes: using a quantum key ID or UUID or a random number as a QR code ID to encode the original data before the QR code, using a quantum key obtained from the quantum key machine to generate a first service start code, and using the quantum key to encrypt the original data before the QR code encoding to obtain a ciphertext.

[0027] Preferably, the two-dimensional code scanning end obtains the first service startup code of the two-dimensional code generating end, specifically including: the first service startup code of the two-dimensional code generating end is provided to the two-dimensional code scanning end for scanning again by generating an ordinary two-dimensional code, or the two-dimensional code scanning end receives the message verification code of the two-dimensional code generating end, and digitally moduloses the required number of digits of the message verification code as the first service startup code.

[0028] Preferably, the second service startup code generation module is also used to: after the QR code is scanned by the QR code scanning end, send the QR code ID to the service server of the service management platform for record, and cancel the QR code if specific conditions are met, and the specific conditions include that a specific person has scanned it or the scan has reached a certain number of times.

[0029] The present invention relates to a two-dimensional code decoding method and system based on quantum key encryption and decryption, which has the following beneficial effects compared with the prior art:

[0030] 1. Encrypting the QR code content by distributing quantum keys through QKD can effectively resist quantum computing, has high security, and is suitable for business scenarios with higher security requirements.

[0031] 2. Add a step to generate a business activation code based on the quantum key and the QR code content. The scanning party compares the business activation code and performs the business operation only after the comparison is passed. Since the person who steals or covers the QR code cannot obtain or provide the business activation code, it can effectively solve the problem of the QR code being copied, stolen, or the QR code posted outside being covered by other QR codes and mistakenly swiped.

[0032] 3. In the case of higher security requirements, it is proposed that the generator can use the quantum key to encrypt the service startup code again and generate a QR code for the scanner to scan, thereby providing stronger security.

[0033] 4. To achieve stronger security, the business end can also record the QR code ID and invalidate the QR code according to certain rules after the QR code is securely scanned to prevent replay attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a method flow chart of a two-dimensional code decoding method based on quantum key encryption and decryption in Embodiment 1 of the present invention;

[0035] Figure 2 It is a system composition diagram of Embodiment 1 and Embodiment 2 of the present invention;

[0036] Figure 3 It is a diagram of a quantum key based two-dimensional code generation and scanning sequence of a two-dimensional code decoding method based on quantum key encryption and decryption in Embodiment 1 of the present invention;

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

[0038] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0039] Embodiment 1

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

[0041] S10: The QR code generation end obtains the quantum key generated by the quantum key distribution protocol, generates a first service start code based on the original data before the QR code is encoded and the quantum key, and uses the quantum key to encrypt the original data before the QR code is encoded to obtain a ciphertext.

[0042] In this embodiment, the QR code generating end obtains the quantum key generated by the quantum key distribution protocol, wherein the QR code generating end and the QR code scanning end are both connected to the QKD network through a quantum key machine to obtain the quantum key generated by the quantum key distribution protocol, or the QR code generating end and the QR code scanning end are both inserted with a U shield or TF card pre-charged with a quantum key to obtain the quantum key generated by the quantum key distribution protocol.

[0043] The QR code generation end uses the quantum key generated by the quantum key distribution protocol to generate a first service startup code for the QR code content and the quantum key, specifically including: the QR code generation end uses the quantum key ID or 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 machine to generate a service startup code.

[0044] S20: The QR code generation end adds the ciphertext to the QR code ID, performs data analysis, encoding, error correction and mask calculation on the QR code, and generates a QR code image.

[0045] S30: The QR code scanning end scans and decodes the QR code image, determines the QR code ID, and then queries the local quantum key machine for its corresponding quantum password through the QR code ID, decrypts the ciphertext to obtain the plaintext, and generates a service start code for the plaintext and the quantum key to generate a second service start code.

[0046] Among them, after the QR code is scanned by the QR code scanning end, the business server of the business management platform records the QR code ID. When specific conditions are met, the QR code is invalidated. The specific conditions include that a specific person has scanned it or the scan has reached a certain number of times.

[0047] S40: The QR code scanning end obtains the first service activation code of the QR code generating end, compares the first service activation code with the second service activation code, and performs subsequent service operations if they are consistent.

[0048] The QR code scanning end obtains the first service startup code of the QR code generating end, specifically including: the first service startup code of the QR code generating end generates a common QR code for the QR code scanning end to scan again, or the QR code scanning end receives the message verification code of the QR code generating end, and takes the modulus of the required number of digits of the message verification code as the first service startup code in a digital manner. The QR code scanning end compares the two service startup codes, and only performs subsequent service operations if both are consistent.

[0049] In one example, the QR code terminal is connected to the quantum key machine. The QR code generator directly uses the quantum key ID or UUID or random number as the QR code ID, and then uses the quantum key K to generate the service start code A = HMAC (M, K) for the QR code original data M, and then encrypts M to obtain C'

[0050] =E(M,K), and finally C=C'||ID is subjected to steps such as QR code data analysis, encoding, error correction and mask calculation to generate a QR code image; the QR code scanner decodes the QR code image, takes out the QR code ID, and then requests the corresponding key from the quantum key management platform, and then decrypts the ciphertext M=D(C',K), and then calculates the business startup code A=HMAC(M,K). The scanning direction generator asks the business startup code for comparison. The generator can regenerate an ordinary QR code for the business startup code A according to the agreement between the two parties. When the security requirement is higher, the business startup code can be encrypted with the quantum key again to generate an ordinary QR code (without carrying the QR code ID at this time), or the message verification code A can be modulo the numerical value, such as N=MOD(A,10000) to generate a four-digit verification code. The generator displays the QR code again or informs the scanner of the four-digit verification code. The scanner calculates and compares the business startup code A in the same way. After the verification is correct, the business operation is performed.

[0051] Embodiment 2

[0052] A two-dimensional code decoding system based on quantum key encryption and decryption, such as Figure 2 and 4 As shown, it includes a two-dimensional code generating terminal 71 and a two-dimensional code scanning terminal 72, as shown in Figure 2 In the embodiment shown, the system mainly consists of three parts, a QR code terminal, a business management platform and a quantum key service platform. The QR code terminal includes a QR code generation terminal 71 and a QR code scanning terminal 72. The business management platform performs business authentication and business processing on the QR code terminal. The quantum key service platform mainly performs quantum device access identity authentication and quantum key generation and distribution. The platform includes a quantum key machine, a QKD network and a quantum key management service.

[0053] The two-dimensional code generating end 71 includes a first service code generating module 711, an encryption module 712 and a two-dimensional code generating module 713, and the two-dimensional code scanning end 72 includes a second service activation code generating module 721 and an activation code comparing module 722. Figure 2 In the embodiment shown, the system mainly consists of three parts: a QR code terminal, a business management platform and a quantum key service platform. The QR code terminal includes a QR code generation terminal and a QR code scanning terminal. The business management platform performs business authentication and business processing on the QR code terminal. The quantum key service platform mainly performs quantum device access identity authentication and quantum key generation and distribution. The platform includes a quantum key machine, a QKD network and a quantum key management service.

[0054] The first service at least generating module 711 is used for the two-dimensional code generating end to obtain the quantum key generated by the quantum key distribution protocol, and to generate the first service starting code based on the original data before encoding of the two-dimensional code and the quantum key.

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

[0056] The two-dimensional code generation module 713 is used for the two-dimensional code generation end to attach the ciphertext to the two-dimensional code ID, perform data analysis, encoding, error correction and mask calculation on the two-dimensional code, and then generate a two-dimensional code image.

[0057] The second service startup code generation module 721 is used to scan and decode the two-dimensional code image, determine the two-dimensional code ID, query the local quantum key machine for its corresponding quantum password through the two-dimensional code ID, decrypt the ciphertext to obtain the plaintext, and generate a service startup code for the plaintext and the quantum key to generate a second service startup code.

[0058] The activation code comparison module 722 is used to obtain the first service activation code of the QR code generating end, compare the first service activation code with the second service activation code, and perform subsequent service operations if they are consistent.

[0059] In some embodiments, the first service at least generates a module 711, specifically configured to:

[0060] Both the QR code generation 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, or both the QR code generation end and the QR code scanning end are inserted with a U shield or TF card pre-charged with quantum keys to obtain the quantum key generated by the quantum key distribution protocol;

[0061] A 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 a ciphertext.

[0062] In some embodiments, the first service at least generates a module 711, specifically including: using a quantum key ID or UUID or a random number as a QR code ID to encode the original data before the QR code is encoded, using a quantum key obtained from a quantum key machine to generate a first service start code, and using the quantum key to encrypt the original data before the QR code is encoded to obtain a ciphertext.

[0063] In some embodiments, the QR code scanning end obtains the first service startup code of the QR code generating end, specifically including: the first service startup code of the QR code generating end is provided to the QR code scanning end for scanning again by generating an ordinary QR code, or the QR code scanning end receives the message verification code of the QR code generating end, and the required number of digits of the message verification code is digitally modulo as the first service startup code.

[0064] In some embodiments, the second service startup code generation module 721 is also used to: after the QR code is scanned at the QR code scanning end, send the QR code ID to the service server of the service management platform for record, and cancel the QR code if specific conditions are met, including that a specific person has scanned it or the scan has reached a certain number of times.

[0065] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0066] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A two-dimensional code decoding method based on quantum key encryption and decryption, used in a system with at least a two-dimensional code generating end and a two-dimensional code scanning end, characterized in that: include: The two-dimensional code generation end obtains a quantum key generated by a quantum key distribution protocol, generates a first service start code based on the original data before encoding of the two-dimensional code and the quantum key, and uses the quantum key to encrypt the original data before encoding of the two-dimensional code to obtain a ciphertext; The two-dimensional code generating end adds the two-dimensional code ID to the ciphertext to generate a two-dimensional code image; 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 local quantum key machine for its corresponding quantum password through the two-dimensional code ID, decrypts the ciphertext to obtain plaintext, and generates a service startup code for the plaintext and the quantum key to generate a second service startup code; The two-dimensional code scanning end obtains the first service activation code from the two-dimensional code generating end, compares the first service activation code with the second service activation code, and performs subsequent service operations if they are consistent.

2. A two-dimensional code decoding method based on quantum key encryption and decryption according to claim 1, characterized in that: The two-dimensional code generating end obtains the quantum key generated by the quantum key distribution protocol, wherein the two-dimensional code generating end and the two-dimensional code scanning end are both 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 generating end and the two-dimensional code scanning end are both inserted with a U shield or TF card pre-charged with a quantum key to obtain the quantum key generated by the quantum key distribution protocol.

3. A two-dimensional code decoding method based on quantum key encryption and decryption according to claim 1, characterized in that: The QR code generation end uses the quantum key generated by the quantum key distribution protocol to generate a first service startup code for the QR code content and the quantum key, specifically including: the QR code generation end uses the quantum key ID or 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 machine to generate a service startup code.

4. A two-dimensional code decoding method based on quantum key encryption and decryption according to claim 1, characterized in that: The two-dimensional code scanning end obtains the first service startup code of the two-dimensional code generating end, specifically including: the first service startup code of the two-dimensional code generating end is used to generate a common two-dimensional code for the two-dimensional code scanning end to scan again, or the two-dimensional code scanning end receives the message verification code of the two-dimensional code generating end, and takes the required number of digits of the message verification code as the first service startup code in a digital manner.

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

6. A two-dimensional code decoding system based on quantum key encryption and decryption, characterized in that: At least comprises a two-dimensional code generating end and a two-dimensional code scanning end, wherein the two-dimensional code generating end comprises a first service at least generating module, an encryption module and a two-dimensional code generating module, and the two-dimensional code scanning end comprises a second service start code generating module and a start code comparing module; The first service at least generating module is used for the two-dimensional code generating end to obtain the quantum key generated by the quantum key distribution protocol, and generate a first service starting code based on the original data before the encoding of the two-dimensional code and the quantum key; The encryption module is used to encrypt the original data of the two-dimensional code before encoding using the quantum key to obtain a ciphertext; The two-dimensional code generation module is used for the two-dimensional code generation end to add the two-dimensional code ID to the ciphertext to generate a two-dimensional code image; The second service startup code generation module is used to scan and decode the two-dimensional code image, determine the two-dimensional code ID, query the local quantum key machine for its corresponding quantum password through the two-dimensional code ID, decrypt the ciphertext to obtain plaintext, and generate a service startup code for the plaintext and the quantum key to generate a second service startup code; The activation code comparison module is used to obtain the first service activation code from the QR code generating end, compare the first service activation code with the second service activation code, and perform subsequent service operations if they are consistent.

7. A two-dimensional code decoding system based on quantum key encryption and decryption according to claim 6, characterized in that: The first business at least generates a module, specifically used for: The two-dimensional code generation end and the two-dimensional code scanning end are both 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 both inserted with a U shield or TF card pre-filled with a quantum key to obtain the quantum key generated by the quantum key distribution protocol; A 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 a ciphertext.

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

9. A two-dimensional code decoding system based on quantum key encryption and decryption according to claim 6, characterized in that: The two-dimensional code scanning end obtains the first service startup code of the two-dimensional code generating end, specifically including: the first service startup code of the two-dimensional code generating end is used to generate a common two-dimensional code for the two-dimensional code scanning end to scan again, or the two-dimensional code scanning end receives the message verification code of the two-dimensional code generating end, and takes the required number of digits of the message verification code as the first service startup code in a digital manner.

10. A two-dimensional code decoding system based on quantum key encryption and decryption according to claim 6, characterized in that: The second service startup code generation module is also used to: after the QR code is scanned by the QR code scanning end, send the QR code ID to the service server of the service management platform for record, and cancel the QR code if specific conditions are met. The specific conditions include that a specific person has scanned or scanned a certain number of times.

Citation Information

Patent Citations

  • Two-dimensional code authentication system based on quantum encryption

    CN107733644A

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

    CN115358748A

  • Block chain identity authentication method and system based on quantum key

    CN117155596A

  • Equipment two-dimensional code point inspection system

    CN118657511A

Cited By

  • QR code dynamic encryption and verification system based on quantum key

    CN121902175A

  • A QR code dynamic encryption and verification system based on quantum key distribution.

    CN121902175B