Transaction method, device and node equipment based on blockchain

Through the commitment mechanism and homomorphic encryption mechanism, the transaction volume commitment and random number ciphertext are calculated on the blockchain, which solves the problem of information leakage in blockchain transactions, and realizes privacy protection and no interaction-free transaction process.

CN111833186BActive Publication Date: 2024-11-01ANTCHAIN TECHNOLOGY PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010579600.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-09-20
Publication Date
2024-11-01
Estimated Expiration
2038-09-20

AI Technical Summary

Technical Problem

In blockchain trading scenarios, transaction information is easily leaked to irrelevant third parties, and there is a lack of privacy protection mechanism.

Method used

Through the commitment mechanism and homomorphic encryption mechanism, transaction volume commitment and random number ciphertext are calculated, and privacy protection is achieved using the decentralized characteristics of blockchain, and transactions can be completed without interacting with the incoming device.

Benefits of technology

It realizes privacy protection of transaction information, avoids direct registration of transaction volume and random numbers, reduces the risk of data leakage, and simplifies the transaction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111833186B_ABST
    Figure CN111833186B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a transaction method, apparatus and remitter device based on blockchain. The method includes: calculating a transaction amount commitment, a first commitment random number ciphertext, a first transaction amount ciphertext, a second commitment random number ciphertext and a second transaction amount ciphertext; submitting transaction data to the blockchain; the transaction data includes the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext; so as to facilitate recording the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext into the remitter account, and recording the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext into the remitter account.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application with application number 201811101747.0, application date September 20, 2018, and invention name “Transaction method, device and remitter equipment based on blockchain”. Technical Field

[0002] The embodiments of this specification relate to the field of computer technology, and in particular to a transaction method, apparatus, and remitter device based on blockchain. Background Art

[0003] Blockchain technology is a distributed database technology that uses cryptography and consensus mechanisms to ensure that data cannot be tampered with or forged. With the development of computer and Internet technologies, blockchain technology has gained popularity for its advantages of decentralization, openness, transparency, non-tamperability, and trustworthiness. It has been widely used in many fields, including smart contracts, securities trading, e-commerce, the Internet of Things, social communications, file storage, proof of existence, identity verification, and equity crowdfunding.

[0004] Currently, when blockchain technology is applied to transaction scenarios, since transaction information needs to be sent to the blockchain for verification, implementation and uploading, the transaction information is at risk of being leaked to third parties not related to the transaction.

[0005] The business urgently needs a technical solution that can achieve privacy protection during the transaction process. Summary of the invention

[0006] The purpose of the embodiments of this specification is to provide a blockchain-based transaction method, apparatus, and remitter device to achieve privacy protection without interacting with the remitter device.

[0007] To achieve the above purpose, the embodiment of this specification provides a transaction method based on blockchain, including:

[0008] Calculate the transaction amount commitment based on the committed random number and transaction amount;

[0009] According to the homomorphic encryption public key of the remitter's account, the commitment random number and the transaction amount are respectively encrypted using a homomorphic encryption algorithm to obtain a first commitment random number ciphertext and a first transaction amount ciphertext;

[0010] According to the homomorphic encryption public key of the remitter's account, the commitment random number and the transaction amount are encrypted respectively using a homomorphic encryption algorithm to obtain a second commitment random number ciphertext and a second transaction amount ciphertext;

[0011] Submitting transaction data to the blockchain; the transaction data includes the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext; so as to facilitate recording the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext into the remitter's account, and recording the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext into the remitter's account.

[0012] To achieve the above objectives, the present specification provides a blockchain-based transaction device, including:

[0013] A calculation unit, used to calculate the transaction amount commitment according to the commitment random number and the transaction amount;

[0014] A first encryption unit is used to encrypt the commitment random number and the transaction amount respectively using a homomorphic encryption algorithm according to a homomorphic encryption public key of the remitter's account to obtain a first commitment random number ciphertext and a first transaction amount ciphertext;

[0015] A second encryption unit is used to encrypt the commitment random number and the transaction amount respectively using a homomorphic encryption algorithm according to the homomorphic encryption public key of the remitter's account to obtain a second commitment random number ciphertext and a second transaction amount ciphertext;

[0016] A submission unit is used to submit transaction data to the blockchain; the transaction data includes the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext; so as to facilitate recording the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext into the remitter's account, and recording the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext into the remitter's account.

[0017] To achieve the above purpose, the present invention provides a remitter device, including:

[0018] Memory, for storing computer instructions;

[0019] A processor is used to execute computer instructions to implement the method described in any embodiment of this specification.

[0020] It can be seen from the technical solutions provided by the above embodiments of this specification that in this embodiment, through the commitment mechanism and the homomorphic encryption mechanism, the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext can be obtained; the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext can be submitted to the chain; so as to facilitate the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext to be recorded in the remitter's account, and the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext to be recorded in the remitter's account. In this way, on the one hand, privacy protection can be achieved through the commitment mechanism and the homomorphic encryption mechanism; on the other hand, by submitting the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext to the chain, the transaction can be successfully completed without the participation of the remitter's device. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of this specification 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 some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0022] Figure 1 This is a schematic diagram of implementing a transaction based on blockchain according to an embodiment of this specification;

[0023] Figure 2 This is a flowchart of a transaction method based on blockchain according to an embodiment of this specification;

[0024] Figure 3 This is a flowchart of implementing a transaction based on blockchain according to an embodiment of this specification;

[0025] Figure 4 This is a functional structure diagram of a blockchain-based transaction device according to an embodiment of this specification;

