Blockchain-based identity verification method and apparatus, device, and medium

By verifying the zero-knowledge proof held by the user through the blockchain system and generating encrypted identifiers using Merkle trees and preset salt values, the problem of decentralized management and repeated identity verification of user privacy data in existing technologies is solved, realizing decentralized management of user identity verification and reusability of credentials.

WO2026066530A1PCT designated stage Publication Date: 2026-04-02ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing technologies cannot achieve decentralized management of user privacy data without leaking users' personal privacy data, and users need to repeatedly authenticate themselves in different projects.

Method used

By verifying the zero-knowledge proof held by the user through the blockchain system, and using the zero-knowledge proof to verify the credential data held by the user that has passed identity authentication, and combining Merkle trees and preset salt values ​​to generate encrypted identifiers, decentralized management of user identity verification is achieved.

Benefits of technology

It enables decentralized management of user privacy data without leaking users' personal privacy data, improves the security of user privacy data, and allows user identity authentication credentials to be reused, avoiding duplicate authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025108422_02042026_PF_FP_ABST
    Figure CN2025108422_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present description provides a blockchain-based identity verification method and apparatus, a device, and a medium. The method comprises: a first device receives verification information from a user equipment held by a first user, wherein the verification information comprises a zero-knowledge proof, and the zero-knowledge proof is used for proving that the first user holds certificate data indicating that identity authentication has been passed, and state data of a blockchain stores first commitment data obtained on the basis of the certificate data; the first device sends a first transaction to the blockchain on the basis of the verification information; and a node of the blockchain performs a verification operation on the zero-knowledge proof on the basis of the first transaction.
Need to check novelty before this filing date? Find Prior Art

Description

Blockchain-based identity verification method, device, equipment and medium

[0001] The present application claims priority to the Chinese patent application No. 2024113919408, filed on September 30, 2024, and entitled "Blockchain-based identity verification method, device, equipment and medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] One or more embodiments of the present specification relate to the field of blockchain technology, in particular to a blockchain-based identity verification method, device, equipment and medium. BACKGROUND

[0003] Blockchain is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. In a blockchain system, data blocks are combined into a chain-like data structure in a sequential manner according to time sequence, and are guaranteed to be non-tamperable and non-forgery by cryptography. Due to the characteristics of decentralization, information non-tamperability and autonomy, blockchain has also received more and more attention and application.

[0004] The rise of decentralized finance (DeFi), Web 3.0 and other blockchain-based applications has stimulated the demand for data management through blockchain. There is a need for a blockchain-based identity verification scheme. SUMMARY

[0005] One or more embodiments of the present specification provide a blockchain-based identity verification method, device, equipment and medium.

[0006] According to a first aspect, a blockchain-based identity verification method is provided. A first device receives verification information from a user device held by a first user; the verification information includes a zero-knowledge proof; the zero-knowledge proof is used to prove that the first user holds a credential data that has passed identity authentication, and that first commitment data obtained based on the credential data is stored in state data of the blockchain;

[0007] The first device sends a first transaction to the blockchain based on the verification information;

[0008] The node of the blockchain performs a verification operation on the zero-knowledge proof according to the first transaction.

[0009] According to a second aspect, a blockchain-based identity verification method is provided. The method is performed by a node of a blockchain; the method comprises:

[0010] receive a first transaction sent by a first device based on verification information; the verification information is obtained by the first device from a user device held by a first user; the verification information comprises a zero-knowledge proof; the zero-knowledge proof is used to prove that the first user holds credential data that has passed identity authentication and that first commitment data obtained based on the credential data is stored in state data of the blockchain;

[0011] verify the zero-knowledge proof according to the first transaction.

[0012] According to a third aspect, an identity authentication apparatus based on a blockchain is provided, the apparatus is deployed at a node of the blockchain; the apparatus comprises:

[0013] a receiving module, configured to receive a first transaction sent by a first device based on verification information; the verification information is obtained by the first device from a user device held by a first user; the verification information comprises a zero-knowledge proof; the zero-knowledge proof is used to prove that the first user holds credential data that has passed identity authentication and that first commitment data obtained based on the credential data is stored in state data of the blockchain;

