Payment method and payment device

By encrypting the payment amount, the opposite number of payment amount and preset data in the payment sender's payment method, and uploading the encrypted ciphertext to the blockchain, the problem that anonymous payment in digital currency cannot be regulated is solved, and effective supervision of anonymous transactions and transaction security is improved.

CN119762067AInactive Publication Date: 2025-04-04BEIJING NATIONAL FINANCIAL TECHNOLOGY RISK MONITORING CENTER CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411842103.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing digital currencies cannot be effectively supervised during the anonymous payment process, resulting in the payment process being unable to be effectively supervised by regulatory authorities.

Method used

A payment method is proposed, which is performed by the payment sender, including encrypting the payment amount, the opposite number of the payment amount and the preset data, and uploading the encrypted ciphertext to the blockchain. The regulator determines the identity and payment amount of both parties to the transaction through decryption and public key query, thereby achieving effective supervision of anonymous transactions.

Benefits of technology

It realizes effective supervision of the identity and transaction amount of both parties to the transaction based on anonymous transactions, and improves the security of the transaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762067A_ABST
    Figure CN119762067A_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and proposes a payment method and a payment device, wherein the payment method comprises: encrypting the opposite of the payment amount according to the public key of the payment sender to generate a first ciphertext; encrypting the payment amount according to the public key of the payment receiver to generate a second ciphertext; encrypting preset data according to the public key of at least one preset user to generate at least one third ciphertext; encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator to generate a fourth ciphertext; uploading the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain; wherein the regulator is used to determine the identities of the two parties to the transaction according to the first ciphertext, the second ciphertext and the third ciphertext, and the regulator is used to determine the payment amount according to the fourth ciphertext. With the payment method of the present application, the regulator can effectively supervise the payment process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a payment method and a payment device. Background Art

[0002] In the relevant technologies, digital currencies include Bitcoin, Ethereum, cryptocurrency and Monero, etc. These digital currencies realize peer-to-peer anonymous payment based on blockchain technology, but these digital currencies do not consider the issue of supervision while protecting user privacy, that is, the transaction amount and the identity of the trader are hidden from the third party and the regulator, resulting in the payment process cannot be effectively supervised by the regulatory authorities. Summary of the invention

[0003] This application aims to at least solve the technical problem in the prior art or related technology that digital currency cannot be effectively regulated during anonymous payment.

[0004] To this end, a first aspect of the present application is to propose a payment method.

[0005] The second aspect of the present application is to propose another payment method.

[0006] The third aspect of the present application is to provide a payment device.

[0007] A fourth aspect of the present application is to provide another payment device.

[0008] In view of this, according to the first aspect of the present application, a payment method is proposed, which is executed by the payment sender, and the payment method includes: encrypting the opposite of the payment amount according to the public key of the payment sender to generate a first ciphertext; encrypting the payment amount according to the public key of the payment receiver to generate a second ciphertext; encrypting preset data according to the public key of at least one preset user to generate at least one third ciphertext; encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator to generate a fourth ciphertext; uploading the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain; wherein the regulator is used to determine the identities of the two parties to the transaction based on the first ciphertext, the second ciphertext and the third ciphertext, and the regulator is used to determine the payment amount based on the fourth ciphertext.

[0009] The payment method provided in the present application is executed by the payment sender. Specifically, in the process where the payment sender needs to make an anonymous payment, first, the payment sender encrypts the opposite of the payment amount according to its own public key to generate a first ciphertext. The payment sender encrypts the payment amount according to the public key of the payment receiver to generate a second ciphertext. The payment sender encrypts the preset data according to the public key of at least one preset user to generate at least one third ciphertext. In this way, the payment receiver can decrypt the second ciphertext according to its own private key, thereby decrypting the payment amount, that is, obtaining the transaction amount, and then determining the validity of the transaction with the payment sender.

[0010] It should be noted that the payment sender encrypts the opposite of the payment amount and the payment amount according to the public key of the payment sender and the public key of the payment receiver, respectively, so as to ensure that the payment receiver can obtain the payment amount and other data after decrypting the second ciphertext, so as to ensure that the payment can be completed. As for the preset data, the payment sender can encrypt according to the public key of at least one preset user, so that the first ciphertext, the second ciphertext and the third ciphertext received by the payment receiver include not only the identity of the payment sender and the payment receiver, the payment amount and other necessary data, but also the identity of at least one preset user and the preset data, so as to achieve the hiding of the identity of the payment sender and the payment receiver and the payment amount, and then realize the anonymous payment process of both parties to the transaction.

[0011] Furthermore, the payment sender also needs to encrypt the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator to generate the fourth ciphertext. And, after generating the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext, the payment sender can upload the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain for the payment receiver to receive and for the regulator to obtain the payment information.

[0012] Specifically, the supervisor can determine the identities of the two parties to the transaction based on the first ciphertext, the second ciphertext, and the third ciphertext. At the same time, the supervisor can also determine the payment amount based on the fourth ciphertext.

