Method, apparatus, medium and program product for asset privacy attestation

By using zero-knowledge proof technology and central institutions to build Merkle trees and smart contracts on the blockchain, the problem that blockchain technology cannot protect asset privacy is solved, and the proof of asset privacy and user anonymity is achieved, satisfying Meet users’ needs for asset privacy.

CN118568771APending Publication Date: 2024-08-30SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410719201.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing blockchain technology cannot effectively protect users' asset privacy, causing users' transactions and behaviors to be traced back to specific personal identities, which cannot meet users' needs for asset privacy.

Method used

By using zero-knowledge proof technology, users can prove to third parties the specific amount of assets they hold without exposing their on-chain addresses, use trusted central institutions to build Merkle trees and smart contracts, and generate and verify asset privacy. Proof to ensure the privacy of assets.

Benefits of technology

It is possible to prove asset holdings to a third party without exposing the account used by users to purchase assets, ensuring the privacy of assets and the anonymity of users, and meeting users' needs for asset privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568771A
    Figure CN118568771A
Patent Text Reader

Abstract

The invention provides a method and device for carrying out asset privacy certification, a medium and a program product. The method comprises the following steps: sending a presence proof request to a central mechanism device by using a first on-chain address; receiving existence proof data returned by the central mechanism equipment; and based on the existence proof data and a Hash value of a Merkel tree root constructed in the central mechanism equipment, target proof data is generated through a zero-knowledge proof circuit, and the target proof data comprises data used for proving that a user corresponding to the client equipment holds a predetermined number of target assets. According to the invention, it can be proved that a specific person corresponding to the social account submitted by the user has a predetermined number of assets, and the account used by the user for purchasing the assets is not exposed, so that the purpose of asset privacy certification is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer-readable medium, and computer program product for performing privacy proof of assets. Background Art

[0002] With the advent of the Internet and the digital age, users are increasingly concerned about privacy. In digital transactions and identity verification, users are beginning to realize the need to protect personal sensitive information while verifying authenticity. The development of cryptography has provided a foundation for the advancement of privacy protection technology. Zero-knowledge proof is built on cryptography and mathematical principles, and uses the concept of zero knowledge in cryptography to achieve information verification and privacy protection.

[0003] In blockchain systems, the privacy of transactions and assets is an important research direction. Traditional blockchains, such as Bitcoin and Ethereum, store transaction information publicly on the chain, which means that the details of the transaction can be viewed publicly. Although this transparency helps prevent fraud and audits, it also exposes the user's private information. In order to protect the user's private information, privacy proof technology has emerged. Privacy proof is a technology that hides the key details of a transaction while maintaining transaction verification. It uses cryptographic zero-knowledge proof algorithms to hide user key information, and uses smart contracts to make proofs publicly verifiable, so as to provide a credible asset privacy proof to a third party.

[0004] On the blockchain, the addresses used by users are usually generated by a digital key pair (public key and private key). These addresses do not directly map to a real identity, but are a string of characters, similar to an account number, that does not reveal the user's real name, address, or other personal identification information. This mechanism provides a certain degree of anonymity. Although the transaction address itself does not reveal the user's identity, if an address is explicitly associated with a real identity (for example, by the participants in the transaction themselves making this information public, or by linking it to the real identity through other channels), then the transactions and behaviors at this address can be traced back to the corresponding individual. The pseudo-anonymity of the blockchain means that transaction records can be viewed on the public chain without directly exposing the real identity, but other factors may cause certain transactions and behaviors to be traced back to specific personal identities.

[0005] Therefore, blockchain solutions based on existing technologies may not be able to meet the needs of some users for implicit proof of assets. Summary of the invention

[0006] Multiple aspects of the present application provide a method, an apparatus, a computer-readable medium, and a computer program product for performing privacy certification of assets.

[0007] In one aspect of the present application, a method for performing asset privacy certification in a client device is provided, the method comprising:

[0008] Sending a proof of existence request to a central institution device using the first on-chain address, wherein the proof of existence request is used to request the central institution device to generate and return proof of existence data in the constructed Merkle tree of the user corresponding to the client device holding the first on-chain address;

[0009] Receive the existence proof data returned by the central institution equipment;

[0010] Based on the existence proof data and the hash value of the Merkle tree root constructed in the central agency device, target proof data is generated through a zero-knowledge proof circuit, and the target proof data includes data for proving that the user corresponding to the client device holds a predetermined amount of target assets.

