A blockchain-based fair commodity transaction privacy protection method

By leveraging blockchain technology, miner verification, and smart contracts, transparency and privacy protection in fair commodity transactions are achieved, solving the problems of high transaction costs and privacy leaks on centralized e-commerce platforms, and ensuring transparent, secure, and fair transactions.

CN115775181BActive Publication Date: 2026-08-25SOUTHWEST JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211163162.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2026-08-25
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

Existing centralized e-commerce platforms suffer from high transaction costs, lack of transparency, and privacy breaches, making it difficult to protect data privacy and achieve fair trade in an untrusted environment.

Method used

By adopting a blockchain-based fair commodity trading method, the blockchain system is initialized, and miner verification and smart contracts are used to achieve encrypted signatures and blind signatures for both buyers and sellers, ensuring transaction transparency and privacy, and guaranteeing transaction fairness through verifiable encrypted signatures.

Benefits of technology

It enables transparent, fair, and secure commodity transactions on the blockchain, avoiding the drawbacks of traditional centralized platforms, ensuring transaction transparency, privacy protection, and fairness, and reducing transaction costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115775181B_ABST
    Figure CN115775181B_ABST
Patent Text Reader

Abstract

The application discloses a fair commodity transaction privacy protection method based on a blockchain, which comprises the following steps: system initialization; a buyer publishes a payment transaction; a miner verifies the transaction and executes a payment function of a contract if the transaction is passed, or ends the process; the buyer publishes a payment proof transaction; a seller verifies a verifiable encryption signature and publishes a delivery transaction if the encryption signature is passed, or ends the process; the buyer publishes a redemption proof transaction; the seller publishes a redemption transaction; and the miner verifies the transaction and executes a redemption function of the contract if the transaction is passed. The method realizes the comprehensive protection of the identities, account balances, transaction amounts and transaction contents of the two parties of the transaction by using blind signature, verifiable encryption signature, homomorphic encryption, range proof and zero-knowledge proof technology to protect the transaction privacy and ensure the fairness of the transaction while recording the transaction information through the blockchain and the smart contract. Through security analysis, the method meets the effectiveness, time limit, fairness, anonymity, confidentiality and balance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and specifically to a blockchain-based method for protecting privacy in fair commodity transactions. Background Technology

[0002] Currently, e-commerce transactions are primarily conducted through centralized e-commerce platforms. These platforms provide services to both buyers and sellers, enabling merchants to open online stores and consumers to purchase goods online, thus facilitating online transactions. A crucial characteristic of online transactions is fairness; a fair transaction should ensure that the seller receives payment only when the buyer receives the expected goods. As an intermediary between consumers and merchants, the e-commerce platform temporarily holds the consumer's funds until the consumer confirms receipt, at which point the platform transfers the funds to the merchant. If the buyer does not receive the goods or there is a dispute between the buyer and seller, the e-commerce platform will mediate the dispute and, if necessary, refund the buyer. While this approach achieves fairness, centralized e-commerce platforms have several drawbacks: ① High transaction costs: As intermediaries, e-commerce platforms charge a service fee (approximately 2-3%) on each transaction, effectively increasing transaction costs for both parties. ② Lack of transparency: The e-commerce platform holds the merchants' historical transaction information and reputation evaluation systems, which are opaque to consumers. Many merchants use practices such as fake orders to inflate sales and positive reviews, misleading consumers. ③ Privacy Leakage: E-commerce platforms store large amounts of user and transaction data in centralized databases, which contain sensitive information such as personal privacy and trade secrets. These databases are easily targeted by malicious attacks, posing risks of data leakage, tampering, and loss. Therefore, designing methods that can protect data privacy and security in untrusted environments while supporting efficient and fair privacy protection in commodity transactions is of significant practical importance. Summary of the Invention

[0003] To address the aforementioned shortcomings in existing technologies, this invention provides a blockchain-based method for protecting privacy in fair commodity transactions.

[0004] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:

[0005] A blockchain-based method for protecting privacy in fair commodity transactions includes the following steps:

[0006] S1. Initialize the blockchain system and obtain the public parameters of the blockchain system, wherein the blockchain system includes buyer and seller users;

[0007] S2. The buyer publishes a payment transaction and executes the contract's payment function after the transaction is verified by the miner. If the miner fails to verify the transaction, the transaction ends.

[0008] S3. The buyer publishes the transaction payment proof transaction, and the seller publishes the shipment transaction after verifying the encrypted signature. If the encrypted signature verification fails, the transaction ends.

