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

The blockchain system verifies the user's zero-knowledge proof, which solves the problem that user identity authentication cannot be decentralized in the existing technology, and realizes the security of user identity authentication and the reusability of credentials.

CN119249387AActive Publication Date: 2025-01-03ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD

Patent Information

Application Number
CN202411391940.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-03
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The prior art cannot decentralize the user's personal privacy data without revealing the user's personal privacy data, and users need to repeatedly authenticate their identity in different projects.

Method used

The user's zero-knowledge proof is verified through the blockchain system, and the user's zero-knowledge proof is used to prove that the user holds credential data that has passed the identity authentication, realizing the decentralized management of user identities and reusability of credentials.

Benefits of technology

Without revealing the user's personal privacy data, the security of user privacy data is improved, and the credentials for user identity authentication are reusable, so that users do not need to repeat identity authentication in different projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249387A_ABST
    Figure CN119249387A_ABST
Patent Text Reader

Abstract

The invention provides an identity verification method and device based on a block chain, equipment and a medium. The method comprises the steps that first equipment receives verification information from user equipment held by a first user; the verification information comprises zero knowledge proof; the zero-knowledge proof is used for proving that the first user holds certificate data passing identity authentication, and first commitment data obtained based on the certificate data is stored in the state data of the block chain; the first device sends a first transaction to the block chain based on the verification information; and the node of the block chain performs verification operation for zero-knowledge proof according to the first transaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a blockchain-based identity authentication method, apparatus, device, and medium. Background Art

[0002] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. In the blockchain system, data blocks are combined into a chain data structure in a sequential manner according to time sequence, and a distributed ledger that cannot be tampered with or forged is guaranteed by cryptography. Due to the characteristics of blockchain such as decentralization, information cannot be tampered with, and autonomy, blockchain has also received more and more attention and application.

[0003] The rise of decentralized finance (DeFi), Web 3.0, and other blockchain-based applications has stimulated the need for data management through blockchain. There is a need for a blockchain-based identity authentication solution. Summary of the invention

[0004] One or more embodiments of this specification provide a blockchain-based identity authentication method, apparatus, device, and medium.

[0005] According to a first aspect, a blockchain-based identity authentication method is provided, wherein 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 credential data that has passed identity authentication, and that first commitment data obtained based on the credential data is stored in the state data of the blockchain;

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

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

[0008] According to a second aspect, a blockchain-based identity authentication method is provided, the method being executed by a node of the blockchain; the method comprising:

[0009] 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 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 the state data of the blockchain;

[0010] According to the first transaction, a verification operation is performed on the zero-knowledge proof.

[0011] According to a third aspect, a blockchain-based identity authentication device is provided, wherein the device is deployed on a node of the blockchain; the device comprises:

[0012] 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 includes 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 the state data of the blockchain;

[0013] A verification module is used to perform a verification operation on the zero-knowledge proof according to the first transaction.

[0014] According to a fourth aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspect or the second aspect is implemented.

[0015] 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, wherein when the processor executes the program, the method described in any one of the first aspect or the second aspect is implemented.

[0016] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:

[0017] The blockchain-based identity authentication scheme provided by the embodiments of this specification can verify the zero-knowledge proof used to prove that the user holds the credential data through the blockchain system, and the credential data is the credential that has passed the identity authentication, so as to verify the user's identity. In this way, the user's privacy data can be decentralized without leaking the user's personal privacy data, which improves the security of the user's privacy data. In addition, the credentials for user identity authentication can be reused, so that the user does not need to repeat the identity authentication in different projects.

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

[0019] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 This is an architecture diagram of a blockchain system shown in this specification according to an exemplary embodiment;

[0021] Figure 2 This is a schematic diagram of an identity authentication scenario based on blockchain according to an exemplary embodiment of this specification;

[0022] Figure 3 This is an interactive flow chart of an identity authentication method based on blockchain according to an exemplary embodiment of this specification;

[0023] Figure 4A is a schematic diagram of a Merkle tree according to an exemplary embodiment of this specification;

[0024] Figure 4B is a schematic diagram of a zero-knowledge proof verification process according to an exemplary embodiment of this specification;

[0025] Figure 5 It is a block diagram of a blockchain-based identity authentication device shown in this specification according to an exemplary embodiment. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0027] Figure 1 FIG. 1 shows an architecture diagram of a blockchain system in an embodiment. Figure 1 As shown, the blockchain system includes N nodes. Figure 1Nodes 1 to 8 are schematically shown in FIG. The lines between the nodes schematically represent the connection between the nodes, which is used to transmit data between the nodes. These nodes can store the full amount of ledgers, that is, store the status of all blocks and 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.