[0011] In one aspect of the present application, a method for performing asset privacy certification in a central institution device is provided, the method comprising:

[0012] In response to receiving a request from a client device, verifying whether the first on-chain address exists in the constructed Merkle tree by interacting with the client device;

[0013] If the verification passes, the corresponding existence proof data is sent to the client device.

[0014] In one aspect of the present application, a method for performing asset privacy certification in a target node device of a blockchain system is provided, the method comprising:

[0015] Receiving an asset proof request from a client device, the asset proof request including target proof data and social account information, the asset proof request being used to request proof that a user corresponding to the social account information holds a predetermined amount of target assets;

[0016] Verifying the target proof data through a zero-knowledge proof circuit to obtain a corresponding verification result;

[0017] If the verification is successful, the social account information is written into the verification contract to prove that the user corresponding to the social account holds a predetermined amount of the target asset.

[0018] In one aspect of the present application, a first device for performing asset privacy certification in a client device is provided, the first device comprising:

[0019] A device for sending a proof of existence request to a central institution device using a first on-chain address, wherein the proof of existence request is used to request the central institution device to generate and return proof of existence data in a constructed Merkle tree of the user corresponding to the client device holding the first on-chain address;

[0020] Means for receiving existence proof data returned by the central agency device;

[0021] A device for generating target proof data through a zero-knowledge proof circuit based on the existence proof data and the hash value of the Merkle tree root constructed in the central agency device, wherein the target proof data includes data for proving that the user corresponding to the client device holds a predetermined amount of target assets.

[0022] In one aspect of the present application, a second device for performing asset privacy certification in a central institution device is provided, the second device comprising:

[0023] means for verifying the presence of the first on-chain address in the constructed Merkle tree by interacting with the client device in response to receiving a request from the client device;

[0024] Means for sending corresponding proof of existence data to the client device if the verification passes.

[0025] In one aspect of the present application, a third device for performing asset privacy certification in a target node device of a blockchain system is provided, the third device comprising:

[0026] A device for receiving an asset proof request from a client device, the asset proof request including target proof data and social account information, the asset proof request being used to request proof that a user corresponding to the social account information holds a predetermined amount of target assets;

[0027] A device for verifying the target proof data by a zero-knowledge proof circuit algorithm to obtain a corresponding verification result;

[0028] If the verification is successful, the social account information is written into the verification contract to prove that the user corresponding to the social account holds a predetermined amount of target assets.

[0029] Another aspect of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of an embodiment of the present application.

[0030] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the method of the embodiment of the present application.

[0031] Another aspect of the present application provides a computer program product, including a computer program, which implements the method of the embodiment of the present application when executed by a processor.

[0032] The solution provided by the embodiment of the present application is to build a zero-knowledge proof by a trusted central agency. The user uses an on-chain address to interact with the central agency to obtain a proof based on zero-knowledge proof. The proof can prove to a third party that he has a specific amount of assets without exposing the on-chain address. The user uses another unrelated account to submit the obtained proof and the user's social account information to the blockchain system for verification. If the verification is successful, it can be proved that the specific person corresponding to the submitted social account owns a predetermined amount of assets without exposing the account used by the user to purchase these assets, thereby achieving the purpose of asset privacy proof. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0034] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0035] Figure 1 A flow chart of a method for performing asset privacy certification provided by an embodiment of the present application is shown;

[0036] Figure 2 A schematic diagram of a method flow for performing asset privacy certification according to an embodiment of the present application is shown;

[0037] Figure 3 A flowchart of an exemplary privacy asset certification scenario according to an embodiment of the present application is shown;

[0038] Figure 4 A schematic diagram of the structure of a first device for performing asset privacy certification in a client device and a second device for performing asset privacy certification in a central institution device provided in an embodiment of the present application is shown;

[0039] Figure 5A schematic diagram of the structure of a first device for performing asset privacy certification in a client device and a third device for performing asset privacy certification in a target node device of a blockchain system provided in an embodiment of the present application is shown;

[0040] Figure 6 A schematic diagram of the structure of a device suitable for implementing the solution in the embodiment of the present application is shown.

[0041] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, 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. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.

[0044] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0045] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0046] The following is an introduction to the terms involved in the embodiments of the present application.

