Article information verification method and system based on zero-knowledge proof and block chain
By adopting a product information verification method based on zero-knowledge proofs and blockchain, the privacy protection and efficiency issues of batch product information verification in existing technologies are solved, and efficient and flexible product information verification is achieved. It is applicable to scenarios such as supply chain finance, brand channel compliance auditing, and product traceability on cross-border e-commerce platforms.
Patent Information
- Application Number
- CN202610043541.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2046-01-14
AI Technical Summary
Existing technologies struggle to achieve efficient, flexible, and reliable batch verification of item information in scenarios such as supply chain finance, brand channel compliance audits, and government procurement supplier reviews. They also suffer from issues such as insufficient privacy protection, high computational overhead, and poor adaptability to business scenarios.
By employing a zero-knowledge proof-based blockchain-based method for verifying item information, including on-chain commitments, proof generation, and proof verification processes, and utilizing Merkle trees and the Groth16 algorithm to optimize circuit constraints, zero-knowledge proofs are generated and verified, ensuring both privacy protection and verification efficiency for item data.
It enables efficient and flexible adaptation to various verification requirements, such as quantity thresholds, geographic affiliation, and authenticity identification, while protecting business privacy. This significantly improves the credibility and computational efficiency of verification, and is suitable for practical application scenarios such as supply chain traceability and batch compliance verification.
Smart Images