[0013] The payment method provided in the present application is executed by the payment sender. Specifically, during the transaction between the payment sender and the payment receiver, the payment sender needs to encrypt the opposite number of the payment amount according to its own public key to generate a first ciphertext. The payment sender encrypts the payment amount according to the public key of the payment receiver to generate a second ciphertext. The payment sender encrypts the preset data according to the public key of at least one preset user to generate at least one third ciphertext. The payment receiver can decrypt the second ciphertext according to its own private key to determine the payment amount, and then determine the validity of the transaction with the payment sender. Due to the existence of the third ciphertext, the identities of both parties to the transaction and the transaction amount can be hidden, thereby realizing anonymous transactions. At the same time, the payment sender also encrypts the payment amount, the opposite number of the payment amount and the preset data according to the public key of the regulator to generate a fourth ciphertext. As a result, the regulator can determine the identities of both parties to the transaction according to the first ciphertext, the second ciphertext and the third ciphertext, and determine the payment amount according to the fourth ciphertext. As a result, anonymous transactions can also be effectively supervised, improving the security of transactions.

[0014] Furthermore, the supervisor is specifically used to: decrypt the fourth ciphertext to determine the payment amount; perform public key query on the first ciphertext, the second ciphertext and the third ciphertext, and determine the identities of the two parties to the transaction based on the public keys corresponding to the payment amount and the opposite of the payment amount.

[0015] Furthermore, before uploading the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain, the payment method also includes: generating a zero-knowledge proof based on the first ciphertext, the second ciphertext and the third ciphertext; uploading the zero-knowledge proof to the blockchain; wherein the zero-knowledge proof is used for verification by the blockchain to determine that the data received by the regulator and the payment recipient are the same.

[0016] According to the second aspect of the present application, a payment method is proposed, which is executed by a regulator, and the payment method includes: obtaining a first ciphertext, a second ciphertext, a third ciphertext and a fourth ciphertext uploaded to the blockchain by a payment sender; decrypting the fourth ciphertext to determine the payment amount; performing a public key query on the first ciphertext, the second ciphertext and the third ciphertext, and determining the identities of the two parties to the transaction based on the public keys corresponding to the payment amount and the opposite of the payment amount; wherein the first ciphertext is obtained by the payment sender encrypting the opposite of the payment amount according to the public key of the payment sender, the second ciphertext is obtained by the payment sender encrypting the payment amount according to the public key of the payment receiver, the third ciphertext is obtained by the payment sender encrypting preset data according to the public key of at least one preset user, and the fourth ciphertext is obtained by the payment sender encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator.

[0017] The payment method provided in this application can be executed by the regulator. Specifically, the regulator can obtain the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender. Among them, the first ciphertext is obtained by the payment sender encrypting the opposite of the payment amount according to the public key of the payment sender, the second ciphertext is obtained by the payment sender encrypting the payment amount according to the public key of the payment receiver, the third ciphertext is obtained by the payment sender encrypting the preset data according to the public key of at least one preset user, and the fourth ciphertext is obtained by the payment sender encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator.

[0018] Specifically, the payment sender encrypts the opposite of the payment amount and the payment amount according to the public key of the payment sender and the public key of the payment receiver, respectively, so as to ensure that the payment receiver can obtain the payment amount and other data after decrypting the second ciphertext, so as to ensure that the payment can be completed. As for the preset data, the payment sender can encrypt according to the public key of at least one preset user, so that the first ciphertext, the second ciphertext and the third ciphertext received by the payment receiver include not only the identity of the payment sender and the payment receiver, the payment amount and other necessary data, but also the identity of at least one preset user and the preset data, so as to achieve the hiding of the identity of the payment sender and the payment receiver and the payment amount, and then realize the anonymous payment process of both parties to the transaction.

[0019] Furthermore, after obtaining the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext, the supervisor can perform a public key query on the first ciphertext, the second ciphertext and the third ciphertext, and determine the identities of the two parties to the transaction, that is, the identities of the payment sender and the payment receiver, based on the public key corresponding to the payment amount and the opposite number of the payment amount. At the same time, the supervisor can decrypt the fourth ciphertext to determine the payment amount. This achieves effective supervision of the payment process.

[0020] In the payment method provided by this application, after the supervisor obtains the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender, the supervisor can query the public keys of the two parties in the first ciphertext, the second ciphertext and the third ciphertext to determine the identities of the two parties to the payment, and decrypt the fourth ciphertext to determine the payment amount. Thus, on the basis of realizing anonymous transactions, the supervisor can obtain the identities of the two parties to the transaction and the transaction amount, and then anonymous transactions can also be effectively supervised, which improves the security of transactions.

[0021] Furthermore, before obtaining the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender, the payment method also includes: obtaining the verification result of the zero-knowledge proof; when the verification result of the zero-knowledge proof is successful, determining that the data received by the regulator and the payment recipient are the same; wherein the verification result of the zero-knowledge proof is obtained by the blockchain verifying the zero-knowledge proof uploaded by the payment sender.

