Distributed digital identity (DID) verification method and device
By generating DID identifiers and documents, using Merkle trees and verifiable statements, and combining encryption algorithms and private key signatures, the problems of high transmission overhead and cumbersome verification steps in the blockchain DID system are solved, and efficient and accurate DID verification is achieved.
Patent Information
- Application Number
- CN202410339295.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-22
- Publication Date
- 2025-09-23
AI Technical Summary
In the existing technology, the blockchain-based DID digital identity system has high transmission overhead, cumbersome verification steps, and low verification efficiency during the flow of identity information.
By generating DID identifiers and DID documents, using Merkle trees and verifiable statements, combined with preset encryption algorithms and private key signatures, the generation and verification of identity attribute certificates are achieved. Only the Merkle path of part of the information is transmitted to save transmission overhead, and verifiable statements are stored on the blockchain to trace the verification process.
It simplifies the DID verification steps, improves verification efficiency, ensures the accuracy and traceability of DID verification, and reduces transmission overhead.
Smart Images

Figure CN120692041A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of data processing technology and trusted business support technology, and in particular to a distributed digital identity (DID) verification method and device thereof. Background Art
[0002] The DID digital identity system established based on blockchain has the characteristics of ensuring data authenticity, protecting user privacy and security, and strong portability. In related technologies, the transmission overhead of identity attribute information in the identity information flow process is large, and the verifiable credential flow process is cumbersome, requiring at least two or more certificate generation and certificate verification, etc., and the verification steps are cumbersome.
[0003] Therefore, how to save transmission overhead, ensure the accuracy of DID verification, simplify the verification steps, and improve the efficiency of DID verification has become one of the important research directions. Summary of the Invention
[0004] The present disclosure aims to solve, at least to some extent, one of the technical problems in the related art. To this end, the first embodiment of the present disclosure proposes a distributed digital identity (DID) verification method, which is executed by a terminal device and includes:
[0005] Obtain the target object's private key and public key based on a preset encryption algorithm, generate a DID identifier based on the target object's private key and public key, generate a DID document based on the DID identifier, the target object's public key, and the encryption algorithm, and store the DID document in the blockchain;
[0006] Generate an identity authentication request based on the DID identifier, and send the identity authentication request to one or more first servers;
[0007] For each first server, obtain a verifiable statement stored by the first server on the blockchain, and obtain an identity attribute certificate and a Merkle tree based on the private key of the target object and the verifiable statement;
[0008] A verifiable credential is generated based on the identity attribute certificate and the Merkle tree, and the verifiable credential is sent to the second server to request verification from the second server.
[0009] The second embodiment of the present disclosure provides a distributed digital identity (DID) verification method, which is executed by a first server and includes:
[0010] Receive an identity authentication request from a terminal device, which carries the DID of the target object, and obtain the identity attribute information of the target object based on the DID;
[0011] Obtain the target object's DID document on the blockchain based on the target object's DID identifier, and generate an identity attribute certificate based on the DID document and identity attribute information;
[0012] Perform hash calculation based on the identity attribute information to generate a Merkle tree, and generate a verifiable claim based on the identity attribute certificate and the Merkle tree;
[0013] The verifiable statement is signed based on the private key of the first server and uploaded to the blockchain.
[0014] The third embodiment of the present disclosure provides a distributed digital identity (DID) verification method, which is executed by a second server and includes:
[0015] Receive verifiable credentials sent by the terminal device;
[0016] Obtaining a private key of the second server, and decrypting the verifiable credential based on the private key of the second server to obtain a Merkle path, target identity attribute information, and a blockchain address;
[0017] Obtaining a first Merkle tree based on the target identity attribute information and the Merkle path, obtaining a verifiable claim based on the blockchain address, and obtaining a second Merkle tree based on the verifiable claim;
[0018] The first Merkle tree and the second Merkle tree are matched to determine whether the first Merkle tree and the second Merkle tree are the same to obtain a verification result.
[0019] In the disclosed embodiment, during the verification process, only part of the disclosed information and its Merkel path are transmitted, which can save transmission overhead. All verifiable statements are uploaded to the chain, and users obtain their own certificates on the chain. After the service provider obtains the disclosed information, it also obtains the Merkel of the verifiable certificate on the chain for verification. The verifiable statements are uploaded to the chain to make the entire verification process traceable, ensuring the accuracy of DID verification while simplifying the verification steps and improving the efficiency of DID verification.
[0020] The fourth embodiment of the present disclosure provides a distributed digital identity (DID) verification device, including:
[0021] A processing module is used to obtain the private key and public key of the target object based on a preset encryption algorithm, generate a DID identifier based on the private key and public key of the target object, generate a DID document based on the DID identifier, the public key of the target object, and the encryption algorithm, and store the DID document in the blockchain;
[0022] A first sending module is configured to generate an identity authentication request based on the DID identifier and send the identity authentication request to one or more first servers;
[0023] An acquisition module, configured to acquire, for each first server, a verifiable statement stored by the first server on the blockchain, and obtain an identity attribute certificate and a Merkle tree based on the private key of the target object and the verifiable statement;
[0024] The second sending module is used to generate a verifiable credential based on the identity attribute certificate and the Merkle tree, and send the verifiable credential to the second server to request verification from the second server.
[0025] The fifth embodiment of the present disclosure provides a distributed digital identity (DID) verification device, including:
[0026] A receiving module is used to receive an identity authentication request sent by a terminal device, the identity authentication request carries the DID identifier of the target object, and obtain the identity attribute information of the target object based on the DID identifier;
[0027] A generation module is used to obtain the DID document of the target object on the blockchain based on the DID identifier of the target object, and to generate an identity attribute certificate based on the DID document and identity attribute information;
[0028] An acquisition module is used to perform hash calculation based on the identity attribute information to generate a Merkle tree, and to generate a verifiable statement based on the identity attribute certificate and the Merkle tree;
[0029] A receiving module, configured to receive a verifiable credential sent by a terminal device;
[0030] A first processing module is configured to obtain a private key of the second server, and decrypt the verifiable credential based on the private key of the second server to obtain a Merkle path, target identity attribute information, and a blockchain address;
[0031] a second processing module, configured to obtain a first Merkle tree based on the target identity attribute information and the Merkle path, obtain a verifiable claim based on the blockchain address, and obtain a second Merkle tree based on the verifiable claim;
[0032] The verification module is used to match the first Merkle tree and the second Merkle tree, and determine whether the first Merkle tree and the second Merkle tree are the same to obtain a verification result.
[0033] A sixth embodiment of the present disclosure provides a distributed digital identity (DID) verification device, including:
[0034] The processing module is used to receive the verifiable credentials sent by the terminal device, verify the verifiable credentials, and obtain the verification result.
[0035] A seventh aspect of the present disclosure provides an electronic device, including:
[0036] at least one processor; and
[0037] a memory communicatively connected to at least one processor; wherein,
[0038] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to execute the distributed digital identity DID verification method provided in the embodiment of the first aspect of the present disclosure, or the distributed digital identity DID verification method provided in the embodiment of the second aspect of the present disclosure, or the distributed digital identity DID verification method provided in the embodiment of the third aspect of the present disclosure.
[0039] The eighth aspect embodiment of the present disclosure proposes a computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are used to enable a computer to execute the distributed digital identity DID verification method provided in the first aspect embodiment of the present disclosure, or the distributed digital identity DID verification method provided in the second aspect embodiment of the present disclosure, or the distributed digital identity DID verification method provided in the third aspect embodiment of the present disclosure.
[0040] The ninth aspect embodiment of the present disclosure proposes a computer program product, including a computer program, which, when executed by a processor, implements the distributed digital identity DID verification method provided in the first aspect embodiment of the present disclosure, or the distributed digital identity DID verification method provided in the second aspect embodiment of the present disclosure, or the distributed digital identity DID verification method provided in the third aspect embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of a distributed digital identity (DID) verification method according to an embodiment of the present disclosure;
[0042] Figure 2 This is a flow chart of a distributed digital identity (DID) verification method according to an embodiment of the present disclosure;
[0043] Figure 3 This is a flow chart of a distributed digital identity (DID) verification method according to an embodiment of the present disclosure;
[0044] Figure 4 This is a flow chart of a distributed digital identity (DID) verification method according to an embodiment of the present disclosure;
[0045] Figure 5 This is a flow chart of a distributed digital identity (DID) verification method according to an embodiment of the present disclosure;
[0046] Figure 6 This is a flow chart of a distributed digital identity (DID) verification method according to an embodiment of the present disclosure;
[0047] Figure 7Schematic diagram of a distributed digital identity (DID) verification method according to an embodiment of the present disclosure;
[0048] Figure 8 This is a structural block diagram of a distributed digital identity DID verification device according to an embodiment of the present disclosure;
[0049] Figure 9 This is a structural block diagram of a distributed digital identity DID verification device according to an embodiment of the present disclosure;
[0050] Figure 10 This is a structural block diagram of a distributed digital identity DID verification device according to an embodiment of the present disclosure;
[0051] Figure 11 is a block diagram of an electronic device according to one embodiment of the present disclosure. DETAILED DESCRIPTION
[0052] The following describes in detail embodiments of the present disclosure, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0053] The following describes the distributed digital identity DID verification method and device according to the embodiment of the present disclosure in conjunction with the accompanying drawings.
[0054] A Merkle tree, also known as a hash tree, is a binary tree widely used in data integrity verification, cryptography, and blockchain technology. The construction of a Merkle tree is based on the properties of hash functions. A hash function maps data of arbitrary length to a fixed-length hash value, transforming input data into an output hash value. When constructing a Merkle tree, the original data is first divided into fixed-size blocks. Each block is then hashed to obtain a corresponding hash value. Next, adjacent hash values are paired and hashed again to obtain a new hash value. This process is repeated until a root hash value is obtained, which is the root node of the Merkle tree. This root hash value represents the integrity of the entire data set.
[0055] Aggregate signature technology, such as BLS aggregate signature technology, BLS signature requires the use of two new structures: Hashing to the curve and Curve pairing.
[0056] (a) Preparation phase: Secretly select a random number as the private key pk, calculate the public key P = pk * G, and the message m to be signed.
[0057] (b) Signature: Map the message hash to a point on the curve, denoted as Q, and then multiply the resulting point by the private key to obtain the signature: S = pk*Q.
[0058] (c) Verify the signature: Check that e(P, Q) = e(G, S), where the function e is the so-called curve pairing function.
[0059] (2) Curve pairing function: There is a special function (or a type of function) denoted as e, which can accept as input two points P and Q on one (or two different) curves and output a number, as follows: e(P, Q) → n. For example, there is a number x and two points P and Q. No matter which point is multiplied by this number, the function result is the same, that is, e(x*P, Q) = e(P, x*Q). Furthermore, e(a*P, b*Q) = e(P, ab*Q) = e(P, ab*Q) = e(P, Q). ab , signature to be verified: e(P,Q)=e(pk*G,Q)=e(G,pk*Q)=e(G,S).
[0060] (3) BLS Aggregate Signature Principle: Suppose there is a block containing 1000 transactions, each of which contains a signature S i , a public key P i and a signature m i news.
[0061] To determine whether all signatures are valid, the aggregate signature is the sum of all signatures: S = S1 + S2 + ... + S 1000 , to verify the block, further check whether the following equation holds:
[0062] e(G, S)=e(P1, H(m1))·e(P2, H(m2))·…·e(P 1000 ,H(m 1000 ))
[0063] In this case, it is still necessary to obtain all public keys and calculate 1001 pairing functions, but at least all signatures in the block only take up 33 bytes. Signature aggregation can be done by miners and save a lot of block space.
[0064] A trusted environment is one in which private information such as passwords and private keys can be securely processed, ensuring that the information is never leaked to nodes or other people, while also proving that the data has not been tampered with.
[0065] Verifiable statement VC metadata: mainly information such as issuer, issuance date, statement type, etc.
[0066] Claim: One or more statements about a subject (issuing a property certificate).
[0067] Proof: Usually the digital signature of the issuer, which ensures that the verifiable statement VC can be verified, prevents the VC content from being tampered with, and verifies the issuer of the VC.
[0068] Figure 1 This is a flow chart of a distributed digital identity DID verification method according to an embodiment of the present disclosure. Figure 1 As shown, the method is executed by the terminal device and includes the following steps:
[0069] S101, based on a preset encryption algorithm, obtain the private key and public key of the target object, generate a DID identifier based on the private key and public key of the target object, generate a DID document based on the DID identifier, the public key of the target object, and the encryption algorithm, and store the DID document in the blockchain.
[0070] Optionally, the preset encryption algorithm may be an elliptic curve encryption algorithm.
[0071] In this disclosed embodiment, a terminal device registers a DID unique identity with a pre-set DID registration authority based on the target object's private and public keys. Based on the DID, the target object's public key, and an encryption algorithm, a corresponding DID document is generated and stored on the blockchain. In this disclosed embodiment, the DID, the target object's public key, and the encryption algorithm are converted into a pre-set DID document format to obtain the DID document data.
[0072] In some implementations, the DID document of the target object also includes information such as the target object's authentication, service endpoint, and timestamp.
[0073] S102: Generate an identity authentication request based on the DID identifier, and send the identity authentication request to one or more first servers.
[0074] In the disclosed embodiment, the identity authentication request carries a DID identifier, and the terminal device submits an identity authentication request to the first server to instruct the first server to download the DID document of the target object on the blockchain according to the DID of the target object.
[0075] In some embodiments, a preset target identity attribute type to be presented to the second server and candidate identity attribute types possessed by each first server are obtained; an identity authentication request is generated based on the DID identifier and the target identity attribute type; and for each first server, if the candidate identity attribute types possessed by the first server include any of the target identity attribute types, the identity authentication request is sent to the first server. For example, if the target identity attribute types include age and gender, the candidate identity attribute types of first server A include age and occupation, the candidate identity attribute types of first server B include gender and occupation, and the candidate identity attribute types of first server C include height and occupation, then the identity authentication request is sent to first server A and first server B.
[0076] In some embodiments, the terminal device, the first server, and the second server upload their respective DID documents to the blockchain, wherein the DID document of the first server also includes the candidate identity attribute type of the first server, and the candidate identity attribute type of the first server can be obtained based on the DID document of the first server, and the DID document of the second server also includes the target identity attribute type, and the target identity attribute type can be obtained based on the DID document of the second server.
[0077] S103: For each first server, obtain a verifiable statement stored by the first server on the blockchain, and obtain an identity attribute certificate and a Merkle tree based on the private key and the verifiable statement of the target object.
[0078] In some implementations, a blockchain address of a verifiable claim may be obtained, and the verifiable claim may be retrieved on the blockchain based on the blockchain address.
[0079] In the disclosed embodiment, the identity attribute certificate of the verifiable declaration is encrypted, and the encrypted attributes in the VC are decrypted using its own private key to obtain the identity attribute certificate. The Merkle tree is unencrypted and the Merkle tree can be directly obtained based on the verifiable declaration.
[0080] S104, generating a verifiable credential based on the identity attribute certificate and the Merkle tree, and sending the verifiable credential to the second server to request verification from the second server.
[0081] In some embodiments, signature verification is performed based on the identity attribute certificate. After the signature verification is passed, a verifiable credential is generated based on the Merkle tree, and the verifiable credential is sent to the second server, which receives the verifiable credential.
[0082] In the disclosed embodiment, during the verification process, only part of the disclosed information and its Merkel path are transmitted, which can save transmission overhead. All verifiable statements are uploaded to the chain, and users obtain their own certificates on the chain. After the service provider obtains the disclosed information, it also obtains the Merkel of the verifiable certificate on the chain for verification. The verifiable statements are uploaded to the chain to make the entire verification process traceable, ensuring the accuracy of DID verification while simplifying the verification steps and improving the efficiency of DID verification.
[0083] Figure 2 This is a flow chart of a distributed digital identity DID verification method according to an embodiment of the present disclosure. Figure 2 As shown, the method is executed by the terminal device and includes the following steps:
[0084] S201, based on a preset encryption algorithm, obtain the private key and public key of the target object, generate a DID identifier based on the private key and public key of the target object, generate a DID document based on the DID identifier, the public key of the target object, and the encryption algorithm, and store the DID document in the blockchain.
[0085] S202: Generate an identity authentication request based on the DID identifier, and send the identity authentication request to one or more first servers.
[0086] For the introduction of steps S201 to S202 , please refer to the relevant content in the above embodiment, which will not be repeated here.
[0087] S203: Receive indication information sent by the first server, where the indication information carries the blockchain address of the verifiable declaration, indicating that the verifiable declaration has been successfully uploaded to the blockchain.
[0088] The first server sends an indication message to the terminal device indicating that the verifiable declaration has been successfully uploaded to the chain, and the terminal device receives the indication message sent by the first server.
[0089] S204, based on the blockchain address, obtain a verifiable statement from the blockchain.
[0090] Obtain a verifiable claim on-chain based on the blockchain address of the verifiable claim VC.
[0091] S205, based on the private key and verifiable statement of the target object, obtain the identity attribute certificate and Merkle tree.
[0092] For the introduction of step S205, please refer to the relevant content in the above embodiment, which will not be repeated here.
[0093] S206: Obtain the public key of the first server and the public key of the second server.
[0094] In some embodiments, the terminal device, the first server, and the second server upload their respective DID documents to the blockchain. The DID documents include the public keys and DID identifiers of the three entities. For each entity, the public keys of the other two entities can be obtained based on the blockchain.
[0095] S207: Verify the signature of the identity attribute certificate based on the public key of the first server.
[0096] The identity attribute certificate is verified using the public key of the identity provider, ie, the first server. In some implementations, the identity attribute certificate can be verified based on an aggregate signature to improve verification efficiency.
[0097] S208: If the signature verification is successful, obtain the Merkle path based on the target identity attribute information and the Merkle tree.
[0098] The target identity attribute information is the identity attribute information under the target identity attribute type in the identity attribute certificate. In some implementations, the terminal device filters the identity attribute information according to the target identity attribute type and obtains the identity attribute information under the target identity attribute type as the target identity attribute information.
[0099] A Merkle path Path in the Merkle tree is determined based on the target identity attribute type that is to be presented to the service provider (the service provider is also the second server).
[0100] S209, after encrypting the Merkle path, target identity attribute information and blockchain address based on the public key of the second server, generating a verifiable credential, and signing the verifiable credential.
[0101] The public key of the service provider is used to encapsulate the blockchain address, Merkle path, and target identity attribute information of the verifiable declaration VC into the verifiable credential VP and sign it.
[0102] S210: Send the verifiable credentials to the second server to request verification from the second server.
[0103] The verifiable credentials are sent to the second server. The second server receives the verifiable credentials sent by the terminal device, verifies the verifiable credentials, obtains the verification result, and sends the verification result to the terminal device.
[0104] S211: Receive the verification result sent by the second server.
[0105] In some implementations, the verification result sent by the second server indicates that the verification is passed, and a business service can be requested from the second server.
[0106] In the disclosed embodiment, only the public key-encrypted attributes of the target object and the root node of the Merkle tree are stored in the VC, and the VC is stored on the chain. The terminal device and the second server respectively verify the content in the VC on the chain, thereby improving privacy.
[0107] Figure 3 This is a flow chart of a distributed digital identity DID verification method according to an embodiment of the present disclosure. Figure 3 As shown, the method is executed by the first server and includes the following steps:
[0108] S301: Receive an identity authentication request sent by a terminal device, where the identity authentication request carries a DID identifier of a target object, and obtain identity attribute information of the target object based on the DID identifier.
[0109] The terminal device sends an identity authentication request to the first server, and the first server receives the identity authentication request sent by the terminal device. The identity authentication request carries the DID identifier of the target object, and the identity attribute information of the target object can be determined from the local database based on the DID identifier.
[0110] S302, obtain the DID document of the target object on the blockchain based on the DID identifier of the target object, and generate an identity attribute certificate based on the DID document and identity attribute information.
[0111] Based on the DID document, the public key and encryption algorithm of the target object are obtained, and the identity attribute information is encrypted based on the public key and encryption algorithm of the target object to generate an identity attribute certificate.
[0112] Optionally, the encryption algorithm may be an elliptic curve encryption algorithm.
[0113] S303, performing hash calculation based on the identity attribute information to generate a Merkle tree, and generating a verifiable statement based on the identity attribute certificate and the Merkle tree.
[0114] The construction of the Merkle tree is based on the characteristics of the hash function. Hash calculation is performed based on the identity attribute information to obtain the corresponding attribute hash value, and the Merkle tree is generated based on the attribute hash value.
[0115] The encrypted attributes and the Merkle tree root generated after hash calculation are placed in the verifiable statement VC. For example, the identity attribute certificate and the Merkle tree are encoded into a digital certificate format to obtain a verifiable statement.
[0116] S304: Sign the verifiable statement based on the private key of the first server and upload it to the blockchain.
[0117] In the disclosed embodiment, before receiving an identity authentication request from a terminal device, the first server obtains its own candidate identity attribute type, public key, and private key, generates a DID identifier for the first server based on the first server's public key and private key, generates a DID document corresponding to the first server based on the candidate identity attribute type, the first server's public key, and the first server's DID identifier, and stores the DID document in the blockchain. Optionally, the first server's private key can be obtained as pk and the first server's public key can be obtained as pk*G based on an elliptic curve cryptography algorithm.
[0118] To further improve security, in the disclosed embodiment, the verifiable statement is signed based on the private key of the first server, and the signed verifiable statement is uploaded to the blockchain.
[0119] In the disclosed embodiment, during the verification process, all verifiable statements are uploaded to the chain, and the target object obtains its own certificate on the chain, which can make the entire verification process traceable, ensure the accuracy of DID verification, simplify the verification steps, and improve the efficiency of DID verification.
[0120] Figure 4 This is a flow chart of a distributed digital identity DID verification method according to an embodiment of the present disclosure. Figure 4 As shown, the method is executed by the first server and includes the following steps:
[0121] S401: Receive an identity authentication request sent by a terminal device, the identity authentication request carries the DID identifier of the target object, and obtain the identity attribute information of the target object based on the DID identifier.
[0122] In the embodiment of the present disclosure, the first server is an identity provider.
[0123] S402, obtaining the DID document of the target object on the blockchain based on the DID identifier of the target object.
[0124] For the introduction of steps S401 to S402, please refer to the relevant content in the above embodiment, which will not be repeated here.
[0125] S403: Obtain the public key and encryption algorithm of the target object based on the DID document.
[0126] S404: Encrypt the identity attribute information based on the public key and encryption algorithm of the target object to generate an identity attribute certificate.
[0127] Optionally, the identity attribute information may include one or more of name, age, gender, address, educational background, occupation, and income. In other implementations, the identity attribute information may also include other information, which is not limited in this embodiment of the present disclosure.
[0128] S405: Calculate the identity attribute information based on a hash algorithm to obtain an attribute hash value.
[0129] Use a hash algorithm to perform hash calculation on each identity attribute information to obtain the attribute hash value.
[0130] S406: Generate a Merkle tree by using the attribute hash values as leaf nodes according to a preset attribute order.
[0131] Generate a Merkle tree with all attribute hash values as leaf nodes in attribute order.
[0132] S407, generating a verifiable statement based on the identity attribute certificate and the Merkle tree.
[0133] S408: Sign the verifiable statement based on the private key of the first server and upload it to the blockchain.
[0134] For the introduction of steps S407 to S408, please refer to the relevant content in the above embodiment, which will not be repeated here.
[0135] S409, generating indication information based on the blockchain address of the verifiable declaration, and sending the indication information to the terminal device, where the indication information is used to indicate that the verifiable declaration has been successfully uploaded to the blockchain.
[0136] In the disclosed embodiment, after the verifiable statement is uploaded to the blockchain, a notification is sent to the terminal device indicating that the upload is successful.
[0137] In the disclosed embodiment, identity attribute information is encrypted based on the target object's public key and encryption algorithm to generate an identity attribute certificate, which can improve data security. During the verification process, all verifiable claims are uploaded to the chain, and the target object obtains its own certificate on the chain, which can make the entire verification process traceable, ensuring the accuracy of DID verification while simplifying the verification steps and improving DID verification efficiency. Based on the identity attribute certificate and Merkle tree, verifiable claims are obtained, and only partially disclosed information and its Merkle path are transmitted, which can save transmission overhead.
[0138] Figure 5 This is a flow chart of a distributed digital identity DID verification method according to an embodiment of the present disclosure. Figure 5 As shown, the method is executed by the second server and includes the following steps:
[0139] S501, receiving a verifiable credential sent by a terminal device.
[0140] In the embodiment of the present disclosure, the second server is a service provider.
[0141] In an embodiment of the present disclosure, before receiving the verifiable credentials sent by the terminal device, the second server obtains its own target identity attribute type and public key and private key, generates the DID identifier of the second server based on the public key and private key of the second server, generates the DID document corresponding to the second server based on the target identity attribute type of the second server, the public key of the second server and the DID identifier of the second server, and stores the DID document in the blockchain.
[0142] S502: Obtain a private key of the second server, and decrypt the verifiable credential based on the private key of the second server to obtain a Merkle path, target identity attribute information, and a blockchain address.
[0143] The verifiable credential is decrypted based on the private key of the second server to obtain the Merkle path, the target identity attribute information, and the blockchain address of the verifiable claim. In the embodiment of the present disclosure, the target identity attribute information obtained by the second server is identity attribute information of the target identity attribute type.
[0144] S503, obtaining a first Merkle tree based on the target identity attribute information and the Merkle path, obtaining a verifiable claim based on the blockchain address, and obtaining a second Merkle tree based on the verifiable claim.
[0145] After receiving the verifiable credential VP, the identity provider calculates its hash based on the identity attributes provided by the terminal device where the target object is located, and uses the provided Merkle path Path to calculate the first Merkle tree MerkleRoot'.
[0146] According to the blockchain address provided in VP, the corresponding verifiable statement VC is obtained, and based on the verifiable statement, the second Merkle tree MerkleRoot is obtained.
[0147] S504: Match the first Merkle tree and the second Merkle tree to determine whether the first Merkle tree and the second Merkle tree are the same to obtain a verification result.
[0148] MerkleRoot' is matched with MerkleRoot" to determine whether the first Merkle tree is consistent with the second Merkle tree.
[0149] If the first Merkle tree and the second Merkle tree are the same, the verification is continued. If the first Merkle tree and the second Merkle tree are different, the verification result is determined to be failed.
[0150] In the disclosed embodiment, the verifiable credential is decrypted based on the private key of the second server to obtain a Merkle path, target identity attribute information, and a blockchain address. A first Merkle tree is obtained based on the target identity attribute information and the Merkle path. A verifiable statement is obtained based on the blockchain address, and a second Merkle tree is obtained based on the verifiable statement. The verifiable credential is verified based on the first Merkle tree and the second Merkle tree to obtain a verification result. This ensures the accuracy of DID verification while simplifying the verification steps and improving the efficiency of DID verification.
[0151] Figure 6 This is a flow chart of a distributed digital identity DID verification method according to an embodiment of the present disclosure. Figure 6 As shown, the method is executed by the second server and includes the following steps:
[0152] S601, receiving a verifiable credential sent by a terminal device.
[0153] S602: Obtain the private key of the second server, and decrypt the verifiable credential based on the private key of the second server to obtain the Merkle path, target identity attribute information, and blockchain address.
[0154] S603, obtaining a first Merkle tree based on the target identity attribute information and the Merkle path, obtaining a verifiable claim based on the blockchain address, and obtaining a second Merkle tree based on the verifiable claim.
[0155] S604: Match the first Merkle tree and the second Merkle tree to determine whether the first Merkle tree and the second Merkle tree are the same.
[0156] For the introduction of steps S601 to S604 , please refer to the relevant content in the above example, which will not be repeated here.
[0157] S605: If the first Merkle tree and the second Merkle tree are the same, the signatures in the identity attribute certificate are aggregated using a preset aggregate signature technology, and the smart contract is called to verify the aggregated signatures to obtain a verification result.
[0158] If the service provider needs to verify multiple attributes in multiple certificates of the target object, it needs to verify the signatures of all certificates that need to be verified. It uses a preset aggregate signature technology, such as BLS aggregate signature technology, to aggregate the signatures in each certificate and call a smart contract to verify the aggregate signature to obtain the verification result.
[0159] S606: Send the verification result to the terminal device.
[0160] In some implementations, if the verification result is passed, the verification result is sent to the terminal device and then services are provided to the terminal device.
[0161] In this disclosure, BLS aggregate signature technology is used to simultaneously verify multiple certificate signatures, improving verification efficiency. Calling a smart contract to perform on-chain verification makes certificate verification results traceable. This disclosure utilizes shared disclosure information and Merkle tree paths for VP verification, and BLS aggregate signature technology is used for signature verification. This not only reduces certificate transmission overhead but also improves verification efficiency by simultaneously verifying multiple certificates.
[0162] The present disclosure is applicable to the target object identity authentication based on DID in a trusted environment. The participants of the scheme include three entities: identity provider (first server), target object (terminal device), and service provider (second server). Among them, the identity provider issues a verifiable statement for the target object and uploads the signature to the blockchain; the terminal device downloads and obtains the identity certificate on the blockchain and decrypts it, and sends the available information to the service provider; the service provider downloads the identity certificate on the blockchain and verifies it based on the available information provided by the terminal device. In the present disclosure, the identity provider, target object, and service provider generate a public-private key pair during the DID registration stage, encrypt and sign before sending information, and decrypt and verify the signature during the authentication stage.
[0163] like Figure 7 As shown, in some embodiments, a terminal device, a first server, and a second server upload their respective DID documents to the blockchain. The DID documents include the public keys and DID identifiers of the three entities. For each entity, the public keys of the other two entities can be obtained based on the blockchain. The terminal device generates an identity authentication request based on the DID identifier and sends it to the first server. The first server receives the identity authentication request from the terminal device, obtains identity attribute information from its local computer based on the identity authentication request, obtains the target object's DID document from the blockchain based on the target object's DID identifier, and generates an identity attribute certificate based on the DID document and identity attribute information. A hash calculation is performed based on the identity attribute information to generate a Merkle tree. A verifiable statement is generated based on the identity attribute certificate and the Merkle tree, signed, and uploaded to the blockchain. The first server notifies the terminal device of the successful upload. The terminal device obtains the verifiable statement and decrypts it to obtain the identity attribute certificate and Merkle tree. A verifiable credential is generated based on the identity attribute certificate and the Merkle tree and sent to the second server. The second server receives the verifiable credential sent by the terminal device and verifies the credential based on the smart contract, obtaining a verification result. If verification is successful, the second server provides business services to the terminal device. In the present disclosure, transmission overhead can be saved, the accuracy of DID verification can be ensured, the verification steps can be simplified, and the efficiency of DID verification can be improved.
[0164] Figure 8 This is a structural diagram of a distributed digital identity DID verification device according to an embodiment of the present disclosure. Figure 8 As shown, the distributed digital identity DID verification device 800 includes:
[0165] Processing module 810, configured to obtain the private key and public key of the target object based on a preset encryption algorithm, generate a DID identifier based on the private key and public key of the target object, generate a DID document based on the DID identifier, the public key of the target object, and the encryption algorithm, and store the DID document in the blockchain;
[0166] A first sending module 820 is configured to generate an identity authentication request based on the DID identifier and send the identity authentication request to one or more first servers;
[0167] An acquisition module 830 is configured to acquire, for each first server, a verifiable statement stored by the first server on the blockchain, and obtain an identity attribute certificate and a Merkle tree based on the private key of the target object and the verifiable statement;
[0168] The second sending module 840 is used to generate a verifiable credential based on the identity attribute certificate and the Merkle tree, and send the verifiable credential to the second server to request verification from the second server.
[0169] In some embodiments, the processing module 810 is further configured to:
[0170] Convert the DID identifier, the target object's public key, and the encryption algorithm into the preset DID document format to generate DID document data.
[0171] In some implementations, the acquisition module 830 is further configured to:
[0172] Receiving an indication message sent by the first server, the indication message carrying the blockchain address of the verifiable declaration, indicating that the verifiable declaration has been successfully uploaded to the blockchain;
[0173] Get verifiable claims from the blockchain based on the blockchain address.
[0174] In some implementations, the first sending module 820 is further configured to:
[0175] Obtaining a preset target identity attribute type to be presented to the second server and candidate identity attribute types possessed by each first server;
[0176] Generate an authentication request based on the DID identifier and the target identity attribute type;
[0177] For each first server, if the candidate identity attribute types possessed by the first server include any target identity attribute type, an identity authentication request is sent to the first server.
[0178] In some implementations, the second sending module 840 is further configured to:
[0179] Obtaining the public key of the first server and the public key of the second server;
[0180] Verifying the signature of the identity attribute certificate based on the public key of the first server;
[0181] If the signature verification passes, the Merkle path is obtained based on the target identity attribute information and the Merkle tree. The target identity attribute information is the identity attribute information under the target identity attribute type in the identity attribute certificate.
[0182] After encrypting the Merkle path, target identity attribute information and blockchain address based on the public key of the second server, a verifiable credential is generated and signed.
[0183] In some embodiments, the distributed digital identity DID verification device 800 further includes a receiving module 850 for:
[0184] Receive the verification result sent by the second server.
[0185] In the disclosed embodiment, only the public key-encrypted attributes of the target object and the root node of the Merkle tree are stored in the VC, and the VC is stored on the chain. The terminal device and the second server respectively verify the content in the VC on the chain, thereby improving privacy.
[0186] Figure 9 This is a structural diagram of a distributed digital identity DID verification device according to an embodiment of the present disclosure. Figure 9 As shown, the distributed digital identity DID verification device 900 includes:
[0187] The receiving module 910 is configured to receive an identity authentication request sent by a terminal device, the identity authentication request carrying a DID identifier of a target object, and obtain identity attribute information of the target object based on the DID identifier;
[0188] A generation module 920 is configured to obtain a DID document of a target object on the blockchain based on the DID identifier of the target object, and to generate an identity attribute certificate based on the DID document and the identity attribute information;
[0189] An acquisition module 930 is configured to perform a hash calculation based on the identity attribute information to generate a Merkle tree, and generate a verifiable claim based on the identity attribute certificate and the Merkle tree;
[0190] The processing module 940 is configured to sign the verifiable statement based on the private key of the first server and upload the signature to the blockchain.
[0191] In some implementations, the generating module 920 is further configured to:
[0192] Obtain the public key and encryption algorithm of the target object based on the DID document;
[0193] The identity attribute information is encrypted based on the public key and encryption algorithm of the target object to generate an identity attribute certificate.
[0194] In some implementations, the acquisition module 930 is further configured to:
[0195] Calculate the identity attribute information based on the hash algorithm to obtain the attribute hash value;
[0196] The attribute hash values are used as leaf nodes in the preset attribute order to generate a Merkle tree.
[0197] In some embodiments, the processing module 940 is further configured to:
[0198] Generate indication information based on the blockchain address of the verifiable declaration and send the indication information to the terminal device. The indication information is used to indicate that the verifiable declaration has been successfully uploaded to the chain.
[0199] In the disclosed embodiment, identity attribute information is encrypted based on the target object's public key and encryption algorithm to generate an identity attribute certificate, which can improve data security. During the verification process, all verifiable claims are uploaded to the chain, and the target object obtains its own certificate on the chain, which can make the entire verification process traceable, ensuring the accuracy of DID verification while simplifying the verification steps and improving DID verification efficiency. Based on the identity attribute certificate and Merkle tree, verifiable claims are obtained, and only partially disclosed information and its Merkle path are transmitted, which can save transmission overhead.
[0200] Figure 10 This is a structural diagram of a distributed digital identity DID verification device according to an embodiment of the present disclosure. Figure 10 As shown, the distributed digital identity DID verification device 1000 includes:
[0201] Receiving module 1010, configured to receive a verifiable credential sent by a terminal device;
[0202] A first processing module 1020 is configured to obtain a private key of the second server, and decrypt the verifiable credential based on the private key of the second server to obtain a Merkle path, target identity attribute information, and a blockchain address;
[0203] A second processing module 1030 is configured to obtain a first Merkle tree based on the target identity attribute information and the Merkle path, obtain a verifiable claim based on the blockchain address, and obtain a second Merkle tree based on the verifiable claim;
[0204] The verification module 1040 is configured to match the first Merkle tree with the second Merkle tree, and determine whether the first Merkle tree and the second Merkle tree are identical, so as to obtain a verification result.
[0205] In some implementations, the verification module 1040 is further configured to:
[0206] If the first Merkle tree and the second Merkle tree are the same, the signatures in the verifiable credentials are aggregated using the preset aggregate signature technology, and the smart contract is called to verify the aggregated signatures.
[0207] In some embodiments, the distributed digital identity DID verification device 1000 further includes a sending module 1050 for:
[0208] Send the verification result to the terminal device.
[0209] In the disclosed embodiments, aggregate signature technology is used to simultaneously verify multiple certificate signatures, improving verification efficiency. Invoking a smart contract for on-chain verification makes certificate verification results traceable. This disclosure utilizes shared disclosure information and Merkle tree paths, and signature verification employs aggregate signature technology. This reduces certificate transmission overhead while simultaneously verifying multiple certificates, improving verification efficiency.
[0210] The acquisition, transmission, storage, use, and processing of data in the technical solution disclosed herein are in compliance with the relevant provisions of national laws and regulations.
[0211] It should be noted that in the embodiments of the present disclosure, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary and their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0212] In order to implement the above embodiment, the present application also proposes an electronic device, such as Figure 11 As shown, Figure 11 is a block diagram of an electronic device according to one embodiment of the present disclosure.
[0213] like Figure 11 As shown, the electronic device 1100 includes:
[0214] The memory 1110 and the processor 1120, a bus 1130 connecting different components (including the memory 1110 and the processor 1120), the memory 1110 stores a computer program, and when the processor 1120 executes the program, the distributed digital identity DID verification method described in the embodiment of the present disclosure is implemented.
[0215] Bus 1130 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0216] The electronic device 1100 typically includes a variety of electronic device-readable media, which can be any available media that can be accessed by the electronic device 1100, including volatile and non-volatile media, removable and non-removable media.
[0217] The memory 1110 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 1140 and / or cache memory 1150. The electronic device 1100 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 1160 may be used to read and write non-removable, non-volatile magnetic media ( Figure 11 Not shown, often called a "hard drive"). Although Figure 11 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 1130 via one or more data medium interfaces. Memory 1110 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present disclosure.
[0218] A program / utility 1180 having a set (at least one) of program modules 1170 may be stored, for example, in memory 1110. Such program modules 1170 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 1170 generally implement the functions and / or methods described in the embodiments of the present disclosure.
[0219] The electronic device 1100 may also communicate with one or more external devices 1190 (e.g., a keyboard, a pointing device, a display, etc.), one or more devices that enable a user to interact with the electronic device 1100, and / or any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 1192. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 1193. Figure 11 As shown, the network adapter 1193 communicates with other modules of the electronic device 1100 via the bus 1130. Figure 11 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 1100, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0220] The processor 1120 executes the programs stored in the memory 1110 to perform various functional applications and data processing.
[0221] It should be noted that the implementation process and technical principles of the electronic device of this embodiment can be found in the aforementioned explanation of the distributed digital identity DID verification method of the embodiment of the present disclosure, and will not be repeated here.
[0222] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the distributed digital identity DID verification method described in the above embodiments is implemented.
[0223] In order to implement the above embodiments, the present disclosure also provides a computer program product. When the instruction processor in the computer program product is executed, the distributed digital identity DID verification method described in the above embodiments is executed.
[0224] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include at least one of such features. In the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0225] In the description of this specification, the description with reference to the 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 the present application. In this specification, the schematic representations of the above terms do not necessarily refer to 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 different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0226] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A distributed digital identity (DID) verification method, characterized in that: Executed by the terminal device, including: Obtaining the private key and public key of the target object based on a preset encryption algorithm, generating a DID identifier based on the private key and public key of the target object, generating a DID document based on the DID identifier, the public key of the target object, and the encryption algorithm, and storing the DID document in the blockchain; Generate an identity authentication request based on the DID identifier, and send the identity authentication request to one or more first servers; For each of the first servers, obtain a verifiable statement stored by the first server on the blockchain, and obtain an identity attribute certificate and a Merkle tree based on the private key of the target object and the verifiable statement; A verifiable credential is generated based on the identity attribute certificate and the Merkle tree, and the verifiable credential is sent to the second server to request verification from the second server.
2. The method according to claim 1, characterized in that The generating of the DID document based on the DID identifier, the public key of the target object, and the encryption algorithm includes: The DID identifier, the public key of the target object, and the encryption algorithm are converted into a preset DID document format to generate the DID document data.
3. The method according to claim 1, characterized in that The obtaining of the verifiable statement stored by the first server on the blockchain includes: Receiving an indication message sent by the first server, the indication message carrying the blockchain address of the verifiable statement, indicating that the verifiable statement has been successfully uploaded to the blockchain; Based on the blockchain address, the verifiable claim is retrieved from the blockchain.
4. The method according to claim 3, characterized in that Generating an identity authentication request based on the DID identifier and sending the identity authentication request to one or more first servers includes: Obtaining a preset target identity attribute type to be displayed to the second server and candidate identity attribute types possessed by each of the first servers; Generate the identity authentication request according to the DID identifier and the target identity attribute type; For each first server, if the candidate identity attribute types possessed by the first server include any of the target identity attribute types, the identity authentication request is sent to the first server.
5. The method according to claim 4, characterized in that Generating a verifiable credential based on the identity attribute certificate and the Merkle tree further includes: Obtaining a public key of the first server and a public key of the second server; Verifying the signature of the identity attribute certificate based on the public key of the first server; If the signature verification passes, obtaining a Merkle path based on the target identity attribute information and the Merkle tree, where the target identity attribute information is the identity attribute information under the target identity attribute type in the identity attribute certificate; After encrypting the Merkle path, the target identity attribute information, and the blockchain address based on the public key of the second server, a verifiable credential is generated, and the verifiable credential is signed.
6. The method according to claim 1, wherein Also includes: Receive the verification result sent by the second server.
7. A distributed digital identity (DID) verification method based on blockchain, characterized in that: Executed by the first server, including: Receive an identity authentication request sent by a terminal device, the identity authentication request carrying a DID identifier of a target object, and obtain identity attribute information of the target object based on the DID identifier; Obtaining the DID document of the target object on the blockchain based on the DID identifier of the target object, and generating an identity attribute certificate based on the DID document and the identity attribute information; Performing a hash calculation based on the identity attribute information to generate a Merkle tree, and generating a verifiable statement based on the identity attribute certificate and the Merkle tree; The verifiable statement is signed based on the private key of the first server and uploaded to the blockchain.
8. The method according to claim 7, characterized in that The generating of the identity attribute certificate based on the DID document and the identity attribute information further includes: Obtaining the public key of the target object and the encryption algorithm based on the DID document; The identity attribute information is encrypted based on the public key of the target object and the encryption algorithm to generate an identity attribute certificate.
9. The method according to claim 7 or 8, characterized in that The performing hash calculation based on the identity attribute information to generate a Merkle tree includes: Calculate the identity attribute information based on a hash algorithm to obtain an attribute hash value; The attribute hash values are used as leaf nodes in a preset attribute order to generate the Merkle tree.
10. The method according to claim 9, characterized in that After uploading to the blockchain, the following steps are also included: Generate indication information based on the blockchain address of the verifiable declaration, and send the indication information to the terminal device, where the indication information is used to indicate that the verifiable declaration has been successfully uploaded to the chain.
11. A distributed digital identity (DID) verification method based on blockchain, characterized in that: Executed by the second server, including: Receive verifiable credentials sent by the terminal device; Obtaining a private key of the second server, and decrypting the verifiable credential based on the private key of the second server to obtain a Merkle path, target identity attribute information, and a blockchain address; Obtaining a first Merkle tree based on the target identity attribute information and the Merkle path, obtaining a verifiable claim based on the blockchain address, and obtaining a second Merkle tree based on the verifiable claim; The first Merkle tree and the second Merkle tree are matched to determine whether the first Merkle tree and the second Merkle tree are the same, so as to obtain a verification result.
12. The method according to claim 11, characterized in that After determining whether the first Merkle tree and the second Merkle tree are the same, the method further includes: If the first Merkle tree and the second Merkle tree are the same, the signatures in the verifiable credentials are aggregated using a preset aggregate signature technology, and the smart contract is called to verify the aggregated signatures.
13. The method according to any one of claims 11-12, characterized in that Also includes: Send the verification result to the terminal device.
14. A distributed digital identity DID verification device, characterized in that: include: a processing module, configured to obtain the private key and public key of the target object based on a preset encryption algorithm, generate a DID identifier based on the private key and public key of the target object, generate a DID document based on the DID identifier, the public key of the target object, and the encryption algorithm, and store the DID document in a blockchain; A first sending module, configured to generate an identity authentication request based on the DID identifier, and send the identity authentication request to one or more first servers; an acquisition module, configured to acquire, for each first server, a verifiable statement stored by the first server on the blockchain, and obtain an identity attribute certificate and a Merkle tree based on the private key of the target object and the verifiable statement; The second sending module is used to generate a verifiable credential based on the identity attribute certificate and the Merkle tree, and send the verifiable credential to the second server to request verification from the second server.
15. A distributed digital identity (DID) verification device based on blockchain, characterized in that: include: A receiving module is configured to receive an identity authentication request sent by a terminal device, the identity authentication request carrying a DID identifier of a target object, and obtain identity attribute information of the target object based on the DID identifier; A generation module, configured to obtain a DID document of the target object on the blockchain based on the DID identifier of the target object, and generate an identity attribute certificate based on the DID document and the identity attribute information; An acquisition module, configured to perform a hash calculation based on the identity attribute information to generate a Merkle tree, and generate a verifiable statement based on the identity attribute certificate and the Merkle tree; A processing module is configured to sign the verifiable statement based on a private key of the first server and upload the signature to the blockchain.
16. A distributed digital identity (DID) verification device based on blockchain, characterized in that: include: A receiving module, configured to receive a verifiable credential sent by a terminal device; a first processing module, configured to obtain a private key of the second server, and decrypt the verifiable credential based on the private key of the second server to obtain a Merkle path, target identity attribute information, and a blockchain address; a second processing module, configured to obtain a first Merkle tree based on the target identity attribute information and the Merkle path, obtain a verifiable claim based on the blockchain address, and obtain a second Merkle tree based on the verifiable claim; A verification module is used to match the first Merkle tree and the second Merkle tree, and determine whether the first Merkle tree and the second Merkle tree are the same to obtain a verification result.
17. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1-6, or the method of any one of claims 7-10, or the method of any one of claims 11-13.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the method of any one of claims 1 to 6, or the method of any one of claims 7 to 10, or the method of any one of claims 11 to 13.
19. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 6, or the method according to any one of claims 7 to 10, or the method according to any one of claims 11 to 13.
Citation Information
Cited By
Method and apparatus for trusted digital credential verification based on distributed digital identity
CN122601216A