[0026] Figure 5 This is a functional structure diagram of a remitter device according to an embodiment of this specification. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0028] See also Figure 1 and Figure 2 The embodiments of this specification provide a transaction method based on blockchain.

[0029] In this embodiment, the blockchain (Block Chain) can be a distributed ledger that organizes multiple block data in a chain structure in chronological order and uses cryptographic algorithms to ensure security, traceability, and non-tamperability. The blockchain can include a public blockchain, a joint blockchain (also known as an alliance blockchain), and a private blockchain. The blockchain can be implemented based on a blockchain network. The blockchain network can include a P2P network (peer-to-peer network), etc. The blockchain network can include multiple blockchain nodes. Each blockchain node jointly maintains a unified blockchain account book.

[0030] In this embodiment, the transaction method can be performed by the remitter device as the execution subject. The remitter device can join the blockchain network as a blockchain node. A remitter account can be logged in the remitter device. The remitter account can be the remitter's account in the blockchain. The remitter account can have a signature public-private key pair and an encryption public-private key pair. The signature public-private key pair can include an associated signature public key and a signature private key. The signature private key can be used to sign the transaction data to be submitted to the blockchain. The signature public key can be disclosed to other blockchain nodes in the blockchain network for other blockchain nodes to verify the signed transaction data. The encryption public-private key pair can include an associated homomorphic encryption public key and a homomorphic encryption private key. The homomorphic encryption public key can be disclosed to other blockchain nodes in the blockchain network for itself and other blockchain nodes to use a homomorphic encryption algorithm to encrypt data (such as the remitter's balance, transaction amount, remitter's random number and commitment random number, etc.). The homomorphic encryption private key can be used to decrypt the encrypted ciphertext. The remitter account may also register the remitter balance commitment, the remitter random number ciphertext and the remitter balance ciphertext in the blockchain.

[0031] The remitter balance commitment can be calculated by the remitter device based on the remitter random number and the remitter balance. The remitter random number can be a random number corresponding to the remitter account for constructing the remitter balance commitment. The remitter balance can be the balance of any type of resource. The resources may include, for example, securities, coupons, real estate, virtual currency, and funds. Specifically, the remitter balance commitment can be implemented based on any type of homomorphic commitment mechanism (Commitment Scheme), such as the Pedersen commitment mechanism. Taking the Pedersen commitment mechanism as an example, the remitter balance commitment can be based on the formula PC(r_A,s_A)=g r_A h s_A Calculated. Among them, PC (r_A, s_A) is the remitter balance commitment; r_A is the remitter random number; s_A is the remitter balance; g and h are known parameters respectively. Of course, the remitter balance commitment can also be implemented by a homomorphic encryption algorithm. That is, the ciphertext obtained by encrypting the remitter balance based on the homomorphic encryption algorithm is used as the remitter balance commitment. The homomorphic encryption algorithm will be introduced in detail in the subsequent process. In this way, on the one hand, by registering the remitter balance commitment in the blockchain, the direct registration of the remitter balance can be avoided, so that the remitter balance can be hidden and kept confidential. On the other hand, given that the commitment mechanism can support efficient zero-knowledge proof (Zero-Knowledge Proof), the remitter balance commitment can make the zero-knowledge proof process involving the remitter balance in the subsequent process (such as the third zero-knowledge proof in the subsequent process) more efficient.

[0032] The remitter random number ciphertext can be obtained by the remitter device encrypting the remitter random number based on a homomorphic encryption algorithm. The homomorphic encryption algorithm may include, for example, the Paillier algorithm, the Okamoto-Uchiyama algorithm, and the Damgard-Jurik algorithm. In particular, compared with the Okamoto-Uchiyama algorithm, the Paillier algorithm and the Damgard-Jurik algorithm are more efficient, and the encrypted ciphertext is shorter. Taking the Paillier algorithm as an example, the remitter random number ciphertext can be obtained based on the formula PA_A(r_A)=u1 r_A d1 n1Calculated. Wherein, PA_A(r_A) is the remitter's random number ciphertext; r_A is the remitter's random number; u1 and n1 are respectively part of the homomorphic encryption public key of the remitter's account; d1 is the random number used by the homomorphic encryption algorithm. In this way, on the one hand, by registering the remitter's random number in the blockchain, the burden of keeping the remitter's random number locally off-chain can be avoided. On the other hand, by registering the remitter's random number ciphertext in the blockchain, the direct registration of the remitter's random number can be avoided, so that the remitter's random number can be hidden and kept confidential.

[0033] The remitter balance ciphertext can be obtained by encrypting the remitter balance based on the homomorphic encryption algorithm by the remitter device. Taking the Paillier algorithm as an example, the remitter balance ciphertext can be obtained based on the formula PA_A(s_A)=u1 s_A d2 n1 Calculated. Among them, PA_A(s_A) is the remitter's balance ciphertext; s_A is the remitter's balance; u1 and n1 are respectively part of the homomorphic encryption public key of the remitter's account; d2 is the random number used by the homomorphic encryption algorithm. In this way, by registering the remitter's balance ciphertext in the blockchain, it is possible to avoid directly registering the remitter's balance, so that the remitter's balance can be hidden and kept confidential.

[0034] In this embodiment, the transaction method can realize the transfer of the transaction amount from the remitter account to the remitter account. The remitter account can be the remitter account in the blockchain. The remitter account can be logged in the remitter device. The remitter device can join the blockchain network as a blockchain node. The transaction amount can be negotiated and agreed upon by the remitter and the remitter. Similar to the remitter account, the remitter account can have a signature public-private key pair and an encryption public-private key pair; the remitter account can also register the remitter balance commitment, the remitter random number ciphertext and the remitter balance ciphertext in the blockchain. The remitter balance commitment can be calculated by the remitter device based on the remitter random number and the remitter balance. The remitter random number ciphertext can be obtained by the remitter device encrypting the remitter random number based on the homomorphic encryption algorithm. The remitter balance ciphertext can be obtained by the remitter device encrypting the remitter balance based on the homomorphic encryption algorithm.