[0009] S4. The buyer publishes a redemption proof transaction and the seller publishes a redemption transaction. After the miner verifies the transaction, the redemption function of the contract is executed.

[0010] Furthermore, step S1 specifically includes the following steps:

[0011] S11, By execution The algorithm obtains a list of common parameters. , It belongs to the GDH group. g for Generators; for The bilinear pair is represented as Hash function ; E It is an elliptic curve. G Let be the generator of the elliptic curve. N Let be the order of the generator of the elliptic curve. l The length of the range proof;

[0012] S12, Execution The algorithm generates two user accounts: a buyer's account and a seller's account, and creates a contract account by creating a transaction through a contract.

[0013] S13. The buyer negotiates the symmetric key for this transaction with the seller via a secret channel. K。

[0014] Furthermore, the contract account generated through contract creation in S12 is defined as follows:

[0015]

[0016]

[0017]

[0018]

[0019]

[0020] in, It is the buyer's account address. This is the buyer's public / private key pair, and NonceA is the integer value used by the buyer's account to defend against replay attacks. It is the homomorphic encrypted value of the buyer's account balance. NonceB is a blinding random number generated by the buyer's account, while NonceB is an integer value used by the seller's account to defend against replay attacks. The homomorphic encrypted value of the seller's account balance. NonceC is a blinding random number generated by the seller's account, and NonceC is an integer value used by the contract account to defend against replay attacks. The homomorphic encrypted value of the contract account balance. A blind factor random number generated for the contract balance account.

[0021] Furthermore, the method by which the buyer user publishes the payment transaction in S2 is represented as follows:

[0022]

[0023] in, The order information is symmetrically encrypted, including the order number, Bob's public key, item name, price, and shipping address; In response to the message M The result of blinding; A message encrypted with a public key from an authoritative source; The transaction amount is encrypted using the buyer's public key; The transaction amount is encrypted using the contract's public key; Rangeproof For transaction amount v and the buyer's new balance exist Proof of the range within; ZKproof for and Proof that the encrypted amounts are equal. σ It is a signature for the entire transaction.

[0024] Furthermore, the specific method for executing the contract's payment function after the miner's verification in S2 is as follows:

[0025] S21. Miners check the legality of the transaction and verify the signature of the entire transaction. σ If the verification is successful, the contract code will be executed.

[0026] S22, Contract receives payment transaction parameters from buyer.

[0027]

[0028] verify Is it correct? If correct, select a random number. sk As a one-time private key

[0029] S23: Contract Re-encrypted Obtain the ciphertext ,Will Enter the random number encrypted with the buyer's public key into the payment form. Return to the buyer;

[0030] S24: Buyer's account balance decreased Contract account balance increased Perform the following calculations:

[0031]

[0032]

[0033]

[0034] in, It is the homomorphic encrypted value of Alice's balance minus the transaction amount v. It is the homomorphic encrypted value of the contract account balance plus the transaction amount v.

[0035] Furthermore, the specific method by which the buyer user publishes the transaction payment proof in S3 is as follows:

[0036] S301, Buyer generates proof of payment transaction ,in VES For verifiable cryptographic signatures, It is a one-time public key for symmetric encryption. pk Random numbers and , σ It is a signature for the entire transaction;

[0037] S302, the miner verifies the transaction and packages it onto the blockchain, and the buyer pays the transaction hash. and payment proof transaction hash Send to the seller.

[0038] Furthermore, the specific method for the seller user to publish the delivery transaction after verifying the encrypted signature in S3 is as follows:

[0039] S311. The seller decrypts the order information from the payment transaction and decrypts the payment proof transaction to obtain... ,verify VES Is it correct? If so... If the equation holds true, the cryptographic signature can be verified as correct, where pk is the public key, H(M) is the hash value of M, and VES is the verifiable cryptographic signature.

[0040] S312, Seller's Calculation Find it in the payment table If found, it confirms that the buyer has paid the amount stipulated in the contract. v .in It is the homomorphic encrypted value of v by the contract account;

[0041] S313, the seller in Ship the goods via express delivery within the specified time and generate a shipping transaction.

[0042] in The shipping information is symmetrically encrypted, including the payment transaction hash, Alice's public key, item name, price, and tracking number. σ For signing the entire transaction;

[0043] Miners verify transactions and package them onto the blockchain; the seller then sends the transaction hash. Send to the buyer.