[0014] a verifying module, configured to verify the zero-knowledge proof according to the first transaction.

[0015] According to a fourth aspect, a computer readable storage medium is provided, the storage medium stores a computer program, and the computer program is executed by a processor to implement the method of any one of the first aspect or the second aspect.

[0016] According to a fifth aspect, a computing device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of any one of the first aspect or the second aspect when executing the program.

[0017] The embodiments of the present specification can provide the following beneficial effects:

[0018] The identity authentication apparatus based on the blockchain provided by the embodiments of the present specification can verify a zero-knowledge proof used to prove that a user holds credential data, which is credential data that has passed identity authentication, through a blockchain system, to authenticate the identity of the user. Thus, the decentralized management of the private data of the user is realized without leaking the private data of the user, the security of the private data of the user is improved, and the credential used for identity authentication of the user can be reused, so that the user does not need to repeat the identity authentication in different projects.

[0019] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory and are not restrictive of the application. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present specification, the drawings needed to be used in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments described in the present specification, and other drawings can be obtained by those skilled in the art without creative labor.

[0021] FIG. 1 is an architecture diagram of a blockchain system according to an exemplary embodiment of the present specification;

[0022] FIG. 2 is a schematic diagram of a blockchain-based identity verification scenario according to an exemplary embodiment of the present specification;

[0023] FIG. 3 is an interaction flow diagram of a blockchain-based identity verification method according to an exemplary embodiment of the present specification;

[0024] FIG. 4A is a schematic diagram of a Merkle tree according to an exemplary embodiment of the present specification;

[0025] FIG. 4B is a schematic diagram of a zero-knowledge proof verification process according to an exemplary embodiment of the present specification;

[0026] FIG. 5 is a block diagram of a blockchain-based identity verification apparatus according to an exemplary embodiment of the present specification. DETAILED DESCRIPTION

[0027] In order for those skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be described clearly and completely in conjunction with the drawings in the embodiments of the present specification. Obviously, the described embodiments are only some embodiments of the present specification, not all embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present specification.

[0028] FIG. 1 shows an architecture diagram of a blockchain system in an embodiment. As shown in FIG. 1, the blockchain system includes N nodes, and nodes 1-8 are shown in FIG. 1. The connection between the nodes schematically represents the connection between the nodes, which is used to transmit data between the nodes. The nodes can store the full amount of the ledger, i.e., store all blocks and the state of all accounts. Among them, each node in the blockchain system can generate the same state in the blockchain system by executing the same transaction, and each node in the blockchain system can store the same state database.

[0029] A transaction in the field of blockchain can refer to a unit of task performed in a blockchain system and recorded in the blockchain system. A transaction usually includes a sending field (From), a receiving field (To) and a data field (Data). Among them, in the case of a transaction being a transfer transaction, the From field represents the account address of the account initiating the transaction (i.e., initiating the task of transferring to another account), the To field represents the account address receiving the transaction (i.e., receiving the transfer), and the Data field includes the transfer amount.

[0030] The blockchain system can provide the function of a smart contract. A smart contract on a blockchain system is a contract that can be triggered and executed by a transaction on the blockchain system. A smart contract can be defined in the form of code. Invoking a smart contract in a blockchain system is to initiate a transaction pointing to the address of the smart contract, so that each node in the blockchain system runs the smart contract code in a distributed manner.

[0031] In the scenario of deploying a contract, for example, Bob sends a transaction containing information for creating a smart contract (i.e., deploying a contract) to the blockchain system as shown in FIG. 1, the data field of the transaction includes the code (such as bytecode or machine code) of the contract to be created, and the to field of the transaction is empty, indicating that the transaction is used to deploy a contract. After the nodes reach an agreement through a consensus mechanism, the contract address "0x6f8ae93…" of the contract is determined, each node adds a contract account corresponding to the contract address of the smart contract in the state database, allocates a state storage corresponding to the contract account, stores the contract code, saves the hash value of the contract code in the state storage of the contract, and thus the contract is successfully created.