[0035] The transaction method may include the following steps. It should be noted that although this specification provides method operation steps as described in the embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative labor. In addition, the order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the device or product is actually executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment).

[0036] Step S10: Calculate the transaction amount commitment based on the commitment random number and the verification amount.

[0037] In this embodiment, the commitment random number can be generated by the remitter device. The transaction amount can be agreed upon by the remitter and the receiver. The transaction amount commitment can be implemented based on any type of homomorphic commitment scheme, such as the Pedersen commitment scheme. Taking the Pedersen commitment scheme as an example, the transaction amount commitment can be based on the formula PC(r, t) = g r h t Calculated. Among them, PC(r,t) is the transaction amount commitment; r is the commitment random number; t is the transaction amount; g and h are known parameters. Of course, the transaction amount commitment can also be implemented by the homomorphic encryption algorithm. That is, the ciphertext obtained by encrypting the transaction amount based on the homomorphic encryption algorithm is used as the transaction amount commitment. In this way, the transaction amount can be hidden and kept confidential through the transaction amount commitment.

[0038] Step S12: According to the homomorphic encryption public key of the remitter's account, the commitment random number and the transaction amount are respectively encrypted using a homomorphic encryption algorithm to obtain a first commitment random number ciphertext and a first transaction amount ciphertext.

[0039] In this embodiment, the remitter device can encrypt the commitment random number using a homomorphic encryption algorithm based on the homomorphic encryption public key of the remitter account to obtain a first commitment random number ciphertext. Specifically, the remitter device can generate a random number for homomorphic encryption operation as the first encrypted random number; and can encrypt the commitment random number using a homomorphic encryption algorithm based on the homomorphic encryption public key of the remitter account and the first encrypted random number to obtain a first commitment random number ciphertext. Taking the Paillier algorithm as an example, the first commitment random number ciphertext can be based on the formula PA_A(r)=u1 r y1 n1 Calculated. Wherein, PA_A(r) is the first committed random number ciphertext; r is the committed random number; u1 and n1 are respectively part of the homomorphic encryption public key of the remitter's account; y1 is the first encrypted random number.

[0040] In this embodiment, the remitter device can encrypt the transaction amount using a homomorphic encryption algorithm based on the homomorphic encryption public key of the remitter account to obtain a first transaction amount ciphertext. Specifically, the remitter device can generate a random number for homomorphic encryption operation as the second encrypted random number; the transaction amount can be encrypted using a homomorphic encryption algorithm based on the homomorphic encryption public key of the remitter account and the second encrypted random number to obtain a first transaction amount ciphertext. Taking the Paillier algorithm as an example, the first transaction amount ciphertext can be based on the formula PA_A(t)=u1 t y2 n1 Calculated. Wherein, PA_A(t) is the first transaction amount ciphertext; t is the transaction amount; u1 and n1 are respectively part of the homomorphic encryption public key of the remitter account; y2 is the second encrypted random number.

[0041] Step S14: According to the homomorphic encryption public key of the remitter's account, the commitment random number and the transaction amount are respectively encrypted using a homomorphic encryption algorithm to obtain a second commitment random number ciphertext and a second transaction amount ciphertext.

[0042] In this embodiment, the remitter device can encrypt the commitment random number using a homomorphic encryption algorithm based on the homomorphic encryption public key of the remitter account to obtain a second commitment random number ciphertext. Specifically, the remitter device can generate a random number for homomorphic encryption operation as a third encrypted random number; the commitment random number can be encrypted using a homomorphic encryption algorithm based on the homomorphic encryption public key of the remitter account and the third encrypted random number to obtain a second commitment random number ciphertext. Taking the Paillier algorithm as an example, the second commitment random number ciphertext can be based on the formula PA_B(r)=u2 r z1 n2 Calculated. Wherein, PA_B(r) is the second commitment random number ciphertext; r is the commitment random number; u2 and n2 are respectively part of the homomorphic encryption public key of the remitter's account; z1 is the third encrypted random number.

[0043] In this embodiment, the remitter device can encrypt the transaction amount using a homomorphic encryption algorithm based on the homomorphic encryption public key of the remitter account to obtain a second transaction amount ciphertext. Specifically, the remitter device can generate a random number for homomorphic encryption operation as the fourth encrypted random number; the transaction amount can be encrypted using a homomorphic encryption algorithm based on the homomorphic encryption public key of the remitter account and the fourth encrypted random number to obtain a second transaction amount ciphertext. Taking the Paillier algorithm as an example, the second transaction amount ciphertext can be based on the formula PA_B(t)=u2 t z2 n2PA_B(t) is the second transaction amount ciphertext; t is the transaction amount; u2 and n2 are respectively part of the homomorphic encryption public key of the remitter's account; z2 is the fourth encrypted random number.

[0044] Step S16: Submit transaction data to the blockchain.

[0045] In this embodiment, the transaction data may include the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext, and the second transaction amount ciphertext. The remitter device may submit the transaction data to the blockchain, so as to credit the transaction amount commitment, the first commitment random number ciphertext, and the first transaction amount ciphertext to the remitter account, and credit the transaction amount commitment, the second commitment random number ciphertext, and the second transaction amount ciphertext to the remitter account.