[0047] Merkle tree: The most commonly used underlying storage structure of blockchain, which can ensure that the entire tree data cannot be tampered with through the root Hash.

[0048] Smart contract: An automatically executed agreement or contract in a blockchain system that allows trusted transactions to be conducted without a third party, and these transactions are traceable and irreversible.

[0049] Transaction: In a broad sense, transactions refer to all on-chain activities, including transfers / contract calls / proposal voting, etc.

[0050] Account model: An abstract concept used in blockchain networks to represent and manage user assets, identities, and interactions. This model describes the structure, attributes, and behavior of accounts in the blockchain.

[0051] Zero-knowledge proof (ZKP): refers to the ability of the prover to convince the verifier that a certain statement is correct without providing any useful information to the verifier.

[0052] zkSNARK: The full name is zero-knowledge Succinct Non-Interactive Arguments of Knowledge, which is the most classic encryption algorithm system in zero-knowledge proof.

[0053] Zero-knowledge proof circuit: The developer defines the zero-knowledge proof algorithm generation and verification logic, which includes privacy parameters and public parameters. The correctness of the circuit can be demonstrated to a third party without disclosing the privacy parameters. The prover uses all parameters to generate the ZKP proof, and the verifier uses the ZKP proof and public parameters to verify the validity of the proof.

[0054] The actual application scenario of the method of the embodiment of the present application can be: Assume that a user has two accounts, Account X and Account Y. Among them, the user uses Account X as a social account on a daily basis, and binds other social accounts of the user, such as a video website account, Twitter account, etc., that is, based on Account X, the video website account, Twitter account, etc. bound to Account X can be found. Due to the public nature of the blockchain, all operations and assets under Account X are visible to everyone. Others can check all transactions under Account X and the assets held under Account X through means such as blockchain browsers.

[0055] Suppose a user wants to buy a batch of assets and wants to prove that he really owns these assets, but does not want to disclose when, through what channel, from where, and at what price he bought these assets. Therefore, the user activates another account Y on the chain that is completely unrelated to the X account and purchases these assets. Since the Y account is completely unrelated to the X account on the chain, the X account and the user's video website account and Twitter account bound to the X account cannot be deduced from the Y account. Although other people can find out that the Y account has obtained a batch of assets through blockchain browsers and other means, they cannot know who specifically obtained these assets in the real world.

[0056] In order to prove that the user owns the purchased assets without exposing the user's Y account, this purpose can be achieved by the method of this embodiment. The method of the embodiment of the present application includes two processes: generating asset privacy proof and asset privacy verification.

[0057] In the process of generating private asset proof, the user uses the interaction between the Y account and the central agency to request the central agency to generate proof data of the on-chain address of the Y account, and generates ZKP proof data based on the ZKP method. The ZKP proof data can prove to a third party that the user is on the current Merkle tree without exposing the user address and the Merkle proof path, that is, the user owns a specific amount of assets.

[0058] During the asset privacy verification phase, the user submits the generated ZKP proof data and the user's social account (for example, the user's frequently used video website account) to the public blockchain for verification to prove that the specific person corresponding to the submitted social account owns the corresponding assets without revealing that the user used account Y to purchase these assets.

[0059] Figure 1 A flow chart of a method for asset privacy certification provided by an embodiment of the present application is shown. The method at least includes step S101, step S102 and step S103 executed by a client device, and step S201 and step S202 executed by a central institution device.

[0060] The method according to the embodiment of the present application adopts a Merkle tree as an underlying data storage structure.

[0061] According to the embodiment of the present application, the target user obtains the target asset through a transaction with the first account, wherein the target user is a user who wishes to verify the ownership of the target asset by means of zero-knowledge proof.

[0062] The target assets refer to assets in a broad sense, including homogeneous tokens, non-homogeneous tokens, semi-homogeneous tokens, etc. For example, the on-chain points held by users, the on-chain digital collections held, etc.

[0063] exist Figure 1 Prior to the steps shown, the method further includes steps S203 to S205 executed by a central agency device.

[0064] In step S203, the central organization device constructs a Merkle tree corresponding to the target smart contract and inserts all on-chain addresses of the target smart contract into the Merkle tree.

[0065] Optionally, the central institution device screens the on-chain addresses of eligible users corresponding to the target smart contract based on the public data on the chain. Then, the screened on-chain addresses are sorted according to specific rules, and the on-chain addresses are inserted into the Merkle tree in the determined order.