[0032] In the scenario of invoking a contract, for example, Bob sends a transaction for invoking a smart contract to the blockchain system as shown in FIG. 1, the from field of the transaction is the address of the account of the transaction initiator (i.e., Bob), the to field is "0x6f8ae93…" described above, i.e., the address of the invoked smart contract, and the data field of the transaction includes the method and parameters for invoking the smart contract. After the transaction is consensus in the blockchain system, each node in the blockchain system can execute the transaction respectively, thereby executing the contract respectively, and updating the state database based on the execution of the contract.

[0033] Currently, for some services / products such as the financial field, the user needs to perform identity verification before use, and can normally use the services / products after successful identity verification. In the related art, some organizations or institutions providing KYT (Know Your Customer, confirming customer identity) services can collect the identity information of the user, verify the identity of the user through biometric identification technology and information collection. However, this way cannot realize the decentralized management of the user's private data without revealing the user's private data.

[0034] To this end, an embodiment of the present specification provides an identity verification scheme based on the blockchain shown in FIG. 1, which can verify the zero-knowledge proof for proving that the user holds the credential data through the blockchain system, and the credential data is the credential that has passed the identity authentication, to verify the identity of the user. Thus, the decentralized management of the user's private data without revealing the user's private data is realized, the security of the user's private data is improved, and the reusability of the credential for user identity authentication is realized, so that the user does not need to repeat the identity verification in different projects.

[0035] FIG. 2 shows a schematic diagram of an identity verification scenario based on a blockchain. As shown in FIG. 2, the identity verification system based on the blockchain can include a blockchain 201, a user side 202, a verification side 203 and an authentication side 204. The verification side 203 and the authentication side 204 can establish a communication connection with the blockchain 201 through the devices they hold respectively. The user side 202 and the verification side 203 can establish a communication connection through the devices they hold respectively.

[0036] The user side 202 is a personal / organization / institution that needs to perform identity authentication, and the user side 202 can submit the identity card information to the authentication side 204 in advance, and the authentication side 204 performs audit and authentication. If the audit and authentication are passed, the authentication side 204 can generate the credential data S that has passed the identity authentication for the user side 202 through the device it holds, and return the credential data S to the user side 202. In addition, the authentication side 204 can obtain commitment data C based on the credential data S through the device it holds. For example, the address A corresponding to the user side 202 and the credential data S can be subjected to preset hash calculation to obtain the commitment data C, so that the user side 202 and the credential data S are bound. The commitment data C is uploaded to the blockchain 201 for on-chain storage.

[0037] When the user party 202 uses the service W / product P that needs to be authenticated, since the commitment data C corresponding to the user party 202 has been stored in the blockchain 201, the user party 202 does not need to re-authenticate, and can directly verify that it holds the credential data S corresponding to the commitment data C based on the blockchain. Specifically, the user party 202 can generate a zero-knowledge proof Q locally through the device it holds, and the zero-knowledge proof Q can include an a part and a b part. The a part is used to prove that the user party 202 holds the credential data S corresponding to the commitment data C, and that the commitment data C is stored in the blockchain 201. The b part is used to prove that the user party 202 has a binding relationship with the commitment data C. Specifically, since the address A corresponding to the user party 202 belongs to the private data of the user party 202, the b part can include an encrypted address M obtained by encrypting the address A based on the salt value H.

[0038] Then, the user party 202 can send verification information to the verification party 203, where the verification party 203 can be a trusted intermediary, and the verification information can include the zero-knowledge proof Q, the to-be-verified address A', and the to-be-verified salt value H'. After receiving the above verification information, the verification party 203 can obtain a to-be-verified encrypted address M' based on the to-be-verified address A' and the to-be-verified salt value H'. The to-be-verified encrypted address M' is compared with the encrypted address M included in the b part of the zero-knowledge proof Q, and if the to-be-verified encrypted address M' is consistent with the encrypted address M, the verification party 203 can send a transaction TX including the zero-knowledge proof Q to the blockchain 201. It should be noted that if the credential data S is processed based on the address A corresponding to the user party 202 to generate the commitment data C, sending the transaction TX to the blockchain 201 through the verification party 203 can avoid exposing the address A corresponding to the user party 202.