[0046] Specifically, after submitting the transaction data to the blockchain, the consensus blockchain node in the blockchain can update the remitter's balance commitment based on the transaction amount commitment; can update the remitter's random number ciphertext based on the first commitment random number ciphertext; can update the remitter's balance ciphertext based on the first transaction amount ciphertext; can update the remitter's balance commitment based on the transaction amount commitment; can update the remitter's random number ciphertext based on the second commitment random number ciphertext; can update the remitter's balance ciphertext based on the second transaction amount ciphertext. Among them, the consensus blockchain node can be a blockchain node determined based on the consensus mechanism of the blockchain. In this way, the transaction data can be recorded in the blockchain ledgers maintained by each blockchain node in the blockchain network to avoid tampering.

[0047] The updated remitter balance commitment may be the quotient of the remitter balance commitment and the transaction amount commitment. Given that the remitter balance commitment and the transaction amount commitment are implemented by a commitment mechanism based on homomorphism, it is possible to deduct the transaction amount from the remitter balance and deduct the commitment random number from the remitter random number. For example, the remitter balance commitment may be PC(r_A,s_A)=g r_A h s_A ; The transaction amount commitment can be PC(r,t)=g r h t ; The updated balance commitment of the remitting party can be PC(r_A-r,s_A-t)=PC(r_A,s_A) / PC(r,t)=g (r _A-r) h (s_A-t) .

[0048] The updated random number ciphertext of the remitter can be the quotient of the random number ciphertext of the remitter and the first commitment random number ciphertext. Since the random number ciphertext of the remitter and the first commitment random number ciphertext are calculated by the homomorphic encryption algorithm, it is possible to deduct the commitment random number from the random number of the remitter. For example, the random number ciphertext of the remitter can be PA_A(r_A)=u1 r_A d1 n1 ; The first commitment random number ciphertext may be PA_A(r)=u1 r y1 n1 ; The updated random number ciphertext of the remitter can be PA_A(r_A-r)=PA_A(r_A) / PA_A(r)=u1 r_A-r (d1 / y1) n1 .

[0049] The updated remitter balance ciphertext may be the quotient of the remitter balance ciphertext and the first transaction amount ciphertext. Given that the remitter balance ciphertext and the first transaction amount ciphertext are calculated by a homomorphic encryption algorithm, it is possible to deduct the transaction amount from the remitter balance. For example, the remitter balance ciphertext may be PA_A(s_A)=u1 s_A d2 n1 ; The first transaction amount ciphertext may be PA_A(t)=u1 t y2 n1 ; The updated balance ciphertext of the remitting party can be PA_A(s_A-t)=PA_A(s_A) / PA_A(t)=u1 s_A-t (d2 / y2) n1 .

[0050] The updated remitter balance commitment may be the product of the remitter balance commitment and the transaction amount commitment. Given that the remitter balance commitment and the transaction amount commitment are implemented by a commitment mechanism based on homomorphism, it is possible to add the transaction amount to the remitter balance and add the commitment random number to the remitter random number. For example, the remitter balance commitment may be PC(r_B,s_B)=g r_B h s_B ; The transaction amount commitment can be PC(r,t)=g r h t ; The updated balance commitment of the remitting party can be PC(r_B+r,s_B+t)=PC(r_B,s_B)PC(r,t)=g (r _B+r) h (s_B+t) Among them, r_B is the random number of the remitting party; s_B is the balance of the remitting party; g and h are known parameters.

[0051] The updated random number ciphertext of the remitter can be the product of the random number ciphertext of the remitter and the second random number ciphertext of the commitment. Since the random number ciphertext of the remitter and the second random number ciphertext of the commitment are calculated by the homomorphic encryption algorithm, it is possible to add the commitment random number to the random number of the remitter. For example, the random number ciphertext of the remitter can be PA_B(r_B)=u2 r_B f1 n2 ; The second commitment random number ciphertext can be PA_B(r)=u2 r z1 n2 ; The updated random number ciphertext of the importer can be PA_B(r_B+r)=PA_B(r_B)PA_B(r)=u2 r_B+r (f1z1) n2 Among them, r_B is the random number of the importer; f1 is the random number used by the homomorphic encryption algorithm.

[0052] The updated remitter balance ciphertext may be the product of the remitter balance ciphertext and the second transaction amount ciphertext. Given that the remitter balance ciphertext and the second transaction amount ciphertext are calculated by a homomorphic encryption algorithm, this can achieve the addition of the transaction amount to the remitter balance. For example, the remitter balance ciphertext may be PA_B(s_B)=u2 s_B f2 n2 ; The second transaction amount ciphertext may be PA_B(t)=u2 t z2 n2 ; The updated balance ciphertext of the remitting party can be PA_B(s_B+t)=PA_B(s_B)PA_B(t)=u2 s_B+t (f2z2) n2 Among them, s_B is the balance of the remitter; f2 is the random number used by the homomorphic encryption algorithm.

[0053] In one implementation of this embodiment, the remitter device may also generate a first zero-knowledge proof based on zero-knowledge proof technology; the first zero-knowledge proof may be added to the transaction data; for the consensus blockchain node to verify that the transaction amount is not less than 0. The zero-knowledge proof technology may be implemented, for example, based on the zkSNARK scheme. Further, the zero-knowledge proof technology may include range proof technology (Range Proof). In this way, the remitter device may generate a first range proof based on the range proof technology; the first range proof may be added to the transaction data; for the consensus blockchain node to verify that the transaction amount is not less than 0. The range proof technology may be implemented, for example, based on the Bulletproofs scheme or the Borromean ring signature scheme.