[0066] In step S204, the central organization device generates a random number, inserts the random number into the constructed Merkle tree, and obtains the hash value of the root of the Merkle tree.

[0067] In step S205, the central institution device generates a zero-knowledge proof verification contract based on the Merkle tree, and publishes the hash value of the root of the Merkle tree in the verification contract.

[0068] Refer to the following Figure 1 To illustrate, in step S101, the client device uses the first on-chain address to send a proof of existence request to the central agency device, and the proof of existence request is used to request the central agency device to generate and return the proof of existence data of the user corresponding to the client device holding the first on-chain address in the constructed Merkle tree.

[0069] In step S201, in response to receiving a request from a client device, the central organization device verifies whether the first on-chain address exists in the constructed Merkle tree by interacting with the client device.

[0070] Specifically, the central agency device generates a random string and sends the generated string to the client device; then, the central agency device receives the signature information sent by the client device, and the signature information is obtained by signing the random string using the on-chain account private key; then, the received signature result is parsed to verify the validity of the signature and obtain the on-chain address corresponding to the signing account; then, the central agency device verifies whether the on-chain address of the signing account is in the constructed Merkle tree.

[0071] In step S202, if the verification is passed, the central agency device sends the corresponding existence proof data to the client device.

[0072] In step S102, the client device receives existence proof data returned by the central organization device.

[0073] In step S103, the client device generates target proof data through a zero-knowledge proof circuit based on the existence proof data and the hash value of the Merkle tree root constructed in the central institution device, and the target proof data includes data for proving that the user corresponding to the client device holds a predetermined amount of target assets.

[0074] According to the method of the embodiment of the present application, a zero-knowledge proof is constructed by a trusted central agency, and the user uses an on-chain address to interact with the central agency to obtain a proof based on zero-knowledge proof. The proof can prove to a third party that it has a specific amount of assets without exposing the on-chain address.

[0075] Figure 2 A flow chart of a method for performing asset privacy certification provided by an embodiment of the present application is shown. The method at least includes S104 executed by a client device, and steps S301, S302, and S303 executed by a target node device of the blockchain system.

[0076] In actual scenarios, the execution subjects of this method are client devices and target node devices in the blockchain system. The target node device contains a zero-knowledge proof (ZKP) circuit, which is a zero-knowledge proof algorithm generation and verification logic defined by the developer, including privacy parameters and public parameters. The correctness of the circuit can be demonstrated to a third party without disclosing the privacy parameters. The prover uses all parameters to generate the ZKP proof, and the verifier uses the ZKP proof and public parameters to verify the validity of the proof.

[0077] The target node device can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0078] In step S104, the client device uses the second on-chain address to send an asset proof request to the target node device, where the proof request includes target proof data and social account information.

[0079] The asset proof request is used to request proof that the user corresponding to the social account holds a predetermined amount of target assets.

[0080] The second on-chain address and the first on-chain address are both on-chain addresses owned by the target user, and the second on-chain address is independent of the first on-chain address. For example, the second on-chain address may correspond to the on-chain address of a blockchain account commonly used by the user, and the first on-chain address may be the on-chain address of an account used to anonymously purchase assets.

[0081] In step S301, a target node device receives an asset certification request from a client device, where the asset certification request includes target certification data and social account information.

[0082] In step S302, the target node device verifies the target proof data through a zero-knowledge proof circuit algorithm to obtain a corresponding verification result.

[0083] In step S303, if the verification is successful, the target node device writes the social account information into the verification contract to prove that the user corresponding to the social account information holds a predetermined amount of target assets.

[0084] If the verification fails, the target node device returns verification failure result information to the corresponding client device.

[0085] According to one embodiment, the method further includes step S304 executed by the target node device, and step S302 includes step S3021 and step S3022.

[0086] In step S304, after the verification is successful and the social account information is written into the certification contract, the target node device marks the target certification data as used in the certification contract.

[0087] In step S3021, when verifying the target proof data through the zero-knowledge proof circuit, verify whether the target proof data is marked as used;

[0088] In step S3022, if the target certification data is valid and the target certification data is not marked as used, the verification result is verification success, otherwise it is verification failure.

[0089] According to one embodiment, after the verification is completed, the central agency publishes the random number mixed in when constructing the Merkle tree. The third party can construct the Merkle tree based on the on-chain address information disclosed on the chain and the random number to verify whether the central agency has done anything malicious.