[0028] Transactions in the blockchain field can refer to task units executed and recorded in the blockchain system. Transactions usually include a send field (From), a receive field (To), and a data field (Data). Among them, in the case of a transfer transaction, the From field indicates the account address that initiates the transaction (i.e., initiates a transfer task to another account), the To field indicates the account address that receives the transaction (i.e., receives the transfer), and the Data field includes the transfer amount.

[0029] The blockchain system can provide the function of smart contracts. Smart contracts on the blockchain system are contracts that can be triggered and executed by transactions on the blockchain system. Smart contracts can be defined in the form of code. Calling a smart contract in the blockchain system is to initiate a transaction pointing to the smart contract address, so that each node in the blockchain system can run the smart contract code in a distributed manner.

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

[0031] In the scenario of calling a contract, for example, Bob sends a transaction for calling a smart contract to Figure 1 In the blockchain system shown, the from field of the transaction is the address of the account of the transaction initiator (i.e., Bob), the to field is the above-mentioned "0x6f8ae93...", that is, the address of the smart contract being called, and the data field of the transaction includes the method and parameters for calling the smart contract. After the blockchain system reaches a consensus on the transaction, each node in the blockchain system can execute the transaction separately, thereby executing the contract separately, and updating the status database based on the execution of the contract.

[0032] At present, for some services / products such as those in the financial field, users need to undergo identity verification before using them, and can only use these services / products normally after successful identity verification. In related technologies, some organizations or institutions that provide KYT (Know Your Customere, confirming customer identity) services can collect user identity information and verify the user's identity through biometric technology and information collection. However, this method cannot achieve decentralized management of user privacy data without leaking the user's personal privacy data.

[0033] To this end, the present specification embodiment provides a Figure 1 The blockchain identity authentication scheme shown can verify the zero-knowledge proof used to prove that the user holds the credential data through the blockchain system. The credential data is a credential that has passed identity authentication to verify the user's identity. This achieves decentralized management of the user's privacy data without leaking the user's personal privacy data, improves the security of the user's privacy data, and can achieve the reuse of user identity authentication credentials, so that users do not need to repeat identity authentication in different projects.

[0034] Figure 2 A schematic diagram of a blockchain-based identity authentication scenario is shown. Figure 2 As shown, the blockchain-based identity authentication system may include a blockchain 201, a user 202, a verifier 203, and an authenticator 204. The verifier 203 and the authenticator 204 may establish a communication connection with the blockchain 201 through their respective devices. The user 202 and the verifier 203 may establish a communication connection through their respective devices.

[0035] Among them, the user party 202 is an individual / organization / institution that needs to be authenticated. The user party 202 can submit the identity card information to the authentication party 204 in advance, and the authentication party 204 will review and authenticate it. If the review and authentication is passed, the authentication party 204 can generate the credential data S that has passed the identity authentication for the user party 202 through the device it holds, and return the credential data S to the user party 202. In addition, the authentication party 204 can obtain the commitment data C based on the credential data S through the device it holds. For example, the address A corresponding to the user party 202 and the credential data S can be calculated by a preset hash to obtain the commitment data C, thereby binding the user party 202 and the credential data S. The commitment data C is then uploaded to the blockchain 201 for on-chain storage.

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

[0037] Next, the user party 202 may send verification information to the verifier 203, wherein the verifier 203 may be a trusted intermediary, and the verification information may include zero-knowledge proof Q, address A' to be verified, and salt value H' to be verified. After receiving the above verification information, the verifier 203 may obtain the encrypted address M' to be verified based on the address A' to be verified and the salt value H' to be verified. The encrypted address M included in part b of the zero-knowledge proof Q of the encrypted address M' to be verified is compared. If the encrypted address M' to be verified is consistent with the encrypted address M, the verifier 203 may 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, then the address A corresponding to the user party 202 is sent to the blockchain 201 by the verifier 203. This can avoid exposing the address A corresponding to the user party 202.

[0038] After receiving the transaction TX, the blockchain 201 executes the transaction TX and verifies the zero-knowledge proof Q. Specifically, part a of the zero-knowledge proof Q can be used to prove that the user 202 holds the credential data S corresponding to the commitment data C, and that the commitment data C is stored in the blockchain 201. Part b of the zero-knowledge proof Q proves that the user 202 has a binding relationship with the commitment data C. If the zero-knowledge proof Q is verified, it can be determined that the user 202 is a legitimate user who has passed the identity authentication, so that the user 202 can be allowed to use the service W / product P.