[0054] In one implementation of this embodiment, the remitter device may also generate a second zero-knowledge proof based on zero-knowledge proof technology; the second zero-knowledge proof may be added to the transaction data; for the consensus blockchain node to verify that the transaction amount is not greater than the remitter's balance. Further, the zero-knowledge proof technology may include interval proof technology. In this way, the remitter device may generate a second interval proof based on the interval proof technology; the second interval proof may be added to the transaction data; for the consensus blockchain node to verify that the transaction amount is not greater than the remitter's balance.

[0055] In one implementation of this embodiment, the remitter device may also generate a third zero-knowledge proof based on zero-knowledge proof technology; the third zero-knowledge proof may be added to the transaction data; for the consensus blockchain node to verify that: the commitment random number used to calculate the transaction amount commitment is consistent with the commitment random number used to calculate the second commitment random number ciphertext, and the transaction amount used to calculate the transaction amount commitment is consistent with the transaction amount used to calculate the second transaction amount ciphertext; avoid recording inconsistent commitment random numbers into the remitter account and the remitter account, and avoid recording inconsistent transaction amounts into the remitter account and the remitter account.

[0056] For example, the third zero-knowledge proof may be (C, D, E, a, b, c, d). x=Hash(C,D,E); a=r * +xr;b=t * +xt;c=z1 * z1 x ; d = z2 * z2 x Among them, r * ,t * 、z1 * 、z2 * The random number generated for the remitter device corresponds to the committed random number r, the transaction amount t, the third encrypted random number z1, and the fourth encrypted random number z2 respectively; Hash represents a hash operation.

[0057] The consensus blockchain nodes can verify g a h b = = CT x 、u2 a c n2 ==DM x 、u2 b d n2 ==EN xWhen both conditions are established, it is considered that: the commitment random number used to calculate the transaction amount commitment is consistent with the commitment random number used to calculate the second commitment random number ciphertext, and the transaction amount used to calculate the transaction amount commitment is consistent with the transaction amount used to calculate the second transaction amount ciphertext. Where T is the transaction amount commitment PC(r,t); M is the second commitment random number ciphertext PA_B(r); and N is the second transaction amount ciphertext PA_B(t).

[0058] In one implementation of this embodiment, the remitter device may calculate a first transaction amount commitment based on a first commitment random number and a transaction amount; and may calculate a second transaction amount commitment based on a second commitment random number and the transaction amount. The first commitment random number and the second commitment random number may be generated by the remitter device. The first transaction amount commitment may correspond to a transaction amount to be transferred from the remitter account; and the second transaction amount commitment may correspond to a transaction amount to be transferred to the remitter account. In this way, the transaction amount to be transferred from the remitter account and the transaction amount to be transferred to the remitter account may be distinguished.

[0059] The remitter device may encrypt the first commitment random number and the transaction amount using a homomorphic encryption algorithm according to the homomorphic encryption public key of the remitter account, and obtain a first commitment random number ciphertext and a first transaction amount ciphertext; may encrypt the second commitment random number and the transaction amount using a homomorphic encryption algorithm according to the homomorphic encryption public key of the remitter account, and obtain a second commitment random number ciphertext and a second transaction amount ciphertext; and may submit transaction data to the blockchain. The transaction data may include the first transaction amount commitment, the second transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext, and the second transaction amount ciphertext; so as to facilitate recording the first transaction amount commitment, the first commitment random number ciphertext, and the first transaction amount ciphertext into the remitter account, and recording the second transaction amount commitment, the second commitment random number ciphertext, and the second transaction amount ciphertext into the remitter account.

[0060] Specifically, after submitting the transaction data to the blockchain, the consensus blockchain node can update the remitter's balance commitment based on the first transaction amount commitment; can update the remitter's random number ciphertext based on the first commitment random number ciphertext; can update the remitter's balance ciphertext based on the first transaction amount ciphertext; can update the remitter's balance commitment based on the second transaction amount commitment; can update the remitter's random number ciphertext based on the second commitment random number ciphertext; can update the remitter's balance ciphertext based on the second transaction amount ciphertext.

[0061] The updated remitter balance commitment may be the quotient of the remitter balance commitment and the first transaction amount commitment; the updated remitter random number ciphertext may be the quotient of the remitter random number ciphertext and the first commitment random number ciphertext; the updated remitter balance ciphertext may be the quotient of the remitter balance ciphertext and the first transaction amount ciphertext; the updated remitter balance commitment may be the product of the remitter balance commitment and the second transaction amount commitment; the updated remitter random number ciphertext may be the product of the remitter random number ciphertext and the second commitment random number ciphertext; the updated remitter balance ciphertext may be the product of the remitter balance ciphertext and the second transaction amount ciphertext.

[0062] Furthermore, the remitter device can also generate a fourth zero-knowledge proof based on zero-knowledge proof technology; the fourth zero-knowledge proof can be added to the transaction data; for the consensus blockchain node to verify: the transaction amount used to calculate the first transaction amount commitment is consistent with the transaction amount used to calculate the second transaction amount commitment; thereby avoiding inconsistency between the transaction amount transferred from the remitter's account and the transaction amount transferred to the remitter's account.

[0063] In one implementation of this embodiment, the remitter device may also use the signature private key of the remitter account to sign the transaction data to obtain signature data; the signature data may be added to the transaction data; for the consensus blockchain node to perform signature verification.

[0064] In this embodiment, through the commitment mechanism and homomorphic encryption mechanism, the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext can be obtained; the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext can be submitted to the chain; so as to facilitate the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext to be recorded in the remitter's account, and the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext to be recorded in the remitter's account. In this way, on the one hand, through the commitment mechanism and homomorphic encryption mechanism, the privacy protection of transaction information such as the transaction amount can be achieved; on the other hand, by submitting the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext to the chain, it can be achieved that the transaction can be successfully completed on the blockchain without the participation of the remitter's device. Therefore, this embodiment can achieve privacy protection under non-interactive conditions.