[0090] According to the method of the embodiment of the present application, a trusted central agency constructs a zero-knowledge proof, and the user uses an on-chain address to interact with the central agency to obtain a proof based on a zero-knowledge proof, which can prove to a third party that he has a specific amount of assets without exposing the on-chain address. The user uses another unrelated account to submit the obtained proof and the user's social account information to the blockchain system for verification. If the verification is successful, it can be proved that the specific person corresponding to the submitted social account owns a predetermined amount of assets without exposing the account used by the user to purchase these assets, thereby achieving the purpose of asset privacy proof.

[0091] The method of the application embodiment is described below with reference to an example.

[0092] Figure 3 A flowchart of an exemplary privacy asset certification scenario according to an embodiment of the present application is shown.

[0093] Among them, the blockchain system of this example uses Merkle tree as the underlying data structure to store account information in the blockchain system. The application scenario of this example is described as follows: the user uses the on-chain address addrA to hold digital assets through the smart contract contract_A, and the number of digital assets held is greater than N. The on-chain address addrA is called a large-holder address. The user wants to prove that he holds more than N digital assets, but does not want to expose his on-chain address addrA to prevent others from querying the channel, time and price of the user's purchase of this batch of digital assets based on addrA. In order to achieve this goal, the method of this example includes two processes: generating asset privacy proof and asset privacy verification.

[0094] Reference Figure 2 The process of generating a privacy asset certificate in this example includes the interaction between the client device where the prover is located and the trusted central agency. Through this interaction process, the prover requests the trusted central agency to generate proof data (merkle proof) that he holds the on-chain address addrA.

[0095] The data obfuscation process according to this example includes the following steps P1 to P6:

[0096] P1: The trusted central agency scans all the addresses of major investors in the smart contract contract_A and inserts all the addresses of major investors into the Merkle tree. All the addresses of major investors are publicly visible on the chain. The trusted central agency can sort these addresses by capital letters and insert them into the Merkle tree in sequence.

[0097] P2: The trusted central agency generates a random number randomNum, inserts the random number into the Merkle tree, and obtains the hash value (root hash) of the final Merkle tree root (MerkleRoot); the purpose of this step is to prevent a third party from constructing a Merkle tree of a large account address to arbitrarily generate proof before the proof is made;

[0098] P3: The trusted central agency deploys zero-knowledge proof verification contract_B to the chain based on the constructed Merkle tree;

[0099] P4: The client device where the prover is located sends a request to the trusted central agency to generate proof data (merkle proof) that it holds the on-chain address addrA;

[0100] P5: In response to receiving the request from the client device, the trusted central agency verifies whether the transaction address is a large-scale address by interacting with the client device, and sends the corresponding proof data (merkle proof) to the client device when the verification passes.

[0101] Specifically, the trusted central agency generates a random string randomStr; the client device where the user is located uses the private key of the on-chain account addrA to sign randomStr, and sends the corresponding signature result to the trusted central agency; the trusted central agency parses the received signature result, verifies the validity of the signature, and obtains the address of the signing account addrA; the trusted central agency detects whether the address of the signing account addrA is in the constructed merkle tree. If the verification passes, a merkleproof is generated for addrA and sent to the client device where the requesting user is located.

[0102] P6: The client device where the prover is located uses the zkSNARK algorithm to generate a zero-knowledge proof ZKPproof based on the merkleproof obtained in the above asset privacy proof process and the root hash published by the trusted central agency in P2, where ZKP proof = zkSNARK (MerkleRoot, MerkleProof); this ZKP can prove to a third party that the user address addrA is located on the currently constructed Merkle tree without exposing the user address addrA and the merkle proof.

[0103] Continue to refer to Figure 2 The asset privacy verification process in this example includes the interaction between the client device where the prover is located and the node device corresponding to the blockchain public chain.

[0104] The asset privacy verification process according to this example includes the following steps Q1 to Q4:

[0105] Q1: The client device uses the new on-chain account addrB to send a transaction to the on-chain verification contract contract_B to request asset verification. The transaction parameters sent are ZKP proof and social account ID.

[0106] Q2: The node device corresponding to the public chain verifies the received ZKP proof through the zero-knowledge proof circuit;

[0107] Q3: If the verification is successful, the social account ID submitted by the client device is written into the contract, and the ZKP proof is marked as used in the contract to prevent it from being used by others in the future.