[0039] The solution provided in this specification will be described in detail below in conjunction with specific embodiments.

[0040] like Figure 3 As shown, Figure 3This is an interactive flow chart of an identity authentication method based on blockchain according to an exemplary embodiment, which involves a first device (e.g., a device held by a verifier), a user device (e.g., a device held by a user), a second device (e.g., a device held by an authenticator), and a node of a blockchain. The first device, the user device, the second device, and the node of the blockchain can all be implemented as any device, platform, server, or device cluster with computing and processing capabilities. The method includes the following steps:

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

[0042] In this embodiment, first, the first user is authenticated by the authentication party, where the authentication party may be an organization or institution that can provide KYT services. After the authentication party determines that the identity authentication of the first user is successful, the credential data for the first user may be generated through the second device held by the authentication party. The credential data is unique and unpredictable, so the credential data may be, for example, a randomly generated random number.

[0043] Then, on the one hand, the second device can return the credential data to the first user. On the other hand, the second device can obtain the 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. Among them, the first identifier can be a unique identifier corresponding to the first user, for example, it can be a blockchain account address corresponding to the first user. Since both the first identifier and the credential data are unique, the first commitment data obtained by the preset hash calculation based on the first identifier and the credential data is also unique (that is, different users correspond to different commitment data).

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

[0045] In this embodiment, after generating the first commitment data, the second device may send a second transaction to the blockchain to call the target contract, and the second transaction includes the first commitment data. Among them, the state data of the contract account corresponding to the target contract in the blockchain stores a Merkle tree constructed based on the commitment data of multiple users, wherein 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 all users can obtain the Merkle tree or query the data in the Merkle tree.

[0046] After receiving the second transaction, the node of the blockchain executes the second transaction, runs the target contract, and updates the Merkle tree with the first commitment data to store the evidence on the chain. Specifically, a new leaf node can be created in the Merkle tree, the first commitment data can be stored in the new leaf node, and the parent node and root node of the new leaf node in the Merkle tree can be updated. Figure 4A is a schematic diagram of the Merkle tree, such as Figure 4A As shown, leaf nodes 1, 2, 3, and 4 correspond to the commitment data of four different users, for example, leaf node 1 stores the commitment data corresponding to user 1, leaf node 2 stores the commitment data corresponding to user 2, leaf node 3 stores the commitment data corresponding to user 3, and leaf node 4 stores the commitment data corresponding to user 4. Node 5 stores the hash value obtained by hashing nodes 1 and 2, and node 6 stores the hash value obtained by hashing nodes 3 and 4. Node 7 is the root node of the Merkle tree, and stores the hash value obtained by hashing nodes 5 and 6.

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

[0048] 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 device held by him. Specifically, first, the user device can obtain the credential data held by the first user, and the credential data can be returned to the user device by the second device in step 301. Then, the user device can generate a zero-knowledge proof based on the credential data. The zero-knowledge proof can be used to prove that the first user holds 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 device can obtain the verification information, which includes the zero-knowledge proof, the preset salt value and the first identifier, and the user device can send the verification information to the first device.

[0049] Specifically, the user device can produce a zero-knowledge proof in the following manner: the user device can 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. For example, the user device can directly or through other devices obtain the Merkle tree currently constructed based on the commitment data from the blockchain, and then perform a hash calculation based on the first identifier and the credential data to obtain the first commitment data. Find the leaf node corresponding to the first commitment data from the above Merkle tree, and obtain the path corresponding to the first commitment data in the Merkle tree based on the leaf node. At the same time, according to the path and the above Merkle tree, obtain reference data for calculating the root of the Merkle tree.

[0050] refer to Figure 4A, taking the first commitment data stored in node 2 as an example, the path corresponding to the first commitment data in the Merkle tree may include node 2, node 5, and node 7. If the root of the Merkle tree is to be calculated based on the first commitment data, the data corresponding to node 1 and node 6 are also required. Therefore, the data stored in node 1 and node 6 can be obtained as reference data.