[0022] According to the third aspect of the present application, a payment device is proposed for a payment sender, the payment device comprising: an encryption unit, used to encrypt the opposite of the payment amount according to the public key of the payment sender to generate a first ciphertext; encrypt the payment amount according to the public key of the payment recipient to generate a second ciphertext; encrypt preset data according to the public key of at least one preset user to generate at least one third ciphertext; encrypt the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator to generate a fourth ciphertext; an uploading unit, used to upload the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain; wherein the regulator is used to determine the identities of the two parties to the transaction based on the first ciphertext, the second ciphertext and the third ciphertext, and the regulator is used to determine the payment amount based on the fourth ciphertext.

[0023] The payment device provided in the present application is used for the payment sender. Specifically, in the process of the payment sender and the payment receiver conducting a transaction, the payment sender needs to encrypt the opposite number of the payment amount according to its own public key to generate a first ciphertext. The payment sender encrypts the payment amount according to the public key of the payment receiver to generate a second ciphertext. The payment sender encrypts the preset data according to the public key of at least one preset user to generate at least one third ciphertext. The payment receiver can decrypt the second ciphertext according to its own private key to determine the payment amount, and then determine the validity of the transaction with the payment sender. Due to the existence of the third ciphertext, the identities of the two parties to the transaction and the transaction amount can be hidden, thereby realizing anonymous transactions. At the same time, the payment sender also encrypts the payment amount, the opposite number of the payment amount and the preset data according to the public key of the regulator to generate a fourth ciphertext. As a result, the regulator can determine the identities of the two parties to the transaction according to the first ciphertext, the second ciphertext and the third ciphertext, and determine the payment amount according to the fourth ciphertext. As a result, anonymous transactions can also be effectively supervised, improving the security of transactions.

[0024] According to the fourth aspect of the present application, a payment device is proposed for use by a regulator, and the payment device includes: an acquisition unit, used to acquire a first ciphertext, a second ciphertext, a third ciphertext and a fourth ciphertext uploaded to the blockchain by a payment sender; a determination unit, used to decrypt the fourth ciphertext to determine the payment amount; a public key query is performed on the first ciphertext, the second ciphertext and the third ciphertext, and the identities of the two parties to the transaction are determined according to the public key corresponding to the payment amount and the opposite of the payment amount; wherein the first ciphertext is obtained by the payment sender encrypting the opposite of the payment amount according to the public key of the payment sender, the second ciphertext is obtained by the payment sender encrypting the payment amount according to the public key of the payment receiver, the third ciphertext is obtained by the payment sender encrypting preset data according to the public key of at least one preset user, and the fourth ciphertext is obtained by the payment sender encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator.

[0025] The payment device provided by the present application can query the public keys of the two parties to the transaction in the first ciphertext, the second ciphertext, the third ciphertext, and the fourth ciphertext in the first ciphertext, the second ciphertext, and the third ciphertext to determine the identities of the two parties to the payment, and decrypt the fourth ciphertext to determine the payment amount after the supervisor obtains the first ciphertext, the second ciphertext, and the third ciphertext uploaded to the blockchain by the payment sender. Thus, on the basis of realizing anonymous transactions, the supervisor can obtain the identities of the two parties to the transaction and the transaction amount, and then the anonymous transaction can also be effectively supervised, which improves the security of the transaction.

[0026] According to the fifth aspect of the present application, an electronic device is proposed, comprising: a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the payment method in any of the above technical solutions are implemented. Therefore, the electronic device has all the beneficial effects of the payment method in any of the above technical solutions, which will not be repeated here.

[0027] According to the sixth aspect of the present application, a readable storage medium is provided, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the payment method in any of the above technical solutions are implemented. Therefore, the readable storage medium has all the beneficial effects of the payment method in any of the above technical solutions, which will not be repeated here.

[0028] Additional aspects and advantages of the present application will become apparent in the following description or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0030] Figure 1One of the flow diagrams of the payment method of an embodiment of the present application is shown;

[0031] Figure 2 The second flowchart of the payment method according to the embodiment of the present application is shown;

[0032] Figure 3 One of the structural block diagrams of the payment device in an embodiment of the present application is shown;

[0033] Figure 4 The second structural block diagram of the payment device according to the embodiment of the present application is shown;

[0034] Figure 5 A structural block diagram of an electronic device according to an embodiment of the present application is shown.

[0035] in, Figures 3 to 5 The corresponding relationship between the reference numerals and the component names is as follows:

[0036] 300 payment device, 302 encryption unit, 304 upload unit, 400 payment device, 402 acquisition unit, 404 determination unit, 500 electronic device, 502 processor, 504 memory. DETAILED DESCRIPTION

[0037] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0038] In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited to the specific embodiments disclosed below.

[0039] Combine the following Figures 1 to 5 , the payment method and payment device provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0040] like Figure 1 As shown, a payment method is provided in an embodiment of the present application, which is executed by a payment sender, and the payment method includes:

[0041] Step 102, encrypting the reverse of the payment amount according to the public key of the payment sender to generate a first ciphertext;

[0042] Step 104, encrypting the payment amount according to the public key of the payment recipient to generate a second ciphertext;

[0043] Step 106, encrypting the preset data according to the public key of at least one preset user to generate at least one third ciphertext;

[0044] Step 108, encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the supervisor to generate a fourth ciphertext;