[0108] Q4: After the verification is completed, the trusted central agency publishes the random number randomNum mixed in step P2. The third party can build a merkle tree based on the public address information of the major investors on the chain plus the random number to verify whether the central agency is malicious.

[0109] At this point, user A has gone through the above process in this example to prove that the specific person corresponding to the social account ID does hold a number of digital assets of the smart contract contract_A greater than N, without exposing the address of the large account holder (on-chain address addA).

[0110] In addition, the embodiment of the present application also provides a first device for performing asset privacy certification in a client device and a second device for performing asset privacy certification in a central institution device. The structures of the first device and the second device are as follows: Figure 4 shown.

[0111] Among them, the first device includes: a device for sending a proof of existence request to a central agency device using a first on-chain address (hereinafter referred to as "first request sending device 101"), a device for receiving proof of existence data returned by the central agency device (hereinafter referred to as "proof of existence receiving device 102"), and a device for generating target proof data through a zero-knowledge proof circuit based on the hash value of the proof of existence data and the Merkle tree root constructed in the central agency device (hereinafter referred to as "proof data generating device 103").

[0112] The second device includes: a device for verifying the existence of the first on-chain address in the constructed Merkle tree by interacting with the client device in response to receiving a request from the client device (hereinafter referred to as "address existence verification device 201"), and a device for sending corresponding proof of existence data to the client device if the verification passes (hereinafter referred to as "proof of existence sending device 202").

[0113] exist Figure 4 Before the operation of the device shown, the target user according to the embodiment of the present application obtains the target asset through a transaction with the first account. The target user is a user who wishes to verify the ownership of the target asset by means of zero-knowledge proof.

[0114] The target assets refer to assets in a broad sense, including homogeneous tokens, non-homogeneous tokens, semi-homogeneous tokens, etc. For example, the on-chain points held by users, the on-chain digital collections held, etc.

[0115] The second device also includes a Merkle tree construction device, a hash value acquisition device and a verification contract generation device.

[0116] The Merkle tree construction device constructs a Merkle tree corresponding to the target smart contract, and inserts all on-chain addresses of the target smart contract into the Merkle tree.

[0117] Optionally, the central institution device screens the on-chain addresses of eligible users corresponding to the target smart contract based on the public data on the chain. Then, the screened on-chain addresses are sorted according to specific rules, and the on-chain addresses are inserted into the Merkle tree in the determined order.

[0118] The hash value acquisition device generates a random number, inserts the random number into the constructed Merkle tree, and obtains the hash value of the root of the Merkle tree.

[0119] The verification contract generating device generates a zero-knowledge proof verification contract based on the Merkle tree, and publishes the hash value of the root of the Merkle tree in the verification contract.

[0120] Refer to the following Figure 4 For explanation, the first request sending device 101 in the client device uses the first on-chain address to send a proof of existence request to the central agency device, and the proof of existence request is used to request the central agency device to generate and return the proof of existence data of the user corresponding to the client device holding the first on-chain address in the constructed Merkle tree.

[0121] In response to receiving a request from a client device, the address existence verification device 201 in the central agency device verifies whether the first on-chain address exists in the constructed Merkle tree by interacting with the client device.

[0122] Specifically, the central agency device generates a random string and sends the generated string to the client device; then, the central agency device receives the signature information sent by the client device, and the signature information is obtained by signing the random string using the on-chain account private key; then, the received signature result is parsed to verify the validity of the signature and obtain the on-chain address corresponding to the signing account; then, the central agency device verifies whether the on-chain address of the signing account is in the constructed Merkle tree.

[0123] If the verification passes, the existence proof sending means 202 sends the corresponding existence proof data to the client device.

[0124] The existence proof receiving means 102 receives the existence proof data returned by the central institution device.

[0125] The proof data generating device 103 generates target proof data through a zero-knowledge proof circuit based on the existence proof data and the hash value of the Merkle tree root constructed in the central agency device. The target proof data includes data for proving that the user corresponding to the client device holds a predetermined amount of target assets.

[0126] According to the device of the embodiment of the present application, a zero-knowledge proof is constructed by a trusted central organization, and a user uses an on-chain address to interact with the central organization to obtain a proof based on zero-knowledge proof. The proof can prove to a third party that the user has a specific amount of assets without exposing the on-chain address.