[0044] Furthermore, the specific method by which the buyer user publishes the redemption certificate transaction and the seller user publishes the redemption transaction in S4 is as follows:

[0045] S401, The buyer obtains shipping information by decrypting the shipping transaction. After confirming that the shipping information matches the order information and that the goods have been received correctly, Generate redemption certificate transaction within the time limit ,in Redemption certificate for symmetric encryption θ , σ For signing the entire transaction;

[0046] S402, the miner verifies the transaction and packages it onto the blockchain. The buyer then redeems the transaction hash as proof of the transaction. Send to the seller;

[0047] S403, The seller decrypts the redemption certificate from the redemption certificate transaction to obtain the redemption certificate. θ Verify redemption certificate θ Is it correct? If correct, generate a redemption transaction.

[0048]

[0049] in The transaction amount is encrypted using Bob's public key. ZKproof for and Proof that the encrypted amounts are equal. σ For signing the entire transaction;

[0050] Furthermore, the specific method for executing the contract's redemption function after the miner verifies the transaction in S4 is as follows:

[0051] S411. Miners check the legality of transactions and verify the signatures for the entire transaction. σ If the verification is successful, the contract code will be executed.

[0052] S412, The contracting party receives the redemption transaction parameters from the buyer.

[0053]

[0054] Verify redemption certificate θ Proof equal to the encrypted amount ZKproof Is it correct? If correct, check the payment schedule. ,Will Delete from the payment table; if not found, the corresponding payment does not exist and a failure is returned.

[0055] S413. If the contract is successfully executed, the transaction verification is successful. The miner packages the transaction into a block and uploads it to the blockchain, and calculates the balance as follows:

[0056]

[0057] ;

[0058]

[0059] S414. The transaction process ends when the buyer confirms receipt of the seller's goods and the seller receives payment from the buyer.

[0060] The present invention has the following beneficial effects:

[0061] (1) This method avoids the drawbacks of traditional centralized structures and solves the problems of opaque transactions and privacy leaks in traditional e-commerce platforms. By recording all buyer and seller transactions on the blockchain, the transparency of transactions is guaranteed; smart contracts are used to hold buyer funds and perform blind signatures, and sellers can redeem funds with the original signature after deblinding, thus ensuring the privacy of the identities of both parties and the content of the transactions; smart contracts are used to perform verifiable cryptographic signatures, ensuring that the seller only ships the goods after confirming the buyer's payment, and the buyer only pays after confirming receipt of the goods. When disputes arise, they can be resolved by an authoritative party, ensuring the fairness of the transactions. Through experimental evaluation on Ethereum, the solution can realize the function of on-chain commodity trading, effectively guaranteeing the fairness and privacy of commodity trading.

[0062] (2) To enhance privacy protection for existing fair transactions, a new verifiable cryptographic signature is proposed. Alice (the buyer) encrypts the message using the authoritative party's public key and sends it to the designated party (smart contract) for signing. This allows Alice to prove to Bob (the seller) that she possesses the designated party's signature on the encrypted message without revealing the original message's signature. If Alice does not send the original signature to the seller after Bob has fulfilled his duties, the authoritative party can decrypt the signature and send it to Bob. Attached Figure Description

[0063] Figure 1 This is a schematic diagram of the privacy protection method for fair commodity transactions based on blockchain according to the present invention. Detailed Implementation

[0064] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0065] A blockchain-based method for protecting privacy in fair commodity transactions, such as... Figure 1 As shown, it includes the following steps:

[0066] S1. Initialize the blockchain system and obtain the public parameters of the blockchain system, wherein the blockchain system includes buyer and seller users;

[0067] Specifically, this embodiment includes the following steps:

[0068] S11, By execution The algorithm obtains a list of common parameters. , It belongs to the GDH group. g for Generators; for The bilinear pair is represented as Hash function ; E It is an elliptic curve. G Let be the generator of the elliptic curve. N Let be the order of the generator of the elliptic curve. l The length of the range proof;

[0069] S12, Execution The algorithm generates buyer and seller accounts: Alice (buyer) and Bob (seller). A contract account (Contract) is created through a transaction. It is assumed that Alice and Bob's accounts both have a certain balance, while the contract account has a balance of 0. Authoritative key. The account is defined as follows:

[0070]

[0071]

[0072]

[0073]

[0074] ;