[0039] After the blockchain 201 receives the transaction TX, the transaction TX is executed, and the zero-knowledge proof Q is verified. Specifically, through the a part in the zero-knowledge proof Q, it can be proved that the user party 202 holds the credential data S corresponding to the commitment data C, and that the commitment data C is stored in the blockchain 201. Through the b part in the zero-knowledge proof Q, it can be proved that the user party 202 has a binding relationship with the commitment data C. If the verification of the zero-knowledge proof Q passes, it can be determined that the user party 202 is a legitimate user who has passed the authentication, so that the user party 202 can be allowed to use the service W / product P.

[0040] The scheme provided in the present specification will be described in detail below in conjunction with specific embodiments.

[0041] As shown in FIG. 3, FIG. 3 is an interaction flowchart of a blockchain-based identity verification method according to an exemplary embodiment, which involves a first device (e.g., a device held by a verification party), a user device (e.g., a device held by a user party), a second device (e.g., a device held by an authentication party), and a node of a blockchain. The first device, the user device, the second device, and the node of the blockchain can each be implemented as any device, platform, server, or device cluster having computing and processing capabilities. The method includes the following steps:

[0042] In step 301, the second device generates credential data for the first user, and obtains first commitment data based on the credential data.

[0043] In this embodiment, first, the authentication party performs identity authentication on the first user, where the authentication party can be an organization or institution capable of providing KYT services. After the authentication party determines that the identity authentication on the first user is successful, it can generate credential data for the first user through the second device held by the authentication party. The credential data has uniqueness and unpredictability, and thus, the credential data can be, for example, a randomly generated random number.

[0044] Next, on one hand, the second device can return the credential data to the first user. On the other hand, the second device can obtain first commitment data based on the credential data. The first commitment data can be determined by, for example, performing a preset hash calculation on the first identifier corresponding to the first user and the credential data, thereby binding the credential data to the first user. The first identifier can be a unique identifier corresponding to the first user, such as a blockchain account address corresponding to the first user. Since both the first identifier and the credential data have uniqueness, the first commitment data obtained by performing a preset hash calculation on the first identifier and the credential data also has uniqueness (i.e., different users correspond to different commitment data).

[0045] In step 303, the second device instructs the node of the blockchain to chain the first commitment data.

[0046] In this embodiment, after generating the first commitment data, the second device can send a second transaction calling a target contract to the blockchain, where the second transaction includes the first commitment data. The state data of the contract account corresponding to the target contract in the blockchain stores a Merkle tree constructed based on commitment data of multiple users, where each leaf node in the Merkle tree corresponds to a user, and any leaf node can store the commitment data of a user. It should be noted that the Merkle tree constructed based on the commitment data is public data, and each party user can obtain or query the Merkle tree or the data in the Merkle tree.

[0047] After the node of the blockchain receives the second transaction, the second transaction is executed, the above-mentioned Merkle tree is updated by running the target contract using the first commitment data to be stored on the chain. Specifically, a new leaf node can be created in the above-mentioned Merkle tree, the first commitment data is stored in the new leaf node, and the parent node and the root node of the new leaf node in the Merkle tree are updated. FIG. 4A is a schematic diagram of a Merkle tree, as shown in FIG. 4A, leaf nodes 1, 2, 3, and 4 correspond to the commitment data of four different users, for example, the leaf node 1 stores the commitment data corresponding to the user 1, the leaf node 2 stores the commitment data corresponding to the user 2, the leaf node 3 stores the commitment data corresponding to the user 3, and the leaf node 4 stores the commitment data corresponding to the user 4. The node 5 stores the hash value obtained by performing hash calculation based on the node 1 and the node 2, and the node 6 stores the hash value obtained by performing hash calculation based on the node 3 and the node 4. The node 7 is the root node of the Merkle tree, which stores the hash value obtained by performing hash calculation based on the node 5 and the node 6.

