Blockchain-based identity authentication method, device and electronic device
By obtaining and verifying the content integrity and authenticity of the object credentials to be verified in the blockchain network, the problem of low security of cross-institutional identity authentication in the blockchain network is solved, cross-institutional identity authentication is realized and identity authentication is improved. security.
Patent Information
- Application Number
- CN202210428302.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-04-22
AI Technical Summary
The identity authentication systems between various institutions in the existing blockchain network are different, resulting in low security of cross-institutional identity authentication and the inability to achieve effective cross-institutional authentication.
By obtaining the to-be-verified object credentials of the target object, the content integrity and authenticity are verified based on the on-chain information in the blockchain, and the identity information of the target object is determined, thereby achieving cross-institutional identity authentication and improving the security of identity authentication.
It realizes cross-agency identity authentication, avoids the low security problems of inconsistent identity information specifications and forged credentials, and improves the security and credibility of identity authentication.
Smart Images

Figure CN114710362B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain, and in particular to an identity authentication method, device and electronic device based on blockchain. Background Art
[0002] The blockchain network is a solution for joint accounting that uses P2P communication technology to achieve peer-to-peer communication, a consensus mechanism to achieve the legitimacy of accounting, and a chain structure to store data. When the cooperative institutions need to conduct cross-institutional data sharing or value transfer collaboration, the cooperative institutions separately deploy blockchain nodes to form a consortium chain, and deploy business smart contracts written based on business rules to each blockchain node in the blockchain business chain system. Each blockchain node will perform transaction consensus, transaction execution and data persistence.
[0003] Blockchain nodes and business systems that initiate smart contract transaction requests all involve corresponding identity identification. When establishing a connection and initiating a transaction, the identities of all parties must be verified first. Only after the identity verification is passed will the corresponding process processing be provided.
[0004] In the existing blockchain network, due to the differences in the identity authentication systems used by various institutions and the need to protect the privacy of users within the institutions, cross-institutional authentication cannot be performed between institutions, resulting in the problem of low security of cross-institutional identity authentication.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a blockchain-based identity authentication method, device, and electronic device to at least solve the technical problem of low security of blockchain identity authentication in the prior art.
[0007] According to one aspect of an embodiment of the present invention, there is provided a blockchain-based identity authentication method, including: obtaining a to-be-verified object credential corresponding to a target object; performing content integrity verification on the to-be-verified object credential based on on-chain information in the blockchain; when the content integrity verification is successful, performing authenticity verification on the to-be-verified object credential based on the on-chain information; when the authenticity verification is successful, determining the identity information of the target object based on the to-be-verified object credential.
[0008] Furthermore, the blockchain-based identity authentication method also includes: determining the template identifier of the credential template used by the credential of the object to be verified; obtaining the target credential template corresponding to the template identifier from the on-chain information; and determining the content integrity of the credential of the object to be verified based on the target credential template.
[0009] Furthermore, the blockchain-based identity authentication method also includes: verifying the authenticity of the digital identity of the object to be verified based on the on-chain information; verifying the authenticity of the object signature based on the on-chain information when the digital identity of the object to be verified is determined to be authentic; verifying the authenticity of the digital identity of the node to be verified based on the on-chain information when the object signature is determined to be authentic; verifying the authenticity of the node signature based on the on-chain information when the digital identity of the node to be verified is determined to be authentic.
[0010] Furthermore, the blockchain-based identity authentication method also includes: obtaining the digital identity of the object to be verified; detecting whether the digital identity of the object to be verified exists in the on-chain information to obtain a first detection result; and determining the authenticity of the digital identity of the object to be verified based on the first detection result.
[0011] Furthermore, the blockchain-based identity authentication method also includes: obtaining an object signature; obtaining an object public key from on-chain information; using the object public key to decrypt the object signature to obtain a decrypted object digital identity; determining whether the decrypted object digital identity is the same as the digital identity of the object to be verified, and obtaining a first judgment result; and determining the authenticity of the object signature based on the first judgment result.
[0012] Furthermore, the blockchain-based identity authentication method also includes: obtaining the digital identity of the node to be verified; detecting whether the digital identity of the node to be verified exists in the on-chain information to obtain a second detection result; and determining the authenticity of the digital identity of the node to be verified based on the second detection result.
[0013] Furthermore, the blockchain-based identity authentication method also includes: obtaining a node signature; obtaining a node public key from on-chain information; using the node public key to decrypt the node signature to obtain decrypted object attribute information; determining whether the decrypted object attribute information is the same as the object attribute information in the object certificate to be verified, and obtaining a second judgment result; and determining the authenticity of the object signature based on the second judgment result.
[0014] Furthermore, the blockchain-based identity authentication method also includes: after determining the authenticity of the object signature based on the second judgment result, if it is determined that the object signature is authentic, obtaining the current time; obtaining the validity period in the certificate of the object to be verified; and if the current time is within the validity period, determining that the authenticity verification of the certificate of the object to be verified is successful.
[0015] Furthermore, the blockchain-based identity authentication method also includes: determining the identity information of the target object based on the object attribute information in the credential of the object to be verified.
[0016] Furthermore, the blockchain-based identity authentication method also includes: after determining the identity information of the target object based on the credential of the object to be verified, determining the object authority of the target object based on the identity information of the target object; when it is determined that the object authority meets the preset conditions, executing the transaction request of the target object to conduct a transaction.
[0017] Furthermore, the blockchain-based identity authentication method also includes: before obtaining the credential of the object to be verified corresponding to the target object, obtaining the node credential corresponding to the current blockchain node; broadcasting the node credential to multiple verification nodes in the blockchain; obtaining a verification result, wherein the verification result is obtained by multiple verification nodes verifying the authenticity of the node credential based on target information, and the target information includes: the node digital identity and node public key corresponding to the current blockchain node; when the verification result indicates that the node credential is authentic, determining that the current blockchain node can become a node in the target blockchain.
[0018] Furthermore, the blockchain-based identity authentication method also includes: before obtaining the credential of the object to be verified corresponding to the target object, obtaining the target object digital identity, target object public key, target node digital identity and target node public key generated by the current service node, wherein each service node corresponds to each blockchain node; and processing the target object digital identity, target object public key, target node digital identity and target node public key on the chain to obtain on-chain information.
[0019] According to another aspect of an embodiment of the present invention, there is also provided an identity authentication device based on blockchain, including: an acquisition module, used to acquire the credential of an object to be verified corresponding to the target object; a first verification module, used to perform content integrity verification on the credential of the object to be verified based on the on-chain information in the blockchain; a second verification module, used to perform authenticity verification on the credential of the object to be verified based on the on-chain information when the content integrity verification is successful; a determination module, used to determine the identity information of the target object based on the credential of the object to be verified when the authenticity verification is successful.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned blockchain-based identity authentication method when running.
[0021] According to another aspect of an embodiment of the present invention, an electronic device is also provided, the electronic device comprising one or more processors; a memory for storing one or more programs, so that when the one or more programs are executed by the one or more processors, the one or more processors are implemented to run the programs, wherein the programs are configured to execute the above-mentioned blockchain-based identity authentication method when running.
[0022] According to another aspect of an embodiment of the present invention, a computer program product is also provided, including a computer program / instruction, which implements the above-mentioned blockchain-based identity authentication method when the computer program / instruction is executed by a processor.
[0023] In an embodiment of the present invention, the object credential of the target object is verified, and the identity information of the target object is determined based on the successfully verified object credential. The object credential to be verified corresponding to the target object is obtained, and the content integrity of the object credential to be verified is verified based on the on-chain information in the blockchain. Then, if the content integrity verification is successful, the authenticity of the object credential to be verified is verified based on the on-chain information. Therefore, if the authenticity verification is successful, the identity information of the target object is determined based on the object credential to be verified.
[0024] It is easy to notice that in the above process, by obtaining the object certificate to be verified corresponding to the target object, the identity information of the target object represented by a fixed information framework is obtained, so that each blockchain node can authenticate the target object, thereby realizing cross-institutional authentication, avoiding the inconsistency of identity information specifications caused by different identity authentication systems adopted by various institutions in the prior art, and the inability to authenticate the target object across institutions, thereby improving the security of identity authentication. Furthermore, by verifying the content integrity of the object certificate to be verified based on the on-chain information, and verifying the content integrity of the object certificate to be verified when the content of the object certificate to be verified is successful, it avoids the resource occupation caused by the authenticity verification of the object certificate to be verified when the content is incomplete. At the same time, it also avoids the problem of low security caused by the opponent or attacker generating forged object certificates, and the problem of verification credibility caused by the opponent or attacker tampering with the information used to verify the object certificate to be verified, thereby further improving the security of identity authentication.
[0025] It can be seen that the solution provided in the present application achieves the purpose of verifying the object credentials of the target object and determining the identity information of the target object based on the successfully verified object credentials, thereby achieving the technical effect of improving the security of identity authentication, and further solving the technical problem of low security of blockchain identity authentication in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 is a schematic diagram of an optional alliance chain system based on digital identity authentication according to an embodiment of the present invention;
[0028] Figure 2 is a schematic diagram of an optional blockchain-based identity authentication method according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of an optional blockchain according to an embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of an optional blockchain-based identity authentication device according to an embodiment of the present invention;
[0031] Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0035] Alliance chain: Business cooperation organizations form a blockchain alliance network based on business needs, extract business rules as business smart contracts and deploy them on the blockchain alliance network to endorse specific business data.
[0036] Digital identity: It is the digital identity identifier of an entity and the digital attribute declaration associated with it. Through the cryptographic system associated with the entity's digital identity identifier, it supports the effective flow of verifiable credentials among alliance institutions.
[0037] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0038] Example 1
[0039] According to an embodiment of the present invention, an embodiment of a blockchain-based identity authentication method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0040] like Figure 1 As shown, the present application can be implemented based on an optional alliance chain system based on digital identity authentication, which at least includes a business chain composed of multiple blockchain nodes, and can also include a digital identity service node and a business system. Among them, each organization corresponds to a different business system, and each organization is deployed with a corresponding digital identity service node and blockchain node. Specifically, the business chain is formed according to the on-chain business needs of the business system corresponding to each organization. The multiple blockchain nodes on the chain are all member nodes of the business chain. The member nodes are deployed with digital identity service smart contracts that interact with the digital identity service node, and support the instantiation of business smart contracts according to business requests. The digital identity service node can register digital identities for the blockchain nodes and transaction users of the corresponding organization, and issue corresponding certificates. Alliance organizations can verify the credentials of nodes and transaction users through blockchain nodes to identify the authority attributes of nodes and transaction users, and provide corresponding services to effectively meet the identity mutual recognition and service authentication between cross-architectures.
[0041] Figure 2 is a schematic diagram of an optional blockchain-based identity authentication method according to an embodiment of the present invention, such as Figure 2 As shown, the method comprises the following steps:
[0042] Step S201, obtaining the to-be-verified object credential corresponding to the target object.
[0043] In step S201, the business system may respond to the transaction request of the target object requesting to conduct a transaction, and based on the transaction request, send a business smart contract transaction request to the corresponding blockchain node, wherein the business smart contract transaction request at least includes the object certificate to be verified corresponding to the target object. Based on different business scenarios, the content and format of the object attribute information in the object certificate to be verified corresponding to different target objects may be different, but the information framework of the object certificate to be verified is the same, that is, all use the preset information framework, for example, all object certificates to be verified include object digital identity, template identification, object signature, node digital identity, node signature, object attribute information, etc. When the current blockchain node obtains the corresponding business smart contract transaction request, the current blockchain node can obtain the object certificate to be verified from it, so as to subsequently verify the target object.
[0044] It should be noted that by obtaining the credential of the object to be verified corresponding to the target object, the identity information of the target object represented by a fixed information framework is obtained, so that each blockchain node can authenticate the target object, thereby realizing cross-institutional authentication, avoiding the inconsistent identity information specifications caused by the different identity authentication systems adopted by various institutions in the prior art, and the inability to authenticate the target object across institutions, thereby improving the superviseability of on-chain operations and transaction behaviors.
[0045] Step S202: Based on the on-chain information in the blockchain, the content integrity of the credential to be verified is verified.
[0046] In step S202, the on-chain information in the blockchain may include a voucher template corresponding to each business scenario or an information requirement list corresponding to each business scenario. Among them, different voucher templates or information requirement lists are used to at least characterize the content requirements of the object attribute information in the object voucher, and may also characterize the format requirements of the object attribute information in the object voucher. The current blockchain node may compare the voucher template with the object voucher to be verified, or may search in the object voucher to be verified according to the information requirements recorded in the information requirement list, so as to determine the content integrity of the object voucher to be verified. Among them, the blockchain is the aforementioned business chain.
[0047] It should be noted that by verifying the content integrity of the credential of the object to be verified based on the on-chain information, the validity of the credential of the object to be verified is guaranteed, and the resource occupation caused by the authenticity verification of the credential of the object to be verified when the content of the credential of the object to be verified is avoided, thereby improving the working efficiency of the blockchain at the same time, and at the same time, avoiding the poor verification accuracy caused by the opponent or attacker tampering with the information used to verify the credential of the object to be verified.
[0048] Step S203: When the content integrity verification is successful, the authenticity of the credential to be verified is verified based on the on-chain information.
[0049] In step S203, the on-chain information in the blockchain may also include the object digital identity and public key corresponding to the target object, and the node digital identity and public key corresponding to the target node, wherein the target node is the blockchain node corresponding to the institution recorded in the certificate of the object to be verified. When it is determined that the content of the certificate of the object to be verified is complete, the current blockchain node may verify the authenticity of the certificate of the object to be verified based on the object digital identity and public key corresponding to the target object, and the node digital identity and public key corresponding to the target node, that is, verify whether the content recorded in the certificate of the object to be verified is authentic.
[0050] It should be noted that by verifying the authenticity of the credential of the object to be verified based on the on-chain information, the authenticity of the credential of the object to be verified and the accuracy of the verification are guaranteed, avoiding the problem of low security caused by the opponent or attacker generating forged object credentials, or the opponent or attacker tampering with the information used to verify the credential of the object to be verified, resulting in poor verification accuracy.
[0051] Step S204: when the authenticity verification is successful, determine the identity information of the target object based on the credential of the object to be verified.
[0052] In step 204, when it is determined that the content of the credential of the object to be verified is authentic, the current blockchain node can determine the identity information of the target object based on the content recorded in the credential of the object to be verified, wherein the identity information of the target object includes at least the permissions that the target object has in the blockchain, and may also include the role information of the target object in the blockchain, the role information may be a user or a blockchain node, and may also include the organization information or other information corresponding to the user.
[0053] It should be noted that by determining the identity information of the target object based on the successfully verified credentials of the object to be verified, effective authentication of the identity of the target object can be achieved.
[0054] Based on the scheme defined in the above steps S201 to S204, it can be known that in an embodiment of the present invention, the object certificate of the target object is verified, and the identity information of the target object is determined based on the successfully verified object certificate. By obtaining the object certificate to be verified corresponding to the target object, the content integrity of the object certificate to be verified is verified based on the on-chain information in the blockchain, and then, if the content integrity verification is successful, the authenticity of the object certificate to be verified is verified based on the on-chain information, so that if the authenticity verification is successful, the identity information of the target object is determined based on the object certificate to be verified.
[0055] It is easy to notice that in the above process, by obtaining the object certificate to be verified corresponding to the target object, the identity information of the target object represented by a fixed information framework is obtained, so that each blockchain node can authenticate the target object, thereby realizing cross-institutional authentication, avoiding the inconsistency of identity information specifications caused by different identity authentication systems adopted by various institutions in the prior art, and the inability to authenticate the target object across institutions, thereby improving the security of identity authentication. Furthermore, by verifying the content integrity of the object certificate to be verified based on the on-chain information, and verifying the content integrity of the object certificate to be verified when the content of the object certificate to be verified is successful, it avoids the resource occupation caused by the authenticity verification of the object certificate to be verified when the content is incomplete. At the same time, it also avoids the problem of low security caused by the opponent or attacker generating forged object certificates, and the problem of verification credibility caused by the opponent or attacker tampering with the information used to verify the object certificate to be verified, thereby further improving the security of identity authentication.
[0056] It can be seen that the solution provided in the present application achieves the purpose of verifying the object credentials of the target object and determining the identity information of the target object based on the successfully verified object credentials, thereby achieving the technical effect of improving the security of identity authentication, and further solving the technical problem of low security of blockchain identity authentication in the prior art.
[0057] In an optional embodiment, before obtaining the credential of the object to be verified corresponding to the target object, the current blockchain node can obtain the node credential corresponding to the current blockchain node, and then broadcast the node credential to multiple verification nodes in the blockchain to obtain a verification result, so as to determine that the current blockchain node can become a node in the target blockchain when the verification result indicates that the node credential is authentic, wherein the verification result is obtained by multiple verification nodes verifying the authenticity of the node credential based on target information, and the target information includes: the node digital identity and node public key corresponding to the current blockchain node.
[0058] Optional, such as Figure 3As shown, the blockchain node includes a node initialization and routing device, a digital identity processing device, wherein the digital identity processing device includes a DID registration module, a credential application module, and a credential verification module. Before the current blockchain node obtains the node credential corresponding to the current blockchain node, it is necessary to first establish a business chain. Specifically, when the business chain is established, the node initialization and routing device in the blockchain node is responsible for the initialization operation of the blockchain node, which is used to obtain the installation medium of the blockchain node, and initialize the digital identity contract information at startup, and at the same time initiate the node registration information to the corresponding digital identity service node through the DID registration module. Then the digital identity management node allocates the node digital identity DID and the node public and private key pair to the corresponding blockchain node according to the initialization configuration information, and the aforementioned node digital identity DID and the node public key pair are processed on the chain to generate chain information. Afterwards, the node credential for issuing the corresponding authority of the node can be applied to the digital identity service node through the credential application module, and the digital identity service node issues the corresponding node credential according to the role information of the corresponding blockchain node in the alliance network, wherein the credential information includes the attribute information corresponding to the blockchain node, and the signature information of the alliance organization on the node attribute information. Among them, the on-chain information also includes multiple certificate templates. The method by which the digital identity management node issues node certificates for the corresponding blockchain nodes is the same as the method by which the digital identity management node issues node certificates for the transaction objects described below, so it will not be repeated here.
[0059] Furthermore, when the current blockchain node obtains the node certificate corresponding to the current blockchain node, the current blockchain node broadcasts the node certificate to multiple blockchain nodes with verification functions in the blockchain. Afterwards, the current node and the verification node can verify the node certificate of the current blockchain node through the certificate verification module based on the node digital identity and node public key corresponding to the current blockchain node, specifically including verifying the ownership information of the transaction initiator on the corresponding certificate, the attribute information of the blockchain node, and the signature information of the certificate issuer. It should be noted that during the business chain formation process, the current blockchain node can also receive node certificates broadcast by other blockchain nodes to verify the node certificates corresponding to other blockchain nodes.
[0060] Furthermore, the current blockchain node can obtain the verification results sent by other blockchain nodes, and when the verification results indicate that the verification is passed, obtain the three attribute information of the transaction initiator's organization, role information and read / write permissions, so as to determine whether the blockchain node forming the business chain is reliable and has the corresponding permissions based on the three attribute information. And when it is determined that the current blockchain node meets the above conditions, it is determined that the current blockchain node can become a node in the target blockchain, that is, it can become a node in the business chain.
[0061] Optionally, if the verification is passed, the digital identity service node corresponding to the current blockchain node can package the node digital identity of the current blockchain node, the certificate template corresponding to the current blockchain node, and the Hash information of the certificate template onto the chain, and complete the on-chain endorsement after consensus is passed by the contract execution device.
[0062] Among them, Figure 3 As shown, the blockchain node also includes a contract execution device, which is responsible for receiving the digital identity transaction endorsement initiated by the digital identity service node, that is, the node digital identity of the current blockchain node, the voucher template corresponding to the current blockchain node, and the Hash information of the voucher template, and routes it to the corresponding smart contract sandbox according to the smart contract ID parameter "subId" in the transaction request method, specifically the subId in the "Invoke(stubId, function, args)" field. In this embodiment, the digital identity endorsement transaction update and query request initiated by the digital identity service node is sent to the digital identity smart contract running container sandbox.
[0063] Specifically, Figure 3 As shown, the contract execution device includes a transaction verification module, a transaction consensus module and a persistence module. Among them, the transaction verification module is a module that verifies the business request parameters and performs transaction consensus preprocessing. The transaction verification module can verify the transaction request parameters and source information, save the Hash of the business request block and the block consensus message to the local disk, and increase the block number by 1, and broadcast the block consensus message to all verification nodes in the business chain.
[0064] Furthermore, the transaction consensus module is used to obtain the aforementioned block consensus message and complete the transaction consensus according to the block consensus message. The transaction consensus module can use the Byzantine consensus algorithm to perform three-stage consensus processing on the transaction within the non-system safety restart time window. The first stage is the pre-prepare consensus, the second stage is the prepare consensus, and the third stage is the commit consensus. The three stages are executed sequentially. After the current stage receives consistent confirmation messages from 2f+1 other transaction consensus nodes, the consensus of the current stage is completed and enters the next stage. After the consensus of the three stages is completed, it means that the business request is legal, and the data processed according to the business contract logic is written into the block for persistence.
[0065] Furthermore, the persistence module is used to complete the transaction execution. The module is used to receive the assembled message of the digital identity service node according to the smart contract interface, and the transaction information sent by the digital identity service node according to the smart contract ID, and execute the smart contract transaction logic after the transaction information passes the parameter verification of the transaction verification module and the consensus of the transaction consensus module, and persist the business data to the world state, wherein the world state data corresponding to the request initiated by the digital identity service node includes the node digital identity of the blockchain node, the node public key, the certificate template, and the hash information of the certificate template.
[0066] It should be noted that by authenticating the identity of the blockchain node based on the node certificate in the process of forming the business chain, the appearance of disguised nodes in the business chain is avoided, thereby improving the security of the business chain, and further improving the security of authenticating the target object's certificate to be verified.
[0067] In an optional embodiment, before obtaining the object certificate to be verified corresponding to the target object, the current blockchain node can obtain the target object digital identity, target object public key, target node digital identity and target node public key generated by the current service node, and process the target object digital identity, target object public key, target node digital identity and target node public key on the chain to obtain the on-chain information. Among them, each service node corresponds to each blockchain node, and the service node is the aforementioned digital identity service node.
[0068] Optionally, before the target object initiates a transaction request to the business chain 1 through the business system, the target object needs to first apply to the digital identity service node for a registered object digital identity and apply for issuance of a corresponding object certificate through the business system.
[0069] Specifically, the digital identity service node can not only register the node digital identity for the blockchain node corresponding to the institution and issue the corresponding node certificate, but also register the object digital identity for the transaction user of the business system corresponding to the institution and issue the corresponding object certificate. When the business chain is established, the business system of each alliance institution can obtain the installation medium and initialization configuration of the digital identity service node, where the initialization configuration information includes the node digital identity and node public and private key pair information of the blockchain node corresponding to the authoritative institution. The authoritative institution can be the current institution or other institutions on the business chain. At the same time, the digital identity service node supports the real-name authentication system within the business system of the alliance institution. It can be customized to require real-name authentication when registering digital identities for blockchain nodes and users, so as to achieve anonymity on the chain and real-name off the chain, and improve the regulatory nature of on-chain operations and transaction behaviors.
[0070] Optionally, the digital identity service node can generate a target object public key, a target object private key, a target node digital identity, a target node public key and a target node private key for the target object pushed by the business system, wherein the target node public key and the target node private key are generated in the process of establishing the business chain. Optionally, after the registration is completed, the digital identity service node can process the target object digital identity, target object public key, target node digital identity and target node public key of the target object on the chain to obtain the chain information. In the process of chaining, the contract execution device can verify, reach consensus, execute chaining and other processing on the aforementioned information sent by the digital identity service node based on the aforementioned method for processing transaction requests, so it will not be repeated here.
[0071] Furthermore, the digital identity service node can generate an object certificate corresponding to the target object based on the target object digital identity, the target object private key, the target node digital identity and the target node private key. The object certificate includes at least three parts: user information, user attribute declaration information and organization signature information. The user attribute declaration information is the aforementioned object attribute information. Among them, the user information includes the object digital identity of the target object, the template identifier corresponding to the adopted certificate template, and the object digital identity signed with the object private key corresponding to the object digital identity, that is, the real object signature. The user information is identified by the "user" field in the certificate. The user's attribute declaration information includes attribute information represented by fields such as "organization", "didrole" and "rightgroup" and the validity period of the certificate. Among them, the "organization" field represents the alliance organization information to which the target object belongs, that is, the organization that issues the certificate for the target object. The "didrole" field represents the role information of the target object in the business chain. The role information may include users, blockchain nodes, etc. The "rightgroup" field represents the permission set of the target object in the business chain. The permission set includes: read-only, write-only, etc. read and write permission categories. The user's attribute declaration information is identified by "claim" in the certificate. The signature information of the organization includes the node digital identity of the blockchain node of the authority organization corresponding to the target object and the attribute declaration information of the user signed with the node private key corresponding to the node digital identity, that is, the real node signature. The signature information of the organization is marked with "proof" in the certificate. The authority organization can be the aforementioned issuing organization or other organizations. In this implementation, an optional object certificate example is as follows:
[0072] {
[0073] "user":{
[0074] "id":"8bdb2f39-4c52-482e-b6c1-57fb282ccf97",
[0075] "cptId":203
[0076] "signature":"8bdb2f394c52482eb6c157fb282ccf97NOGwglaoG5fsSSIzglaoG5fsSSI85d5c0450ed"
[0077] },
[0078] "claim":{
[0079] "organization":"ICBC",
[0080] "didrole":"client",
[0081] "rightgroup":"R|W"
[0082] "issuanceDate":1632468448,
[0083] "expirationDate":1639282332,
[0084] },
[0085] "proof":{
[0086] "creator":"did:icbcid:201:0xf3836e585d5c0450edf75c165a0fe3b6e9d6c945",
[0087] "signature":"HFi8JV5pNOGwglaoG5fsSSIzhvfQOMA0+qJpsrWb / FohI / Z / dJw1O5k7ZhKaZWdBsiFcj3+4asqSpULlcqTV0HE="
[0088] }
[0089] }
[0090] It should be noted that the node credential is generated in the same way as the object credential. By generating the object credential based on the target object digital identity, the target object private key, the target node digital identity, the target node private key, and the user's attribute declaration information, on the one hand, it is easy to authenticate the user's identity, and on the other hand, it realizes the recording of user-related information. In addition, by processing the target object digital identity, the target object public key, the target node digital identity, and the target node public key on the chain to obtain the on-chain information, it can be ensured that when authenticating the user, the target node digital identity, the target node public key and other information are prevented from being tampered with, thereby improving the security of the authentication.
[0091] In an optional embodiment, in the process of verifying the content integrity of the object credential to be verified based on the on-chain information in the blockchain, the template identifier of the credential template used by the object credential to be verified can be determined, and the target credential template corresponding to the template identifier can be obtained from the on-chain information, thereby determining the content integrity of the object credential to be verified based on the target credential template.
[0092] Optionally, based on different business scenarios, the voucher templates used by the target object or blockchain node are also different. Different voucher templates correspond to different template identifiers. Therefore, when the current blockchain node obtains the voucher of the object to be verified, it can first determine the template identifier "cptId" of the voucher template used by the voucher from the content recorded in the voucher of the object to be verified. The voucher template is used to determine the content that needs to be recorded in the voucher. For example, in a certain voucher template, the name, gender and date of birth of the target object need to be recorded, while in another voucher template, only the name and date of birth of the target object need to be recorded; at the same time, the voucher template can also limit the recording format of the information in the voucher. For example, in a certain voucher template, gender is limited to exist in Chinese characters (male, female), while in another voucher template, gender is limited to exist in digital form (0, 1).
[0093] Furthermore, after the current blockchain node determines the template identifier, the credential verification module can send a digital identity credential template query transaction to the contract execution device to determine the target credential template corresponding to the template identifier from the on-chain information based on the template identifier, thereby determining whether the information in the credential of the object to be verified is recorded completely and whether the format is correct based on the target credential template. Optionally, if the information in the credential of the object to be verified is recorded completely and the format is correct, the content integrity verification is determined to be successful; otherwise, the content integrity verification is determined to have failed.
[0094] It should be noted that the accuracy of the verification result is guaranteed by verifying the content integrity of the object credential to be verified based on the target credential template in the on-chain information.
[0095] In an optional embodiment, in the process of verifying the authenticity of the object credential to be verified based on the on-chain information, the authenticity of the object digital identity to be verified can be verified based on the on-chain information, and when the digital identity of the object to be verified is determined to be authentic, the object signature can be verified for authenticity based on the on-chain information, and then when the object signature is determined to be authentic, the authenticity of the node digital identity to be verified can be verified based on the on-chain information, and when the digital identity of the node to be verified is determined to be authentic, the node signature can be verified for authenticity based on the on-chain information. Wherein, the object credential to be verified includes at least the object digital identity to be verified, the object signature, the node digital identity to be verified, and the node signature.
[0096] Optionally, when the content integrity verification of the object certificate to be verified is successful, the current blockchain node can verify the authenticity of the object digital identity, object signature, node digital identity and node signature in the verification object certificate in turn based on the certificate verification module. During the verification process, if the verification fails in any step, not only the subsequent verification steps will be skipped, but the verification failure information will be directly returned and the corresponding transaction request will be rejected.
[0097] It should be noted that by performing the verification of the next step when the verification of the previous verification step is valid, the verification time can be effectively saved, thereby reducing the resource occupation of the relevant system and improving work efficiency.
[0098] In an optional embodiment, in the process of verifying the authenticity of the digital identity of the object to be verified based on the on-chain information, the current blockchain node can obtain the digital identity of the object to be verified, and detect whether the digital identity of the object to be verified exists in the on-chain information to obtain a first detection result, thereby determining the authenticity of the digital identity of the object to be verified based on the first detection result.
[0099] Optionally, the credential verification module can send a digital identity query transaction to the contract execution device according to the information corresponding to the "id" of the "user" part of the credential of the object to be verified (i.e., the digital identity of the object) to determine whether the digital identity of the object to be verified exists in the on-chain information, and obtain a first detection result. Optionally, when the first detection result indicates that the digital identity of the object to be verified exists in the on-chain information, it means that the digital identity of the object to be verified is authentic. Conversely, when the first detection result indicates that the digital identity of the object to be verified does not exist in the on-chain information, it means that the digital identity of the object to be verified is not authentic.
[0100] It should be noted that the accuracy of the verification result is guaranteed by determining the authenticity of the digital identity of the object to be verified based on the digital identity of the object recorded in the on-chain information.
[0101] In an optional embodiment, in the process of verifying the authenticity of the object signature based on the on-chain information, the current blockchain node can obtain the object signature and obtain the object public key from the on-chain information, thereby using the object public key to decrypt the object signature to obtain the decrypted object digital identity, and then determine whether the decrypted object digital identity is the same as the digital identity of the object to be verified, and obtain a first judgment result, so as to determine the authenticity of the object signature based on the first judgment result.
[0102] Optionally, the credential verification module can obtain the object public key corresponding to the target object from the on-chain information, and then use the object public key to decrypt the object signature to obtain the decrypted object digital identity, wherein the real object signature is obtained by signing the object digital identity based on the private key corresponding to the target object. Thus, the decrypted object digital identity can be compared with the digital identity of the object to be verified to obtain a first judgment result. Optionally, when the first judgment result indicates that the decrypted object digital identity is the same as the digital identity of the object to be verified, it means that the object signature is authentic. Conversely, when the first judgment result indicates that the decrypted object digital identity is different from the digital identity of the object to be verified, it means that the object signature is not authentic.
[0103] It should be noted that since the real object signature is obtained by signing the object's digital identity based on the private key corresponding to the target object, the object signature is decrypted using the object's public key to verify the authenticity of the object signature, thereby ensuring the accuracy of the verification result.
[0104] In an optional embodiment, in the process of verifying the authenticity of the digital identity of the node to be verified based on the on-chain information, the current blockchain node can obtain the digital identity of the node to be verified, detect whether the digital identity of the node to be verified exists in the on-chain information, obtain a second detection result, and determine the authenticity of the digital identity of the node to be verified based on the second detection result.
[0105] Optionally, the credential verification module can send a digital identity query transaction to the contract execution device according to the information corresponding to the "id" in the "proof" part of the credential of the object to be verified (i.e., the digital identity of the object) to determine whether the digital identity of the node to be verified exists in the on-chain information, and obtain a second test result. Optionally, when the second test result indicates that the digital identity of the node to be verified exists in the on-chain information, it means that the digital identity of the node to be verified is authentic. Conversely, when the second test result indicates that the digital identity of the node to be verified does not exist in the on-chain information, it means that the digital identity of the node to be verified is not authentic.
[0106] It should be noted that the accuracy of the verification result is guaranteed by determining the authenticity of the digital identity of the node to be verified based on the digital identity of the node recorded in the on-chain information.
[0107] In an optional embodiment, in the process of verifying the authenticity of the node signature based on the on-chain information, the current blockchain node can obtain the node signature and obtain the node public key from the on-chain information, and then use the node public key to decrypt the node signature to obtain the decrypted object attribute information, thereby determining whether the decrypted object attribute information is the same as the object attribute information in the object certificate to be verified, obtaining a second judgment result, and then determining the authenticity of the object signature based on the second judgment result.
[0108] Optionally, the credential verification module can obtain the object public key of the blockchain node of the authority corresponding to the target object from the on-chain information, and then use the object public key to decrypt the node signature to obtain the decrypted object attribute information, that is, the aforementioned user attribute declaration information "claim", wherein the real node signature is obtained by signing the node digital identity based on the object private key of the blockchain node of the authority corresponding to the target object. Thus, the decrypted object attribute information can be compared with the object attribute information in the object certificate to be verified to obtain a second judgment result. Optionally, when the second judgment result indicates that the decrypted object attribute information is the same as the object attribute information in the object certificate to be verified, it means that the node signature is authentic. Conversely, when the second judgment result indicates that the decrypted object attribute information is different from the object attribute information in the object certificate to be verified, it means that the node signature is not authentic.
[0109] It should be noted that since the real node signature is obtained by signing the node digital identity based on the object private key of the blockchain node of the authority corresponding to the target object, the node signature is decrypted by using the node public key to verify the authenticity of the node signature, thereby ensuring the accuracy of the verification result.
[0110] In an optional embodiment, after determining the authenticity of the object signature based on the second judgment result, the current blockchain node can obtain the current time and the validity period in the certificate of the object to be verified when determining that the object signature is authentic, thereby determining that the authenticity verification of the certificate of the object to be verified is successful when the current time is within the validity period.
[0111] Optionally, the current blockchain node may compare the current time with the validity period in the certificate of the object to be verified to determine whether the current time is within the validity period, and if the current time is within the validity period, determine that the authenticity verification of the certificate of the object to be verified is successful; otherwise, determine that the authenticity verification of the certificate of the object to be verified has failed.
[0112] It should be noted that by comparing the current time with the validity period in the credential of the object to be verified, the security of identity authentication can be further improved.
[0113] In an optional embodiment, in the process of determining the identity information of the target object based on the credential of the object to be verified, the identity information of the target object may be determined based on the object attribute information in the credential of the object to be verified.
[0114] Optionally, after determining that the authenticity of the credential of the object to be verified is successful, the current blockchain node can send the object attribute information in the credential of the object to be verified, that is, the aforementioned user attribute declaration information "claim", to the contract execution device, so that the contract execution module determines the identity information of the target object based on the object attribute information, and then determines whether to execute the corresponding transaction request based on the identity information of the target object.
[0115] It should be noted that the identity information of the target object is determined based on the object attribute information in the verified object credential, thereby achieving effective verification of the identity of the target object.
[0116] In an optional embodiment, after determining the identity information of the target object based on the credential of the object to be verified, the current blockchain node can determine the object authority of the target object based on the identity information of the target object, and thus execute the transaction request of the target object to conduct a transaction when it is determined that the object authority meets the preset conditions.
[0117] Optionally, in this embodiment, the credential verification module can determine the object authority of the target object based on the identity information of the target object, and execute the transaction request of the target object to conduct a transaction when it is determined that the object authority meets the preset conditions. The preset conditions correspond to the transaction request, that is, when the transaction request initiated by the target object is different, the preset conditions that its authority needs to meet are also different.
[0118] Furthermore, in the process of executing the transaction request of the target object to conduct a transaction, the contract execution device can receive the business transaction request initiated by the target object based on the business system, and route it to the corresponding smart contract sandbox according to the smart contract ID parameter "subId" in the transaction request method, specifically the subId in the "Invoke(stubId, function, args)" field, wherein the business update and query requests initiated by the business system are forwarded to the corresponding business smart contract running container sandbox.
[0119] Furthermore, the transaction verification module can verify the transaction request parameters and source information, and save the Hash of the business request block and the block consensus message to the local disk, then increase the block number by 1, and broadcast the block consensus message to all verification nodes in the business chain. After that, the current blockchain node and the verification node can reach a consensus on the transaction through the transaction consensus module, where the transaction consensus module can use the aforementioned consensus algorithm to reach a consensus, or it can reach a consensus based on other consensus algorithms, so it will not be repeated here.
[0120] Optionally, the persistence module can then obtain the message assembled by the business system according to the smart contract interface and the transaction information sent according to the smart contract ID, and then persist the business data to the world state. Among them, the world state data corresponding to the transaction request initiated by the business system is mainly business data, such as account information, account balance information, etc.
[0121] It should be noted that the present invention deploys blockchain member nodes and digital identity service nodes in each organization when each alliance organization forms an alliance chain, and the digital identity service nodes of each organization issue corresponding node certificates to member nodes when the alliance chain network is initialized. When cross-institutional node communication and transaction verification are carried out, the node and transaction user identity authentication is carried out through node certificates and object certificates, which effectively improves the security and scalability of blockchain transactions. Specifically, the present invention effectively removes the centralized CA authentication mode by deploying digital identity service nodes in each alliance organization, allowing each alliance organization on the chain to truly achieve peer-to-peer interaction, thereby promoting the blockchain system to return to its decentralized origin; because the digital identity service node supports docking with the real-name identity authentication system within each organization, and can selectively disclose user-related attribute information through object certificates, it realizes anonymity on the chain and real-name off the chain, thereby improving the supervision of on-chain operations and transaction behaviors; through the unified digital identity identifier of the digital identity, the digital identity certificate that can be effectively circulated, and the certificate parser, it can be convenient to expand the identity authentication when the alliance organization is expanded, and it can also be flexibly applied to the linkage of on-chain and off-chain identities and the opening of identities between different alliances.
[0122] It can be seen that the solution provided in the present application achieves the purpose of verifying the object credentials of the target object and determining the identity information of the target object based on the successfully verified object credentials, thereby achieving the technical effect of improving the security of identity authentication, and further solving the technical problem of low security of blockchain identity authentication in the prior art.
[0123] Example 2
[0124] According to an embodiment of the present invention, an embodiment of an identity authentication device based on blockchain is provided, wherein: Figure 4is a schematic diagram of an optional blockchain-based identity authentication device according to an embodiment of the present invention, such as Figure 4 As shown, the device comprises:
[0125] The acquisition module 401 is used to acquire the to-be-verified object credential corresponding to the target object;
[0126] The first verification module 402 is used to verify the content integrity of the verification object credential based on the on-chain information in the blockchain;
[0127] The second verification module 403 is used to verify the authenticity of the verification object credential based on the on-chain information when the content integrity verification succeeds;
[0128] The determination module 404 is used to determine the identity information of the target object based on the credential of the object to be verified if the authenticity verification is successful.
[0129] It should be noted that the above-mentioned acquisition module 401, first verification module 402, second verification module 403 and determination module 404 correspond to steps S201 to S204 in the above-mentioned embodiment, and the examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.
[0130] Optionally, the first verification module also includes: a first sub-determination module, used to determine the template identifier of the certificate template adopted by the certificate of the object to be verified; a first sub-acquisition module, used to obtain the target certificate template corresponding to the template identifier from the on-chain information; and a second sub-determination module, used to determine the content integrity of the certificate of the object to be verified based on the target certificate template.
[0131] Optionally, the credential of the object to be verified includes at least the digital identity of the object to be verified, the object signature, the digital identity of the node to be verified and the node signature, wherein the second verification module also includes: a first sub-verification module, used to verify the authenticity of the digital identity of the object to be verified based on the on-chain information; a second sub-verification module, used to verify the authenticity of the object signature based on the on-chain information when it is determined that the digital identity of the object to be verified is authentic; a third sub-verification module, used to verify the authenticity of the node digital identity to be verified based on the on-chain information when it is determined that the object signature is authentic; a fourth sub-verification module, used to verify the authenticity of the node signature based on the on-chain information when it is determined that the digital identity of the node to be verified is authentic.
[0132] Optionally, the first sub-verification module also includes: a second sub-acquisition module, used to obtain the digital identity of the object to be verified; a first detection module, used to detect whether the digital identity of the object to be verified exists in the on-chain information to obtain a first detection result; and a third sub-determination module, used to determine the authenticity of the digital identity of the object to be verified based on the first detection result.
[0133] Optionally, the second sub-verification module also includes: a third sub-acquisition module, used to obtain the object signature; a fourth sub-acquisition module, used to obtain the object public key from the on-chain information; a first processing module, used to use the object public key to decrypt the object signature to obtain the decrypted object digital identity; a first judgment module, used to judge whether the decrypted object digital identity is the same as the digital identity of the object to be verified, and obtain a first judgment result; a fourth sub-determination module, used to determine the authenticity of the object signature based on the first judgment result.
[0134] Optionally, the third sub-verification module also includes: a fifth sub-acquisition module, which acquires the digital identity of the node to be verified; a second detection module, which detects whether the digital identity of the node to be verified exists in the on-chain information, and obtains a second detection result; and a fifth sub-determination module, which is used to determine the authenticity of the digital identity of the node to be verified based on the second detection result.
[0135] Optionally, the fourth sub-verification module also includes: a sixth sub-acquisition module, used to obtain the node signature; a seventh sub-acquisition module, used to obtain the node public key from the on-chain information; a second processing module, used to use the node public key to decrypt the node signature to obtain the decrypted object attribute information; a second judgment module, used to judge whether the decrypted object attribute information is the same as the object attribute information in the object certificate to be verified, and obtain a second judgment result; a fifth sub-determination module, used to determine the authenticity of the object signature based on the second judgment result.
[0136] Optionally, the blockchain-based identity authentication device also includes: an eighth sub-acquisition module, used to obtain the current time when it is determined that the object signature is authentic; a ninth sub-acquisition module, used to obtain the validity period in the credential of the object to be verified; and a sixth sub-determination module, which determines that the authenticity verification of the credential of the object to be verified is successful when the current time is within the validity period.
[0137] Optionally, the determination module further includes: a seventh sub-determination module, configured to determine the identity information of the target object based on the object attribute information in the credential of the object to be verified.
[0138] Optionally, the blockchain-based identity authentication device also includes: an eighth sub-determination module, used to determine the object authority of the target object based on the identity information of the target object; and an execution module, used to execute the transaction request of the target object to conduct a transaction when it is determined that the object authority meets preset conditions.
[0139] Optionally, the blockchain-based identity authentication device also includes: a tenth sub-acquisition module, used to obtain a node credential corresponding to a current blockchain node; a broadcast module, used to broadcast the node credential to multiple verification nodes in the blockchain; an eleventh sub-acquisition module, used to obtain a verification result, wherein the verification result is obtained by multiple verification nodes verifying the authenticity of the node credential based on target information, and the target information includes: a node digital identity and a node public key corresponding to the current blockchain node; a ninth sub-determination module, used to determine that the current blockchain node can become a node in the target blockchain when the verification result indicates that the node credential is authentic.
[0140] Optionally, the blockchain-based identity authentication device also includes: a twelfth sub-acquisition module, used to obtain the target object digital identity, target object public key, target node digital identity and target node public key generated by the current service node, wherein each service node corresponds to each blockchain node; a third processing module, used to perform on-chain processing on the target object digital identity, target object public key, target node digital identity and target node public key to obtain on-chain information.
[0141] Example 3
[0142] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned blockchain identity authentication method when running.
[0143] Example 4
[0144] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, wherein: Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Figure 5 As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned blockchain identity authentication method when running.
[0145] Example 5
[0146] According to another aspect of an embodiment of the present invention, a computer program product is also provided, including a computer program / instruction, which implements the above-mentioned blockchain identity authentication method when the computer program / instruction is executed by a processor.
[0147] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0148] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be 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 units or modules, which can be electrical or other forms.
[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0151] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0152] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0153] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A blockchain-based identity authentication method, characterized in that: include: Obtain the object credentials to be verified corresponding to the target object; Based on the on-chain information in the blockchain, the content integrity of the credential of the object to be verified is verified; If the content integrity verification is successful, the authenticity of the object credential to be verified is verified based on the on-chain information; In case the authenticity verification is successful, determining the identity information of the target object based on the credential of the object to be verified; The object credential to be verified includes at least the digital identity of the object to be verified, the object signature, the digital identity of the node to be verified, and the node signature. Based on the on-chain information, the authenticity of the object credential to be verified is verified, including: Based on the on-chain information, verify the authenticity of the digital identity of the object to be verified; When it is determined that the digital identity of the object to be verified is authentic, the authenticity of the signature of the object is verified based on the information on the chain; When it is determined that the object signature is authentic, the authenticity of the digital identity of the node to be verified is verified based on the on-chain information; When it is determined that the digital identity of the node to be verified is authentic, the authenticity of the node signature is verified based on the on-chain information.
2. The method according to claim 1, characterized in that: Based on the on-chain information in the blockchain, the content integrity of the credential of the object to be verified is verified, including: Determine the template identifier of the credential template used by the credential of the object to be verified; Acquire a target voucher template corresponding to the template identifier from the on-chain information; Based on the target credential template, determine the content integrity of the credential of the object to be verified.
3. The method according to claim 1 or 2, characterized in that: Based on the on-chain information, the authenticity of the digital identity of the object to be verified is verified, including: Obtaining the digital identity of the object to be verified; Detecting whether the digital identity of the object to be verified exists in the on-chain information to obtain a first detection result; The authenticity of the digital identity of the object to be verified is determined based on the first detection result.
4. The method according to claim 1 or 2, characterized in that: Based on the on-chain information, the authenticity of the object signature is verified, including: Obtaining the object signature; Obtaining the object public key from the on-chain information; Decrypting the object signature using the object public key to obtain a decrypted object digital identity; Determine whether the decrypted object digital identity is the same as the digital identity of the object to be verified, and obtain a first determination result; The authenticity of the object signature is determined based on the first judgment result.
5. The method according to claim 1 or 2, characterized in that: Based on the on-chain information, the authenticity of the digital identity of the node to be verified is verified, including: Obtaining the digital identity of the node to be verified; Detecting whether the digital identity of the node to be verified exists in the on-chain information to obtain a second detection result; The authenticity of the digital identity of the node to be verified is determined based on the second detection result.
6. The method according to claim 1 or 2, characterized in that: Based on the on-chain information, the node signature is verified for authenticity, including: Obtaining the node signature; Obtaining a node public key from the on-chain information; Decrypting the node signature using the node public key to obtain decrypted object attribute information; Determine whether the decrypted object attribute information is the same as the object attribute information in the object credential to be verified, and obtain a second determination result; The authenticity of the object signature is determined based on the second judgment result.
7. The method according to claim 6, characterized in that After determining the authenticity of the object signature based on the second judgment result, the method further includes: When it is determined that the signature of the object is authentic, obtaining the current time; Obtaining the validity period in the credential of the object to be verified; In a case where the current time is within the validity period, it is determined that the authenticity verification of the credential of the object to be verified is successful.
8. The method according to claim 1, characterized in that Determining the identity information of the target object based on the credential of the object to be verified includes: The identity information of the target object is determined based on the object attribute information in the credential of the object to be verified.
9. The method according to claim 1, characterized in that: After determining the identity information of the target object based on the credential of the object to be authenticated, the method further includes: Determining the object authority of the target object based on the identity information of the target object; In the case where it is determined that the object authority meets the preset condition, the transaction request of the target object to conduct a transaction is executed.
10. The method according to claim 1, characterized in that Before obtaining the to-be-verified object credential corresponding to the target object, the method further includes: Get the node certificate corresponding to the current blockchain node; Broadcasting the node certificate to multiple verification nodes in the blockchain; Obtaining a verification result, wherein the verification result is obtained by the multiple verification nodes verifying the authenticity of the node credential based on target information, and the target information includes: a node digital identity and a node public key corresponding to the current blockchain node; When the verification result indicates that the node credential is authentic, it is determined that the current blockchain node can become a node in the target blockchain.
11. The method according to claim 1, characterized in that: Before obtaining the to-be-verified object credential corresponding to the target object, the method further includes: Obtain the target object digital identity, target object public key, target node digital identity and target node public key generated by the current service node, where each service node corresponds to each blockchain node; The target object digital identity, the target object public key, the target node digital identity and the target node public key are processed on the chain to obtain the on-chain information.
12. An identity authentication device based on blockchain, characterized in that: include: An acquisition module is used to obtain the object certificate to be verified corresponding to the target object; A first verification module, used to verify the content integrity of the credential of the object to be verified based on the on-chain information in the blockchain; A second verification module is used to verify the authenticity of the credential of the object to be verified based on the on-chain information when the content integrity verification succeeds; A determination module, configured to determine the identity information of the target object based on the credential of the object to be verified if the authenticity verification is successful; The object credential to be verified includes at least the digital identity of the object to be verified, the object signature, the digital identity of the node to be verified and the node signature, wherein the second verification module includes: A first sub-verification module, used to verify the authenticity of the digital identity of the object to be verified based on the on-chain information; A second sub-verification module is used to verify the authenticity of the object signature based on the on-chain information when determining that the digital identity of the object to be verified is authentic; A third sub-verification module is used to verify the authenticity of the digital identity of the node to be verified based on the on-chain information when determining that the object signature is authentic; The fourth sub-verification module is used to verify the authenticity of the node signature based on the on-chain information when it is determined that the digital identity of the node to be verified is authentic.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the blockchain-based identity authentication method described in any one of claims 1 to 11 when running.
14. An electronic device, characterized in that: The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the blockchain-based identity authentication method described in any one of claims 1 to 11 when running.