[0065] Furthermore, the remitter account can register the remitter balance commitment, remitter random number ciphertext and remitter balance ciphertext in the blockchain; the remitter account can register the remitter balance commitment, remitter random number ciphertext and remitter balance ciphertext in the blockchain. In this way, on the one hand, the privacy protection of account balance and transaction amount can be achieved; on the other hand, by registering the remitter random number ciphertext and remitter random number ciphertext on the chain, the burden of keeping the remitter random number and remitter random number locally off the chain can be avoided, eliminating the risk of loss.

[0066] See also Figure 1 , Figure 2 and Figure 3 For ease of understanding, a scenario example of an embodiment of this specification is introduced below.

[0067] In this embodiment, it is assumed that the remitter account may be Account_A. The remitter account Account_A may have a signature public-private key pair and an encryption public-private key pair. The remitter account Account_A may also register the remitter balance commitment PC(r_A,s_A)=g in the blockchain. r_A h s_A 、The sender's random number ciphertext PA_A(r_A)=u1 r_A d1 n1 、The remitter's balance ciphertext PA_A(s_A)=u1 s_A d2 n1 Among them, r_A is the remitter's random number; s_A is the remitter's balance; g and h are known parameters; u1 and n1 are parts of the homomorphic encryption public key of the remitter's account; d1 and d2 are random numbers used by the homomorphic encryption algorithm.

[0068] Assume that the remitter account can be Account_B. The remitter account Account_B can have a signature public-private key pair and an encryption public-private key pair. The remitter account Account_B can also register the remitter balance commitment PC(r_B,s_B)=g in the blockchain. r_B h s_B 、The importer's random number ciphertext PA_B(r_B)=u2 r_B f1 n2 、The ciphertext of the remitter's balance PA_B(s_B)=u2 s_B f2 n2 Among them, r_B is the random number of the remitter; s_B is the balance of the remitter; g and h are known parameters; u2 and n2 are parts of the homomorphic encryption public key of the remitter's account; f1 and f2 are random numbers used by the homomorphic encryption algorithm.

[0069] In this embodiment, the transaction in this scenario example can realize the transfer of transaction amount t from the remitter account Account_A to the remitter account Account_B. Specifically, the remitter device can generate a commitment random number r, a first encrypted random number y1, a second encrypted random number y2, a third encrypted random number z1, and a fourth encrypted random number z2. The remitter device can calculate the transaction amount commitment PC(r,t)=g according to the commitment random number r and the transaction amount t. r h t ; The commitment random number r can be encrypted using the homomorphic encryption algorithm according to the first encrypted random number y1 and the homomorphic encryption public key of the remitter's account to obtain the first commitment random number ciphertext PA_A(r)=u1 r y1 n1 ; The transaction amount t can be encrypted using the homomorphic encryption algorithm according to the second encrypted random number y2 and the homomorphic encryption public key of the remitter's account to obtain the first transaction amount ciphertext PA_A(t)=u1 t y2 n1 ; According to the third encrypted random number z1 and the homomorphic encryption public key of the remitter's account, the commitment random number r can be encrypted using the homomorphic encryption algorithm to obtain the second commitment random number ciphertext PA_B(r)=u2 r z1 n2 ; The transaction amount t can be encrypted using the homomorphic encryption algorithm according to the fourth encrypted random number z2 and the homomorphic encryption public key of the remitter's account to obtain the second transaction amount ciphertext PA_B(t)=u2 t z2 n2 .

[0070] In this embodiment, the remitter device may generate a first zero-knowledge proof RP1, a second zero-knowledge proof RP2, and a third zero-knowledge proof RP3. The first zero-knowledge proof RP1 may be used to verify that: t≥0. The second zero-knowledge proof RP2 may be used to verify that: s_A-t≥0. The third zero-knowledge proof RP3 may be used to verify that: the commitment random number r in PC(r,t) is consistent with the commitment random number r in PA_B(r), and the transaction amount t in PC(r,t) is consistent with the transaction amount t in PA_B(t).

[0071] In this embodiment, the remitter device can use the signature private key of the remitter account to sign [PC(r,t), PA_A(r), PA_A(t), PA_B(r), PA_B(t), RP1, RP2, RP3] to obtain the signature data SIG; and can submit the transaction data [PC(r,t), PA_A(r), PA_A(t), PA_B(r), PA_B(t), RP1, RP2, RP3, SIG] to the blockchain.

[0072] In this embodiment, the blockchain can determine the consensus blockchain node according to the consensus mechanism. The consensus blockchain node can use the anti-double-spending or anti-replay mechanism in the relevant technology to verify whether the transaction has been executed. If it has been executed, the consensus blockchain node can reject the transaction.

[0073] If it has not been executed, the consensus blockchain node can verify whether the signature data SIG in the transaction data is correct. If it is incorrect, the consensus blockchain node can reject the transaction.

[0074] If correct, the consensus blockchain node may check the first zero-knowledge proof RP1 in the transaction data to verify whether t≥0 is satisfied. If not, the consensus blockchain node may reject the transaction.

[0075] If satisfied, the consensus blockchain node may check the second zero-knowledge proof RP2 in the transaction data to verify whether s_A-t≥0 is satisfied. If not satisfied, the consensus blockchain node may reject the transaction.