[0048] In step 305, the user equipment sends the verification information to the first device.

[0049] In this embodiment, when the first user needs to prove that he has passed the identity authentication, the verification information can be obtained through the user equipment held by the first user. Specifically, first, the user equipment can obtain the credential data held by the first user, which can be returned by the second device to the user equipment in step 301. Then, the user equipment can generate a zero-knowledge proof according to the credential data. The zero-knowledge proof can be used to prove that the first user holds the credential data that has passed the identity authentication, and the first commitment data obtained based on the credential data is stored in the state data of the blockchain. After generating the zero-knowledge proof, the user equipment can obtain the verification information, which includes the zero-knowledge proof, a preset salt value and a first identifier, and the user equipment can send the verification information to the first device.

[0050] Specifically, the user equipment can generate a zero-knowledge proof in the following way: the user equipment can obtain the blockchain account address corresponding to the first user as the first identifier. The path corresponding to the first commitment data in the Merkle tree is obtained, for example, the user equipment can directly or through other devices obtain the Merkle tree currently constructed based on the commitment data from the blockchain, and then perform hash calculation based on the first identifier and the credential data to obtain the first commitment data. The leaf node corresponding to the first commitment data is found in the above-mentioned Merkle tree, and the path corresponding to the first commitment data in the Merkle tree is obtained based on the leaf node. At the same time, the reference data used to calculate the root of the Merkle tree is obtained according to the path and the above-mentioned Merkle tree.

[0051] Referring to FIG. 4A, taking the first commitment data stored in the node 2 as an example, the corresponding path of the first commitment data in the Merkle tree can include the node 2, the node 5, and the node 7. If the tree root of the Merkle tree is to be calculated based on the first commitment data, the data corresponding to the node 1 and the node 6 is also needed, and therefore, the data stored by the node 1 and the node 6 can be acquired as reference data.

[0052] Next, a preset salt value used for encryption can also be acquired, and the first identifier can be encrypted based on the preset salt value by using a preset encryption algorithm to obtain an encrypted identifier. Furthermore, the tree root of the Merkle tree can be calculated based on the first commitment data, the corresponding path of the first commitment data in the Merkle tree, and the reference data. A zero-knowledge proof can be generated based on the above-mentioned preset salt value, the first identifier, the credential data, the corresponding path of the first commitment data in the Merkle tree, and the reference data by using a preset algorithm (for example, a zero-knowledge proof circuit algorithm). The generated zero-knowledge proof can include an input part used for inputting the circuit algorithm, and the input part can include secret data and public data. The secret data can include the salt value ciphertext, the first identifier ciphertext, the credential data ciphertext, the corresponding path ciphertext of the first commitment data in the Merkle tree, and the reference data ciphertext after secret processing, and the public data can include the encrypted identifier and the tree root of the Merkle tree.

[0053] When verifying the zero-knowledge proof, the secret data and the public data included in the input part can be input into the circuit algorithm, and a verification result can be output by the circuit algorithm. If the verification result indicates that the verification is successful, it means that the encrypted identifier included in the public data can be obtained based on the salt value ciphertext and the first identifier ciphertext included in the secret data, and the tree root of the Merkle tree included in the public data can be obtained based on the first identifier ciphertext, the credential data ciphertext, the corresponding path ciphertext of the first commitment data in the Merkle tree, and the reference data ciphertext included in the secret data, thereby verifying the authenticity and validity of the credential data.

[0054] In step 307, the first device sends a first transaction to the blockchain based on the verification information.

[0055] In this embodiment, the first device can first acquire the preset salt value and the first identifier from the verification information, and generate an encrypted identifier to be verified by performing preset hash processing on the first identifier based on the preset salt value. Then, the first device can compare the encrypted identifier to be verified with the encrypted identifier included in the public data of the zero-knowledge proof in the verification information, and if they are consistent, the first device can send a first transaction to the blockchain based on the zero-knowledge proof included in the verification information. The first transaction includes the above-mentioned zero-knowledge proof and calls a target contract in which the above-mentioned Merkle tree is stored.