[0045] Step 110, uploading the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain;

[0046] Among them, the supervisor is used to determine the identities of the two parties to the transaction based on the first ciphertext, the second ciphertext and the third ciphertext, and the supervisor is used to determine the payment amount based on the fourth ciphertext.

[0047] In this embodiment, a payment method is provided, which is executed by a payment sender. Specifically, in the process where the payment sender needs to make an anonymous payment, first, the payment sender encrypts the opposite of the payment amount according to its own public key to generate a first ciphertext. The payment sender encrypts the payment amount according to the public key of the payment receiver to generate a second ciphertext. The payment sender encrypts the preset data according to the public key of at least one preset user to generate at least one third ciphertext. In this way, the payment receiver can decrypt the second ciphertext according to its own private key, thereby decrypting the payment amount, that is, obtaining the transaction amount, and then determining the validity of the transaction with the payment sender.

[0048] It should be noted that the payment sender encrypts the opposite of the payment amount and the payment amount according to the public key of the payment sender and the public key of the payment receiver, respectively, so as to ensure that the payment receiver can obtain the payment amount and other data after decrypting the second ciphertext, so as to ensure that the payment can be completed. As for the preset data, the payment sender can encrypt according to the public key of at least one preset user, so that the first ciphertext, the second ciphertext and the third ciphertext received by the payment receiver include not only the identity of the payment sender and the payment receiver, the payment amount and other necessary data, but also the identity of at least one preset user and the preset data, so as to achieve the hiding of the identity of the payment sender and the payment receiver and the payment amount, and then realize the anonymous payment process of both parties to the transaction.

[0049] Furthermore, the payment sender also needs to encrypt the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator to generate the fourth ciphertext. And, after generating the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext, the payment sender can upload the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain for the payment receiver to receive and for the regulator to obtain the payment information.

[0050] Specifically, the supervisor can determine the identities of the two parties to the transaction based on the first ciphertext, the second ciphertext, and the third ciphertext. At the same time, the supervisor can also determine the payment amount based on the fourth ciphertext.

[0051] The payment method provided in the present application is executed by the payment sender. Specifically, during the transaction between the payment sender and the payment receiver, the payment sender needs to encrypt the opposite number of the payment amount according to its own public key to generate a first ciphertext. The payment sender encrypts the payment amount according to the public key of the payment receiver to generate a second ciphertext. The payment sender encrypts the preset data according to the public key of at least one preset user to generate at least one third ciphertext. The payment receiver can decrypt the second ciphertext according to its own private key to determine the payment amount, and then determine the validity of the transaction with the payment sender. Due to the existence of the third ciphertext, the identities of both parties to the transaction and the transaction amount can be hidden, thereby realizing anonymous transactions. At the same time, the payment sender also encrypts the payment amount, the opposite number of the payment amount and the preset data according to the public key of the regulator to generate a fourth ciphertext. As a result, the regulator can determine the identities of both parties to the transaction according to the first ciphertext, the second ciphertext and the third ciphertext, and determine the payment amount according to the fourth ciphertext. As a result, anonymous transactions can also be effectively supervised, improving the security of transactions.

[0052] In some embodiments, optionally, the regulator is specifically used to: decrypt the fourth ciphertext to determine the payment amount; perform public key query on the first ciphertext, the second ciphertext and the third ciphertext, and determine the identities of the two parties to the transaction based on the public keys corresponding to the payment amount and the opposite of the payment amount.

[0053] In this embodiment, after obtaining the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext, the supervisor can perform a public key query on the first ciphertext, the second ciphertext and the third ciphertext, and determine the identities of the two parties to the transaction, that is, the identities of the payment sender and the payment receiver, according to the public key corresponding to the payment amount and the opposite number of the payment amount. At the same time, the supervisor can decrypt the fourth ciphertext to determine the payment amount. This achieves effective supervision of the payment process.

[0054] In some embodiments, optionally, before uploading the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain, the payment method also includes: generating a zero-knowledge proof based on the first ciphertext, the second ciphertext and the third ciphertext; uploading the zero-knowledge proof to the blockchain; wherein the zero-knowledge proof is used for verification by the blockchain to determine that the data received by the regulator and the payment recipient are the same.

[0055] In this embodiment, before the payment sender uploads the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain, the payment sender also needs to generate a zero-knowledge proof based on the first ciphertext, the second ciphertext and the third ciphertext, and upload the zero-knowledge proof to the blockchain. Through the zero-knowledge proof, it can be proved that the encrypted content sent by the payment sender to the payment recipient is the same as the encrypted content obtained by the regulator. That is, through the zero-knowledge proof, the regulator can determine that the fourth ciphertext received is the same as the content encrypted by the first ciphertext, the second ciphertext and the third ciphertext received by the payment recipient, thereby enabling the regulator to accurately obtain the identity information of the two payment parties and the payment amount to ensure the effectiveness of the regulator's supervision of the payment process.

