Block chain transaction method and system for hiding account amount
By using zero-value commitment and zero-knowledge proof technology on the blockchain, transaction information is generated and verified, and the problem of transaction amounts in the existing technology needs to be pre-determined and third-party verification is solved, achieving transaction flexibility and security.
Patent Information
- Application Number
- CN202411740540.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, the payer and the payee need to determine the transaction amount before the transaction, and need to introduce a trusted third party to perform numerical operations, and other users cannot verify the legality of the transaction, which limits the flexibility and security of the transaction.
By calculating the initial commitment C(0) generated with the zero value, the zero value proof of the initial commitment C(0), the ciphertext E(r) encrypting the random number r that generates the initial commitment C(0), and the zero-knowledge proof consistent with the random number r of the ciphertext E(r) in the initial commitment C(0), the transaction information is generated, and these proofs are verified on the blockchain, the smart contract calculates transaction data, update the account balance commitment, and realize the concealment and security of the account balance.
The dynamic settlement of transaction data is realized. The payer and the payee do not need to determine the transaction amount before the transaction, and support the operation logic of the smart contract, and the transaction data can be verified to all users to ensure the legality and security of the transaction.
Smart Images

Figure CN119561671A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security information technology, and in particular to a blockchain transaction method and system for concealing account balances. Background Art
[0002] In blockchain technology, hiding account balances is of vital importance because it is directly related to the user's financial privacy and security. In the blockchain world, privacy protection mainly includes three levels of content: user identity information, user's specific transaction data, and the overall state of the blockchain that collects all transaction information. Hiding account balances helps protect user identity information and transaction data, prevent sensitive financial information from being obtained by unauthorized third parties, and thus maintain user anonymity and security.
[0003] The publication number CN113159745A "Blockchain Transaction Privacy Protection Method Based on Full Homomorphism" realizes the privacy protection of users on the blockchain by combining homomorphic encryption and symmetric encryption. The specific user generates a key, encrypts the transaction amount, and transmits the encrypted data to the cloud server, which then verifies and calculates it in the ciphertext state. After the transaction is completed, the cloud server uploads the encrypted result to the blockchain to ensure that the transaction amount is always confidential throughout the process. Finally, the user can view the balance by decrypting the ciphertext. If a new transaction is required, the key must be regenerated and the process must be repeated. This ensures that the attacker cannot obtain the user's credit account balance from the encrypted data. However, in this method, the payer and the payee need to determine the transaction amount before the transaction, and a trusted third party must be introduced for numerical calculations. If the transaction amount is adjusted according to certain conditions during the transaction, any changes require the regeneration of encrypted data because the amount is encrypted, which limits the flexibility of the transaction. Moreover, the transaction amount is encrypted, and other users (non-transaction participants) cannot verify the legitimacy of the transaction. In addition, the payer, the payee and the cloud server need to interact multiple times during the transaction, which increases the complexity and delay of the transaction. Summary of the invention
[0004] Based on this, in response to the above technical problems, a blockchain transaction method and system for concealing account balances is provided to solve the problems in the prior art that the payer and the payee must determine the transaction amount before the transaction, need to introduce a trusted third party to perform numerical calculations, and other users cannot verify the legitimacy of the transaction.
[0005] In a first aspect, a blockchain transaction method for concealing account balances, the method comprising:
[0006] Receive transaction information sent by the initiator, wherein the transaction information includes: an initial commitment C(0) generated by the initiator using a zero value, a zero value proof of the initial commitment C(0), a ciphertext E(r) encrypted with a random number r used to generate the initial commitment C(0), and a zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r);
[0007] Verify the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) based on the transaction information. If the verification is successful, proceed to the next step.
[0008] Run the smart contract to get the transaction value v;
[0009] Generate a transaction commitment of the transaction value v using the initial commitment C(0); calculate the new balance commitment of the sender and the receiver based on the pre-stored balance commitments of the sender and the receiver and the commitment of the transaction value v;
[0010] In response to the recipient's acquisition of the ciphertext E(r), the recipient decrypts the ciphertext E(r) to obtain a random number r to calculate a cumulative blinding factor, and calculates a cumulative amount based on the deposit v in the recipient's account.
[0011] In the above solution, optionally, the transaction information also includes: the transaction upper limit X set by the initiator, the remaining commitment C' calculated according to the transaction upper limit A , and the calculated remaining commitment C′ A Generated non-negativity range proof.
[0012] In the above solution, further optionally, the remaining commitment C′ A The generated non-negative range proof is calculated using the Bulletproof algorithm.
[0013] In the above scheme, further optionally, the running of the smart contract and obtaining the transaction value v further include: verifying that the transaction value v is less than or equal to the transaction upper limit X, and verifying the remaining commitment C′ A Generated non-negativity range proof.
[0014] In the above scheme, optionally, the zero-value proof of the initial commitment C(0) and the zero-knowledge proof of the random number r in the initial commitment C(0) that is consistent with the ciphertext E(r) are verified based on the transaction information. If the verification fails, the transaction fails and waits to be re-initiated.
[0015] In the above scheme, optionally, the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) are implemented using zk-STARK or Sigma protocol.
[0016] In the above scheme, optionally, the random number used to generate the initial commitment C(0) is encrypted using the Paillier algorithm to obtain the ciphertext E(r).
[0017] In a second aspect, a blockchain transaction system for concealing account balances is provided, the system comprising:
[0018] Transaction information acquisition module: used to receive transaction information sent by the initiator, the transaction information including: the initial commitment C(0) generated by the initiator using zero value, the zero value proof of the initial commitment C(0), the ciphertext E(r) encrypted with the random number r used to generate the initial commitment C(0), and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r);
[0019] Verification module: used to verify the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) based on the transaction information. If the verification is successful, the smart contract execution module is executed;
[0020] Smart contract execution module: used to run smart contracts and obtain the transaction value v;
[0021] Balance update module: used to generate a transaction commitment of a transaction value v using the initial commitment C(0); calculate the new balance commitment of the sender and the receiver based on the pre-stored balance commitments of the sender and the receiver and the commitment of the transaction value v;
[0022] Ciphertext E(r) sending module: responds to the recipient's acquisition of the ciphertext E(r) so that the recipient decrypts the ciphertext E(r) to obtain a random number r to calculate the cumulative blinding factor, and calculates the cumulative amount based on the deposit v in the recipient's account.
[0023] In a third aspect, a computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of a blockchain transaction method for concealing account balance described in the first aspect are implemented.
[0024] In a fourth aspect, a computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of a blockchain transaction method for concealing account balances as described in the first aspect above.
[0025] This application has at least the following beneficial effects:
[0026] This application generates transaction information by calculating the initial commitment C(0) generated by the sending end using zero value, the zero value proof of the initial commitment C(0), the ciphertext E(r) encrypted by the random number r generating the initial commitment C(0), and the zero-knowledge proof consistent with the random number r of the ciphertext E(r) in the initial commitment C(0), and uploads it to the blockchain. The blockchain verifies the zero value proof of the initial commitment C(0) and the zero-knowledge proof consistent with the random number r of the ciphertext E(r) in the initial commitment C(0), and then executes the smart contract, calculates the transaction data, generates the transaction commitment of the transaction value v using the initial commitment C(0), calculates the new balance commitment of the sender and the receiver according to the pre-stored balance commitment of the sender and the receiver and the commitment of the transaction value v, realizes the concealment of the account balance, and the account balance is more secure. In this process, the transaction data supports dynamic settlement when executed on the blockchain, and the payer and the payee do not need to determine the transaction amount before the transaction, which is more in line with the operation logic of the smart contract and hardly increases the amount of calculation. At the same time, no third-party platform is required to perform data calculation. At the same time, transaction data is verifiable to all users, and other users can verify the legitimacy of the transaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A flowchart of a blockchain transaction method for concealing account balance provided in one embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] Pedersen commitment: Pedersen commitment is a cryptographic technique that allows one party to submit a numerical commitment to another party without revealing the specific value. This commitment is immutable and verifiable. In other words, the submitter cannot modify the committed value afterwards, and the verifier can confirm whether the submitted value is consistent with the previously committed value. This technology is widely used in scenarios that require privacy protection, such as blockchain.
[0030] Blinding factor: The blinding factor of a Pedersen commitment is a random number that plays a key role in hiding the original value, ensuring that the commitment cannot be changed, and enhancing security in the process of generating the commitment.
[0031] Range Proof: Range proof is a zero-knowledge proof technology that allows one party (the prover) to prove to another party (the verifier) that they know a number and that the number is within a given range without revealing the specific value of the number. In other words, the prover can prove to the verifier that "I know a number, and this number is between 1 and 100", but at the same time will not reveal what the number is. This technology has a wide range of applications in protecting privacy and data security.
[0032] Elliptic curve: An elliptic curve is a plane algebraic curve defined as satisfying the equation y 2 =x 3 +ax+b, where a and b are real constants. Elliptic curves are widely used in cryptography because of their computational difficulty in the elliptic curve discrete logarithm problem (ECDLP), which can provide efficient and secure encryption methods.
[0033] Public key: A public key is a public encryption key in a public key encryption system, used to encrypt messages or verify digital signatures. The public key is used in pairs with the corresponding private key, where the public key is public and the private key is kept secret, ensuring that only the person holding the private key can decrypt the information or generate a valid signature.
[0034] Private key: A private key is a secret key used to decrypt messages or generate digital signatures in a public key encryption system. It exists in pairs with the public key. The public key is public, while the private key must be kept strictly confidential. The security of the private key is critical because anyone who possesses the private key can decrypt information encrypted by the public key or forge a signature.
[0035] Hash function: A hash function is an algorithm that converts data input of arbitrary length into an output (hash value) of fixed length. Hash functions are one-way, that is, the original input cannot be reversed from the hash value, and the hash values generated for different inputs are almost always different. It is widely used in data integrity verification, digital signatures, and cryptography.
[0036] zk-STARK and related concepts: zk-STARK (Zero-Knowledge Scalable Transparent Argument of Knowledge) is a zero-knowledge proof technology that allows a party to prove the authenticity of a certain knowledge or data without revealing any specific information. Zk-STARK is efficient, scalable and transparent, does not rely on trusted settings, and can provide fast verification in large-scale data and complex calculations. It has important applications in the fields of blockchain and privacy protection.
[0037] Constraints: A set of rules or conditions imposed on each state and transition between states in a computational process in order to verify the correctness of the computational process.
[0038] Public Input: Input data that is known to both parties and does not need to be hidden during the proof process. This data is usually used as the starting point of the calculation or the basis for verification.
[0039] Secret input: During the proof process, one party wishes to hide input data that the other party does not want to know. This data is usually sensitive information such as personal privacy or business secrets.
[0040] Proof Algorithm: A protocol that does not require a trusted setup. By arithmetizing the computation process and making polynomial commitments, it is possible to prove the correctness of the computation results to the verifier without leaking any private data.
[0041] Verification algorithm: Verify the correctness of the calculation process by performing a series of checks and calculations on the proof information provided by the prover, thereby ensuring that the prover has not cheated.
[0042] Smart Contract: A smart contract is a self-executing code deployed on the blockchain to automate and execute contract terms. It runs automatically when specific conditions are met without human intervention, thus ensuring the transparency and credibility of the contract. Smart contracts can handle functions such as asset transfer, automatic payment, and verification of conditions, and are widely used in finance, supply chain, insurance and other fields. Because it is based on blockchain technology, smart contracts are tamper-proof and irreversible, ensuring the security and reliability of contract execution.
[0043] In one embodiment, Figure 1 As shown, a blockchain transaction method for concealing account amount is provided, which is applied to the blockchain, and the method includes:
[0044] Step S1: receiving transaction information sent by the initiator, wherein the transaction information includes: an initial commitment C(0) generated by the initiator using a zero value, a zero value proof of the initial commitment C(0), a ciphertext E(r) encrypted with a random number r used to generate the initial commitment C(0), and a zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r);
[0045] Step S2: Verify the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) according to the transaction information. If the verification is successful, proceed to the next step.
[0046] Step S3: Run the smart contract to obtain the transaction value v;
[0047] Step S4: Generate a transaction commitment of the transaction value v using the initial commitment C(0); calculate the new balance commitment of the sender and the receiver based on the pre-stored balance commitments of the sender and the receiver and the commitment of the transaction value v.
[0048] Step S5: In response to the recipient's acquisition of the ciphertext E(r), the recipient decrypts the ciphertext E(r) to obtain a random number r to calculate the cumulative blinding factor, and calculates the cumulative amount based on the deposit v in the recipient's account.
[0049] In the above-mentioned blockchain transaction method for concealing the account balance, the transaction information is generated by calculating the initial commitment C(0) generated by the sending end using the zero value, the zero value proof of the initial commitment C(0), the ciphertext E(r) encrypted by the random number r generating the initial commitment C(0), and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r), and uploaded to the blockchain. The zero value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) are verified on the blockchain, and then the smart contract is executed, the transaction data is calculated, and the transaction commitment of the transaction value v is generated using the initial commitment C(0). According to the pre-stored balance commitments of the sender and the receiver and the commitment of the transaction value v, the new balance commitment of the sender and the receiver is calculated, so as to realize the concealment of the account balance, and the account balance is more secure. In this process, the transaction data supports dynamic settlement when executed on the blockchain, and the payer and the payee do not need to determine the transaction amount before the transaction, which is more in line with the operation logic of the smart contract and almost does not increase the amount of calculation. At the same time, there is no need for a third-party platform to perform data calculations. At the same time, transaction data is verifiable to all users, and other users can verify the legitimacy of the transaction.
[0050] In one embodiment, the transaction information also includes: the transaction limit X set by the initiator, the remaining commitment C' calculated based on the transaction limit A , and the calculated remaining commitment C′ A Generated non-negativity range proof.
[0051] In one embodiment, the remaining commitment C′ A The generated non-negative range proof is calculated using the Bulletproof algorithm.
[0052] In one embodiment, the operation of the smart contract, after obtaining the transaction value v, further includes: verifying that the transaction value v is less than or equal to the transaction upper limit X, and verifying the remaining commitment C′ A Generated non-negativity range proof.
[0053] In this embodiment, the initiator sets the transaction limit X, the remaining commitment C′ calculated based on the transaction limit A , and the calculated remaining commitment C′ A The generated non-negative range proof is verified on the blockchain, limiting the maximum transaction amount and proving the remaining commitment C′A The non-negativity of ensures that after the sender's balance is deducted from the maximum value X, the value remains legal. A The verification of the generated non-negative range proof ensures the legitimacy of on-chain calculations without leaking the privacy of the balance.
[0054] In one embodiment, the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) are verified based on the transaction information. If the verification fails, the transaction fails and waits to be re-initiated.
[0055] In this embodiment, verification failure indicates that there is no guarantee that the random number r is the same as the random number in the initial commitment C(0), and thus the subsequent commitment on the transaction amount cannot be guaranteed. Therefore, the transaction fails and needs to be re-initiated.
[0056] In one embodiment, the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) are implemented using zk-STARK or Sigma protocol.
[0057] In one embodiment, the random number used to generate the initial commitment C(0) is encrypted using the Paillier algorithm to obtain the ciphertext E(r).
[0058] Specifically, the process of this application is as follows:
[0059] 1. The sender initiates a transaction, and the calculation process is as follows:
[0060] (1) Initial commitment generation: Use zero value to generate the initial commitment C(0)=0G+rH, where r is a random number.
[0061] (2) Zero-value proof: Generate a zero-knowledge proof (ZK proof) of v=0 for C(0) to prove that the committed value is zero. This can be implemented using zk-STARK or Sigma protocol.
[0062] (3) Random number encryption and verification: The random number r is encrypted using the recipient’s public key P B The encryption is performed to obtain the ciphertext E(r), and a zero-knowledge proof is attached that is consistent with the random number r in the commitment C(0). The encryption algorithm can use the Paillier algorithm, and the zero-knowledge proof can be implemented using the zk-STARK or Sigma protocol.
[0063] (4) Set a transaction cap and generate remaining commitments: Select a transaction cap X and calculate the remaining commitment C′ A =C A -(XG+rH)). Where C AIt is a commitment to the current value of the sender's assets.
[0064] (5) Range Proof: The sender generates a range proof to prove the remaining commitment C′ after calculation A The non-negativity of ensures that after the maximum value X is subtracted from the transaction, the value remains legal. The range proof can use the Bulletproof algorithm.
[0065] (6) Assemble transaction: Assemble transaction data, including the upper limit X, the initial commitment C(0), the zero-value proof of the initial commitment, the zero-knowledge proof of the consistency of the ciphertext E(r) and the random number, the transaction upper limit X and C′ A Range proof (remaining commitment C′ A It can be calculated and therefore not included in the transaction). The above data and other transaction contents are packaged into a transaction.
[0066] 2. The on-chain contract execution of the transfer is as follows (if any step in the process fails, the transaction fails):
[0067] (1) Verification of the legitimacy of the initial commitment: Verify the zero-value proof of the initial commitment and the zero-knowledge proof of the consistency of the random number.
[0068] (2) Contract value calculation: According to the content of the smart contract called by the transaction, run the smart contract to obtain the actual transaction value v (visible to everyone).
[0069] (3) Transaction value legitimacy verification: Verify the transaction value v≤X and verify the remaining commitment C′ A Proof of scope.
[0070] (4) Calculate the transaction commitment: C(v) = v·G + C(0).
[0071] (5) Update blockchain status: Update the sender's status (i.e., the commitment of the asset value) to The receiver's status is updated to And update other on-chain status according to the content of the smart contract, and the on-chain transaction is completed.
[0072] 3. Decryption by the receiver: The receiver gets the deposit v from the transaction; then uses its private key to decrypt the ciphertext E(r) in the transaction and gets the random number r. The accumulated amount and accumulated blinding factor are updated locally. The accumulated amount and accumulated blinding factor correspond to the receiver's commitment in the smart contract state. (If the on-chain status has been updated to a commitment However, if the recipient cannot obtain the correct random number r, it will be difficult for the recipient to conduct subsequent transactions. Therefore, the zero-knowledge proof that the random number in E(r) is consistent with the random number in the commitment is important.)
[0073] This application uses additive homomorphic commitment technology to record hidden asset values and ensures the legitimacy of the amount through range proof. In view of the need for variable transaction values during contract execution, the variable values are committed on the chain, requiring the sender to set an upper limit and generate a corresponding range proof to ensure that the value before the transaction is greater than or equal to the upper limit.
[0074] In one embodiment, a blockchain transaction system for concealing account amounts is provided, the system comprising:
[0075] Transaction information acquisition module: used to receive transaction information sent by the initiator, the transaction information including: the initial commitment C(0) generated by the initiator using zero value, the zero value proof of the initial commitment C(0), the ciphertext E(r) encrypted with the random number r used to generate the initial commitment C(0), and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r);
[0076] Verification module: used to verify the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) based on the transaction information. If the verification is successful, the smart contract execution module is executed;
[0077] Smart contract execution module: used to run smart contracts and obtain the transaction value v;
[0078] Balance update module: used to generate a transaction commitment of a transaction value v using the initial commitment C(0); calculate the new balance commitment of the sender and the receiver based on the pre-stored balance commitments of the sender and the receiver and the commitment of the transaction value v;
[0079] Ciphertext E(r) sending module: responds to the recipient's acquisition of the ciphertext E(r) so that the recipient decrypts the ciphertext E(r) to obtain a random number r to calculate the cumulative blinding factor, and calculates the cumulative amount based on the deposit v in the recipient's account.
[0080] For the specific definition of a blockchain transaction system for concealing account amounts, please refer to the definition of a blockchain transaction method for concealing account amounts in the above text, which will not be repeated here. Each module in the above-mentioned blockchain transaction system for concealing account amounts can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0081] In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above-mentioned blockchain transaction method for concealing the account amount is implemented.
[0082] In one embodiment, a computer program product is also provided, including a computer program / instruction, which, when executed by a processor, involves all or part of the process in the above-mentioned embodiment method.
[0083] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0084] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0085] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A blockchain transaction method for concealing account balance, characterized in that: Applied to blockchain, the method includes: Receive transaction information sent by the initiator, wherein the transaction information includes: an initial commitment C(0) generated by the initiator using a zero value, a zero value proof of the initial commitment C(0), a ciphertext E(r) encrypted with a random number r used to generate the initial commitment C(0), and a zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r); Verify the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) based on the transaction information. If the verification is successful, proceed to the next step. Run the smart contract to get the transaction value v; Generate a transaction commitment of the transaction value v using the initial commitment C(0); calculate the new balance commitment of the sender and the receiver based on the pre-stored balance commitments of the sender and the receiver and the commitment of the transaction value v; In response to the recipient's acquisition of the ciphertext E(r), the recipient decrypts the ciphertext E(r) to obtain a random number r to calculate a cumulative blinding factor, and calculates a cumulative amount based on the deposit v in the recipient's account.
2. The blockchain transaction method for concealing account amount according to claim 1 is characterized in that: The transaction information also includes: the transaction limit X set by the initiator, the remaining commitment C' calculated based on the transaction limit A , and the calculated remaining commitment C′ A Generated non-negativity range proof.
3. The blockchain transaction method for concealing account amount according to claim 2 is characterized in that: The remaining commitment C' A The generated non-negative range proof is calculated using the Bulletproof algorithm.
4. The blockchain transaction method for concealing account amount according to claim 2 is characterized in that: After the smart contract is executed and the transaction value v is obtained, the following steps are further included: verifying that the transaction value v is less than or equal to the transaction upper limit X, and verifying the remaining commitment C′ A Generated non-negativity range proof.
5. The blockchain transaction method for concealing account amount according to claim 1 is characterized in that: The zero-value proof of the initial commitment C(0) is verified based on the transaction information, as well as the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r). If the verification fails, the transaction fails and waits to be re-initiated.
6. The blockchain transaction method for concealing account amount according to claim 1, characterized in that: The zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) are implemented using the zk-STARK or Sigma protocol.
7. The blockchain transaction method for concealing account amount according to claim 1, characterized in that: The random number used to generate the initial commitment C(0) is encrypted using the Paillier algorithm to obtain the ciphertext E(r).
8. A blockchain transaction system for concealing account balance, characterized in that: The system comprises: Transaction information acquisition module: used to receive transaction information sent by the initiator, the transaction information including: the initial commitment C(0) generated by the initiator using zero value, the zero value proof of the initial commitment C(0), the ciphertext E(r) encrypted with the random number r used to generate the initial commitment C(0), and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r); Verification module: used to verify the zero-value proof of the initial commitment C(0) and the zero-knowledge proof that the random number r in the initial commitment C(0) is consistent with the ciphertext E(r) based on the transaction information. If the verification is successful, the smart contract execution module is executed; Smart contract execution module: used to run smart contracts and obtain the transaction value v; Balance update module: used to generate a transaction commitment of a transaction value v using the initial commitment C(0); calculate the new balance commitment of the sender and the receiver based on the pre-stored balance commitments of the sender and the receiver and the commitment of the transaction value v; Ciphertext E(r) sending module: responds to the recipient's acquisition of the ciphertext E(r) so that the recipient decrypts the ciphertext E(r) to obtain a random number r to calculate the cumulative blinding factor, and calculates the cumulative amount based on the deposit v in the recipient's account.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Block chain transaction privacy protection method based on full homomorphism
CN113159745A
Cited By
Intelligent semiconductor element commodity transaction payment method based on block chain
CN120746567A
Cloud control platform instruction digital signature verification method based on vehicle-road cloud collaboration
CN121077800A
Block chain-based electricity-carbon transaction method and device
CN122023010A
A blockchain-based electric carbon trading method and device
CN122023010B
Dynamic updatable zero-knowledge proof commitment method and system supporting cross-chain transaction
CN122155719A