[0056] In step 309, a node of the blockchain performs a verification operation on the zero-knowledge proof based on the first transaction.

[0057] In the embodiment, after the node of the blockchain receives the first transaction, the node of the blockchain verifies the zero-knowledge proof by executing the first transaction and running the target contract. Specifically, the node of the blockchain can obtain the tree root of the Merkle tree from the contract state corresponding to the target contract, and compare the tree root of the Merkle tree included in the public data in the zero-knowledge proof. If the two are consistent, the input part in the zero-knowledge proof can be further obtained, the input part is input into the circuit algorithm, and the verification result output by the circuit algorithm is obtained. The node of the blockchain can chain the verification result for storage and return it to the user device. The circuit algorithm can be pre-deployed in the target contract.

[0058] FIG. 4B is a schematic diagram of the verification process of the zero-knowledge proof. As shown in FIG. 4B, the salt value ciphertext, the first identity ciphertext, the credential data ciphertext, the path ciphertext of the first commitment data in the Merkle tree, and the reference data ciphertext included in the secret input of the zero-knowledge proof can be input into the circuit algorithm, and the verification result output by the circuit algorithm, for example, the verification result can be true (indicating that the verification is passed) or false (indicating that the verification is not passed).

[0059] The above-mentioned embodiments of the present specification provide a blockchain-based identity verification method. The zero-knowledge proof for proving that the user holds the credential data can be verified by the blockchain system. The credential data is the credential that has passed the identity authentication, and the user identity is verified. Thus, the decentralized management of the user's private data is realized without revealing the user's personal private data, the security of the user's private data is improved, and the reusability of the user identity authentication credential is realized, so that the user does not need to repeat the identity authentication in different projects.

[0060] It should be noted that although the operations of the method of the embodiments of the present specification are described in a specific order in the above-mentioned embodiments, this does not require or imply that the operations must be performed in this specific order, or that all of the shown operations must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can change the order of execution. Additionally or alternatively, certain steps can be omitted, a plurality of steps can be combined into one step, and / or one step can be divided into a plurality of steps.

[0061] Corresponding to the foregoing embodiment of the blockchain-based identity verification method, the present specification also provides an embodiment of a blockchain-based identity verification device.

[0062] As shown in FIG. 5, FIG. 5 is a block diagram of a blockchain-based identity verification device according to an exemplary embodiment of the present specification. The device is deployed in the node of the blockchain, and the device can include a receiving module 501 and a verification module 502.

[0063] The receiving module 501 is configured to receive a first transaction sent by the first device based on verification information, the verification information being obtained by the first device from a user device held by the first user, and the verification information including zero-knowledge proof, the zero-knowledge proof being used to prove that the first user holds the credential data that has passed the identity authentication and that the first commitment data based on the credential data is stored in the state data of the blockchain.

[0064] The verification module 502 is configured to perform a verification operation on the zero-knowledge proof according to the first transaction.

[0065] In some embodiments, the state data of the blockchain stores a Merkle tree based on commitment data of a plurality of users, wherein the commitment data of any user corresponds to a leaf node of the Merkle tree.

[0066] In some embodiments, the first commitment data is determined by preset hash calculation on the first identity corresponding to the first user and the credential data.

[0067] In some embodiments, the zero-knowledge proof is generated by: obtaining the blockchain account address corresponding to the first user as the first identity, obtaining the path corresponding to the first commitment data in the Merkle tree and the reference data used to calculate the root of the Merkle tree, and generating the zero-knowledge proof based on the credential data, the first identity, the path and the reference data.