[0056] Specifically, after the payment sender uploads the zero-knowledge proof to the blockchain, the blockchain can verify the zero-knowledge proof through a smart contract. If the verification is successful, it means that the encrypted content given by the payment sender to the payment receiver is the same as the encrypted content obtained by the regulator. On the contrary, it means that the encrypted content given by the payment sender to the payment receiver is different from the encrypted content obtained by the regulator. At this time, further measures can be taken to control the payment process, such as prohibiting the payment receiver from obtaining the first ciphertext, so that the transaction cannot be completed.

[0057] In a specific embodiment, for example, A needs to send b digital currencies to B. First, A selects n users, including A, B, and n-2 preset users. It should be noted that the n users selected by A need to register their identities with the regulator and obtain their corresponding public and private keys. Specifically, the public keys of the n users are y1, y2, ...y n , the payment sender uses his own public key y from The reverse of the encrypted amount - b, using the payment recipient's public key y to Encrypt the amount b using the public key of the preset user {y1,y2,…,y n}\{y from ,y to}Encrypted amount 0. Finally, the ciphertexts obtained by the payment sender using the ElGamal encryption algorithm are That is, the first ciphertext, the second ciphertext, and the third ciphertext. i ∈{y1,y2,…,y n}\{y from ,y to}, i is an integer from 1 to n.

[0058] Among them, y1 to y n are the public keys of n users, y1 to y n Included in y fromand to That is, the public keys of the payment sender and the payment receiver, and the rest are the public keys of other preset users, C from , C to and D are the ciphertexts obtained after encryption, r is a random number, and g is the generator of the q-order cyclic group G.

[0059] Furthermore, the payment sender randomly selects r1, r2, …, r n , using the supervisor's public key y s Encrypt -b, b and 0 respectively. Get n ciphertexts r i ∈{r1,r2,…,r n}\{r f ,r t}, which is the fourth ciphertext.

[0060] Furthermore, the payment sender calculates the zero-knowledge proof:

[0061]

[0062] This zero-knowledge proof can prove that the encrypted content given by the payment sender to the payment receiver is the same as the encrypted content given by the payment sender to the regulator.

[0063] Furthermore, the payment sender uploads the first ciphertext, the second ciphertext and the zero-knowledge proof to the blockchain at the same time. At this time, the blockchain smart contract verifies the zero-knowledge proof uploaded by the payment sender. If the verification is successful, it is believed that the encrypted content sent by the payment sender to the payment receiver is the same as the encrypted content sent by the payment sender to the regulator.

[0064] Specifically, the process of the payment sender generating a zero-knowledge proof and the blockchain smart contract verifying the zero-knowledge proof is as follows:

[0065]

[0066] Prover Verifier

[0067]

[0068]

[0069] Prover Verifier

[0070]

[0071] Specifically, the ciphertext C encrypted with the payment sender's public key from and the ciphertext C encrypted with the supervisor's public key fFor example, the payment sender is Prover and the smart contract is Verifier. Specifically, Prover first selects three random numbers; Prover calculates two ElGamal encrypted ciphertexts and Where g is the generator of the q-order cyclic group G, y from is the payment sender’s public key, y s is the public key of the supervisor; then according to and n1 to calculate the hash value c, where n1 is a random number. Further, Prover calculates the pair -b, r, r f The confusion value of b is the transaction amount, r and r f are random values, -b, r, r f Belong to Z q , Z q is a q-order integer cyclic group. Then the four calculated values ​​are sent to the Verifier. The Verifier first calculates and is the payment sender’s public key, y s is the supervisory party’s public key, C from and C f The Verifier calculates the hash value and compares the two hash values. If they are equal, the verification succeeds, otherwise the verification fails. The ciphertext C encrypted with the public key of the payment recipient to and the ciphertext C encrypted with the supervisor's public key t , and the ciphertext C encrypted by the public key corresponding to the preset user i and the ciphertext C encrypted with the supervisor's public key i ′, and the zero-knowledge proof is verified in the same way.

[0072] Then, the regulator uses its own private key to decrypt the fourth ciphertext on the blockchain and obtains the transaction amount b. from , D), (C to , D) the corresponding public key y from and to The real identity of the transaction can be known. It can be understood that the correspondence between the user's public key and the real identity has been registered with the regulator.

[0073] like Figure 2 As shown, a payment method is provided in an embodiment of the present application, which is executed by a supervisor, and the payment method includes:

[0074] Step 202, obtaining the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender;

[0075] Step 204, decrypting the fourth ciphertext to determine the payment amount;

[0076] Step 206, performing a public key query on the first ciphertext, the second ciphertext, and the third ciphertext, and determining the identities of the two parties to the transaction based on the public keys corresponding to the payment amount and the opposite of the payment amount;

[0077] Among them, the first ciphertext is obtained by the payment sender encrypting the opposite of the payment amount according to the public key of the payment sender, the second ciphertext is obtained by the payment sender encrypting the payment amount according to the public key of the payment receiver, the third ciphertext is obtained by the payment sender encrypting the preset data according to the public key of at least one preset user, and the fourth ciphertext is obtained by the payment sender encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the supervisor.