[0076] If satisfied, the consensus blockchain node can check the third zero-knowledge proof RP3 in the transaction data to verify whether: the commitment random number r in PC(r,t) is consistent with the commitment random number r in PA_B(r), and the transaction amount t in PC(r,t) is consistent with the transaction amount t in PA_B(t). If not satisfied, the consensus blockchain node can reject the transaction.

[0077] If satisfied, the consensus blockchain node can update the remitter balance commitment PC(r_A,s_A), the remitter random number ciphertext PA_A(r_A), the remitter balance ciphertext PA_A(s_A), the remitter balance commitment PC(r_B,s_B), the remitter random number ciphertext PA_B(r_B), and the remitter balance ciphertext PA_B(s_B). Specifically, the updated remitter balance commitment can be PC(r_A-r,s_A-t)=PC(r_A,s_A) / PC(r,t)=g (r_A-r) h (s_A-t) ; The updated random number ciphertext of the remitter can be PA_A(r_A-r)=PA_A(r_A) / PA_A(r)=u1 r_A-r (d1 / y1) n1 ; The updated balance ciphertext of the remitting party can be PA_A(s_A-t)=PA_A(s_A) / PA_A(t)=u1 s_A-t (d2 / y2) n1 ; The updated balance commitment of the remitting party can be PC(r_B+r,s_B+t)=PC(r_B,s_B)PC(r,t)=g(r_B+r) h (s_B+t) ; The updated random number ciphertext of the importer can be PA_B(r_B+r)=PA_B(r_B)PA_B(r)=u2 r_B+r (f1z1) n2 ; The updated balance ciphertext of the remitting party can be PA_B(s_B+t)=PA_B(s_B)PA_B(t)=u2 s_B+t (f2z2) n2 .

[0078] See also Figure 4 The embodiment of this specification also provides a transaction device based on blockchain. The transaction device may include the following units.

[0079] A calculation unit 20, used to calculate the transaction amount commitment according to the commitment random number and the transaction amount;

[0080] A first encryption unit 22 is used to encrypt the commitment random number and the transaction amount respectively using a homomorphic encryption algorithm according to the homomorphic encryption public key of the remitter's account to obtain a first commitment random number ciphertext and a first transaction amount ciphertext;

[0081] The second encryption unit 24 is used to encrypt the commitment random number and the transaction amount respectively using a homomorphic encryption algorithm according to the homomorphic encryption public key of the remitter's account to obtain a second commitment random number ciphertext and a second transaction amount ciphertext;

[0082] The submitting unit 26 is used to submit transaction data to the blockchain; the transaction data includes the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext; so as to facilitate recording the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext into the remitter's account, and recording the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext into the remitter's account.

[0083] See also Figure 5 The embodiment of the present specification also provides a remitter device. The remitter device may include a memory and a processor.

[0084] In this embodiment, the memory may be implemented in any appropriate manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid-state hard disk, or a USB flash drive, etc. The memory may be used to store computer instructions.

[0085] In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. The processor may execute the computer instructions to implement the following steps:

[0086] Calculate the transaction amount commitment based on the committed random number and transaction amount;

[0087] According to the homomorphic encryption public key of the remitter's account, the commitment random number and the transaction amount are respectively encrypted using a homomorphic encryption algorithm to obtain a first commitment random number ciphertext and a first transaction amount ciphertext;

[0088] According to the homomorphic encryption public key of the remitter's account, the commitment random number and the transaction amount are encrypted respectively using a homomorphic encryption algorithm to obtain a second commitment random number ciphertext and a second transaction amount ciphertext;

[0089] Submitting transaction data to the blockchain; the transaction data includes the transaction amount commitment, the first commitment random number ciphertext, the first transaction amount ciphertext, the second commitment random number ciphertext and the second transaction amount ciphertext; so as to facilitate recording the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext into the remitter's account, and recording the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext into the remitter's account.

[0090] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment and the equipment embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0091] After reading this specification, those skilled in the art can conceive of any combination of some or all of the embodiments listed in this specification without creative work, and these combinations are also within the scope of disclosure and protection of this specification.

[0092] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip2. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog2. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0093] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0094] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the present specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.

[0095] This specification can be used in many general or special computer system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0096] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0097] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.

Claims

1. A transaction method based on blockchain, applied to a blockchain node device, comprising: Receive transaction data, the transaction data including a transaction amount commitment, a first commitment random number ciphertext, a first transaction amount ciphertext, a second commitment random number ciphertext, and a second transaction amount ciphertext; wherein the transaction amount commitment is calculated based on the commitment random number and the transaction amount, the first commitment random number ciphertext and the first transaction amount ciphertext are obtained by encrypting the commitment random number and the transaction amount respectively using a homomorphic encryption algorithm based on a homomorphic encryption public key of a remitter's account, and the second commitment random number ciphertext and the second transaction amount ciphertext are obtained by encrypting the commitment random number and the transaction amount respectively using a homomorphic encryption algorithm based on a homomorphic encryption public key of a remitter's account; the remitter's account includes an account of the remitter of the transaction in the blockchain, and the remitter's account includes an account of the remitter of the transaction in the blockchain; Recording the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext into the remitter's account; The transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext are recorded in the remitter's account.

2. According to the method as described in claim 1, the first commitment random number ciphertext is obtained by encrypting the commitment random number by a homomorphic encryption algorithm based on the first encrypted random number and the homomorphic encryption public key of the remitter's account, and the first transaction amount ciphertext is obtained by encrypting the transaction amount by a homomorphic encryption algorithm based on the second encrypted random number and the homomorphic encryption public key of the remitter's account; the second commitment random number ciphertext is obtained by encrypting the commitment random number by a homomorphic encryption algorithm based on the third encrypted random number and the homomorphic encryption public key of the remitter's account, and the second transaction amount ciphertext is obtained by encrypting the transaction amount by a homomorphic encryption algorithm based on the fourth encrypted random number and the homomorphic encryption public key of the remitter's account.

