Cross-alliance chain-oriented privacy protection data element transaction auditing method
By combining Pedersen's commitment and Shamir's secret sharing technology, and combining smart contracts to manage cross-affiliated chain data transactions, the problems of data fraud and payment denied in cross-affiliated chain transactions are solved, data privacy protection and transaction fairness are achieved, and data is authentic. Sex and transparency of transactions.
Patent Information
- Application Number
- CN202410984823.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
AI Technical Summary
The existing cross-affiliated chain data element transaction solutions cannot effectively deal with data fraud and payment debauchery, and lack privacy protection and transaction fairness guarantees.
By combining the characteristics of alliance chains and public chains, we use Pedersen promises and Shamir secret sharing technology to build zero-knowledge proofs, use smart contracts to manage data transaction processes, ensure the privacy and authenticity of data elements, and introduce a pledge accountability mechanism to ensure transactions Fairness.
It realizes privacy protection and data authenticity audit in the transaction process of cross-affiliated chain data elements, eliminates data fraud and payment debunk, and ensures the fairness and transparency of transactions.
Smart Images

Figure CN118940312A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of cross-chain technology and data audit technology, and in particular relates to a privacy-preserving data element transaction audit method for cross-alliance chains. Background Art
[0002] The status and importance of data elements in today's digital age are becoming increasingly prominent. It constitutes the core component of the digital economy and has a profound impact on the economic, social and technological fields. The transaction and circulation of data elements are the key to the assetization of enterprise data. Alliance chain technology is widely used to build data markets within enterprise alliances due to its decentralized, tamper-proof and access-controlled characteristics. As a decentralized technology, alliance chain reduces dependence on trusted third parties, reduces the risks of single point failures, opaque transactions, untraceability and privacy leakage; through the tamper-proof characteristics of block information, it ensures the integrity and credibility of data and prevents data from being changed or deleted; by introducing access control and finely setting data access rights, it ensures that only authorized members can access and process sensitive data, prevents unauthorized access, and reduces the risk of node maliciousness and data leakage.
[0003] However, with the increase in the number of enterprise alliances, a massive data market based on alliance chains has been formed. Although traditional alliance chain technology performs well in ensuring efficient and secure transactions of data elements within a single alliance chain, it is opaque to the outside world, resulting in the separation of chains, forming data islands, and limiting the flow of data between enterprise alliances. Therefore, how to build a data element transaction market across alliance chains and promote the safe circulation and fair transaction of data between enterprise alliances has become a problem that needs to be solved urgently. There is an urgent need to design an efficient, secure, fair, and privacy-protected data element transaction audit solution for cross-alliance chains to address the deficiencies in existing solutions and promote the development of data element transactions.
[0004] In the process of cross-alliance chain data element transactions, the two parties do not trust each other. Data buyers are worried that they will not be able to obtain the true and complete data element content after payment. Data sharers are worried that they will not be able to get the due compensation after delivering the data element content. Moreover, the alliance chain is a black box to the outside world. External entities cannot directly access the ledger of the alliance chain and verify the data on the alliance chain. The existing cross-alliance chain data element transaction solutions mainly focus on the ownership transfer and privacy protection of cross-alliance chain data elements, and cannot effectively deal with data fraud and payment repudiation that may occur in the process of cross-alliance chain data element transactions. Summary of the invention
[0005] To solve the above problems, the present invention provides a privacy-preserving data element transaction audit method for cross-alliance chains. By combining the characteristics of the alliance chain and the public chain, cross-alliance chain data element transactions and verifications are realized, and the authenticity and integrity of the data element content are ensured while protecting privacy. It can effectively deal with data fraud and payment repudiation that may occur in cross-alliance chain transactions.
[0006] A privacy-preserving data element transaction audit method for cross-alliance chains includes the following steps:
[0007] S1: The data element sharer maps the data element D to be released to an integer group Z of order q q Then publish the Pedersen commitment CM=g of data element D D h r mod p to the public chain, where G is a cyclic subgroup modulo p and order q, p is a large prime number, q is a large prime factor of p-1, g and h are two generators in the cyclic subgroup G, and h = g x , x is in Z q A secret value randomly selected from Z q Random numbers in ;
[0008] S2: The data element sharer uses the Shamir secret sharing algorithm to divide the data element D into two secret shards, and obtains the commitment of secret shard 2 and the data element integrity verification tag Tag;
[0009] S3: The data element sharer sends the commitment of secret shard 1 and secret shard 2 and the data element integrity verification tag Tag to the data element buyer off-chain; at the same time, the data element sharer publishes an audit contract instance AC;
[0010] S4: The data element buyer calculates the restoration commitment CM′ based on the received secret shard information, and then determines whether the restoration commitment CM′ is consistent with the on-chain commitment CM. If yes, proceed to step S5;
[0011] S5: The data element buyer generates a receipt certificate π for receiving the secret shard information, and inputs the receipt certificate π into the audit contract instance AC issued by the data sharer to wait for the data sharer to verify. If the verification is successful, proceed to step S6;
[0012] S6: The data element sharer publishes the pledge accountability contract instance SC and notifies the data element buyer off-chain that the pledge accountability contract instance SC has been published;
[0013] S7: After the data element buyer observes the pledge accountability contract instance SC published by the data element sharer on the chain, he verifies whether the content of the pledge accountability contract instance SC is correct. If yes, proceed to step S8;
[0014] S8: The data element buyer publishes the payment contract instance PC and notifies the data element sharer off-chain that the payment contract instance PC has been published;
[0015] S9: After the data element sharer observes the payment contract instance PC issued by the data element buyer on the chain, it verifies whether the content of the payment contract instance PC is correct. If so, the data element sharer inputs secret shard 2 into the payment contract instance PC. If the verification result of the payment contract instance PC on the secret shard 2 is true, PC enters the pre-payment waiting stage;
[0016] S10: The data element buyer calculates the data element restoration value D′ and the random number restoration value r′ based on the secret shard 2 input in the payment contract instance PC and the secret shard 1 received off-chain. The data element buyer verifies whether the data element restoration value D′ is the data element D to be purchased. If yes, proceed to S11; if not, proceed to S12;
[0017] S11: When the prepayment waiting time of the payment contract instance PC ends, the data element sharer's on-chain address / account receives the purchase token of the data element buyer locked in the payment contract instance PC, and the transaction is completed;
[0018] S12: The data element purchaser inputs the data element restoration value D′ and the random number restoration value r′ into the pledge accountability contract instance SC. If the input D′ and r′ meet the compensation conditions of the pledge accountability contract instance SC, the data element purchaser's on-chain address / account receives the pledge tokens of the data sharer locked in the pledge accountability contract instance SC as compensation.
[0019] Furthermore, the method for obtaining the two secret slices, the commitment of secret slice 2, and the data element integrity verification tag Tag in step S2 is specifically as follows:
[0020] S21: Data element sharers in integer group Z q Define two different first-order functions f1(x) and f2(x) above:
[0021] f1(x)=ax+D mod q
[0022] f2(x)=bx+r mod q
[0023] Where a and b are the coefficients of the first-order functions f1(x) and f2(x) respectively;
[0024] S22: Generate two sets of secret fragments based on the two points (1, f1(1)) and (2, f1(2)) taken on f1(x) and the two points (1, f2(1)) and (2, f2(2)) taken on f2(x):
[0025] Secret Shard 1 = (1, f1(1), f2(1))
[0026] Secret Shard 2 = (2, f1(2), f2(2))
[0027] S23: The data element sharer calculates and generates the Pedersen commitment EP of the second secret shard 2 as follows:
[0028]
[0029] Where, P2=f1(2), r2=f2(2);
[0030] S24: The data element sharer calculates the data element integrity verification tag Tag as follows:
[0031]
[0032] Among them, η1, η2 are the integer group Z of order s from which the data element sharers are derived. s A random number randomly selected from is the hash value of the timestamp of the current time, ζ is a random value related to the random numbers η1, η2, and:
[0033]
[0034] Where σ1 is an auxiliary variable related to H1(1), σ2 is an auxiliary variable related to H1(2), and H1 is {0, 1} * →Hash function on G1, H1(1) is the hash value of index 1 of secret shard 1, H2 is {0, 1} * →Z s H1(2) is the hash value of index 2 of secret shard 2, P1=f1(1), r1=f2(1), H2(EP) is the hash value of Pedersen commitment EP, u is a random number randomly selected by the data element sharer from the cyclic group G1 of order s, α is the private key in the public-private key pair (U,α), and α is a random number randomly selected from the integer group Z of order s. s The number selected in .
[0035] Furthermore, the calculation method of the reduction commitment CM′ is:
[0036]
[0037] Wherein, l1(0) is the value of the Lagrangian basis function of the point (1, f1(1)) on the first-order function f1(x) and the point (1, f2(1)) on f2(x) when x=0, and l2(0) is the value of the Lagrangian basis function of the point (2, f1(2)) on f1(x) and the point (2, f2(2)) on f2(x) when x=0.
[0038] Furthermore, the receipt proof π in step S5 is specifically:
[0039] π=(E c , E d ,E′ c ,E′ d , μ, κ, ζ)
[0040] Among them, E c =g2 c , E d =g2 d , c, d are integer groups Z from order s s The random numbers randomly selected in the random number generator are g1 and g2, respectively, which are the generators of the cyclic groups G1 and G2 of order s. μ and κ are auxiliary variables, and:
[0041] μ=c+((P1+r1)*η2+H2(EP)*η1
[0042]
[0043] Furthermore, in step S5, the receipt proof π is input into the audit contract instance AC issued by the data sharer to wait for the data sharer to verify it. The specific verification method is:
[0044] S51: Determine whether the following conditions are met. If yes, proceed to step S52. If no, verification fails:
[0045] e(E′ c ,E c ) = e(g1, g2)
[0046] e(E′ d ,E d ) = e(g1, g2)
[0047] Among them, e() is defined in G1×G2→G T Bilinear mapping on ;
[0048] S52: Determine whether the following conditions are met. If yes, the verification is successful; if no, the verification fails:
[0049]
[0050] Among them, U is the public key in the public-private key pair (U, α), g2 is a generator of the cyclic group G2 of order s.
[0051] Furthermore, in step S7, the method for the data element purchaser to verify whether the content of the pledge accountability contract instance SC is correct is:
[0052] S71: The amount locked for data sharers is V d of staked tokens, of which V d ≥ the price of data element D;
[0053] S72: Call the cross-chain smart contract and query the consortium chain ledger with the consortium chain identifier CID to obtain the data element certificate (ID_D, Hash(D), Sig(Hash(D))) with the identifier ID_D, where ID_D is the identifier of the data element D, Hash(D) is the hash value of the data element D, and Sig(Hash(D)) is the digital signature of the data sharer;
[0054] S73: Determine the compensation condition g within T1 time after the release of the pledge accountability contract instance SC D′ h r′ =CM∧Hash(D′)≠Hash(D) is true, if so, the locked amount is V d The pledged tokens are transferred to the data buyer's address / account PA. If not, the locked amount is V d The pledged tokens are returned to the address / account PA of the data sharer; T1 is the accountability time after the release of the pledge accountability contract instance SC, which is set by the data element sharer, and the data element buyer needs to judge whether the T1 setting is reasonable; Hash(D) is the hash value of the data element D, (D′, r′) is the restored value of the revealed value (D, r) of the commitment CM calculated by the data buyer after the data sharer delivers the secret shard 2 and combines the secret shard 1, D′ is the restored value of the data element D, r′ is the restored value of the random number r, and Hash(D′) is the hash value of D′ input by the data buyer into the pledge accountability contract instance SC.
[0055] Furthermore, in step S9, the method for the data element sharer to verify whether the content of the payment contract instance PC is correct is:
[0056] S91: The amount locked for data buyers is V b of purchase tokens, of which V b =Price of data element D;
[0057] S92: Determine the prepayment conditions within the time period T2-T3 Is it true? If yes, after waiting for T3 time, the locked amount will be V b The purchase tokens are transferred to the data sharer's address / account PA; if not, after waiting for T2 time, the locked amount will be V b The pledged tokens are returned to the address / account BA of the data purchaser; among them, T2 is the purchase refund time set by the data element purchaser, and T3 is the verification and accountability reserved time set by the data element purchaser. Among them, the data element sharer needs to judge whether the settings of T2 and T3 are reasonable, that is, T2>T3, P2' and r2' are respectively the revealed values of the commitment EP entered by the data element sharer to the verification payment contract instance PC when verifying the payment contract instance PC.
[0058] Furthermore, in step S10, the method for proving that the data element D′ restored by the data element purchaser is the data element D promised by the data sharer is specifically as follows:
[0059] S101: The data element buyer uses (P2, r2) within T3, combined with the first secret shard 1 received off-chain, and substitutes Shamir's secret recovery formula off-chain to calculate the recovery value D′ of the data element D:
[0060] D'=P1*l1(0)+P2*l2(0)mod q
[0061] =P1*2+P2*(-1)mod q
[0062] r′=r1*l1(0)+r2*l2(0)mod q
[0063] =r1*2+r2*((-1)mod q
[0064] Wherein, l1(0) is the value of the Lagrangian basis function of the point (1, f1(1)) on the first-order function f1(x) and the point (1, f2(1)) on f2(x) at x=0, l2(0) is the value of the Lagrangian basis function of the point (2, f1(2)) on f1(x) and the point (2, f2(2)) on f2(x) at x=0;
[0065] S102: The data element purchaser uses the same hash function as the evidence of data element D on the alliance chain to calculate Hash(D');
[0066] S103: The data element purchaser calls the cross-chain query contract, inputs the alliance chain identifier CID and the evidence identifier ID_D of the data element D as query parameters, and queries the alliance chain evidence of the data element D: (ID_D, Hash(D), Sig(Hash(D))). If Hash(D′)=Hash(D)∧Decrypt(Sig(Hash(D)),PK), it proves that the data element D' restored by the data element purchaser is the data element D to be purchased.
[0067] Beneficial effects:
[0068] 1. The present invention provides a privacy-preserving data element transaction audit method for cross-alliance chains. By combining the zero-knowledge proof constructed by Pedersen commitment and Shamir secret sharing technology, the data element sharer can prove to the data element buyer that the data element shard information it receives is consistent with the data element commitment without exposing the content of the data element, thereby ensuring privacy protection and data authenticity audit during the data element transaction process, and effectively dealing with data fraud problems that may occur during cross-alliance chain transactions. .
[0069] 2. The present invention provides a privacy-preserving data element transaction audit method for cross-alliance chains. It uses difficult problems on bilinear groups to form an integrity audit scheme based on elliptic curve bilinear mapping. It allows data element buyers to provide receipts to prove that they have received the data element shard information without exposing the data element shard information. This can effectively prevent the problem of data buyers denying payment that may occur during cross-alliance chain transactions.
[0070] 3. The present invention provides a privacy-preserving data element transaction audit method for cross-alliance chains. By deploying smart contracts on the public chain to manage the data transaction process, including data verification, payment and accountability, data sharers store the evidence of data elements on the alliance chain and publish the Pedersen commitment of data elements on the public chain to ensure the privacy, authenticity and integrity of the data. Data buyers publish payment contract instances on the public chain, lock tokens with the same value as the data elements, and ensure that tokens are automatically paid after data verification, thereby realizing an efficient and secure cross-chain payment mechanism.
[0071] 4. The present invention provides a privacy-preserving data element transaction audit method for cross-alliance chains. Through the smart contract on the public chain, the data sharer pledges a certain number of tokens as a guarantee, and uses cross-chain tools to verify the authenticity of the data content to ensure the fairness of the transaction; if the data content is proved to be forged, the data buyer can trigger the pledge accountability contract and obtain the tokens pledged by the data sharer as compensation, ensuring that the data sharer bears responsibility and ensuring the fairness and transparency of the transaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 A flowchart of a privacy-preserving data element transaction audit method for cross-alliance chains provided by the present invention. DETAILED DESCRIPTION
[0073] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0074] The purpose of the present invention is to address the deficiencies in the prior art, and to solve the problems of privacy protection, authenticity protection and fairness protection of data content in the process of data element transactions across alliance chains. A privacy protection data element transaction audit method for cross-alliance chains is proposed. The method combines cross-chain technology, zero-knowledge proof and smart contracts, and makes full use of the characteristics of alliance chains and relay chains to ensure privacy protection and transaction fairness in the process of data transactions. Specifically, by storing data evidence on the alliance chain, using smart contracts executed on the relay chain for data verification and payment management, and combining Pedersen commitments and Shamir secret sharing technology to construct zero-knowledge proofs, while protecting data privacy, audit the authenticity of data transactions and prevent data fraud. In addition, the method introduces a data element integrity audit mechanism based on bilinear mapping, which allows the receipt of data elements to be verified without revealing data privacy, effectively solving the problem of payment repudiation.
[0075] It should be noted that before the transaction audit, the smart contract code needs to be deployed on the chain; specifically, the system uploads and deploys the following three smart contract codes to the public chain for use (instantiation) in subsequent steps.
[0076] The specific smart contract code includes:
[0077] 1. Cross-chain query contract logic: The cross-chain query contract is used to access the alliance chain ledger and find the evidence of data element D on the alliance chain.
[0078] Contract input: target alliance chain identifier CID, query parameter Query = (data element D’s evidence identifier ID_D on the alliance chain).
[0079] Contract operation:
[0080] 1. Use cross-chain tools to access the consortium chain based on the consortium chain identifier CID.
[0081] 2. Perform a query operation on the alliance based on the query parameter Query to find the evidence information that matches the data element identifier.
[0082] Contract output: Evidence of data element D on the consortium chain: (ID_D, Hash(D), Sig(Hash(D))
[0083] 2. Audit contract logic: The audit contract is used to verify the receipt proof generated by the data buyer based on the shard content after receiving the data element secret shard (including the plaintext 1 of a secret shard and the commitment EP of another secret shard 2). If the verification is true, it proves that the data buyer has indeed received the correct and complete shard information.
[0084] Contract input:
[0085] Input published by the contract: random values u,η1,η2 in the integrity tag of the data element.
[0086] Contract verification input: Data buyer inputs shard receipt proof: π = (E c ,E d ,E′ c ,E′ d ,μ,к,ζ)
[0087] Contract operation:
[0088] 1. Verification:
[0089] e(E' c ,E c )=e(g1,g2)
[0090] e(E' d ,E d ) = e(g1, g2)
[0091] Is it true? If so, proceed to the next step, otherwise the verification fails.
[0092] 2. Verification:
[0093]
[0094] Is it true? If so, the verification succeeds, otherwise the verification fails.
[0095] Contract output: return verification result
[0096] 3. Pledge accountability contract logic: The pledge accountability contract is used by data sharers to pledge tokens to ensure that they have indeed promised the real data element D in CM and have not used false data. If the data sharer is proved by the data buyer to have promised forged data elements in CM, which is inconsistent with the evidence stored on the alliance chain, the tokens pledged by the data sharer will be transferred to the data buyer as compensation.
[0097] Contract input:
[0098] 1. Inputs of contract release: data buyer address / account BA, data sharer address / account PA, data sharer pledge token amount V d , alliance chain identifier CID, data element evidence identifier ID_D.
[0099] 2. Input of conditions in the contract:
[0100] a) Input of compensation conditions: the revealed values D′ and r′ of the on-chain commitment CM published by the data sharer.
[0101] b) Input of refund conditions: token staking time T1.
[0102] Contract operation:
[0103] 1. The amount locked for data sharers is V d (V d ≥Data Element D Price) of pledged tokens.
[0104] 2. Call the cross-chain smart contract, query the consortium chain ledger identified as CID, and obtain the data element certificate identified as ID_D (ID_D, Hash(D), Sig(Hash(D))).
[0105] 3. If the compensation conditions are met within T1 time after the contract is released: g D′ h r′ =CM∧Hash(D′)≠Hash(D), then the locked pledge tokens (amount is V d ) Transfer to the data buyer’s address / account PA.
[0106] 4. After the T1 time of the contract release, if the compensation conditions are still not met, the locked staked tokens will be returned to the data sharer address / account PA.
[0107] Contract output: compensation or refund
[0108] 4. Payment contract logic: The payment contract is used when the data sharer trades honestly. The data sharer will give the shard restoration information of data element D to the data buyer. At the same time, the data buyer pays the data sharer an amount of tokens equal to the price of data element D.
[0109] Contract input:
[0110] 1. Inputs of contract release: data sharer address / account PA, data buyer address / account BA, data buyer's purchase token V b .
[0111] 2. Input of conditions in the contract:
[0112] a) Input of prepayment conditions: the revealed values P2′ and r2′ of the secret shard commitment EP of the data element D sent by the data sharer to the data buyer off-chain.
[0113] b) Input of purchase capital refund conditions: time T2.
[0114] c) Reserve time for verification and accountability: time T3.
[0115] Contract operation:
[0116] 1. The amount locked for data buyers is V b (V b =Token of data element D price).
[0117] 2. If the prepayment conditions are met within T2-T3 after the contract is released: After the prepayment conditions are met, after waiting for T3 time, the locked purchase tokens will be transferred to the data sharer address / account PA.
[0118] 3. After the T2 time of the contract release, if the pre-payment conditions are still not met, the locked staked tokens will be returned to the data buyer's address / account BA.
[0119] Specifically, Figure 1 As shown, a privacy-preserving data element transaction audit method for cross-alliance chains includes the following steps:
[0120] Default (step 0): The data element sharer leaves a certificate of data element D on the alliance chain (ID_D, Hash(D), Sig(Hash(D)). Among them, ID_D is the identifier of data element D, Hash(D) is the hash value of data element D, and Sig(Hash(D)) is the digital signature of the data sharer.
[0121] Then, public parameters are generated; specifically, the system selects the Pedersen commitment public parameters (G, λ, p, q, g, h). Among them, the security parameter λ is a parameter used to determine the security of the scheme. After λ is determined, p is a large prime number with a bit length of λ bits. q is another large prime number, and q is a large prime number subgroup of p-1. G is a cyclic subgroup with a modulus of p and an order of q. g is a generator in the cyclic group G. h is another generator in the cyclic group G, satisfying h=g x , where x is in Z q A secret value randomly selected from the system. The system selects the public parameters of the integrity audit algorithm, and lets g1 and g2 be the generators of the cyclic groups G1 and G2 respectively, and e is defined in G1×G2→G T bilinear map on s, s is a cyclic group G1, G2, G T Choose a cryptographic hash function H1: {0,1}* →G1, H2:{0,1} * →Zs and H3:{0,1} * →{0,1} * The system generates a public-private key pair (U, α) for integrity auditing, where U = g2 α , α is the integer group Z of order s s The number selected in .
[0122] S1: The data element sharer maps the data element D to be released to an integer group Z of order q q Then publish the Pedersen commitment CM=g of data element D D h r mod p to the public chain, where G is a cyclic subgroup modulo p and order q, p is a large prime number, q is a large prime factor of p-1, g and h are two generators in the cyclic subgroup G, and h = g x , x is in Z q A secret value randomly selected from Z q Random numbers in ;
[0123] S2: The data element sharer uses the Shamir secret sharing algorithm to divide the data element D into two secret shards, and obtains the commitment of secret shard 2 and the data element integrity verification tag Tag;
[0124] Specifically, the method for obtaining the two secret slices, the commitment of secret slice 2, and the data element integrity verification tag Tag in step S2 is as follows:
[0125] S21: Data element sharers in integer group Z q Define two different first-order functions f1(x) and f2(x) above:
[0126] f1(x)=ax+D mod q
[0127] f2(x)=bx+r mod q
[0128] Where a and b are the coefficients of the first-order functions f1(x) and f2(x) respectively;
[0129] S22: Generate two sets of secret fragments based on the two points (1, f1(1)) and (2, f1(2)) taken on f1(x) and the two points (1, f2(1)) and (2, f2(2)) taken on f2(x):
[0130] Secret Shard 1 = (1, f1(1), f2(1))
[0131] Secret Shard 2 = (2, f1(2), f2(2))
[0132] S23: The data element sharer calculates and generates the Pedersen commitment EP of the second secret shard 2 as follows:
[0133]
[0134] Where, P2=f1(2), r2=f2(2);
[0135] S24: The data element sharer calculates the data element integrity verification tag Tag as follows:
[0136]
[0137] Among them, η1, η2 are the integer group Z of order s from which the data element sharers are derived. s A random number randomly selected from is the hash value of the timestamp of the current time, ζ is a random value related to the random numbers η1, η2, and:
[0138]
[0139] Where σ1 is an auxiliary variable related to H1(1), σ2 is an auxiliary variable related to H1(2), H1 is a hash function on {0, 1}→G1, H1(1) is the hash value of index 1 of secret shard 1, and H2 is {0, 1}→Z s H1(2) is the hash value of index 2 of secret shard 2, P1=f1(1), r1=f2(1), H2(EP) is the hash value of Pedersen commitment EP, u is a random number randomly selected by the data element sharer from the cyclic group G1 of order s, α is the private key in the public-private key pair (U,α), and α is a random number randomly selected from the integer group Z of order s. s The number selected in .
[0140] S3: The data element sharer sends the secret shard 1: (1, P1, r1), the commitment of the secret shard 2: (2, EP), and the data element integrity verification tag Tag to the data element buyer off-chain; at the same time, the data element sharer publishes an audit contract instance AC;
[0141] S4: The data element buyer calculates the restoration commitment CM′ based on the received secret shard information, and then determines whether the restoration commitment CM′ is consistent with the on-chain commitment CM. If yes, proceed to step S5;
[0142] Specifically, the calculation method of the restoration commitment CM′ is:
[0143]
[0144] If CM′ is equal to the commitment on the chain, it proves that the secret shard information received by the data element buyer is consistent with the commitment on the chain. The derivation process is as follows:
[0145]
[0146] (D′, r′ are D, r restored by Lagrange interpolation method)
[0147] Among them, because the horizontal coordinates of the points on f1(x) and f2(x) are the same (both 1 and 2) when slicing, the point (1,f1(1)) on f1(x) and the point (1,f2(1)) on f2(x) have the same Lagrange basis function: The point (2,f1(2)) has the same Lagrangian basis function as the point (2,f2(2)): When x=0,
[0148] S5: The data element buyer generates a receipt certificate π for receiving the secret shard information, and inputs the receipt certificate π into the audit contract instance AC published by the data sharer for verification. If the verification passes, proceed to step S6;
[0149] Specifically, according to the received in step S3 The specific method of generating receipt proof π is:
[0150] π=(E c , E d ,E′ c ,E′ d , μ, κ, ζ)
[0151] Among them, E c =g2 c , E d =g2 d , c, d are integer groups Z from order s s The random numbers randomly selected in the random number generator are g1 and g2, respectively, which are the generators of the cyclic groups G1 and G2 of order s. μ and κ are auxiliary variables, and:
[0152] μ=c+(P1+r1)*η2+H2(EP)*η1
[0153] Note that when π is input into the audit contract instance AC, it is necessary to wait for the data sharer to verify and return the verification result, rather than the audit contract automatically verifying it. Based on this, the receipt proves π = (E c , E d , E′ c, E′ d , μ, κ, ζ) are input into the audit contract instance AC published by the data sharer for verification as follows:
[0154] S51: Determine whether the following conditions are met. If yes, proceed to step S52. If no, verification fails:
[0155] e(E′ c , E c ) = e(g1, g2)
[0156] e(E′ d , E d ) = e(g1, g2)
[0157] Among them, e() is defined in G1×G2→G T Bilinear mapping on ;
[0158] S52: Determine whether the following conditions are met. If yes, the verification is successful; if no, the verification fails:
[0159]
[0160] Among them, U is the public key in the public-private key pair (U, α), g2 is a generator of the cyclic group G2 of order s.
[0161] S6: The data element sharer publishes the pledge accountability contract instance SC and notifies the data element buyer off-chain that the pledge accountability contract instance SC has been published;
[0162] That is to say, if the output of the audit contract instance AC is verified, the data element sharer publishes the pledge accountability contract instance SC. The release input of the pledge accountability contract instance SC is: data buyer address / account BA, data sharer address / account PA, the amount of pledge tokens that the data sharer will lock V d , which contains the alliance chain identifier CID of the data element D certificate, the data element certificate identifier ID_D, and the pledge return time T1. After publishing the contract instance SC, the data element sharer notifies the data buyer off-chain that the pledge accountability contract instance has been published.
[0163] S7: After the data element buyer observes the pledge accountability contract instance SC published by the data element sharer on the chain, he verifies whether the content of the pledge accountability contract instance SC is correct. If yes, proceed to step S8;
[0164] Specifically, the method for the data element buyer to verify whether the content of the pledge accountability contract instance SC is correct is:
[0165] S71: The amount locked for data sharers is Vd pledged tokens, where V d ≥ the price of data element D;
[0166] S72: Invoke the cross-chain smart contract and query the consortium chain ledger with the consortium chain identifier CID to obtain the deposit of data element with the identifier ID_D (ID_D, Hash(D), Sig(Hash(D))), where ID_D is the identifier of data element D, Hash(D) is the hash value of data element D, and Sig(Hash(D)) is the digital signature of the data sharer;
[0167] S73: Determine whether the compensation condition g D′ h r′ = CM ∧ Hash(D′) ≠ Hash(D) holds. If yes, transfer the pledged tokens with the amount V d to the address / account PA of the data purchaser. If no, return the pledged tokens with the amount V d to the address / account PA of the data sharer; where T1 time is the accountable time after the release of the pledge liability contract instance SC, which is set by the data element sharer. The data element purchaser needs to judge whether the T1 setting is reasonable; Hash(D) is the hash value of data element D, (D′, r′) is the restored value of the revealed value (D, r) of the commitment CM calculated by the data purchaser after the data sharer delivers the secret shard 2 in combination with the secret shard 1. D′ is the restored value of data element D, r′ is the restored value of the random number r, and Hash(D′) is the hash value of D′ input by the data purchaser into the pledge liability contract instance SC.
[0168] S8: The data element purchaser releases the payment contract instance PC and notifies the data element sharer off-chain that the payment contract instance PC has been released;
[0169] That is to say, after the data element purchaser observes the pledge liability contract instance SC released by the data element sharer on the chain, verifies that the content of the contract instance SC is correct, and approves that the refund time T1 set in SC is reasonable. Then the payment contract instance PC is released. The input for the release of the payment contract instance PC is: the data sharer address / account PA, the data purchaser address / account BA, the purchase tokens V b that the data purchaser is going to lock, as well as the purchase fund refund time T2 and the verification and liability reservation time T3, where it is necessary to ensure that T3 < T2 < T1. After releasing the contract instance PC, the data element purchaser notifies the data element sharer off-chain that the payment contract instance has been released.
[0170] S9: After the data element sharer observes the payment contract instance PC issued by the data element buyer on the chain, it verifies whether the content of the payment contract instance PC is correct. If so, the data element sharer inputs secret shard 2 into the payment contract instance PC. If the verification result of the payment contract instance PC on the secret shard 2 is true, PC enters the pre-payment waiting stage;
[0171] Specifically, the method for the data element sharer to verify whether the content of the payment contract instance PC is correct is:
[0172] S91: The amount locked for data buyers is V b of purchase tokens, of which V b =Price of data element D;
[0173] S92: Determine the prepayment conditions within the time period T2-T3 Is it true? If yes, after waiting for T3 time, the locked amount will be V b The purchase tokens are transferred to the data sharer's address / account PA; if not, after waiting for T2 time, the locked amount will be V b The pledged tokens are returned to the address / account BA of the data purchaser; among them, T2 is the purchase refund time set by the data element purchaser, and T3 is the verification and accountability reserved time set by the data element purchaser. Among them, the data element sharer needs to judge whether the settings of T2 and T3 are reasonable, that is, T2>T3, P2' and r2' are respectively the revealed values of the commitment EP entered by the data element sharer to the verification payment contract instance PC when verifying the payment contract instance PC.
[0174] S10: The data element buyer calculates the data element restoration value D′ and the random number restoration value r′ based on the secret shard 2 input in the payment contract instance PC and the secret shard 1 received off-chain. The data element buyer verifies (based on the alliance chain evidence) whether the data element restoration value D′ is the data element D to be purchased. If yes, proceed to S11; if not, proceed to S12;
[0175] Specifically, the method for proving that the data element D′ restored by the data element purchaser is the data element D promised by the data sharer is as follows:
[0176] S101: The data element buyer uses (P2, r2) within T3, combined with the first secret shard 1 received off-chain, and substitutes Shamir's secret recovery formula off-chain to calculate the recovery value D' of the data element D:
[0177]
[0178] r′=r1*l1(0)+r2*l2(0)mod q
[0179] =r1*2+r2**(-1)mod q
[0180] Wherein, l1(0) is the value of the Lagrangian basis function of the point (1, f1(1)) on the first-order function f1(x) and the point (1, f2(1)) on f2(x) at x=0, l2(0) is the value of the Lagrangian basis function of the point (2, f1(2)) on f1(x) and the point (2, f2(2)) on f2(x) at x=0;
[0181] S102: The data element purchaser uses the same hash function as the evidence of data element D on the alliance chain to calculate Hash(D′);
[0182] S103: The data element purchaser calls the cross-chain query contract, inputs the consortium chain identifier CID and the evidence identifier ID_D of the data element D as query parameters, and queries the consortium chain evidence of the data element D: (ID_D, Hash(D), Sig(Hash(D))). If Hash(D') = Hash(D)∧Decrypt(Sig(Hash(D)), PK), it proves that the data element D' restored by the data element purchaser is the data element D to be purchased.
[0183] S11: When the prepayment waiting time of the payment contract instance PC ends, the data element sharer's on-chain address / account receives the purchase token of the data element buyer locked in the payment contract instance PC, and the transaction is completed;
[0184] S12: The data element purchaser inputs the data element restoration value D′ and the random number restoration value r′ into the pledge accountability contract instance SC. If the input D′ and r′ meet the compensation conditions of the pledge accountability contract instance SC, the data element purchaser's on-chain address / account receives the pledge tokens of the data sharer locked in the pledge accountability contract instance SC as compensation.
[0185] That is to say, after the data element sharer observes the payment contract instance PC issued by the data element buyer on the chain, he verifies that the content of the contract instance PC is correct, and recognizes that the purchase refund time T2 and the verification and accountability reserved time T3 set in the PC are reasonable. The data element sharer inputs the value of the secret shard 2 of the data element D into the payment contract instance PC: (P2, r2), which is also the revealed value of the commitment EP. If the prepayment condition of the contract instance PC is met, the data element buyer uses (P2, r2) within T3, combined with the secret shard 1 received previously off-chain: (P1, r1), and substitutes the Shamir secret reduction formula off-chain to calculate the reduced value D' of the data element D:
[0186] D'=P1*l1(0)+P2*l2(0)mod q
[0187] =P1*2+P2*((-1)mod q
[0188] The data element buyer then uses the same hash function as the evidence of data element D on the consortium chain to calculate Hash(D'). After that, the data element buyer calls the cross-chain query contract, inputs the consortium chain identifier CID and the evidence identifier ID_D of data element D as query parameters, and queries the consortium chain evidence of data element D: (ID_D, Hash(D), Sig(Hash(D))). If Hash(D')=Hash(D)∧Decrypt(Sig(Hash(D)),PK), it proves that the data element D' restored by the data element buyer is the data element D to be purchased. After the prepayment waiting time of the payment contract instance PC ends, the data element sharer's on-chain address / account receives the purchase token locked in the contract instance PC, and the transaction is completed. During this process, although any observer on the public chain can observe the pre-payment condition input in the payment contract instance, namely secret shard 2: (P2, r2), due to the lack of secret shard 1, other on-chain observers cannot restore data element D except for the data element purchaser and data element sharer who hold secret shard 1 in advance.
[0189] If the restored data element restoration value D' does not satisfy Hash(D') = Hash(D), it means that the data element sharer has placed a forged data element D in the on-chain commitment CM. Specifically, the data element buyer inputs the data element restoration value D' and the committed random number restoration value into the pledge accountability contract instance SC:
[0190] r′=r1*l1(0)+r2*l2(0)=r1*2+r2*(-1)mod q
[0191] As verified in step 4, the secret shard information corresponds to the on-chain commitment CM, and D' and r' are calculated by restoring the secret shard information. Therefore, D' and r' correspond to CM, so CM = g D′ h r′ .
[0192] CM is the commitment of the data element sharer to the data element D, and Hash(D')≠Hash(D), combined with the binding of the commitment, it can be seen that the data element D cannot be the revealed value of the on-chain commitment CM, thus proving that the data sharer has promised a false data element. At this time, the data element buyer enters D',r' of the pledge accountability contract instance SC to meet the compensation conditions, and the data element buyer's address / account receives the data sharer's pledge token locked in the contract instance SC as compensation.
[0193] In summary, existing cross-chain data solutions mainly focus on the privacy protection of cross-chain data, and cannot effectively deal with data fraud and payment repudiation that may occur during cross-consortium chain transactions. Compared with other solutions, the present invention has the following significant advantages in terms of privacy protection, transaction fairness, and data authenticity verification:
[0194] 1. Privacy protection: By storing data on the consortium chain and using the off-chain zero-knowledge proof built with Pedersen commitment and Shamir secret sharing technology, the privacy of data elements during verification and transaction processes is ensured to prevent data leakage and abuse.
[0195] 2. Transaction fairness: By utilizing the openness, transparency and decentralization of the public chain and combining it with smart contracts, the pledge accountability mechanism and payment verification mechanism designed ensure that the interests of honest parties in the transaction will not be harmed, achieve fairness and transparency in the transaction process, and prevent fraud by both parties.
[0196] 3. Data element authenticity and integrity audit: Through cross-chain technology, data authenticity audit scheme based on zero-knowledge proof and data element integrity audit scheme based on elliptic curve bilinear mapping, the authenticity and integrity of data elements in the transaction process are ensured, providing a reliable verification mechanism to prevent data forgery and tampering.
[0197] Of course, the present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may certainly make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.
Claims
1. A privacy-preserving data element transaction audit method for cross-alliance chains, It is characterized in that The following steps are involved: S1: The data element sharer maps the data element D to be released to an integer group Z of order q q Then publish the Pedersen commitment CM=g of data element D D h r mod p to the public chain, where G is a cyclic subgroup modulo p and order q, p is a large prime number, q is a large prime factor of p-1, g and h are two generators in the cyclic subgroup G, and h = g x , x is in Z q A secret value randomly selected from Z q Random numbers in ; S2: The data element sharer uses the Shamir secret sharing algorithm to divide the data element D into two secret shards, and obtains the commitment of secret shard 2 and the data element integrity verification tag Tag; S3: The data element sharer sends the commitment of secret shard 1 and secret shard 2 and the data element integrity verification tag Tag to the data element buyer off-chain; at the same time, the data element sharer publishes an audit contract instance AC; S4: The data element buyer calculates the restoration commitment CM′ based on the received secret shard information, and then determines whether the restoration commitment CM′ is consistent with the on-chain commitment CM. If yes, proceed to step S5; S5: The data element buyer generates a receipt certificate π for receiving the secret shard information, and inputs the receipt certificate π into the audit contract instance AC issued by the data sharer to wait for the data sharer to verify. If the verification is successful, proceed to step S6; S6: The data element sharer publishes the pledge accountability contract instance SC and notifies the data element buyer off-chain that the pledge accountability contract instance SC has been published; S7: After the data element buyer observes the pledge accountability contract instance SC published by the data element sharer on the chain, he verifies whether the content of the pledge accountability contract instance SC is correct. If yes, proceed to step S8; S8: The data element buyer publishes the payment contract instance PC and notifies the data element sharer off-chain that the payment contract instance PC has been published; S9: After the data element sharer observes the payment contract instance PC issued by the data element buyer on the chain, it verifies whether the content of the payment contract instance PC is correct. If so, the data element sharer inputs secret shard 2 into the payment contract instance PC. If the verification result of the payment contract instance PC on the secret shard 2 is true, PC enters the pre-payment waiting stage; S10: The data element buyer calculates the data element restoration value D′ and the random number restoration value r′ based on the secret shard 2 input in the payment contract instance PC and the secret shard 1 received off-chain. The data element buyer verifies whether the data element restoration value D′ is the data element D to be purchased. If yes, proceed to S11; if not, proceed to S12; S11: When the prepayment waiting time of the payment contract instance PC ends, the data element sharer's on-chain address / account receives the purchase token of the data element buyer locked in the payment contract instance PC, and the transaction is completed; S12: The data element purchaser inputs the data element restoration value D′ and the random number restoration value r′ into the pledge accountability contract instance SC. If the input D′ and r′ meet the compensation conditions of the pledge accountability contract instance SC, the data element purchaser's on-chain address / account receives the pledge tokens of the data sharer locked in the pledge accountability contract instance SC as compensation.
2. A privacy-preserving data element transaction audit method for cross-alliance chains as claimed in claim 1, It is characterized in that The method for obtaining the two secret slices, the commitment of secret slice 2, and the data element integrity verification tag Tag in step S2 is specifically as follows: S21: Data element sharers in integer group Z q Define two different first-order functions f 1 (x) and f 2 (x): f 1 (x)=ax+D mod q f 2 (x)=bx+r mod q Where a and b are first-order functions f 1 (x) and f 2 The coefficient of (x); S22: According to f 1 (x) takes two points (1,f 1 (1))、(2,f 1 (2)), f 2 (x) takes two points (1,f 2 (1))、(2,f 2 (2)) Generate two sets of secret shards: Secret Shard 1 = (1,f 1 (1),f 2 (1)) Secret Shard 2 = (2,f 1 (2),f 2 (2) S23: The data element sharer calculates and generates the Pedersen commitment EP of the second secret shard 2 as follows: Among them, P 2 =f 1 (2), r 2 =f 2 (2); S24: The data element sharer calculates the data element integrity verification tag as follows: Among them, η 1 ,η 2 For data element sharers from the integer group Z of order s s A random number randomly selected from The hash value of the current timestamp. is the random number η 1 ,η 2 The random values are: Among them, σ 1 For H 1 (1) Related auxiliary variables, σ 2 For H 1 (2) Related auxiliary variables, H 1 is {0, 1} * →G 1 The hash function on 1 (1) is the hash value of index 1 of secret shard 1, H 2 is {0, 1} * →Z s The hash function on 1 (2) is the hash value of index 2 of secret shard 2, P 1 =f 1 (1), r 1 =f 2 (1), H 2 (EP) is the hash value of the Pedersen commitment EP, and u is the data element sharer from the cyclic group G of order s. 1 A randomly selected random number, α is the private key in the public-private key pair (U, α), and α is a random number from the integer group Z of order s. s The number selected in .
3. A privacy-preserving data element transaction audit method for cross-alliance chains as claimed in claim 2, It is characterized in that The calculation method of restoration commitment CM′ is: Among them, l 1 (0) is the first-order function f 1 (x) is a point (1, f 1 (1)) and f 2 (x) is a point (1, f 2 (1)) is the value of the Lagrangian basis function at x = 0, l 2 (0) is f 1 (x) is a point (2, f 1 (2)) and f 2 (x) is a point (2, f 2 (2)) is the value of the Lagrangian basis function at x = 0.
4. A privacy-preserving data element transaction audit method for cross-alliance chains as claimed in claim 2, It is characterized in that The receipt proof π in step S5 is specifically: π=(E c ,E d ,E′ c ,E′ d ,m,k,g) Among them, E c =g 2 c , E d =g 2 d , c, d are integer groups Z from order s s A random number selected randomly from 1 , g 2 are cyclic groups G of order s 1 , G 2 The generator of , μ, κ are auxiliary variables, and there are: μ=c+(P 1 +r 1 )*η 2 +H 2 (EP)*η 1 5. A privacy-preserving data element transaction audit method for cross-alliance chains as claimed in claim 4, It is characterized in that In step S5, the receipt proof π is input into the audit contract instance AC published by the data sharer and waits for the data sharer to verify it. The specific verification method is: S51: Determine whether the following conditions are met. If yes, proceed to step S52. If no, verification fails: e(E′ c ,E c )=e(g 1 ,g 2 ) e(E′ d ,E d )=e(g 1 ,g 2 ) Among them, e() is defined in G 1 ×G 2 →G T Bilinear mapping on ; S52: Determine whether the following conditions are met. If yes, the verification is successful; if no, the verification fails: Among them, U is the public key in the public-private key pair (U, α), g 2 is a cyclic group G of order d 2 The generator of .
6. A privacy-preserving data element transaction audit method for cross-alliance chains as claimed in claim 4, It is characterized in that In step S7, the method for the data element buyer to verify whether the content of the pledge accountability contract instance SC is correct is: S71: The amount locked for data sharers is V d of staked tokens, of which V d ≥ the price of data element D; S72: Call the cross-chain smart contract and query the consortium chain ledger with the consortium chain identifier CID to obtain the data element certificate (ID_D, Hash(D), Sig(Hash(D))) with the identifier ID_D, where ID_D is the identifier of the data element D, Hash(D) is the hash value of the data element D, and Sig(Hash(D)) is the digital signature of the data sharer; S73: Determine the T after the release of the pledge accountability contract instance SC 1 Time, compensation conditions D′ h r′ =CM∧Hash(D′)≠Hash(D) is true, if so, the locked amount is V d The pledged tokens are transferred to the data buyer's address / account PA. If not, the locked amount is V d The pledged tokens are returned to the data sharer’s address / account PA; among them, T 1 Time is the accountability time after the pledge accountability contract instance SC is released, which is set by the data element sharer. Among them, the data element buyer needs to judge T 1 Whether the settings are reasonable; Hash(D) is the hash value of the data element D, (D′, r′) is the restored value of the revealed value (D, r) of the commitment CM calculated by the data buyer after the data sharer delivers the secret shard 2 and combines the secret shard 1, D′ is the restored value of the data element D, r′ is the restored value of the random number r, and Hash(D′) is the hash value of D′ input by the data buyer into the pledge accountability contract instance SC.
7. A privacy-preserving data element transaction audit method for cross-alliance chains as claimed in claim 4, It is characterized in that In step S9, the method by which the data element sharer verifies whether the content of the payment contract instance PC is correct is: S91: The amount locked for data buyers is V b of purchase tokens, of which V b =Price of data element D; S92: Judge T 2 -T 3 Within the time, prepayment conditions Is it true? If yes, wait for T 3 After the time, the locked amount will be V b The purchase tokens are transferred to the data sharer's address / account PA; if not, wait for T 2 After the time, the locked amount will be V b The pledged tokens are returned to the data buyer’s address / account BA; among them, T 2 The purchase refund time set for the data element buyer, T 3 The verification and accountability time set for data element buyers, among which the data element sharer needs to judge T 2 and T 3 Is the setting reasonable? 2 >T 3 , P 2 ' and r 2 'They are respectively the revealed values of the commitment EP input by the data element sharer to the verification of the payment contract instance PC when verifying the payment contract instance PC.
8. A privacy-preserving data element transaction audit method for cross-alliance chains as claimed in claim 7, It is characterized in that In step S10, the method of proving that the data element D′ restored by the data element purchaser is the data element D promised by the data sharer is specifically as follows: S101: Data element buyers are in T 3 Use within time (P 2 ,r 2 ), combined with the first secret shard 1 received off-chain, substitute the Shamir secret recovery formula off-chain to calculate the recovery value D′ of data element D: D’=P 1 *l 1 (0)+P 2 *l 2 (0)mod q =P 1 *2+P 2 *(-1)mod q r’=r 1 *l 1 (0)+r 2 *l 2 (0)mod q =r 1 *2+r 2 *(-1)mod q Among them, l 1 (0) is the first-order function f 1 (x) is a point (1, f 1 (1)) and f 2 (x) is a point (1, f 2 (1)) is the value of the Lagrangian basis function at x = 0, l 2 (0) is f 1 (x) is a point (2, f 1 (2)) and f 2 (x) is a point (2, f 2 (2)) The value of the Lagrangian basis function at x = 0; S102: The data element purchaser uses the same hash function as the evidence of data element D on the alliance chain to calculate Hash(D'); S103: The data element purchaser calls the cross-chain query contract, inputs the alliance chain identifier CID and the evidence identifier ID_D of the data element D as query parameters, and queries the alliance chain evidence of the data element D: (ID_D, Hash(D), Sig(Hash(D))). If Hash(D′)=Hash(D)∧Decrypt(Sig(Hash(D)),PK), it proves that the data element D' restored by the data element purchaser is the data element D to be purchased.
Citation Information
Cited By
Fire-fighting equipment-oriented data storage method and device
CN119865307A
Data storage and certification method and device for fire-fighting equipment
CN119865307B
Data transaction anti-repudiation cross-chain collaboration method and device based on point-to-point data transmission channel
CN121357194A
Anti-repudiation cross-chain collaboration method and device for data transaction based on point-to-point data transmission channel
CN121357194B
Dynamic updatable zero-knowledge proof commitment method and system supporting cross-chain transaction
CN122155719A
