Payment protection method, device, equipment and storage medium based on quantum encryption
Generating and distributing random numbers and keys through quantum encryption technology solves the problem of the risk of QR code replacement in scan-code payment, ensuring the security of the payment environment and the correctness of the flow of funds.
Patent Information
- Application Number
- CN202211037836.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-08-26
AI Technical Summary
During the scanning and payment process, the QR code for payment and receipt can easily be replaced or stolen, resulting in unclear fund flow and posing risks to both parties to the transaction.
Using a payment protection method based on quantum encryption, quantum random numbers and keys are generated and sent to the client participating in the payment. The client uses the transaction QR code information to encrypt the random numbers and returns the encryption results for comparison. If the results are consistent This ensures that the payment environment is safe.
It effectively prevents the QR code from being replaced during payment, ensures the correct flow of funds, and avoids losses for both parties to the transaction.
Smart Images

Figure CN115358748B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum encryption technology, and in particular to a payment protection method, device, equipment and storage medium based on quantum encryption. Background Art
[0002] Mobile payment has become the mainstream payment method nowadays, and the mainstream payment carrier is the QR code payment solution provided by Alipay and WeChat, that is, scan code payment. The issuance of digital RMB has improved the convenience, security and anti-counterfeiting level of retail payment, and greatly promoted the development of my country's digital economy.
[0003] During the QR code scanning payment process, the payment QR code can be easily replaced or stolen, resulting in a flow of funds that is not in line with the expectations of both parties to the transaction after scanning the code, causing risks to one or both parties in the transaction. Common risks include the merchant's payment QR code being covered by criminals and the payment amount flowing to other people. Summary of the invention
[0004] In view of the shortcomings of the above-mentioned prior art, the present invention provides a payment protection method, device, equipment and storage medium based on quantum encryption to improve the security of transactions based on code scanning payment.
[0005] The first aspect of the present application provides a payment protection method based on quantum encryption, comprising:
[0006] Receive a security verification application from a digital RMB client participating in payment; wherein the digital RMB client sends the security verification application after scanning a transaction QR code; the transaction QR code is a payment QR code or a receipt QR code;
[0007] Call the random number module to generate quantum random numbers, and call the quantum key module to generate quantum keys;
[0008] Send the quantum random number and the quantum key to each of the digital RMB clients participating in the payment;
[0009] Receive the random number encryption result fed back by each of the digital RMB clients participating in the payment; wherein the random number encryption result is obtained by the digital RMB client participating in the payment using the quantum key and the QR code information of the transaction QR code to encrypt the quantum random number;
[0010] Compare the received multiple random number encryption results to see if they are consistent;
[0011] If the encryption results of multiple random numbers received are consistent, it is determined that the current payment environment is secure.
[0012] Optionally, after comparing the received multiple encryption results to see if they are consistent, the step further includes:
[0013] If the encryption results of multiple random numbers received are inconsistent, it is determined that the current payment environment is unsafe and the payment is canceled.
[0014] Optionally, calling a quantum key module to generate a quantum key includes:
[0015] The quantum key module is called to process the quantum random number to obtain the quantum key.
[0016] Optionally, the receiving of random number encryption results fed back by each digital RMB client participating in the payment includes:
[0017] Receive ciphertext data feedback from each digital RMB client participating in the payment;
[0018] The data ciphertext is decrypted using the quantum key of each digital RMB client participating in the payment to obtain a random number encryption result.
[0019] Optionally, the process of encrypting the random number encryption result by the digital RMB client includes:
[0020] Performing hash processing on the two-dimensional code to obtain two-dimensional code information of the two-dimensional code;
[0021] Combining the quantum key and the two-dimensional code information to obtain a random number encryption key;
[0022] The quantum random number is encrypted using the random number encryption password to obtain a random number encryption result.
[0023] The second aspect of the present application provides a payment protection device based on quantum encryption, comprising:
[0024] A receiving unit, used to receive a security verification application from a digital RMB client participating in payment; wherein the digital RMB client sends the security verification application after scanning a transaction QR code; the transaction QR code is a payment QR code or a receipt QR code;
[0025] A generation unit, used to call a random number module to generate a quantum random number, and call a quantum key module to generate a quantum key;
[0026] A sending unit, used to send the quantum random number and the quantum key to each of the digital RMB clients participating in the payment;
[0027] The receiving unit is used to receive the random number encryption result fed back by each of the digital RMB clients participating in the payment; wherein the random number encryption result is obtained by the digital RMB client participating in the payment using the quantum key and the QR code information of the transaction QR code to encrypt the quantum random number;
[0028] A comparison unit, used to compare whether the received multiple random number encryption results are consistent;
[0029] The determination unit is used to determine that the current payment environment is safe if the encryption results of the multiple random numbers received are consistent.
[0030] Optionally, the determining unit is further configured to:
[0031] If the encryption results of multiple random numbers received are inconsistent, it is determined that the current payment environment is unsafe and the payment is canceled.
[0032] Optionally, when the generation unit calls the quantum key module to generate the quantum key, it is specifically used to:
[0033] The quantum key module is called to process the quantum random number to obtain the quantum key.
[0034] Optionally, when the receiving unit receives the random number encryption result fed back by each of the digital RMB clients participating in the payment, it is specifically used to:
[0035] Receive ciphertext data feedback from each digital RMB client participating in the payment;
[0036] The data ciphertext is decrypted using the quantum key of each digital RMB client participating in the payment to obtain a random number encryption result.
[0037] A third aspect of the present application provides an electronic device, including a memory and a processor;
[0038] Wherein, the memory is used to store computer programs;
[0039] The processor is used to execute the computer program, and when the computer program is executed, it is specifically used to implement the quantum encryption-based payment protection method provided in any one of the first aspects of the present application.
[0040] The fourth aspect of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the quantum encryption-based payment protection method provided in any one of the first aspects of the present application.
[0041] The present application provides a payment protection method, device, equipment and storage medium based on quantum encryption, which can be applied to the field of quantum computing or finance. The method includes receiving a security verification application from a digital RMB client participating in the payment; generating a quantum random number and a quantum key, and sending them to each digital RMB client participating in the payment; receiving a random number encryption result fed back by the digital RMB client; the random number encryption result is obtained by encrypting the digital RMB client participating in the payment using the quantum key and the QR code information of the transaction QR code; if the multiple random number encryption results received are consistent, the current payment environment is determined to be safe. This solution prevents the QR code scanned during payment from being replaced by comparing the random number encryption results of the two payment parties, thereby avoiding the risk of the transaction QR code being replaced. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1 A flowchart of a payment protection method based on quantum encryption provided in an embodiment of the present application;
[0044] Figure 2 An example diagram of an application of a payment protection method based on quantum encryption provided in an embodiment of the present application;
[0045] Figure 3 A schematic diagram of the structure of a payment protection device based on quantum encryption provided in an embodiment of the present application;
[0046] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] First, some terms that may be involved in this application are explained.
[0049] The principle of quantum unmeasurability: The principle of quantum unmeasurability is also known as the quantum uncertainty principle. This is based on the characteristics of quantum mechanics. When measuring and observing external quantum, the original state of motion of the quantum will be changed, resulting in inconsistent final transmission results.
[0050] Quantum communication: Quantum communication is a new type of communication technology that uses physical properties such as quantum superposition and quantum entanglement to transmit information. It is a combination of quantum mechanics and information theory. It uses the quantum non-cloning and invisible transmission characteristics and quantum computing methods to ensure the absolute security of both parties in communication.
[0051] Quantum random numbers: Quantum random numbers are based on the probabilistic nature of quantum mechanics. They are naturally unpredictable and non-periodic. They are generally generated using a quantum random number generator. Unlike the pseudo-random numbers generated by software algorithms, quantum random numbers are truly random.
[0052] Most existing retail mobile payment scenarios rely on mutual trust between the two parties to the transaction. Consumers have two payment methods: one is to scan the merchant's payment QR code and manually enter the payment amount; the other is to present the payment code, and the merchant presets the payment amount and uses a code scanning device to scan the payment code. In the first method, criminals may post other payment codes to cover or seize the merchant's payment code, resulting in incorrect fund flow and losses to both parties of the transaction. In the second method, consumers need to prepare payment codes in advance. First, consumers may steal other people's payment codes, and second, during the payment interval, criminals may use cash registers to secretly scan, resulting in property damage.
[0053] With the promotion of digital RMB, mobile payment scenarios are becoming more daily and convenient. The present invention places the payment scenario under the protection of the quantum shield and uses the principle of quantum key distribution to solve the above-mentioned problems of unknown fund flow and theft when conducting transactions.
[0054] The second quantum revolution is currently underway, and it looks likely to create a host of disruptive quantum technologies that exploit features of quantum mechanics such as superposition and entanglement to provide unprecedented power, precision, security, and sensitivity for quantum applications such as communications, computing, radar, timing, sensing, imaging, metrology, and navigation.
[0055] The most mature field of quantum technology is quantum communication. my country's quantum trunk lines have almost covered the entire country, and the quantum cloud platform is also becoming more complete. Quantum keys are the most secure encryption method at present. Based on quantum key distribution technology, while ensuring information security, it also verifies whether the communicating parties are in a secure environment. In retail mobile payment scenarios, only when both parties receive the same key can the correct flow of funds be guaranteed.
[0056] In view of the above problems and in combination with the principles of quantum communication, the present invention designs a quantum shield system based on quantum communication technology to protect the security of transactions.
[0057] The basic principles of the present invention are summarized as follows. When using the digital RMB QR code to conduct an amount transaction in a retail scenario, an application message will be sent to the Quantum Shield system. The Quantum Shield system sends keys and quantum random numbers to both parties of the transaction based on quantum key distribution technology. Both parties of the transaction encrypt the random number according to the key, and the digital RMB system determines the encrypted output result. If the result is consistent, it proves that the QR code is correct and the funds flow is correct. In addition, according to the principle of quantum unpredictability, it proves that the transaction environment is safe, thus ensuring the security of the transaction.
[0058] To implement the solution of the present invention, technicians need to develop a quantum shield system and provide an interface for access by payment channels such as digital RMB, Alipay, and WeChat. The quantum shield system is responsible for distributing quantum keys and quantum random numbers, and the payment app receives quantum keys and quantum random numbers and performs encryption and comparison.
[0059] The technical solution of the present invention mainly includes the following modules.
[0060] Quantum key module: The quantum cloud platform generates and distributes quantum keys.
[0061] Quantum random number module: The quantum cloud platform generates and distributes quantum random numbers.
[0062] Receiving module: The payment app receives the quantum key and quantum random number.
[0063] Verification module: The payment app uses the received quantum key to encrypt the random number and returns the encryption result to the Quantum Shield system for comparison.
[0064] Encryption module: Use the national sm4 symmetric encryption algorithm for encryption.
[0065] The process of scanning code payment based on the technical solution of the present invention is as follows:
[0066] The two parties conduct the transaction, the payer presents the payment code, the payee scans the QR code, or the payer scans the payee's payment code.
[0067] The trading app (here is the digital RMB app) initiates an application to the Quantum Shield system for security verification.
[0068] After receiving the application message, the Quantum Shield system calls the random number module to generate a quantum random number, and calls the quantum key module to generate a quantum key. The random number and the key are distributed to both parties of the transaction.
[0069] The Digital RMB app receives the key and random number, calls the encryption module, encrypts the random number using the quantum key, and returns the result to the Quantum Shield system.
[0070] The Quantum Shield system compares the returned results. If the results are the same, the transaction environment is safe, the funds flow is correct, and the transaction is successful.
[0071] The beneficial effects of the present invention are:
[0072] The present invention is designed as a complete system, utilizing the principle of quantum key distribution, and includes the physical properties of quantum immeasurability and quantum entanglement. The quantum immeasurability property ensures that quantum keys and random numbers are in a safe environment during transmission, without external detection and interference, to ensure the safety of the transaction environment. The quantum entanglement property ensures that both parties to the transaction receive the same key, preventing the theft of payment QR codes.
[0073] When a digital RMB payment transaction is initiated, the payment system applies to the Quantum Shield system, which generates and distributes quantum keys and quantum random numbers, initiates a random number challenge, and verifies that both parties have received the same key and random number by comparing the results of quantum key encryption of random numbers, so as to achieve a safe transaction environment and correct capital flow, thus protecting the interests of both parties to the transaction.
[0074] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0075] First see Figure 1 , which is a flowchart of a payment protection method based on quantum encryption provided in an embodiment of the present application. The method may include the following steps.
[0076] Each step in the method provided in this embodiment can be specifically performed by the aforementioned quantum shield system, and the quantum shield system can be regarded as a server.
[0077] S101, receiving the security verification application from the digital RMB client participating in the payment.
[0078] Among them, the digital RMB client sends a security verification application after scanning the transaction QR code; the transaction QR code is a payment QR code or a receipt QR code.
[0079] In step S101, each digital RMB client participating in the payment will send a security verification application to the Vector Shield system. Specifically, among the two parties participating in the payment, the digital RMB client that scans the transaction QR code can automatically send a security verification application to the Vector Shield system, and the digital RMB client that does not scan the transaction QR code can send a security verification application to the Vector Shield system in response to the user's operation.
[0080] For example, see Figure 2 When consumer A purchases goods from merchant B, he can scan the payment QR code displayed by merchant B. After consumer A's digital RMB client scans the payment QR code, consumer A's digital RMB client sends a security verification application to the Quantum Shield system. At the same time, after seeing consumer A scan the payment QR code, merchant B operates merchant B's digital RMB client (hereinafter referred to as the client) to cause it to also send a security verification application to the Quantum Shield system.
[0081] S102, calling the random number module to generate a quantum random number, and calling the quantum key module to generate a quantum key.
[0082] The above-mentioned random number generation module can specifically be the quantum random number generator mentioned above, that is, quantum random numbers can be generated by the quantum random number generator, and the randomness of quantum ensures the true randomness of random numbers.
[0083] Optionally, the quantum key module may specifically include existing hardware and algorithms for generating quantum keys. When generating keys, the quantum random numbers may be processed using the existing hardware and related algorithms to obtain the quantum keys.
[0084] S103, sending the quantum random number and quantum key to each client participating in the payment.
[0085] In step S103, the quantum shield system can send the above quantum random number and quantum key to each client that has sent a security verification application.
[0086] Continue Figure 2 For example, the quantum shield system can send quantum random numbers and quantum keys to the clients of consumer A and merchant B respectively.
[0087] In some optional embodiments, before sending the quantum random number and quantum key, the quantum shield system can use a symmetric encryption algorithm, such as the national encryption SM4 algorithm, to encrypt the quantum random number and quantum key to obtain the corresponding random number ciphertext and key ciphertext, and then send the random number ciphertext and key ciphertext to the client, and the client decrypts the ciphertext to obtain the quantum random number and quantum key.
[0088] The advantage of doing this is that it can improve data security and avoid data leakage during transmission.
[0089] S104, receiving the random number encryption result fed back by each client participating in the payment.
[0090] Among them, the random number encryption result is obtained by the client participating in the payment using the quantum key and the QR code information of the transaction QR code to encrypt the quantum random number.
[0091] Optionally, the process of generating the random number encryption result by the client in step S104 can be to use a quantum key to encrypt the quantum random number through a national secret symmetric algorithm to obtain a random number encryption result. Therefore, when the encryption results of the payment and the payment are the same, it proves that the transaction parties have received the same key and random number, which proves the security of the transaction environment. In other words, it is only necessary to compare the encryption results and the encryption results are the same.
[0092] Optionally, the process of obtaining a random number encryption result by client encryption includes:
[0093] Perform hash processing on the QR code to obtain the QR code information of the QR code;
[0094] Combining the quantum key and the QR code information to obtain a random number encryption key;
[0095] The quantum random number is encrypted using a random number encryption cipher to obtain a random number encryption result.
[0096] Specifically, the client may first convert the aforementioned transaction QR code into a string, and then perform hash processing on the string converted from the QR code to obtain the QR code information.
[0097] When the transaction QR code is a payment QR code, the payer's client scans the payment QR code to pay the money to the payee pointed to by the payment QR code. At this time, among the two parties involved in the payment, the payer's client can obtain the payment QR code by scanning, and the payee's (such as a merchant) client can pre-store the payment QR code locally.
[0098] When the transaction QR code is a payment QR code, the payer's client may pre-store the payment QR code, and the payee's client obtains the payment QR code by scanning.
[0099] The quantum key and the QR code information are combined to obtain a random number encryption key. Specifically, the QR code information can be spliced at the end or beginning of the quantum key to obtain the random number encryption key.
[0100] In some optional embodiments, the random number encryption result may also be an encryption result obtained by the client encrypting the quantum random number and the QR code information together with the quantum key, that is, the random number encryption result includes the client's QR code information and the received quantum random number.
[0101] S105, comparing whether the received multiple random number encryption results are consistent.
[0102] Optionally, in step S105, comparing multiple random number encryption results to see whether they are consistent may specifically be:
[0103] Decrypt the received multiple random number encryption results with the quantum key to obtain the quantum random number contained in each random number encryption result, and then compare whether the multiple quantum random numbers are consistent. If the quantum random numbers are consistent, execute S106; if the quantum random numbers are inconsistent, execute S107.
[0104] If the encryption results of the multiple random numbers are consistent, execute step S106; if the encryption results of the multiple random numbers are inconsistent, execute step S107.
[0105] Continue Figure 2 In the example of, the multiple random number encryption results may include the random number encryption result sent by the client of consumer A and the random number encryption result sent by the client of merchant B.
[0106] In some optional embodiments, in order to improve security, the random number encryption result may be transmitted in encrypted form.
[0107] Specifically, the random number encryption results received from each digital RMB client participating in the payment include:
[0108] Receive the ciphertext data feedback from each digital RMB client participating in the payment;
[0109] Use the quantum key of each digital RMB client participating in the payment to decrypt the data ciphertext and obtain the random number encryption result.
[0110] That is to say, before each client sends the random number encryption result to the Quantum Shield system, it uses a symmetric encryption algorithm (such as the national secret SM4 algorithm) to encrypt the random number encryption result based on the client's quantum key, obtain the corresponding data ciphertext, and then send the data ciphertext to the Quantum Shield system. The Quantum Shield system obtains the client's quantum key in advance when the client registers and stores it locally. Therefore, the Quantum Shield system can use the quantum key to decrypt the data ciphertext and obtain the random number encryption result.
[0111] In some optional embodiments, the following steps may be further included after step S105:
[0112] The Quantum Shield system can use the quantum key to decrypt the received random number encryption result. If it is found after decryption that the random number encryption result includes QR code information and quantum random numbers, the Quantum Shield system will send the QR code information provided by both parties to the transaction to the other party's client respectively. For example, the QR code information included in the payee's random number encryption result is sent to the payee's client, and the QR code information included in the payee's random number encryption result is sent to the payee's client.
[0113] Therefore, the payer and the payee can compare the received QR code information with their own QR code information to verify whether the funds flow is correct during the transaction. For example, the payer receives the payee's QR code information Code1, and compares Code1 with the payment target QR code information Code2. If the two are consistent, the payer determines that the funds flow in this payment is correct.
[0114] S106, determining that the current payment environment is safe.
[0115] Optionally, in step S106, the Quantum Shield system may send a first prompt message to the client participating in the payment, where the first prompt message is used to notify the user of the client that the current payment environment is secure.
[0116] S107, determining that the current payment environment is unsafe, and canceling the current payment.
[0117] Optionally, in step S107, the Quantum Shield system may send a second prompt message to the client participating in the payment, where the second prompt message is used to notify the user of the client that the current payment environment is not safe and that the payment has been canceled.
[0118] The beneficial effects of the method of this embodiment are:
[0119] Combination Figure 2 It is not difficult to see from the example that when the payment QR code posted by merchant B is covered by other QR codes by criminals, the client of consumer A that scans the other covered QR codes will use the QR code information of the other QR codes to generate a random number encryption result (see step S104), while the client of merchant B still uses the locally pre-stored payment QR code of merchant B to generate a random number encryption result. This results in the random number encryption result fed back by consumer A's client being different from the random number encryption result fed back by merchant B's client. Therefore, the Quantum Shield system can discover that merchant B's payment QR code has been replaced, that is, it determines that the current payment environment is unsafe, thereby canceling the payment in time to avoid losses to consumers and merchants.
[0120] The present application provides a payment protection method based on quantum encryption, which can be applied to the field of quantum computing or finance. The method includes receiving a security verification application from a digital RMB client participating in the payment; generating a quantum random number and a quantum key, and sending them to each digital RMB client participating in the payment; receiving a random number encryption result fed back by the digital RMB client; the random number encryption result is obtained by encrypting the digital RMB client participating in the payment using the quantum key and the QR code information of the transaction QR code; if the multiple random number encryption results received are consistent, the current payment environment is determined to be safe. This solution prevents the QR code scanned during payment from being replaced by comparing the random number encryption results of the two payment parties, thereby avoiding the risk of the transaction QR code being replaced.
[0121] According to the payment protection method based on quantum encryption provided in the embodiment of the present application, the embodiment of the present application also provides a payment protection device based on quantum encryption, see Figure 3 , the device may include the following units.
[0122] The device provided in this embodiment can be regarded as the software part of the quantum shield system in the aforementioned method embodiment.
[0123] The receiving unit 301 is used to receive a security verification application from a digital RMB client participating in payment.
[0124] Among them, the digital RMB client sends a security verification application after scanning the transaction QR code; the transaction QR code is a payment QR code or a receipt QR code.
[0125] The generating unit 302 is used to call the random number module to generate a quantum random number, and call the quantum key module to generate a quantum key.
[0126] The sending unit 303 is used to send the quantum random number and quantum key to each digital RMB client participating in the payment.
[0127] The receiving unit 301 is used to receive the random number encryption result fed back by each digital RMB client participating in the payment.
[0128] Among them, the random number encryption result is obtained by the digital RMB client participating in the payment using the quantum key and the QR code information of the transaction QR code to encrypt the quantum random number.
[0129] The comparison unit 304 is used to compare whether the received multiple random number encryption results are consistent.
[0130] The determination unit 305 is used to determine that the current payment environment is safe if the received multiple random number encryption results are consistent.
[0131] Optionally, the determining unit 305 is further configured to:
[0132] If the encryption results of multiple random numbers received are inconsistent, it is determined that the current payment environment is unsafe and the payment is canceled.
[0133] Optionally, when the generation unit 302 calls the quantum key module to generate the quantum key, it is specifically used to:
[0134] Call the quantum key module to process quantum random numbers and obtain the quantum key.
[0135] Optionally, when the receiving unit 301 receives the random number encryption result fed back by each digital RMB client participating in the payment, it is specifically used to:
[0136] Receive the ciphertext data feedback from each digital RMB client participating in the payment;
[0137] Use the quantum key of each digital RMB client participating in the payment to decrypt the data ciphertext and obtain the random number encryption result.
[0138] The specific working principle of the payment protection device based on quantum encryption provided in the embodiment of the present application can be found in the relevant steps of the payment protection method based on quantum encryption provided in any embodiment of the present application, and will not be repeated here.
[0139] The present application provides a payment protection device based on quantum encryption, which can be applied to the field of quantum computing or the financial field. The device includes: a receiving unit 301 receives a security verification application of a digital RMB client participating in the payment; a generating unit 302 generates a quantum random number and a quantum key, and a sending unit 303 sends it to each digital RMB client participating in the payment; the receiving unit 301 receives the random number encryption result fed back by the digital RMB client; the random number encryption result is obtained by the digital RMB client participating in the payment using the quantum key and the QR code information of the transaction QR code to encrypt; if the comparison unit 304 determines that the received multiple random number encryption results are consistent after comparison, the determination unit 305 determines that the current payment environment is safe. This solution prevents the QR code scanned during payment from being replaced by comparing the random number encryption results of the two payment parties, thereby avoiding the risk of the transaction QR code being replaced.
[0140] The present application also provides an electronic device. Figure 4 , including a memory 401 and a processor 402.
[0141] The memory 401 is used to store computer programs.
[0142] The processor 402 is used to execute a computer program. When the computer program is executed, it is specifically used to implement the quantum encryption-based payment protection method provided in any embodiment of the present application.
[0143] An embodiment of the present application also provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the quantum encryption-based payment protection method provided in any embodiment of the present application.
[0144] It should be noted that the payment protection method, device, equipment and storage medium based on quantum encryption provided by the present invention can be used in the field of quantum computing or the financial field. The above is only an example and does not limit the application field of the payment protection method, device, equipment and storage medium based on quantum encryption provided by the present invention.
[0145] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants 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, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0146] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0147] The present application can be implemented or used by professionals and technicians. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A payment protection method based on quantum encryption, characterized in that: include: Receive a security verification application from a digital RMB client participating in payment; wherein the digital RMB client sends the security verification application after scanning a transaction QR code; the transaction QR code is a payment QR code or a receipt QR code; Call the random number module to generate quantum random numbers, and call the quantum key module to generate quantum keys; Send the quantum random number and the quantum key to each of the digital RMB clients participating in the payment; Receive the random number encryption result fed back by each of the digital RMB clients participating in the payment; wherein the random number encryption result is obtained by the digital RMB client participating in the payment using the quantum key and the QR code information of the transaction QR code to encrypt the quantum random number; Compare the received multiple random number encryption results to see if they are consistent; If the encryption results of multiple random numbers received are consistent, the current payment environment is determined to be secure; Among them, the process of encrypting the digital RMB client to obtain the random number encryption result includes: Performing hash processing on the two-dimensional code to obtain two-dimensional code information of the two-dimensional code; Combining the quantum key and the two-dimensional code information to obtain a random number encryption key; The quantum random number is encrypted using the random number encryption key to obtain a random number encryption result.
2. The method according to claim 1, characterized in that After comparing the received multiple encryption results to see if they are consistent, the process further includes: If the encryption results of multiple random numbers received are inconsistent, it is determined that the current payment environment is unsafe and the payment is canceled.
3. The method according to claim 1, characterized in that: The calling of the quantum key module to generate a quantum key comprises: The quantum key module is called to process the quantum random number to obtain the quantum key.
4. The method according to claim 1, characterized in that: The random number encryption result received from each digital RMB client participating in the payment includes: Receive ciphertext data feedback from each digital RMB client participating in the payment; The data ciphertext is decrypted using the quantum key of each digital RMB client participating in the payment to obtain a random number encryption result.
5. A payment protection device based on quantum encryption, characterized in that: include: A receiving unit, used to receive a security verification application from a digital RMB client participating in payment; wherein the digital RMB client sends the security verification application after scanning a transaction QR code; the transaction QR code is a payment QR code or a receipt QR code; A generation unit, used to call a random number module to generate a quantum random number, and call a quantum key module to generate a quantum key; A sending unit, used to send the quantum random number and the quantum key to each of the digital RMB clients participating in the payment; The receiving unit is used to receive the random number encryption result fed back by each of the digital RMB clients participating in the payment; wherein the random number encryption result is obtained by the digital RMB client participating in the payment using the quantum key and the QR code information of the transaction QR code to encrypt the quantum random number; A comparison unit, used to compare whether the received multiple random number encryption results are consistent; A determination unit, used to determine that the current payment environment is secure if the encryption results of multiple random numbers received are consistent; Among them, the process of encrypting the digital RMB client to obtain the random number encryption result includes: Performing hash processing on the two-dimensional code to obtain two-dimensional code information of the two-dimensional code; Combining the quantum key and the two-dimensional code information to obtain a random number encryption key; The quantum random number is encrypted using the random number encryption key to obtain a random number encryption result.
6. The device according to claim 5, characterized in that The determining unit is further configured to: If the encryption results of multiple random numbers received are inconsistent, it is determined that the current payment environment is unsafe and the payment is canceled.
7. The device according to claim 5, characterized in that When the generation unit calls the quantum key module to generate the quantum key, it is specifically used to: The quantum key module is called to process the quantum random number to obtain the quantum key.
8. The device according to claim 5, characterized in that When the receiving unit receives the random number encryption result fed back by each of the digital RMB clients participating in the payment, it is specifically used to: Receive ciphertext data feedback from each digital RMB client participating in the payment; The data ciphertext is decrypted using the quantum key of each digital RMB client participating in the payment to obtain a random number encryption result.
9. A computer storage medium, characterized in that Used to store computer programs, which, when executed, are specifically used to implement the quantum encryption-based payment protection method as described in any one of claims 1 to 4.
10. An electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program, specifically to implement the quantum encryption-based payment protection method as described in any one of claims 1 to 4.