[0068] In some embodiments, the zero-knowledge proof is generated based on the credential data, the first identity, the path and the reference data by: obtaining a preset salt value used to generate an encrypted identity for the first identity, and generating the zero-knowledge proof based on the preset salt value, the credential data, the first identity, the path and the reference data, so that the encrypted identity and the Merkle tree root corresponding to the first commitment data are included in the public data of the zero-knowledge proof.

[0069] For the device embodiment, since it basically corresponds to the method embodiment, the related parts can be referred to the part of the method embodiment. The device embodiments described above are only schematic and the units illustrated as separate components can or can not be physically separate and the components illustrated as separate components can or can not be physical components. All or some of the modules can be implemented according to the actual needs, and the person of ordinary skill in the art can understand and implement without creative effort.

[0070] One or more embodiments of the present specification also provide a computer readable storage medium, which stores a computer program, and the computer program can be used to execute the identity verification method based on the blockchain provided by any one of the embodiments of FIG. 3.

[0071] One or more embodiments of the present specification also provide a computing device, comprising a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the blockchain-based identity verification method provided by any one of the embodiments of FIG. 3.

[0072] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.

[0073] The controller can be implemented in any suitable way, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. The skilled person will also appreciate that, in addition to implementing the controller in pure computer readable program code, it is possible to implement the controller in the form of logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. to perform the same functions by logically programming the method steps. Such a controller can therefore be considered to be a hardware component, and the means included therein to perform the various functions can also be considered to be structures within the hardware component. Alternatively, or even additionally, the means to perform the various functions can be considered to be both a software module implementing the method and a structure within a hardware component.

[0074] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not rule out that with the development of future computer technologies, computers implementing the functions of the above embodiments can be personal computers, laptop computers, vehicle human-computer interaction devices, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email devices, game consoles, tablet computers, wearable devices, or combinations of any of these devices.

[0075] While one or more embodiments of this specification provide the operational steps of the methods described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or end product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes the elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any particular order.

[0076] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

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

[0078] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart or flowsheets and / or block or blocks of the block diagrams.

[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheets and / or block or blocks of the block diagrams.

[0080] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0081] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the computer stores the information. The memory is an example of computer readable media.

[0082] Computer readable media includes permanent and non-permanent, moveable and non- moveable media that can be implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules 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, compact disc read only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that is accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0083] Those skilled in the art will appreciate that the one or more embodiments described herein can be provided as a method, a system or a computer program product. Accordingly, the one or more embodiments described herein can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the one or more embodiments described herein can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable code.

[0084] The one or more embodiments described herein can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The one or more embodiments described herein can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0085] The various embodiments described in this specification can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The various embodiments described in this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0086] The above description is only some embodiments of the one or more embodiments described in this specification and is not intended to limit the one or more embodiments described in this specification. Those skilled in the art can make various modifications and changes to the one or more embodiments described in this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the one or more embodiments described in this specification shall be included in the scope of the claims.

Claims

1. A blockchain-based identity verification method, comprising: receiving, by a first device, verification information from a user device held by a first user; the verification information comprising a zero-knowledge proof; the zero-knowledge proof being used to prove that the first user holds credential data that has passed identity authentication and that first commitment data derived from the credential data is stored in state data of a blockchain; sending, by the first device, a first transaction to the blockchain based on the verification information; performing, by a node of the blockchain, a verification operation on the zero-knowledge proof according to the first transaction.

2. The method of claim 1, wherein, the state data of the blockchain storing a Merkle tree derived from commitment data of a plurality of users, wherein the commitment data of any user corresponds to a leaf node of the Merkle tree.

3. The method of claim 1, wherein, the first commitment data being determined by a preset hash calculation of a first identifier corresponding to the first user and the credential data.

4. The method of claim 1, wherein, before the first device receives the verification information, performing, by a second device, the following operations: generating credential data for the first user after determining that identity authentication of the first user is successful; obtaining the first commitment data based on the credential data and storing the first commitment data on-chain.

5. The method of claim 2, wherein, before the first device receives the verification information, performing, by the user device, the following operations: obtaining the credential data; generating a zero-knowledge proof based on the credential data; sending the verification information to the first device based on the zero-knowledge proof.