Figure CN121530749A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of blockchains, and particularly relates to a method and system for verifying information of an item based on zero-knowledge proof and a blockchain. BACKGROUND
[0002] In the process of digital transformation of enterprise operation and supply chain management, the dual needs of "privacy protection and trusted verification" are increasingly urgent in the scenarios of supply chain financial movable pledge, brand channel compliance audit, government procurement supplier review, etc.: enterprises need to prove the authenticity and compliance of assets or inventory to financial institutions, brand parties, tender parties and other third parties, but are reluctant to disclose core business secrets such as product categories, quantities, purchase prices, and supply chain details, in order to avoid causing data security risks and potential competitive threats. Under this background, the combination of zero-knowledge proof technology and blockchains has become a key exploration direction for solving the contradiction between "data disclosure and privacy protection", and related technical solutions have been applied in multiple fields.
[0003] Currently, a number of patents have explored the application path of the combination of zero-knowledge proof and blockchains:
[0004] A Chinese patent with the patent publication number CN116091049B proposes a "payment method and device based on big data and blockchains and cloud platform", the core technology of which is to generate a unique digital fingerprint and ID of an item through a third-party institution, to encrypt transaction data using zero-knowledge proof, and to verify the validity of the proof through a blockchain, mainly applied to the verification of payment in real item transaction scenarios, aiming to reduce the risk of information leakage in the transaction process; a Chinese patent with the patent publication number CN111159694A discloses a "private use method of blockchain digital assets based on zero-knowledge proof", which completes the publication of digital assets through a blockchain, hides the identities of asset owners and participants using zero-knowledge proof technology, and supports on-chain verification of validity, mainly suitable for private use scenarios of digital asset usage rights; a Chinese patent with the patent publication number CN107274184A provides a "blockchain data processing method and device based on zero-knowledge proof", which verifies the validity of cross-node shared data through a zero-knowledge proof smart contract, realizes a "verify first, pay later" transaction mode, balances data privacy and transaction security, and is suitable for cross-node data sharing and validity verification scenarios.
[0005] In addition, traditional verification schemes also include a full-data audit scheme, a scheme based on hash commitment, and a general zero-knowledge proof scheme, but all existing technical solutions have significant defects and are difficult to meet the actual needs of batch item information verification:
[0006] Privacy leakage risk of full data audit scheme: the prover needs to provide core information such as full inventory details and supply chain data, completely sacrificing data sovereignty and commercial privacy. Not only is there a risk of sensitive information leakage, but it is difficult to meet compliance requirements, and it may be used by the verifier for unfair commercial competition, harming the interests of the prover; functional limitations of the hash commitment scheme: only the basic proof of data existence can be realized, and the verification of complex business logic such as "a certain subset meets the conditions", "the total inventory quantity meets the standard", and "geographical area compliance" cannot be supported. The privacy protection strength is insufficient; practical defects of the general zero-knowledge proof scheme: large computational overhead and long proof generation time, making it difficult to meet the real-time requirements of batch verification; lack of deep integration with the physical world identity authentication system, resulting in a disconnection between the proof content and the physical assets; no special circuit is designed for specific business scenarios such as supply chains, resulting in low proof efficiency, and the deployment and use require professional cryptography knowledge, with a high threshold; limitations of existing related patents in terms of scene and efficiency: although the above-mentioned patented technologies have realized the integration of zero-knowledge proof and blockchain technology, they are limited to single or single data verification or customized applications in specific scenarios (such as payment transactions and digital assets), and lack the ability to efficiently verify large amounts of item information; some schemes rely on third-party institutions to participate in data collection or authentication, increasing trust costs and process complexity, and cannot flexibly adapt to diverse business needs such as quantity verification, geographical compliance, and total value verification, making it difficult to meet the demands of large-scale applications in supply chain finance and channel audit scenarios.
[0007] In summary, the existing technical solutions have deficiencies in privacy protection integrity, batch verification efficiency, business scenario adaptability, and integration with the physical world. There is an urgent need for a batch item authenticity authentication scheme that can overcome the above-mentioned defects and efficiently, flexibly, and verifiably verify the authenticity of large quantities of items while strictly protecting commercial privacy. SUMMARY
[0008] The present application addresses the technical problems in the prior art by providing a method for verifying item information based on zero-knowledge proof and blockchain, comprising:
[0009] On-chain commitment: the prover registers a cryptographic commitment representing its item set on the blockchain;
[0010] Proof generation: the prover generates a zero-knowledge proof off-chain based on its private item data, the cryptographic commitment, and a verification strategy using a zero-knowledge proof circuit; the zero-knowledge proof circuit is configured to internally verify that the private item data satisfies the verification strategy and is consistent with the cryptographic commitment;
[0011] Proof verification: a verifier verifies the validity of the zero-knowledge proof on the chain, and if the verification is passed, it confirms that the proof party owns the item set corresponding to the cryptographic commitment that meets the verification policy;
[0012] The verification policy includes at least one of the following:
[0013] Prove that all items in the private item data pass the authenticity verification;
[0014] Prove that the number of items in the private item data that pass the authenticity verification is greater than or equal to a preset threshold;
[0015] Prove that the geographic location of all items in the private item data is within an authorized geographic area.
[0016] Further, on-chain commitment: the specific process for the proof party to register the cryptographic commitment representing its item set on the blockchain is as follows:
[0017] The proof party receives batch item data to be verified, performs data standardization processing on the batch item data, constructs a Merkle tree based on the standardized batch item data, and uploads the root hash of the Merkle tree to the blockchain for storage.
[0018] Further, proof generation: the specific process for the proof party to generate a zero-knowledge proof off-chain based on its private item data, the cryptographic commitment, and a verification policy through a zero-knowledge proof circuit is as follows:
[0019] The proof party receives a preset verification policy, digitizes the verification policy based on the standardized batch item data and generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints;
[0020] The proof party performs circuit design based on the circuit constraints after constraint optimization, generates a key pair including a proof key and a verification key through the circuit design, and deploys the verification key to the smart contract of the blockchain;
[0021] The proof party prepares private input data based on the standardized batch item data, and performs proof calculation by combining the private input data, the circuit constraints after constraint optimization, and the proof key to generate a zero-knowledge proof .
[0022] The zero-knowledge proof circuit internally completes the verification of the private item data meeting the verification policy and the consistency verification of the private item data and the cryptographic commitment, and only outputs the zero-knowledge proof to the outside.
[0023] Further, the verification of the proof: the verifier verifies the validity of the zero-knowledge proof on the chain, and if the verification is passed, it confirms that the collection of items corresponding to the cryptographic commitment owned by the prover meets the verification strategy. The specific process is as follows:
[0024] The verifier submits the zero-knowledge proof π to the smart contract of the blockchain, and the smart contract calls the preset verification algorithm;
[0025] The smart contract performs validity verification on the zero-knowledge proof π in combination with the verification key deployed by the prover and the Merkle tree root hash uploaded by the prover to the blockchain storage;
[0026] If the verification result of the zero-knowledge proof is valid, the verifier records the successful verification information of the batch of items on the blockchain; if the verification result of the zero-knowledge proof is invalid, the verifier returns the corresponding verification error information.
[0027] Further, the specific process of data standardization and Merkle tree construction is as follows:
[0028] The prover extracts information from the batch of item data, including item unique identity code, physical characteristic parameters, traceability identifier, and authenticity verification field,
[0029] wherein the item unique identity code is generated by encrypting the item factory serial number using the SHA-256 hash algorithm; the extracted information is converted into structured data according to the preset rules:
[0030] Numerical parameters are kept to a certain number of decimal places and are uniformly converted to decimal format, character information is standardized using the UTF-8 encoding standard, traceability identifiers are reorganized in the combined format of timestamp + geographic location code, and integrity verification is performed on the standardized structured data, with the verification formula being:
[0031] ;
[0032] wherein, is the SHA-256 hash function, to is the standardized data of a single item, represents the standardized data of the th item, and the result is 0 when the data is complete, otherwise the corresponding invalid data is removed;
[0033] The Merkle tree construction adopts a binary tree structure, and the standardized data hash value is used as a leaf node. The non-leaf node is the splicing hash of the hash values of its two child nodes. The root hash calculation formula is:
[0034] wherein, are adjacent left child node data and right child node data, is a string splicing operation.
[0035] Further, the prover receives a preset verification policy, digitally expresses the verification policy based on the standardized batch item data, and generates a corresponding circuit constraint. The specific process of performing constraint optimization processing on the circuit constraint is:
[0036] The preset verification policy received by the prover includes a quantity threshold policy, a geographical attribution policy, and a true-false identification policy. For different types of verification policies, the standardized batch item data fields are digitally expressed. The quantity threshold policy is converted into a logic that the quantity field value is greater than or equal to a preset threshold. The geographical attribution policy is converted into a logic that the geographical code field belongs to a preset code set. The true-false identification policy is converted into a logic that the true-false field value is a preset valid identification.
[0037] Based on the logic of the digitalized verification policy, the circuit constraint is generated in combination with the standardized batch item data fields. The circuit constraint includes data consistency constraint, range constraint, and enumeration constraint.
[0038] The data consistency constraint is wherein, is a field value in the standardized batch item data, is a corresponding segment value in the cryptography commitment; the range constraint is wherein, is a quantity segment value in the batch item data, is a preset minimum threshold, is a preset maximum threshold; and the enumeration matching constraint is wherein, is a geographical code field value in the batch item data, is a preset legal geographical code set,
[0039] The three types of constraints are all based on a finite field construction, represents the order of the finite field .
[0040] Optimization is performed on the generated circuit constraints, data consistency constraints and range constraints are divided into basic constraints, enumeration matching constraints are divided into extended constraints, a general constraint library is constructed for the basic constraints,
[0041] The repeated constraint logic is encapsulated as a callable module to realize reuse, the extended constraints are classified and layered according to geographic coding, redundant constraints are deleted and associated constraints are merged;
[0042] All optimized constraints are converted into R1CS format to meet the constraint requirements of , wherein, is a line value vector, including a virtual variable with a value of 1, a private input variable and an intermediate calculation variable, is a left constraint vector, is a right constraint vector, is an output constraint vector, and the dot product operation is defined as , the three vectors only contain 0, 1 and the index of the corresponding variable.
[0043] Further, the prover designs a circuit based on the circuit constraints optimized by constraints, generates a key pair including a proof key and a verification key through the circuit design, and deploys the verification key to a specific process of a smart contract in a blockchain:
[0044] Based on the R1CS format constraint optimized by constraints, a zero-knowledge proof circuit is designed, which includes a constraint analysis module, a data calculation module and a proof output module;
[0045] The constraint analysis module analyzes the R1CS format , , vector;
[0046] The data calculation module performs addition, subtraction and multiplication operations in a finite field , and the proof output module is used to generate a polynomial set conforming to the QAP format;
[0047] The circuit input is the standardized batch commodity data and the verification strategy parameters, and the output is three sets of polynomial sets , , and a target polynomial , wherein, is the number of multiplication gates in the circuit, is the abstract assignment of the th multiplication gate;
[0048] A Groth16 algorithm is used to generate a public reference string CRS based on the designed zero-knowledge proof circuit, and the CRS includes a group generator , group generator and polynomial set , , evaluation result at a random point ;
[0049] The proof key and the verification key are derived based on a common reference string (CRS) ; ;
[0050] wherein is a random number, , , are the values of the left, right and output polynomials at point respectively, wherein is a random number;
[0051] The prover adopts a key non-hosting mode, constructs a transaction request through an interface of a smart contract of a block chain, the transaction request containing complete data of the verification key and a digital signature of the prover; sends the transaction request to a block chain network, writes into a block after passing through node consensus verification, and stores the verification key into a preset key storage mapping table by the smart contract, wherein the mapping table takes an identity of the prover as a key and the verification key as a value;
[0052] The private input data preparation process is as follows: filtering segment values corresponding to circuit constraints from standardized batch goods data, including field values corresponding to data consistency constraints , quantity segment values corresponding to range constraints , and geographic code field values corresponding to enumeration matching constraints , and eliminating data beyond the value range of a finite field and not meeting the basic requirements of a verification strategy; converting the filtered field values into elements in a finite field to form a private input data set , and performing a hash check on the data set.
[0053] Further, the prover prepares private input data based on standardized batch goods data, performs proof calculation based on the private input data, the circuit constraints after constraint optimization and the proof key, and generates a zero-knowledge proof . The specific process is as follows:
[0054] The private input data set Substitute the R1CS format constraint after the constrained optimization, verify is always true, where contains a set of private input data and circuit intermediate computation variables;
[0055] Then, based on the QAP format polynomial set , , , calculate the polynomial product , and calculate by polynomial division, where is the quotient polynomial, is the remainder polynomial and the degree is less than the degree of , verify the remainder polynomial to confirm that the input data satisfies the circuit constraint;
[0056] Based on the proof key and the above calculation results, perform group operation to generate a proof component:
[0057] Calculate , where is an element in the set of private input data ;
[0058] Calculate ;
[0059] Calculate , where, is a random parameter in the CRS;
[0060] Finally, the zero-knowledge proof , where, performs integrity verification on the generated zero-knowledge proof , and the verification content includes , , group membership validity and operation logic consistency.
[0061] An item information verification system based on zero-knowledge proof and blockchain, for the above-mentioned item information verification method based on zero-knowledge proof and blockchain, comprising:
[0062] The prover client is configured to store private item data and contains a zero-knowledge proof generator for generating the zero-knowledge proof;
[0063] The blockchain network is used to store the cryptographic commitment and run a verification smart contract for verifying the zero-knowledge proof;
[0064] a verifier client configured to initiate a verification request to the verification smart contract and obtain a verification result;
[0065] The prover client is also in communication connection with an article authenticity verification service to obtain the verification result and geographic location information in the private article data.
[0066] Further, the system further comprises a strategy engine for compiling the business strategy defined by the user into a constraint condition executable by the zero-knowledge proof circuit.
[0067] The positive progress effect of the present application is that:
[0068] The present application realizes the privacy protection of batch article information data by means of zero-knowledge proof, avoids the leakage of sensitive fields and verification strategy details, realizes the dynamic transformation and optimization of circuit constraints, flexibly adapts to multiple types of verification requirements such as quantity threshold, geographical origin and authenticity identification, solves the pain point of insufficient strategy adaptability of the prior art, and guarantees the integrity of private input data by combining with hash check, prevents forgery by deploying verification key on the chain, significantly improves the credibility of data and verification result, and realizes fast generation of proof and millisecond-level on-chain verification by Groth16 algorithm and constraint redundancy elimination optimization, efficiently adapts to supply chain traceability, batch compliance verification and other practical application scenarios, and balances privacy compliance, adaptive flexibility, verification credibility and operation efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0070] Figure 1 The step flowchart of the present application. DETAILED DESCRIPTION
[0071] The embodiments of the present application will be described below through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the disclosure in the specification. The present application can also be implemented or applied by means of other different specific embodiments, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application.
[0072] REFERENCE Figure 1 A method for verifying article information based on zero-knowledge proof and blockchain, comprising:
[0073] On-chain commitment: the prover registers a cryptographic commitment representing its article set on the blockchain;
[0074] Proof generation: the prover generates a zero-knowledge proof off-chain based on the private item data, the cryptographic commitment, and a verification policy through a zero-knowledge proof circuit, wherein the zero-knowledge proof circuit is configured to internally verify that the private item data satisfies the verification policy and is consistent with the cryptographic commitment;
[0075] Proof verification: the verifier verifies the validity of the zero-knowledge proof on-chain, and if the verification is passed, confirms that the item set corresponding to the cryptographic commitment possessed by the prover satisfies the verification policy;
[0076] The verification policy includes at least one of the following:
[0077] Prove that all items in the private item data pass the authenticity verification;
[0078] Prove that the number of items in the private item data that pass the authenticity verification is greater than or equal to a preset threshold;
[0079] Prove that the geographic locations of all items in the private item data are within an authorized geographic area.
[0080] Further, on-chain commitment: the specific process of the prover registering the cryptographic commitment representing the item set to the blockchain is as follows:
[0081] The prover receives batch item data to be verified, performs data standardization processing on the batch item data, constructs a Merkle tree based on the standardized batch item data, and uploads the root hash of the Merkle tree to the blockchain for storage.
[0082] Further, proof generation: the specific process of the prover generating a zero-knowledge proof off-chain based on the private item data, the cryptographic commitment, and a verification policy through a zero-knowledge proof circuit is as follows:
[0083] The prover receives a preset verification policy, digitally represents the verification policy based on the standardized batch item data and generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints;
[0084] The prover performs circuit design based on the circuit constraints after constraint optimization, generates a key pair including a proof key and a verification key through the circuit design, and deploys the verification key to the smart contract of the blockchain;
[0085] The prover prepares private input data based on the standardized batch item data, performs proof calculation by combining the private input data, the circuit constraints after constraint optimization, and the proof key, and generates a zero-knowledge proof ;
[0086] The zero-knowledge proof circuit internally verifies that the private item data satisfies the verification strategy and that the private item data is consistent with the cryptographic commitment, and only outputs the zero-knowledge proof to the outside. .
[0087] Furthermore, the verification process involves the verifier validating the zero-knowledge proof on-chain. If the verification passes, the specific process confirming that the set of items owned by the verifier, corresponding to the cryptographic commitment, satisfies the verification strategy is as follows:
[0088] The verifier submits the zero-knowledge proof π to a smart contract on the blockchain, which then calls a preset verification algorithm.
[0089] The smart contract combines the verification key deployed by the prover with the Merkle root hash uploaded by the prover to the blockchain storage to perform validity verification on the zero-knowledge proof π.
[0090] If the zero-knowledge proof If the verification result is valid, the verifier records the successful verification information of the batch of items on the blockchain; if the zero-knowledge proof... If the verification result is invalid, the verifier returns the corresponding verification error message.
[0091] Furthermore, the specific process of data standardization and Merkle tree construction is as follows:
[0092] The certifying party extracts information from the batch of item data, including the item's unique identification code, physical characteristic parameters, traceability identifier, and authenticity verification field.
[0093] The unique identification code for each item is generated by encrypting the item's factory serial number using the SHA-256 hash algorithm; the extracted information is then converted into structured data according to preset rules.
[0094] Numerical parameters retain a preset number of decimal places and are uniformly converted to decimal format. Character information is standardized using UTF-8 encoding. Traceability identifiers are recombined using a combination of timestamp and geographic location code. Integrity checks are performed on the standardized structured data using the following formula:
[0095] ;
[0096] in, It is the SHA-256 hash function. to Standardized data for individual items. Indicates the first standardized data of the item, if the result is 0, it is determined that the data is complete, and if it is not 0, the corresponding invalid data is rejected;
[0097] The Merkle tree is constructed in a binary tree structure, and the hash value of the standardized data is used as a leaf node. The hash value of the non-leaf node is the splicing hash of the hash values of its two child nodes. The root hash calculation formula is:
[0098] wherein, are the adjacent left child node data and right child node data, is a string splicing operation.
[0099] Further, the prover receives a preset verification policy, digitally expresses the verification policy based on the standardized batch item data, and generates a corresponding circuit constraint. The specific process of performing constraint optimization processing on the circuit constraint is:
[0100] The preset verification policy received by the prover includes a quantity threshold policy, a geographical attribution policy, and a true-false identification policy. For different types of verification policies, the standardized batch item data fields are digitally expressed. The quantity threshold policy is converted into a logic that the quantity field value is greater than or equal to a preset threshold. The geographical attribution policy is converted into a logic that the geographical code field belongs to a preset code set. The true-false identification policy is converted into a logic that the true-false field value is a preset valid identification.
[0101] Based on the logic of the digitally expressed verification policy, the circuit constraint is generated in combination with the standardized batch item data fields. The circuit constraint includes data consistency constraint, range constraint, and enumeration constraint.
[0102] The data consistency constraint is wherein, is a field value in the standardized batch item data, is a corresponding segment value in the cryptographic commitment; the range constraint is wherein, is a quantity segment value in the batch item data, is a preset minimum threshold, is a preset maximum threshold; the enumeration matching constraint is wherein, is a geographical code field value in the batch item data, is a preset legal geographical code set,
[0103] The three types of constraints are all based on a finite field construction, represents the order of the finite field .
[0104] Optimization is performed on the generated circuit constraints, data consistency constraints and range constraints are divided into basic constraints, enumeration matching constraints are divided into extended constraints, a general constraint library is constructed for the basic constraints,
[0105] The repeatedly occurring constraint logic is encapsulated as a callable module to realize reuse, the extended constraints are classified and layered according to geographical coding, redundant constraints are deleted and associated constraints are merged;
[0106] All the optimized constraints are converted into R1CS format to meet the constraint requirements of , wherein, is a line value vector, containing virtual variables, private input variables and intermediate calculation variables with a value of 1, is a left constraint vector, is a right constraint vector, is an output constraint vector, and the dot product operation is defined as , the three vectors only contain 0, 1 and the index of the corresponding variable.
[0107] Further, the prover designs a circuit based on the circuit constraints optimized by constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key to a specific process of a smart contract in a blockchain as follows:
[0108] A zero-knowledge proof circuit is designed based on the R1CS format constraints optimized by constraints, and the circuit contains a constraint analysis module, a data calculation module and a proof output module;
[0109] The constraint analysis module analyzes the R1CS format , , vectors;
[0110] The data calculation module performs addition, subtraction and multiplication operations in a finite field , and the proof output module is used to generate a polynomial set conforming to the QAP format;
[0111] The circuit input is the standardized batch of commodity data and the verification strategy parameters, and the output is three sets of polynomial sets , , and a target polynomial , wherein, is the number of multiplication gates in the circuit, is the abstract assignment of the th multiplication gate;
[0112] The Groth16 algorithm is used to generate a public reference string CRS based on the completed zero-knowledge proof circuit, and the CRS includes a group of elliptic curve BN254 a generator , a group a generator and a polynomial set , , the evaluation result of a random point ;
[0113] Based on the public reference string CRS, the proof key and the verification key are derived ; ;
[0114] wherein is a random number, , , , respectively, the left, right and output polynomial values at point, , wherein is a random number;
[0115] The prover adopts a key non-hosting mode, constructs a transaction request through a smart contract deployment interface of a block chain, the transaction request includes the complete data of the verification key and the digital signature of the prover; send the transaction request to the block chain network, and write it into the block after passing the node consensus verification, and the smart contract stores the verification key to the preset key storage mapping table, and the mapping table takes the identity of the prover as the key, and the verification key as the value;
[0116] The private input data preparation process is: screening the segment value corresponding to the circuit constraint from the standardized batch commodity data, including the field value corresponding to the data consistency constraint , the number segment value corresponding to the range constraint , the geographic code field value corresponding to the enumeration matching constraint , and eliminating the data exceeding the value range of the finite field and not meeting the basic requirements of the verification strategy; convert the filtered field value into an element in the finite field , form a private input data set , and perform hash check on the data set.
[0117] Further, the prover prepares private input data based on the standardized batch commodity data, performs proof calculation based on the private input data, the constraint optimized circuit constraint and the proof key, and generates zero-knowledge proof The specific process is:
[0118] The private input data set is substituted into the R1CS format constraint after constrained optimization, and the constraint is verified to be always true, where The private input data set and the circuit intermediate calculation variable are included;
[0119] Then, based on the QAP format polynomial set , , , the polynomial product is calculated, and is calculated by polynomial division, where is the quotient polynomial, is the remainder polynomial and the degree is less than the degree of , and the remainder polynomial is verified to confirm that the input data satisfies the circuit constraint;
[0120] Based on the proof key and the above calculation result, the group operation is executed to generate the proof component:
[0121] Calculate , where is an element in the private input data set ;
[0122] Calculate ;
[0123] Calculate , where is a random parameter in the CRS;
[0124] Finally, the zero-knowledge proof is verified, where The generated zero-knowledge proof performs integrity verification, and the verification content includes the group membership validity of , , and the operation logic consistency.
[0125] An item information verification system based on zero-knowledge proof and blockchain, for the above-mentioned item information verification method based on zero-knowledge proof and blockchain, comprising:
[0126] The prover client is configured to store private item data and includes a zero-knowledge proof generator for generating the zero-knowledge proof;
[0127] a blockchain network, configured to store the cryptographic commitment and run a verification smart contract for verifying the zero-knowledge proof;
[0128] a verifier client configured to initiate a verification request to the verification smart contract and obtain a verification result;
[0129] The prover client is also connected to an article authenticity verification service to obtain the verification result and geographic location information in the private article data.
[0130] Further, the system further comprises a policy engine for compiling a business policy defined by a user into a constraint condition executable by the zero-knowledge proof circuit.
[0131] As a further illustration, in an example, a certain liquor manufacturing enterprise needs to apply for supply chain financial financing to a bank, and the bank requires proof that "the number of authentic liquor in the inventory is not less than 100,000 bottles", and the enterprise does not want to disclose specific inventory location, batch, and other business secrets. The present application realizes efficient adaptation through the following technical process:
[0132] On-chain commitment phase: the enterprise as the prover collects all batch article data of the inventory liquor (including authenticity verification field, quantity field, etc.), performs data standardization processing — extracts article unique identity code, authenticity identifier, etc. information, standardizes character data according to UTF-8 encoding, numerical quantity field retains 6 decimal places and converts to decimal, and ensures data integrity through SHA-256 hash check. Based on the standardized data, a Merkle tree is constructed, the root hash is uploaded to the blockchain for storage, and the cryptographic commitment registration is completed.
[0133] Proof generation phase: the enterprise receives the bank's preset "authentic liquor quantity ≥100,000 bottles" verification policy, digitizes it into a range constraint ( for the liquor quantity segment, ), and generates a circuit constraint in combination with data consistency constraints. After optimized conversion to R1CS format, a zero-knowledge proof circuit is designed, Groth16 algorithm is used to generate a proof key and a verification key, and the verification key is deployed to the blockchain smart contract. Then, the private article data (authentic liquor quantity, authenticity identifier field) is selected from the standardized data, and after hash check, it is input into the circuit to generate a zero-knowledge proof π in combination with the proof key.
[0134] Proof verification phase: the bank as the verifier will the proof Submit to the smart contract. The smart contract calls the Groth16 verification algorithm, combines the on-chain stored verification key and Merkle tree root hash, and performs format checking, bilinear mapping checking, and benchmark consistency checking. After verification, the bank confirms that the enterprise meets the financing qualifications and the enterprise does not leak any sensitive inventory information, realizing "data usability and invisibility", which not only guarantees the risk control needs of financial institutions, but also protects the business secrets of enterprises.
[0135] II. Brand cross-regional channel compliance audit: channel management without data leakage
[0136] In an example, a beauty brand headquarters needs to randomly check the distributors in the East China region to verify that "all inventory goods are located in the authorized region" and "the authenticity rate is higher than 95%", to avoid distributors cross-regional stringing or selling fake goods, while preventing the leakage of core sales data of distributors. The technical landing process is as follows:
[0137] On-chain commitment phase: The distributor, as the prover, collects batch data of inventory beauty products (including geographic coding and authenticity verification fields), performs standardized processing — geographic coding is reorganized according to pre-set rules, authenticity identification is unified as valid / invalid identification, and after integrity verification, a Merkle tree is constructed, and the root hash is stored on-chain.
[0138] Proof generation phase: The brand headquarters issues verification strategies through the strategy engine, which are digitized by the distributor into two types of constraints: enumeration matching constraints ( authorized geographic coding set for East China region), and range constraints (authenticity quantity / total inventory 295%). Optimize the circuit constraints and generate a key pair, and after the verification key is stored on-chain, filter the geographic coding and authenticity fields as private input data, generate zero-knowledge proof π and submit to the brand headquarters.
[0139] Proof verification phase: The brand headquarters submits to the blockchain smart contract, and the smart contract combines the on-chain key and Merkle tree root hash to complete the verification. If the verification is passed, it confirms that the distributor is in compliance, and the distributor does not need to provide detailed inventory lists and sales data throughout the process, and the brand headquarters does not need to directly intervene in the distributor's inventory management. Through technical means, mutual trust is built, which not only guarantees channel compliance, but also maintains the operating autonomy of distributors.
[0140] III. Cross-border e-commerce platform product traceability: consumer trust building under privacy protection
[0141] In an example, a cross-border e-commerce platform requires overseas luxury goods merchants to prove that "all listed goods are certified by the brand" and "inventory quantity is consistent with sales commitment", to make consumers confident in purchasing, while protecting sensitive information such as merchants' procurement channels and inventory size. The technical implementation process is as follows:
[0142] On-chain commitment phase: Luxury goods merchants collect batch data of goods on the shelf (brand authentication marks, inventory quantity, traceability codes), perform standardization processing - authentication marks are unified into effective formats recognized by brand owners, traceability codes are reorganized according to timestamp + geographic code, and after integrity verification, a Merkle tree is constructed, and the root hash is stored on the chain.
[0143] Proof generation phase: Merchants receive platform verification policies, digitize them into authenticity mark constraints (authentication marks are valid), and range constraints (inventory quantity ≥ sales commitment quantity). Optimize circuit constraints and generate key pairs. After verifying the key on the chain, prepare private input data (authentication marks, inventory quantity), hash it, and generate a zero-knowledge proof , submit it to the e-commerce platform.
[0144] Proof verification phase: The platform submits to the smart contract, completes verification with the on-chain key and Merkle tree root hash. After verification, the platform displays a "compliance verification passed" mark to consumers, who do not need to know the merchant's procurement channel or inventory size to trust the authenticity of the goods and the authenticity of the inventory. Merchants meet platform regulatory requirements while protecting core business information, improving cross-border transaction credibility and efficiency.
[0145] The above embodiments of the present application are described in detail in combination with the drawings. Those skilled in the art can make various changes to the present application according to the above description. Therefore, some details in the embodiments should not be construed as limiting the present application, and the present application will be protected within the scope defined by the appended claims.
Claims
1. A method for verifying item information based on zero-knowledge proofs and blockchain, characterized in that, include: On-chain commitment: The certifier registers a cryptographic commitment representing its collection of items on the blockchain; Proof generation: The proving party generates a zero-knowledge proof off-chain based on its private item data, the cryptographic commitment, and a verification strategy through a zero-knowledge proof circuit; wherein the zero-knowledge proof circuit is configured to internally verify that the private item data satisfies the verification strategy and is consistent with the cryptographic commitment; Proof Verification: The verifier verifies the validity of the zero-knowledge proof on the blockchain. If the verification passes, it is confirmed that the set of items owned by the verifier that corresponds to the cryptographic commitment satisfies the verification strategy. The verification strategy includes at least one of the following: This proves that all items in the private item data have passed authenticity verification; Prove that the number of items in the private item data that have passed the authenticity verification is greater than or equal to a preset threshold; Prove that the geographical locations of all items in the private item data are within an authorized geographical area.
2. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 1, characterized in that, On-chain commitment: The specific process by which the proving party registers the cryptographic commitment representing its collection of items on the blockchain is as follows: The proving party receives batch item data to be verified, performs data standardization processing on the batch item data, constructs a Merkle tree based on the standardized batch item data, and uploads the root hash of the Merkle tree to the blockchain for storage.
3. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 2, characterized in that, Proof Generation: The proof-provider operates off-chain, generating a zero-knowledge proof based on its private item data, the cryptographic commitment, and a verification strategy using a zero-knowledge proof circuit. The specific process is as follows: The proving party receives a preset verification strategy, digitally expresses the verification strategy based on standardized batch item data and generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints. The proving party designs a circuit based on the constrained and optimized circuit constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key into the smart contract of the blockchain. The proving party prepares private input data based on standardized batch item data, and performs proof computation by combining the private input data, constraint-optimized circuit constraints, and the proof key to generate a zero-knowledge proof. ; The zero-knowledge proof circuit internally verifies that the private item data satisfies the verification strategy and that the private item data is consistent with the cryptographic commitment, and only outputs the zero-knowledge proof to the outside. .
4. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 3, characterized in that, Proof Verification: The verifier verifies the validity of the zero-knowledge proof on the blockchain. If the verification passes, the specific process of confirming that the set of items owned by the verifier corresponding to the cryptographic commitment satisfies the verification strategy is as follows: The verifier submits the zero-knowledge proof π to a smart contract on the blockchain, which then calls a preset verification algorithm. The smart contract combines the verification key deployed by the prover with the Merkle root hash uploaded by the prover to the blockchain storage to perform validity verification on the zero-knowledge proof π. If the zero-knowledge proof If the verification result is valid, the verifier records the successful verification information of the batch of items on the blockchain; if the zero-knowledge proof... If the verification result is invalid, the verifier returns the corresponding verification error message.
5. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 2, characterized in that, The specific process of data standardization and Merkle tree construction is as follows: The certifying party extracts information from the batch of item data, including the item's unique identification code, physical characteristic parameters, traceability identifier, and authenticity verification field. The unique identification code for each item is generated by encrypting the item's factory serial number using the SHA-256 hash algorithm; the extracted information is then converted into structured data according to preset rules. Numerical parameters retain a preset number of decimal places and are uniformly converted to decimal format. Character information is standardized using UTF-8 encoding. Traceability identifiers are recombined using a combination of timestamp and geographic location code. Integrity checks are performed on the standardized structured data using the following formula: ; in, It is the SHA-256 hash function. to Standardized data for individual items. Indicates the first Standardized data for each item If the result is 0, the data is considered complete; otherwise, the corresponding invalid data is removed. Merkle trees are constructed using a binary tree structure, with standardized data hash values as leaf nodes and non-leaf nodes being the concatenation hashes of their two child nodes. The root hash is calculated using the following formula: ,in, These are the data of the adjacent left and right child nodes, respectively. This is for string concatenation operations.
6. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 3, characterized in that, The proving party receives a preset verification strategy, digitally expresses the verification strategy based on standardized batch item data, generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints as follows: The preset verification strategies accepted by the certifying party include quantity threshold strategy, geographic attribution strategy, and authenticity identification strategy. For different types of verification strategies, the standardized batch item data fields are used for digital expression. The quantity threshold strategy is transformed into the logic that the quantity field value is greater than or equal to the preset threshold. The geographic attribution strategy is transformed into the logic that the geographic code field belongs to the preset code set. The authenticity identification strategy is transformed into the logic that the authenticity field value is a preset valid identifier. Based on the logic of the digitized verification strategy, circuit constraints are generated by combining the standardized batch item data fields. The circuit constraints include data consistency constraints, range constraints, and enumeration constraints. Data consistency constraints are ,in, For the field values in the standardized batch item data, The corresponding field value in the cryptographic commitment; the range constraint is... ,in, For the quantity field value in the batch item data, To preset the minimum threshold, The preset maximum threshold is used; the enumerated matching constraints are... ,in, This refers to the geocoding field value in the batch item data. For a pre-defined set of valid geocodes, All three types of constraints are based on finite fields. Build, Representing a finite field The order; The generated circuit constraints are optimized by classifying data consistency constraints and range constraints as basic constraints, and enumerated matching constraints as extended constraints. A general constraint library is then constructed based on the basic constraints. Encapsulate recurring constraint logic into callable modules for reuse, classify and stratify extended constraints by geocode, delete redundant constraints and merge related constraints; Convert all optimized constraints to R1CS format to satisfy... The constraints, among which, This is a line value vector, containing dummy variables with a value of 1, private input variables, and intermediate calculation variables. Let be the left constraint vector. The right constraint vector, To output the constraint vector, the dot product operation is defined as follows: The three vectors contain only 0, 1, and the index of the corresponding variable.
7. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 6, characterized in that, The proving party designs a circuit based on the constrained and optimized circuit constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key into the blockchain smart contract. The specific process is as follows: A zero-knowledge proof circuit is designed based on the constraint-optimized R1CS format. The circuit includes a constraint parsing module, a data calculation module, and a proof output module. The constraint parsing module parses R1CS format. , , vector; The data calculation module performs finite field operations. The addition, subtraction, and multiplication operations within the code demonstrate that the output module is used to generate a set of polynomials conforming to the QAP format. The circuit input consists of standardized batch item data and verification strategy parameters, and the output consists of three sets of polynomials. , , and objective polynomial ,in, The number of multiplication gates in the circuit. For the first Abstract assignment of a multiplication method; The Groth16 algorithm is used to generate a common reference string (CRS) based on the designed zero-knowledge proof circuit. The CRS contains the group of elliptic curve BN254. Generator ,group Generator and polynomial sets , , At random points The result of the evaluation; Derivation of the proof key based on the public reference string CRS and verification key ; in It is a random number. , , The left, right, and output polynomials are respectively located in The value of the point, ,in, It is a random number; The certifier employs a non-escrow key model, constructing a transaction request through the blockchain's smart contract deployment interface. This transaction request includes the verification key. The complete data and the digital signature of the certifier are provided; the transaction request is sent to the blockchain network, and after verification by node consensus, it is written into a block. The smart contract will verify the key. The key is stored in a pre-defined key storage mapping table, which uses the certifier's identity identifier as the key to verify the key. Value; The private input data preparation process is as follows: From the standardized batch item data, filter the field values corresponding to the circuit constraints, including the field values corresponding to the data consistency constraints. Quantity field value corresponding to range constraints Enumerate the geocoding field values corresponding to the matching constraints. Eliminate those outside the finite field Data with values ranging from a certain range and not meeting the basic requirements of the validation strategy; convert the filtered field values into a finite field. The elements within form a private input data set. And perform hash verification on the data set.
8. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 7, characterized in that, The proving party prepares private input data based on standardized batch item data, and performs proof computation by combining the private input data, constraint-optimized circuit constraints, and the proof key to generate a zero-knowledge proof. The specific process is as follows: Private input data set Substitute the constrained R1CS format constraints after constraint optimization and verify. Heng was established, among which, Includes private input data set and intermediate calculation variables in the circuit; Subsequently, a set of polynomials based on the QAP format was used. , , Calculate polynomial product And calculate using polynomial division ,in For quotient polynomial, It is a remainder polynomial and its degree is less than The degree of verification of the remainder polynomial. To confirm that the input data meets the circuit constraints; Based on the proof key The above calculation results are then used to perform group operations to generate a proof component: calculate ,in Private input data set Elements in; calculate ; calculate ,in, For random parameters in CRS; Final zero-knowledge proof ,in, Zero-knowledge proofs generated Perform integrity verification, the verification content includes , , The validity of group affiliation and the consistency of operational logic.
9. A system for verifying item information based on zero-knowledge proofs and blockchain, used in the item information verification method based on zero-knowledge proofs and blockchain as described in any one of claims 1 to 8, characterized in that, include: The proving client is configured to store private item data and includes a zero-knowledge proof generator for generating the zero-knowledge proof; A blockchain network is used to store the cryptographic commitments and run a verification smart contract to verify the zero-knowledge proofs. The verification client is configured to initiate a verification request to the verification smart contract and obtain the verification result. The certifying client also communicates with an item authenticity verification service to obtain the verification results and geographical location information from the private item data.
10. The item information verification system based on zero-knowledge proof and blockchain as described in claim 9, characterized in that, It also includes a strategy engine for compiling user-defined business strategies into constraints that the zero-knowledge proof circuit can execute.
Citation Information
Patent Citations
Block-chain data processing based on zero-knowledge proof
CN107274184A
Private use authorization method for blockchain digital assets based on zero knowledge proof
CN111159694A
A payment method, device, and cloud platform based on big data and blockchain.
CN116091049B
Data verification system implementation method based on block chain and zero-knowledge proof
CN116707751A
Equipment attribute verification method based on block chain and zero-knowledge proof
CN119939566A
Cited By
A multi-source low-carbon behavior joint constraint verification model construction method, medium and system
CN122312177A