[0078] In this embodiment, the payment method can be executed by the supervisor. Specifically, the supervisor can obtain the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender. Among them, the first ciphertext is obtained by the payment sender encrypting the opposite of the payment amount according to the public key of the payment sender, the second ciphertext is obtained by the payment sender encrypting the payment amount according to the public key of the payment receiver, the third ciphertext is obtained by the payment sender encrypting the preset data according to the public key of at least one preset user, and the fourth ciphertext is obtained by the payment sender encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the supervisor.

[0079] Specifically, the payment sender encrypts the opposite of the payment amount and the payment amount according to the public key of the payment sender and the public key of the payment receiver, respectively, so as to ensure that the payment receiver can obtain the payment amount and other data after decrypting the second ciphertext, so as to ensure that the payment can be completed. As for the preset data, the payment sender can encrypt according to the public key of at least one preset user, so that the first ciphertext, the second ciphertext and the third ciphertext received by the payment receiver include not only the identity of the payment sender and the payment receiver, the payment amount and other necessary data, but also the identity of at least one preset user and the preset data, so as to achieve the hiding of the identity of the payment sender and the payment receiver and the payment amount, and then realize the anonymous payment process of both parties to the transaction.

[0080] Furthermore, after obtaining the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext, the supervisor can perform a public key query on the first ciphertext, the second ciphertext and the third ciphertext, and determine the identities of the two parties to the transaction, that is, the identities of the payment sender and the payment receiver, based on the public key corresponding to the payment amount and the opposite number of the payment amount. At the same time, the supervisor can decrypt the fourth ciphertext to determine the payment amount. This achieves effective supervision of the payment process.

[0081] In the payment method provided by this application, after the supervisor obtains the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender, the supervisor can query the public keys of the two parties in the first ciphertext, the second ciphertext and the third ciphertext to determine the identities of the two parties to the payment, and decrypt the fourth ciphertext to determine the payment amount. Thus, on the basis of realizing anonymous transactions, the supervisor can obtain the identities of the two parties to the transaction and the transaction amount, and then anonymous transactions can also be effectively supervised, which improves the security of transactions.

[0082] In some embodiments, optionally, before obtaining the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender, the payment method also includes: obtaining a verification result of the zero-knowledge proof; if the verification result of the zero-knowledge proof is successful, determining that the data received by the regulator and the payment recipient are the same; wherein the verification result of the zero-knowledge proof is obtained by the blockchain verifying the zero-knowledge proof uploaded by the payment sender.

[0083] In this embodiment, the regulator also needs to obtain the verification result of the zero-knowledge proof uploaded to the blockchain by the payment sender to determine whether the encrypted content sent by the payment sender to the payment recipient is the same as the encrypted content obtained by the regulator. Specifically, after the payment sender uploads the zero-knowledge proof to the blockchain, the blockchain can verify the zero-knowledge proof through a smart contract. If the verification is successful, it means that the encrypted content given by the payment sender to the payment recipient is the same as the encrypted content obtained by the regulator. On the contrary, it means that the encrypted content given by the payment sender to the payment recipient is different from the encrypted content obtained by the regulator. At this time, further measures can be taken to control the payment process, such as prohibiting the payment recipient from obtaining the first ciphertext, so that the transaction cannot be completed.

[0084] Through the verification of zero-knowledge proof, the regulator can determine that the fourth ciphertext received is the same as the encrypted content of the first, second and third ciphertexts received by the payment recipient, thereby enabling the regulator to accurately obtain the identity information and payment amount of the two payment parties to ensure the effectiveness of the regulator's supervision of the payment process.

[0085] In some embodiments of the present application, Figure 3As shown, a payment device 300 is also proposed for a payment sender, and the payment device 300 includes: an encryption unit 302, used to encrypt the opposite of the payment amount according to the public key of the payment sender to generate a first ciphertext; encrypt the payment amount according to the public key of the payment receiver to generate a second ciphertext; encrypt preset data according to the public key of at least one preset user to generate at least one third ciphertext; encrypt the payment amount, the opposite of the payment amount and the preset data according to the public key of the regulator to generate a fourth ciphertext; an uploading unit 304, used to upload the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain; wherein the regulator is used to determine the identities of the two parties to the transaction according to the first ciphertext, the second ciphertext and the third ciphertext, and the regulator is used to determine the payment amount according to the fourth ciphertext.

[0086] The payment device 300 provided in the present application is used for the payment sender. Specifically, in the process of the payment sender and the payment receiver conducting a transaction, the payment sender needs to encrypt the opposite number of the payment amount according to its own public key to generate a first ciphertext. The payment sender encrypts the payment amount according to the public key of the payment receiver to generate a second ciphertext. The payment sender encrypts the preset data according to the public key of at least one preset user to generate at least one third ciphertext. The payment receiver can decrypt the second ciphertext according to its own private key to determine the payment amount, and then determine the validity of the transaction with the payment sender. Due to the existence of the third ciphertext, the identities of both parties to the transaction and the transaction amount can be hidden, thereby realizing anonymous transactions. At the same time, the payment sender also encrypts the payment amount, the opposite number of the payment amount and the preset data according to the public key of the regulator to generate a fourth ciphertext. As a result, the regulator can determine the identities of both parties to the transaction according to the first ciphertext, the second ciphertext and the third ciphertext, and determine the payment amount according to the fourth ciphertext. As a result, anonymous transactions can also be effectively supervised, improving the security of transactions.