[0075] in, It is the buyer's account address. This is the buyer's public / private key pair, and NonceA is the integer value used by the buyer's account to defend against replay attacks. It is the homomorphic encrypted value of the buyer's account balance. NonceB is a blinding random number generated by the buyer's account, while NonceB is an integer value used by the seller's account to defend against replay attacks. The homomorphic encrypted value of the seller's account balance. NonceC is a blinding random number generated by the seller's account, and NonceC is an integer value used by the contract account to defend against replay attacks. The homomorphic encrypted value of the contract account balance. A blind factor random number generated for the contract balance account.

[0076] S13. The buyer negotiates the symmetric key for this transaction with the seller via a secret channel. K。

[0077] S2. The buyer publishes a payment transaction and executes the contract's payment function after the transaction is verified by the miner. If the miner fails to verify the transaction, the transaction ends.

[0078] In this embodiment of the invention, the specific method for generating a payment transaction in step S2 is as follows:

[0079] Buyer generates payment transaction:

[0080]

[0081] in It contains symmetrically encrypted order information, including the order number, Bob's public key, item name, price, and shipping address. . It is a message M This includes the results of blinding Bob's public key and order number. Messages encrypted with the authoritative public key M . The transaction amount is encrypted using the buyer's public key. The transaction amount is encrypted using the contract's public key. Rangeproof Transaction amount v and the buyer's new balance exist Proof of the range within, ZKproof yes and Proof that the encrypted amounts are equal. σ This is the signature for the entire transaction. The relevant parameters are calculated as follows:

[0082]

[0083]

[0084]

[0085] The specific method for executing the contract's payment function after the miner's verification is successful is as follows:

[0086] S21. Miners check the legality of the transaction and verify the signature of the entire transaction. σ If the verification is successful, the contract code will be executed.

[0087] S22, Contract receives payment transaction parameters from buyer.

[0088]

[0089] verify Is it correct? If correct, select a random number. sk Use the one-time private key; if correct, select a random number. sk As a one-time private key As a one-time public key, use sk right Signature obtained by blind signature ,use sk right A verifiable cryptographic signature is obtained from the signature. VES Blind signature Verifiable cryptographic signature VES and a one-time public key encrypted with the buyer's public key. Returned to the buyer. The relevant parameters are calculated as follows:

[0090]

[0091] S23: Contract Re-encrypted Obtain the ciphertext ,Will Enter the random number encrypted with the buyer's public key into the payment form. Return to the buyer;

[0092] S24: Buyer's account balance decreased Contract account balance increased Perform the following calculations:

[0093]

[0094]

[0095] .

[0096] S3. The buyer publishes the transaction payment proof transaction, and the seller publishes the shipment transaction after verifying the encrypted signature. If the encrypted signature verification fails, the transaction ends.

[0097] In this embodiment, the specific method by which the buyer user publishes transaction payment proof is as follows:

[0098] S301, Buyer generates proof of payment transaction ,in VES For verifiable cryptographic signatures, It is a one-time public key for symmetric encryption. pk Random numbers and , σ It is a signature for the entire transaction;

[0099] In this embodiment, the buyer decrypts to obtain the one-time public key. Unblinding signature Get a signature Verify if ζ is correct. If If the equation holds true, then the signature is correct. The buyer decrypts the message to obtain a random number. ,calculate Find it in the payment table If found, confirm receipt of payment under the contract. v。

[0100] S302, the miner verifies the transaction and packages it onto the blockchain, and the buyer pays the transaction hash. and payment proof transaction hash Send to the seller.

[0101] The specific steps for the seller to publish the shipping transaction after verifying the encrypted signature are as follows:

[0102] S311. The seller decrypts the order information from the payment transaction and decrypts the payment proof transaction to obtain... Verification can verify the cryptographic signature. VES Is it correct? If so... If the equation holds true, the cryptographic signature can be verified as correct. Here, VEW is the verifiable cryptographic signature, pk is the public key, and H(M) is the hash value of M.

[0103] S312, Seller's Calculation Find it in the payment table If found, it confirms that the buyer has paid the amount stipulated in the contract. v .in It is the homomorphic encrypted value of v for the contract account.

[0104] Seller Ship the goods via express delivery within the specified time and generate a shipping transaction.

[0105] in The shipping information is symmetrically encrypted, including the payment transaction hash, Alice's public key, item name, price, and tracking number. σ For signing the entire transaction;

[0106] Miners verify transactions and package them onto the blockchain; the seller then sends the transaction hash. Send to the buyer.

[0107] S4. The buyer publishes a redemption proof transaction and the seller publishes a redemption transaction. After the miner verifies the transaction, the redemption function of the contract is executed.