[0051] Next, a preset salt value for encryption can also be obtained, and the first identifier can be encrypted based on the preset salt value using a preset encryption algorithm to obtain an encrypted identifier. In addition, the root of the Merkle tree is calculated based on the first commitment data, the path corresponding to the first commitment data in the Merkle tree, and the reference data. A zero-knowledge proof is generated using a preset algorithm (e.g., a zero-knowledge proof circuit algorithm) based on the preset salt value, the first identifier, the credential data, the path corresponding to the first commitment data in the Merkle tree, and the reference data. The generated zero-knowledge proof may include an input part for inputting the circuit algorithm, and the input part may include secret data and public data, wherein the secret data may include a salt value ciphertext after secret processing, a first identifier ciphertext, a credential data ciphertext, a path ciphertext corresponding to the first commitment data in the Merkle tree, and a reference data ciphertext, and the public data may include an encrypted identifier and the root of the Merkle tree.

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

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

[0054] In this embodiment, the first device may first obtain a preset salt value and a first identifier from the verification information, and perform a preset hash process on the first identifier based on the preset salt value to generate an encrypted identifier to be verified. Then, the first device may compare the encrypted identifier to be verified with the encrypted identifier included in the public data in the zero-knowledge proof. If the two are consistent, the first transaction may be sent to the blockchain based on the zero-knowledge proof included in the verification information. The first transaction includes the above zero-knowledge proof and calls the target contract storing the above Merkle tree.

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

[0056] In this embodiment, after receiving the first transaction, the node of the blockchain executes the first transaction, runs the target contract, and verifies the zero-knowledge proof. Specifically, the node of the blockchain can obtain the root of the Merkle tree from the contract state corresponding to the target contract, and compare it with the root of the Merkle tree included in the public data in the zero-knowledge proof. If the two are consistent, the input part of the zero-knowledge proof can be further obtained, and the input part can be input into the circuit algorithm. The circuit algorithm outputs the verification result, and the node of the blockchain can store the verification result on the chain and return it to the user device. Among them, the circuit algorithm can be pre-deployed in the target contract.

[0057] Figure 4B This is a schematic diagram of the verification process of zero-knowledge proof, such as Figure 4B As shown, the salt value ciphertext, the first identification 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 in the zero-knowledge proof can be input into the circuit algorithm, and the circuit algorithm outputs the verification result. For example, the verification result can be true (indicating that the verification passed) or false (indicating that the verification failed).

[0058] The blockchain-based identity authentication method provided by the above-mentioned embodiments of this specification can verify the zero-knowledge proof used to prove that the user holds the credential data through the blockchain system, and the credential data is the credential that has passed the identity authentication, so as to verify the user's identity. In this way, the user's privacy data can be decentralized without leaking the user's personal privacy data, thereby improving the security of the user's privacy data, and the user's identity authentication credentials can be reused, so that the user does not need to repeat the identity authentication in different projects.

[0059] It should be noted that although the operations of the methods of the embodiments of this specification are described in a specific order in the above embodiments, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowchart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.

[0060] Corresponding to the aforementioned blockchain-based identity authentication method embodiment, this specification also provides an embodiment of a blockchain-based identity authentication device.

[0061] like Figure 5 As shown, Figure 5This is a block diagram of a blockchain-based identity authentication device shown in this specification according to an exemplary embodiment. The device is deployed in a node of the blockchain, and the device may include: a receiving module 501 and a verification module 502.

[0062] Among them, the receiving module 501 is used to receive a first transaction sent by the first device based on verification information, the verification information is obtained by the first device from a user device held by the first user, and the verification information includes zero-knowledge proof, which is used to prove that the first user holds credential data that has passed identity authentication, and the status data of the blockchain stores first commitment data obtained based on the credential data.

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

[0064] In some embodiments, a Merkle tree based on commitment data of multiple users is stored in the state data of the blockchain, wherein the commitment data of any user corresponds to a leaf node of the Merkle tree.

[0065] In other implementations, the first commitment data is determined by performing a preset hash calculation on the first identification and credential data corresponding to the first user.

[0066] In other embodiments, the zero-knowledge proof is generated in the following manner: obtaining the blockchain account address corresponding to the first user as the first identifier, obtaining the path corresponding to the first commitment data in the Merkle tree and reference data for calculating the root of the Merkle tree, and generating a zero-knowledge proof based on the credential data, the first identifier, the path and the reference data.

[0067] In other embodiments, a zero-knowledge proof is generated based on the credential data, the first identifier, the path, and the reference data in the following manner: a preset salt value for generating an encrypted identifier for the first identifier is obtained, and a zero-knowledge proof is generated based on the preset salt value, the credential data, the first identifier, the path, and the reference data, 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.