[0087] Furthermore, the supervisor is specifically used to: decrypt the fourth ciphertext to determine the payment amount; perform public key query on the first ciphertext, the second ciphertext and the third ciphertext, and determine the identities of the two parties to the transaction based on the public keys corresponding to the payment amount and the opposite of the payment amount.

[0088] Furthermore, the payment device 300 also includes: a generation unit, used to generate a zero-knowledge proof based on the first ciphertext, the second ciphertext and the third ciphertext; the uploading unit 304 is also used to upload the zero-knowledge proof to the blockchain; wherein the zero-knowledge proof is used for verification by the blockchain to determine that the data received by the regulator and the payment recipient are the same.

[0089] In some embodiments of the present application, Figure 4As shown, a payment device 400 is also proposed for use by a regulator, and the payment device 400 includes: an acquisition unit 402, used to acquire a first ciphertext, a second ciphertext, a third ciphertext and a fourth ciphertext uploaded to the blockchain by a payment sender; a determination unit 404, used to decrypt the fourth ciphertext to determine the payment amount; a public key query is performed on the first ciphertext, the second ciphertext and the third ciphertext, and the identities of the two parties to the transaction are determined according to the public keys corresponding to the payment amount and the opposite number of the payment amount, wherein the first ciphertext is obtained by the payment sender encrypting the opposite number of the payment amount according to the public key of the payment sender, the second ciphertext is obtained by the payment sender encrypting the payment amount according to the public key of the payment receiver, the third ciphertext is obtained by the payment sender encrypting preset data according to the public key of at least one preset user, and the fourth ciphertext is obtained by the payment sender encrypting the payment amount, the opposite number of the payment amount and the preset data according to the public key of the regulator.

[0090] The payment device 400 provided in this application, after the supervisor obtains the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender, the supervisor can query the public keys of the two parties to the transaction in the first ciphertext, the second ciphertext and the third ciphertext to determine the identities of the two parties to the payment, and decrypt the fourth ciphertext to determine the payment amount. Thus, on the basis of realizing anonymous transactions, the supervisor can obtain the identities of the two parties to the transaction and the transaction amount, and then the anonymous transaction can also be effectively supervised, which improves the security of the transaction.

[0091] Furthermore, the acquisition unit 402 is also used to: obtain the verification result of the zero-knowledge proof; the determination unit 404 is also used to determine that the data received by the regulator and the payment recipient are the same when the verification result of the zero-knowledge proof is successful; wherein the verification result of the zero-knowledge proof is obtained by the blockchain verifying the zero-knowledge proof uploaded by the payment sender.

[0092] In some embodiments, optionally, Figure 5 As shown, an electronic device 500 is proposed, including: a processor 502 and a memory 504, the memory 504 stores a program or instruction that can be run on the processor 502, and the program or instruction is executed by the processor 502 to implement the steps of the payment method in any of the above embodiments. Therefore, the electronic device 500 has all the beneficial effects of the payment method in any of the above embodiments, which will not be repeated here.

[0093] In some embodiments, optionally, a readable storage medium is provided on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the payment method in any of the above embodiments are implemented, thereby having all the beneficial effects of the payment method in any of the above embodiments.

[0094] The readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0095] It should be clarified that in the claims, specification and drawings of the present application, the term "multiple" refers to two or more than two. Unless otherwise clearly defined, the orientation or position relationship indicated by the terms "upper" and "lower" is based on the orientation or position relationship shown in the drawings, which is only for the purpose of more conveniently describing the present application and making the description process easier, rather than indicating or implying that the device or element referred to must have the specific orientation described, be constructed and operated in a specific orientation, so these descriptions cannot be understood as limitations on the present application; the terms "connect", "install", "fix" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection between multiple objects, or a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects, or an indirect connection between multiple objects through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood based on the specific circumstances of the above data.

[0096] In the claims, specification and drawings of the present application, the description of the terms "one embodiment", "some embodiments", "specific embodiments" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the claims, specification and drawings of the present application, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0097] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A payment method, performed by a payment sender, characterized in that: The payment methods include: Encrypting the reverse of the payment amount according to the public key of the payment sender to generate a first ciphertext; Encrypting the payment amount according to the public key of the payment recipient to generate a second ciphertext; Encrypting the preset data according to the public key of at least one preset user to generate at least one third ciphertext; Encrypting the payment amount, the opposite of the payment amount, and the preset data according to the public key of the supervisor to generate a fourth ciphertext; Uploading the first ciphertext, the second ciphertext, the third ciphertext, and the fourth ciphertext to a blockchain; The supervisor is used to determine the identities of the two parties to the transaction based on the first ciphertext, the second ciphertext and the third ciphertext, and the supervisor is used to determine the payment amount based on the fourth ciphertext.