[0108] In this embodiment, the specific method by which the seller user publishes the redemption certificate transaction and the buyer user publishes the redemption transaction is as follows:

[0109] S401, The buyer obtains shipping information by decrypting the shipping transaction. After confirming that the shipping information matches the order information and that the goods have been received correctly, Generate redemption certificate transaction within the time limit ,in Redemption certificate for symmetric encryption θ , For signing the entire transaction;

[0110] S402, the miner verifies the transaction and packages it onto the blockchain. The buyer then redeems the transaction hash as proof of the transaction. Send to the seller;

[0111] S403, The seller decrypts the redemption certificate from the redemption certificate transaction to obtain the redemption certificate. θ Verify redemption certificate θ Is it correct? If correct, generate a redemption transaction.

[0112]

[0113] in The transaction amount is encrypted using Bob's public key. ZKproof for and Proof that the encrypted amounts are equal. σ This is the signature for the entire transaction.

[0114] The specific method for executing the contract's redemption function after the miner verifies the transaction is as follows:

[0115] S411. Miners check the legality of transactions and verify the signatures for the entire transaction. σ If the verification is successful, the contract code will be executed.

[0116] S412, The contracting party receives the redemption transaction parameters from the buyer.

[0117]

[0118] Verify redemption certificate θ Proof equal to the encrypted amount ZKproof Is it correct? If correct, check the payment schedule. ,Will Delete from the payment table; if not found, the corresponding payment does not exist and a failure is returned.

[0119] S413. If the contract is successfully executed, the transaction verification is successful. The miner packages the transaction into a block and uploads it to the blockchain, and calculates the balance as follows:

[0120]

[0121] ;

[0122]

[0123] S414. The transaction process ends when the buyer confirms receipt of the seller's goods and the seller receives payment from the buyer.

[0124] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0125] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0126] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0127] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

[0128] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.

Claims

1. A blockchain-based method for protecting privacy in fair commodity transactions, characterized in that, Includes the following steps: S1. Initialize the blockchain system and obtain the public parameters of the blockchain system, wherein the blockchain system includes buyer and seller users; S2. The buyer publishes a payment transaction, and after successful verification by the miner, the contract's payment function is executed. If the miner's verification fails, the transaction ends. The specific method for executing the contract's payment function after successful miner verification is as follows: S21. Miners check the legality of the transaction and verify the signature of the entire transaction. σ If the verification is successful, the contract code will be executed. S22, Contract receives payment transaction parameters from buyer. verify Is it correct? If correct, select a random number. sk As a one-time private key For the buyer's public key, The transaction amount is encrypted using the buyer's public key. The transaction amount is encrypted using the public key of the contracting party. Messages encrypted with the authoritative public key M, It is a message M The blinding results; For transaction amount v and the buyer's new balance of Range proof, l For the length of the range proof, ZKproof yes and Proof that the encrypted amounts are equal; S23: Contract Re-encrypted Obtain the ciphertext ,Will Enter the random number encrypted with the buyer's public key into the payment form. Return to the buyer; S24: Buyer's account balance decreased Contract account balance increased Perform the following calculations: in, It is the buyer's account balance minus the transaction amount. The homomorphic encrypted value, It is the balance of the contract account plus the transaction amount. The homomorphic encrypted value; and It is a random number; G Let be the generator of the elliptic curve. It is a blind factor random number generated by the buyer's account. It is the homomorphic encrypted value of the buyer's account balance; The public key of the contract party; This is the homomorphic encrypted value of the contract account's balance. This is the buyer's account balance; S3. The buyer publishes the transaction payment proof transaction, and the seller publishes the shipment transaction after verifying the encrypted signature. If the encrypted signature verification fails, the transaction ends. The specific method for the seller to verify the encrypted signature and publish the shipment transaction is as follows: S311. The seller decrypts the order information from the payment transaction and decrypts the payment proof transaction to obtain... Verification can verify the cryptographic signature. VES Is it correct? If If the equation holds true, then the encryption signature can be verified as correct. It is a public key. It is the hash value of M. It is a verifiable cryptographic signature; It is a generator of the GDH group. For authoritative public keys, It is a bilinear pairing function; S312, Seller's Calculation Find it in the payment table If found, it confirms that the buyer has paid the amount stipulated in the contract. v ,in It is the homomorphic encrypted value of v by the contract account; S313, the seller in Ship the goods via express delivery within the specified time and generate a shipping transaction. in The shipping information is symmetrically encrypted, including the payment transaction hash, buyer's public key, item name, price, and tracking number. σ For signing the entire transaction; Miners verify transactions and package them onto the blockchain; the seller then sends the transaction hash. Send to the buyer; S4. The buyer publishes a redemption proof transaction, and the seller publishes a redemption transaction. After the miners verify the transaction, the redemption function of the contract is executed. The specific method for executing the redemption function of the contract after the miners verify the transaction is as follows: S411. Miners check the legality of transactions and verify the signatures for the entire transaction. σ If the verification is successful, the contract code will be executed. S412, The contracting party receives the redemption transaction parameters from the seller. Verify redemption certificate θ Proof that the amount is equal to the encrypted amount ZKproof Is it correct? If correct, check the payment schedule. ,Will Delete from the payment table; if not found, the corresponding payment does not exist, and a failure is returned; among them, For the seller's public key, For order number, θ To redeem the certificate, The transaction amount is encrypted using the seller's public key; S413. If the contract is successfully executed, the transaction verification is successful. The miner packages the transaction into a block and uploads it to the blockchain, and calculates the balance as follows: ; ; In the formula, Add the homomorphic encrypted value of the redemption amount v to the seller's account balance; Blind factor random numbers generated for the seller's account. The homomorphic encrypted value of the seller's account balance. This is the seller's account balance; This is a cryptographic expression that restores the balance of a contract account to zero after a redemption operation is completed. The homomorphic encrypted value of the contract party's account balance; S414. The transaction process ends when the buyer confirms receipt of the seller's goods and the seller receives payment from the buyer.