3. According to the method of claim 1, the remitter account has registered in the blockchain a remitter balance commitment, a remitter random number ciphertext and a remitter balance ciphertext; the remitter balance commitment is calculated based on the remitter random number and the remitter balance, the remitter random number ciphertext is calculated based on the remitter random number by a homomorphic encryption algorithm, and the remitter balance ciphertext is calculated based on the remitter balance by a homomorphic encryption algorithm; The remitter account has registered in the blockchain a remitter balance commitment, a remitter random number ciphertext and a remitter balance ciphertext; the remitter balance commitment is calculated based on the remitter random number and the remitter balance, the remitter random number ciphertext is calculated by a homomorphic encryption algorithm based on the remitter random number, and the remitter balance ciphertext is calculated by a homomorphic encryption algorithm based on the remitter balance.

4. The method according to claim 3, wherein the step of recording the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext into the remitter's account comprises: Update the remitter balance commitment based on the transaction amount commitment, update the remitter random number ciphertext based on the first commitment random number ciphertext, and update the remitter balance ciphertext based on the first transaction amount ciphertext; The step of recording the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext into the remitter's account includes: The remitter balance commitment is updated based on the transaction amount commitment, the remitter random number ciphertext is updated based on the second commitment random number ciphertext, and the remitter balance ciphertext is updated based on the second transaction amount ciphertext.

5. The method of claim 1, wherein the transaction data further comprises a first zero-knowledge proof; the method further comprising: Verification based on the first zero-knowledge proof: the transaction amount is not less than 0.

6. The method of claim 1, wherein the transaction data further comprises a second zero-knowledge proof; the method further comprising: Verification based on the second zero-knowledge proof: the transaction amount is not greater than the balance of the remitter.

7. The method of claim 1, wherein the transaction data further comprises a third zero-knowledge proof; the method further comprises: Based on the third zero-knowledge proof verification: the commitment random number used to calculate the transaction amount commitment is consistent with the commitment random number used to calculate the second commitment random number ciphertext, and the transaction amount used to calculate the transaction amount commitment is consistent with the transaction amount used to calculate the second transaction amount ciphertext.

8. The method according to claim 1, wherein the transaction data further includes signature data, and the signature data is obtained by signing the transaction data based on a signature private key of the remitter's account; the method further includes: The signature data is verified based on the signature public key of the remitter's account.

9. The method of claim 1, wherein the commitment random number comprises a first commitment random number and a second commitment random number; Accordingly, the transaction amount commitment includes a first transaction amount commitment and a second transaction amount commitment; the first transaction amount commitment is calculated based on the first commitment random number and the transaction amount, and the second transaction amount commitment is calculated based on the second commitment random number and the transaction amount; The first commitment random number ciphertext and the first transaction amount ciphertext are obtained by encrypting the first commitment random number and the transaction amount respectively based on the homomorphic encryption public key of the remitter's account using a homomorphic encryption algorithm, and the second commitment random number ciphertext and the second transaction amount ciphertext are obtained by encrypting the second commitment random number and the transaction amount respectively based on the homomorphic encryption public key of the remitter's account using a homomorphic encryption algorithm.

10. The method according to claim 9, wherein the step of crediting the transaction amount commitment into the remitter's account comprises: Depositing the first transaction amount commitment into the remitting party's account; The commitment to credit the transaction amount to the account of the remitting party includes: The second transaction amount commitment shall be credited to the account of the remitting party.

11. The method according to claim 10, wherein the step of crediting the first transaction amount commitment to the remitter's account comprises: Updating the remitter's balance commitment based on the first transaction amount commitment; The said committing to credit the second transaction amount to the account of the remitting party includes: The remitter's balance commitment is updated based on the second transaction amount commitment.

12. The method of claim 9, wherein the transaction data further comprises a fourth zero-knowledge proof; the method further comprises: Verification based on the fourth zero-knowledge proof: the transaction amount used to calculate the first transaction amount commitment is consistent with the transaction amount used to calculate the second transaction amount commitment.

13. A transaction device based on blockchain, applied to a blockchain node device, comprising: A receiving unit, configured to receive transaction data, wherein the transaction data includes a transaction amount commitment, a first commitment random number ciphertext, a first transaction amount ciphertext, a second commitment random number ciphertext, and a second transaction amount ciphertext; wherein the transaction amount commitment is calculated based on the commitment random number and the transaction amount, the first commitment random number ciphertext and the first transaction amount ciphertext are obtained by encrypting the commitment random number and the transaction amount respectively using a homomorphic encryption algorithm based on a homomorphic encryption public key of a remitter's account, and the second commitment random number ciphertext and the second transaction amount ciphertext are obtained by encrypting the commitment random number and the transaction amount respectively using a homomorphic encryption algorithm based on a homomorphic encryption public key of a remitter's account; the remitter's account includes an account of the remitter of the transaction in the blockchain, and the remitter's account includes an account of the remitter of the transaction in the blockchain; A first crediting unit, used for crediting the transaction amount commitment, the first commitment random number ciphertext and the first transaction amount ciphertext into the remitter's account; The second crediting unit is used to credit the transaction amount commitment, the second commitment random number ciphertext and the second transaction amount ciphertext into the remitter's account.

14. A node device in a blockchain network, comprising: Memory, for storing computer instructions; A processor, configured to execute computer instructions to implement the method according to any one of claims 1 to 12.