2. The payment method according to claim 1, characterized in that: The supervisor is specifically used to: decrypting the fourth ciphertext to determine the payment amount; A public key query is performed on the first ciphertext, the second ciphertext and the third ciphertext, and the identities of the two parties to the transaction are determined according to the public keys corresponding to the payment amount and the opposite number of the payment amount.

3. The payment method according to claim 1, characterized in that: Before uploading the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext to the blockchain, the payment method further includes: Generate a zero-knowledge proof according to the first ciphertext, the second ciphertext and the third ciphertext; Uploading the zero-knowledge proof to the blockchain; The zero-knowledge proof is used for verification by the blockchain to determine whether the data received by the regulator and the payment recipient are the same.

4. A payment method, performed by a supervisor, characterized in that: The payment methods include: Obtain the first ciphertext, second ciphertext, third ciphertext and fourth ciphertext uploaded to the blockchain by the payment sender; decrypting the fourth ciphertext to determine the payment amount; Performing a public key query on the first ciphertext, the second ciphertext, and the third ciphertext, and determining the identities of the two parties to the transaction according to the public keys corresponding to the payment amount and the opposite number of the payment amount; Among them, the first ciphertext is obtained by the payment sender encrypting the opposite of the payment amount according to the public key of the payment sender, the second ciphertext is obtained by the payment sender encrypting the payment amount according to the public key of the payment receiver, the third ciphertext is obtained by the payment sender encrypting the preset data according to the public key of at least one preset user, and the fourth ciphertext is obtained by the payment sender encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the supervisor.

5. The payment method according to claim 4, characterized in that: Before obtaining the first ciphertext, the second ciphertext, the third ciphertext and the fourth ciphertext uploaded to the blockchain by the payment sender, the payment method further includes: Get the verification result of zero-knowledge proof; In the event that the verification result of the zero-knowledge proof is successful, it is determined that the data received by the supervisor and the payment recipient are the same; The verification result of the zero-knowledge proof is obtained by the blockchain verifying the zero-knowledge proof uploaded by the payment sender.

6. A payment device for paying a sender, characterized in that: The payment device comprises: an encryption unit, configured to encrypt the reverse number of the payment amount according to the public key of the payment sender to generate a first ciphertext; Encrypting the payment amount according to the public key of the payment recipient to generate a second ciphertext; Encrypting the preset data according to the public key of at least one preset user to generate at least one third ciphertext; Encrypting the payment amount, the opposite of the payment amount, and the preset data according to the public key of the supervisor to generate a fourth ciphertext; an uploading unit, configured to upload the first ciphertext, the second ciphertext, the third ciphertext, and the fourth ciphertext to a blockchain; The supervisor is used to determine the identities of the two parties to the transaction based on the first ciphertext, the second ciphertext and the third ciphertext, and the supervisor is used to determine the payment amount based on the fourth ciphertext.

7. The payment device according to claim 6, characterized in that: The supervisor is specifically used to: decrypting the fourth ciphertext to determine the payment amount; A public key query is performed on the first ciphertext, the second ciphertext and the third ciphertext, and the identities of the two parties to the transaction are determined according to the public keys corresponding to the payment amount and the opposite number of the payment amount.

8. The payment device according to claim 6, characterized in that: Also includes: A generating unit, configured to generate a zero-knowledge proof according to the first ciphertext, the second ciphertext and the third ciphertext; The uploading unit is also used to upload the zero-knowledge proof to the blockchain; The zero-knowledge proof is used for verification by the blockchain to determine whether the data received by the regulator and the payment recipient are the same.

9. A payment device for a supervisory party, characterized in that: The payment device comprises: An acquisition unit, used to acquire a first ciphertext, a second ciphertext, a third ciphertext and a fourth ciphertext uploaded by a payment sender to the blockchain; a determination unit, configured to decrypt the fourth ciphertext to determine a payment amount; Performing a public key query on the first ciphertext, the second ciphertext, and the third ciphertext, and determining the identities of the two parties to the transaction according to the public keys corresponding to the payment amount and the opposite number of the payment amount; Among them, the first ciphertext is obtained by the payment sender encrypting the opposite of the payment amount according to the public key of the payment sender, the second ciphertext is obtained by the payment sender encrypting the payment amount according to the public key of the payment receiver, the third ciphertext is obtained by the payment sender encrypting the preset data according to the public key of at least one preset user, and the fourth ciphertext is obtained by the payment sender encrypting the payment amount, the opposite of the payment amount and the preset data according to the public key of the supervisor.

10. The payment device according to claim 9, characterized in that: The acquisition unit is also used for: Get the verification result of zero-knowledge proof; The determining unit is further configured to determine that the data received by the supervisor and the payment recipient are the same if the verification result of the zero-knowledge proof is successful; The verification result of the zero-knowledge proof is obtained by the blockchain verifying the zero-knowledge proof uploaded by the payment sender.

Citation Information

Patent Citations

  • Supervisable online payment privacy protection method and device, and electronic equipment

    CN113988863A

  • Transaction supervision method and device based on block chain, electronic equipment and storage medium

    CN115953244A

  • Transaction supervision method and device based on block chain, electronic equipment and storage medium

    CN116308776A

  • Digital asset anonymous payment method and device, equipment and medium

    CN117078255A