2. The method for protecting privacy in fair commodity transactions based on blockchain according to claim 1, characterized in that, S1 specifically includes the following steps: S11, Execution The algorithm obtains a list of common parameters. , It belongs to the GDH group. g for Generators; for The bilinear pair is represented as ; Hash function ; E It is an elliptic curve. G Let be the generator of the elliptic curve. N Let be the order of the generator of the elliptic curve. l The length of the range proof; S12, Execution The algorithm generates both buyer and seller accounts, and creates contract accounts through contract-based transactions. S13. The buyer negotiates the symmetric key for this transaction with the seller via a secret channel. K。 3. The method for protecting privacy in fair commodity transactions based on blockchain according to claim 1, characterized in that, The method by which the buyer publishes a payment transaction in S2 is represented as follows: in, For the address of the contracting party, The order information is symmetrically encrypted, including the order number, seller's public key, item name, price, and shipping address. In response to the message M The result of blinding; A message encrypted with a public key from an authoritative source; The transaction amount is encrypted using the buyer's public key; The transaction amount is encrypted using the contract's public key; Rangeproof For transaction amount v and the buyer's new balance exist Proof of the range within; ZKproof for and Proof that the encrypted amounts are equal. σ It is a signature for the entire transaction.

4. The method for protecting privacy in fair commodity transactions based on blockchain according to claim 1, characterized in that, The specific method by which the buyer user publishes transaction payment proof in S3 is as follows: S301, Buyer generates proof of payment transaction: ,in VES For verifiable cryptographic signatures, It is a one-time public key for symmetric encryption. pk Random numbers and , It is a signature for the entire transaction; S302, the miner verifies the transaction and packages it onto the blockchain, and the buyer pays the transaction hash. and payment proof transaction hash Send to the seller.

5. A method for protecting privacy in fair commodity transactions based on blockchain according to claim 1, characterized in that, The specific method by which the buyer publishes the redemption certificate transaction and the seller publishes the redemption transaction in S4 is as follows: S401, The buyer obtains shipping information by decrypting the shipping transaction. After confirming that the shipping information matches the order information and that the goods have been received correctly, A redemption certificate transaction is generated within the specified time. ,in Redemption certificate for symmetric encryption , For signing the entire transaction; S402, the miner verifies the transaction and packages it onto the blockchain. The buyer then redeems the transaction hash as proof of the transaction. Send to the seller; S403, The seller decrypts the redemption certificate from the redemption certificate transaction to obtain the redemption certificate. θ Verify redemption certificate θ Is it correct? If correct, generate a redemption transaction: in, The transaction amount is encrypted using the seller's public key. ZKproof for and Proof that the encrypted amounts are equal. σ This is the signature for the entire transaction.

Citation Information

Patent Citations

  • A fair contract signing method with privacy protection based on a block chain

    CN109815728A

  • Contract signature method and system based on block chain and fair exchange, and medium

    CN112671540A