[0127] Refer to the following Figure 5 To explain, Figure 5 A schematic diagram of the structures of a first device for performing asset privacy proof in a client device and a third device for performing asset privacy proof in a target node device of a blockchain system provided in an embodiment of the present application is shown.

[0128] Among them, the first device includes: using the second on-chain address to send an asset proof request to the target node device, and the proof request includes target proof data and social account information (hereinafter referred to as "second request sending device 104").

[0129] The third device includes: a device for receiving an asset proof request from a client device (hereinafter referred to as "second request receiving device 301"), a device for verifying the target proof data through a zero-knowledge proof circuit algorithm to obtain a corresponding verification result (hereinafter referred to as "zero-knowledge verification device 302"), and a device for writing the social account information into a verification contract if the verification is successful to prove that the user corresponding to the social account holds a predetermined amount of target assets (hereinafter referred to as "information proof device 303").

[0130] Reference Figure 5 In step S104, the second request sending device 104 in the client device uses the second on-chain address to send an asset proof request to the target node device, and the proof request includes target proof data and social account information.

[0131] The asset proof request is used to request proof that the user corresponding to the social account holds a predetermined amount of target assets.

[0132] The second on-chain address and the first on-chain address are both on-chain addresses owned by the target user, and the second on-chain address is independent of the first on-chain address. For example, the second on-chain address may correspond to the on-chain address of a blockchain account commonly used by the user, and the first on-chain address may be the on-chain address of an account used to anonymously purchase assets.

[0133] The second request receiving means 301 in the target node device receives an asset certification request from a client device, where the asset certification request includes target certification data and social account information.

[0134] The zero-knowledge verification device 302 verifies the target proof data through a zero-knowledge proof circuit algorithm to obtain a corresponding verification result.

[0135] If the verification is successful, the information verification device 303 writes the social account information into the verification contract to prove that the user corresponding to the social account information holds a predetermined amount of target assets.

[0136] If the verification fails, the target node device returns verification failure result information to the corresponding client device.

[0137] According to one embodiment, the third device further comprises a certification data marking device.

[0138] After the verification is successful and the social account information is written into the certification contract, the certification data marking device marks the target certification data as used in the certification contract.

[0139] When the information proof device 303 verifies the target proof data through the zero-knowledge proof circuit, it verifies whether the target proof data is marked as used; if the target proof data is valid and the target proof data is not marked as used, the verification result is successful verification, otherwise it is failed verification.

[0140] According to one embodiment, after the verification is completed, the central agency publishes the random number mixed in when constructing the Merkle tree. The third party can construct the Merkle tree based on the on-chain address information disclosed on the chain and the random number to verify whether the central agency has done anything malicious.

[0141] According to the device of the embodiment of the present application, a trusted central agency constructs a zero-knowledge proof, and the user uses an on-chain address to interact with the central agency to obtain a proof based on a zero-knowledge proof, which can prove to a third party that he has a specific amount of assets without exposing the on-chain address. The user uses another unrelated account to submit the obtained proof and the user's social account information to the blockchain system for verification. If the verification is successful, it can be proved that the specific person corresponding to the submitted social account owns a predetermined amount of assets without exposing the account used by the user to purchase these assets, thereby achieving the purpose of asset privacy proof.

[0142] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the method corresponding to the electronic device may be the method for asset privacy certification in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.

[0143] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or may be an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0144] Figure 6The structure of a device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the device 1200 includes a central processing unit (CPU, Central Processing Unit) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM, Random Access Memory) 1203. In RAM1203, various programs and data required for system operation are also stored. CPU 1201, ROM 1202 and RAM 1203 are connected to each other through bus 1204. Input / output (I / O, Input / Output) interface 1205 is also connected to bus 1204.

[0145] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 1208 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet.

[0146] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 1201, the above functions defined in the method of the present application are executed.

[0147] Another embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application described above.

[0148] Specifically, the present embodiment may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device.

[0149] Computer readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0150] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0151] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0152] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0154] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0155] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0156] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0157] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0159] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A method for performing asset privacy certification in a client device, the method comprising: Sending a proof of existence request to a central institution device using the first on-chain address, wherein the proof of existence request is used to request the central institution device to generate and return proof of existence data in the constructed Merkle tree of the user corresponding to the client device holding the first on-chain address; Receive the existence proof data returned by the central institution equipment; Based on the existence proof data and the hash value of the Merkle tree root constructed in the central agency device, target proof data is generated through a zero-knowledge proof circuit, and the target proof data includes data for proving that the user corresponding to the client device holds a predetermined amount of target assets.