6. The method of claim 5, wherein, the generating of the zero-knowledge proof based on the credential data comprises: obtaining a blockchain account address corresponding to the first user as a first identifier; obtaining a path corresponding to the first commitment data in the Merkle tree and reference data for calculating a Merkle tree root; generating a zero-knowledge proof based on the credential data, the first identifier, the path, and the reference data.

7. The method of claim 6, wherein, the generating of the zero-knowledge proof based on the credential data, the first identifier, the path, and the reference data comprises: obtaining a preset salt value used to generate an encrypted identifier for the first identifier; generating a zero-knowledge proof based on the preset salt value, the credential data, the first identifier, the path, and the reference data, so that the encrypted identifier and a Merkle tree root corresponding to the first commitment data are included in public data of the zero-knowledge proof.

8. The method of claim 7, wherein, the verification information further comprises the preset salt value and the first identifier; wherein the sending of the first transaction to the blockchain based on the verification information comprises: generating an encrypted identifier to be verified based on the preset salt value and the first identifier; if the encrypted identifier to be verified is consistent with the encrypted identifier included in the public data of the zero-knowledge proof, sending the first transaction to the blockchain based on the zero-knowledge proof included in the verification information. 9.A blockchain-based identity verification method, performed by a node of a blockchain, comprising: receiving a first transaction sent by a first device based on verification information; the verification information being obtained by the first device from a user device held by a first user; The verification information includes zero-knowledge proof; the zero-knowledge proof is used to prove that the first user holds the credential data that has passed identity authentication, and first commitment data obtained based on the credential data is stored in the state data of the blockchain; According to the first transaction, a verification operation is performed on the zero-knowledge proof.

10. The method of claim 9, wherein, The state data of the blockchain stores a Merkle tree based on commitment data of a plurality of users, wherein the commitment data of any user corresponds to a leaf node of the Merkle tree.

11. The method of claim 9, wherein, The first commitment data is determined by preset hash calculation of the first identifier corresponding to the first user and the credential data.

12. The method of claim 10, wherein, The zero-knowledge proof is generated in the following way: Obtain the blockchain account address corresponding to the first user as the first identifier; Obtain the path corresponding to the first commitment data in the Merkle tree and the reference data for calculating the Merkle tree root; Based on the credential data, the first identifier, the path and the reference data, generate zero-knowledge proof.

13. The method of claim 12, wherein, The zero-knowledge proof is generated based on the credential data, the first identifier, the path and the reference data, including: Obtain a preset salt value for generating an encrypted identifier for the first identifier; Based on the preset salt value, the credential data, the first identifier, the path and the reference data, generate zero-knowledge proof, so that the public data of the zero-knowledge proof includes the encrypted identifier and the Merkle tree root corresponding to the first commitment data.

14. A blockchain-based identity verification device, the device is deployed on a node of a blockchain; the device comprises: A receiving module for receiving a first transaction sent by a first device based on verification information; The verification information is obtained by the first device from a user device held by a first user; the verification information includes zero-knowledge proof; the zero-knowledge proof is used to prove that the first user holds the credential data that has passed identity authentication, and first commitment data obtained based on the credential data is stored in the state data of the blockchain; A verification module for performing a verification operation on the zero-knowledge proof according to the first transaction.

15. A computer-readable storage medium having a computer program stored thereon, when the computer program is executed in a computer, the computer program causes the computer to execute the method of any one of claims 1-13.

16. A computing device comprising a memory and a processor, the memory having executable code stored therein, and the processor, when executing the executable code, implements the method of any one of claims 1-13.

Citation Information

Patent Citations

  • Block chain-based copyright asset publishing method and apparatus, and electronic device

    CN115174097A

  • Internet of Things identity authentication method based on block chain

    CN118214552A

  • Trusted identity information management method, device and system based on block chain network

    CN118395402A

  • Identity verification method and device based on block chain, equipment and medium

    CN119249387A

  • Biometric-based identity verificaton using zero-knowledge proofs

    US20220222678A1