[0068] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of one or more embodiments of the present specification. A person of ordinary skill in the art can understand and implement them without creative work.

[0069] One or more embodiments of the present specification also provide a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 3 Any embodiment provides a blockchain-based identity authentication method.

[0070] One or more embodiments of the present specification further provide a computing device, including a memory and a processor, wherein the memory stores an executable code, and when the processor executes the executable code, the above-mentioned Figure 3 Any embodiment provides a blockchain-based identity authentication method.

[0071] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, 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. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0072] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers 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. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0073] The systems, devices, modules or units described in the above embodiments may be 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 exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0074] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0075] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. 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 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0076] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0077] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0079] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0080] 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.

[0081] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene 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. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0082] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0083] One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0084] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0085] The above description is only an example of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims.

Claims

1. A blockchain-based identity authentication method, the method comprising: The first device receives verification information from a user device held by the first user; The verification information includes 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 the state data of the blockchain stores first commitment data obtained based on the credential data; The first device sends a first transaction to the blockchain based on the verification information; The node of the blockchain performs a verification operation on the zero-knowledge proof according to the first transaction.

2. The method according to claim 1, wherein: The state data of the blockchain stores a Merkle tree obtained based on the commitment data of multiple users, wherein the commitment data of any user corresponds to a leaf node of the Merkle tree.

3. The method according to claim 1, wherein: The first commitment data is determined by performing a preset hash calculation on the first identifier corresponding to the first user and the credential data.

4. The method according to claim 1, wherein: Before the first device receives the verification information, the second device performs the following operations: After determining that the identity authentication of the first user is successful, generating credential data for the first user; Based on the credential data, the first commitment data is obtained, and the first commitment data is stored on the chain.

5. The method according to claim 2, wherein: Before the first device receives the verification information, the user device performs the following operations: Obtaining the credential data; Based on the credential data, generate a zero-knowledge proof; Based on the zero-knowledge proof, the verification information is sent to the first device.

6. The method according to claim 5, wherein: The generating a zero-knowledge proof based on the credential data includes: 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; A zero-knowledge proof is generated based on the credential data, the first identifier, the path, and the reference data.

7. The method according to claim 6, wherein: The generating a zero-knowledge proof based on the credential data, the first identifier, the path, and the reference data includes: Obtaining 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, a zero-knowledge proof is generated so that the public data of the zero-knowledge proof includes the encrypted identifier and a Merkle tree root corresponding to the first commitment data.

8. The method according to claim 7, wherein: The verification information further includes the preset salt value and the first identifier; wherein, based on the verification information, sending the first transaction to the blockchain includes: Based on the preset salt value and the first identifier, generating an encrypted identifier to be verified; If the encrypted identifier to be verified is consistent with the encrypted identifier included in the public data of the zero-knowledge proof, a first transaction is sent to the blockchain based on the zero-knowledge proof included in the verification information.

9. A blockchain-based identity authentication method, the method being executed by a node of the blockchain; the method comprising: receiving a first transaction sent by the first device based on the verification information; The verification information is obtained by the first device from a user device held by the first user; The verification information includes 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 the state data of the blockchain stores first commitment data obtained based on the credential data; According to the first transaction, a verification operation is performed on the zero-knowledge proof.

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

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

12. The method according to claim 10, wherein: The zero-knowledge proof is generated as follows: 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; A zero-knowledge proof is generated based on the credential data, the first identifier, the path, and the reference data.

13. The method according to claim 12, wherein: The generating a zero-knowledge proof based on the credential data, the first identifier, the path, and the reference data includes: Obtaining 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, a zero-knowledge proof is generated so that the public data of the zero-knowledge proof includes the encrypted identifier and a Merkle tree root corresponding to the first commitment data.

14. A blockchain-based identity authentication device, the device being deployed on a node of the blockchain; the device comprising: 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 the first user; the verification information includes 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 the state data of the blockchain stores first commitment data obtained based on the credential data; A verification module is used to perform 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, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 13.

16. A computing device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

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

    CN115174098A

  • Verification method of zero-knowledge identity proof based on Merkel commitment

    CN117353939A

  • Lightweight identity authentication method and system for block chain trusted sensor

    CN118484790A

  • Efficient deniable commitment of data and unlinkable proof of commitment for securing user privacy in a digital identity system

    US20210374274A1

Cited By

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

    WO2026066530A1