2. According to the method of claim 1, when it is necessary to prove to a third party that the user corresponding to the client device holds data of a predetermined amount of target assets, the method comprises: An asset proof request is sent to a target node device using the second on-chain address, wherein the proof request includes target proof data and social account information.

3. A method for performing asset privacy certification in a central institution device, the method comprising: In response to receiving a request from a client device, verifying whether the first on-chain address exists in the constructed Merkle tree by interacting with the client device; If the verification passes, the corresponding existence proof data is sent to the client device.

4. The method according to claim 3, wherein: The method further comprises: Construct a Merkle tree corresponding to the target smart contract, and insert all on-chain addresses of the target smart contract into the Merkle tree; Generate a random number, insert the random number into the constructed Merkle tree, and get the hash value of the root of the Merkle tree; A zero-knowledge proof verification contract is generated based on the Merkle tree, and a hash value of the root of the Merkle tree is published in the contract.

5. The method according to claim 3 or 4, wherein: Verifying whether the first on-chain address exists in the constructed Merkle tree by interacting with the client device includes: generating a random string and sending the generated string to the client device; Receive signature information sent by the client device, where the signature information is obtained by signing a random string using an on-chain account private key; Parse the received signature result to verify the validity of the signature and obtain the on-chain address corresponding to the signing account; Verify whether the on-chain address of the signing account is in the constructed Merkle tree.

6. A method for performing asset privacy certification in a target node device of a blockchain system, the method comprising: Receiving an asset proof request from a client device, the asset proof request including target proof data and social account information, the asset proof request being used to request proof that a user corresponding to the social account information holds a predetermined amount of target assets; Verifying the target proof data by a zero-knowledge proof circuit algorithm to obtain a corresponding verification result; If the verification is successful, the social account information is written into the verification contract to prove that the user corresponding to the social account holds a predetermined amount of the target asset.

7. The method according to claim 6, wherein: The method further comprises: After the verification is successful and the social account information is written into the proof contract, the target proof data is marked as used in the proof contract.

8. The method according to claim 7, wherein: The method further comprises: When verifying the target proof data through the zero-knowledge proof circuit, verify whether the target proof data is marked as used; If the target certification data is valid and the target certification data is not marked as used, the verification result is a successful verification, otherwise it is a failed verification.

9. A first device for performing asset privacy certification in a client device, the first device comprising: A device for sending a proof of existence request to a central institution device using a first on-chain address, wherein the proof of existence request is used to request the central institution device to generate and return proof of existence data in a constructed Merkle tree of the user corresponding to the client device holding the first on-chain address; Means for receiving existence proof data returned by the central agency device; A device for generating target proof data through a zero-knowledge proof circuit based on the existence proof data and the hash value of the Merkle tree root constructed in the central agency device, wherein the target proof data includes data for proving that the user corresponding to the client device holds a predetermined amount of target assets.

10. A second device for performing asset privacy certification in a central institution device, the second device comprising: means for verifying the presence of the first on-chain address in the constructed Merkle tree by interacting with the client device in response to receiving a request from the client device; Means for sending corresponding proof of existence data to the client device if the verification passes.

11. A third device for performing asset privacy certification in a target node device of a blockchain system, the third device comprising: A device for receiving an asset proof request from a client device, the asset proof request including target proof data and social account information, the asset proof request being used to request proof that a user corresponding to the social account information holds a predetermined amount of target assets; A device for verifying the target proof data by a zero-knowledge proof circuit algorithm to obtain a corresponding verification result; A device for writing the social account information into a verification contract if the verification is successful to prove that the user corresponding to the social account holds a predetermined amount of target assets.

12. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1 or 2, or the method of any one of claims 3 to 5, or the method of any one of claims 6 to 8.

13. A computer-readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method as claimed in any one of claims 1 or 2, or to execute the method as claimed in any one of claims 3 to 5, or to execute the method as claimed in any one of claims 6 to 8.

14. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 or 2, or executes the method according to any one of claims 3 to 5, or executes the method according to any one of claims 6 to 8.

Citation Information

Cited By

  • Building engineering quality control method and system based on block chain

    CN118886064A