A distributed zero-knowledge identity authentication method and system based on verifiable credentials
By using verifiable credentials and zero-knowledge proof technology in the distributed identity authentication system, the inconcentrated identity management and security risks in the centralized identity authentication system are solved, and distributed identity authentication for users to independently manage identity information is realized, and the user can enhance the Privacy protection and security.
Patent Information
- Application Number
- CN202411179839.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The traditional centralized digital identity authentication system leads to inconcentrated management of user identity information, which poses security risks. In the distributed identity authentication system, it is difficult to ensure security and correctness during the generation, application and issuance of verifiable credentials of identity information. .
Using distributed zero-knowledge identity authentication method based on verifiable credentials, by generating and verifying verifiable credentials, using zero-knowledge proof technology to complete identity authentication without leaking specific information, ensuring that users independently manage identity information and generate the ability to Secondary encryption and signature technology are used when verifying credentials to ensure their security and correctness.
Implement identity authentication under distributed systems, solve the problem of missing identity layer, enhance user privacy protection, reduce the trust cost of information authentication, avoid the disadvantages of high performance requirements and easy attacks of centralized systems, and ensure identity Information security and user-autonomous management.
Smart Images

Figure CN118694541B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of identity authentication, and in particular to a distributed zero-knowledge identity authentication method and system based on verifiable credentials. Background Art
[0002] In the traditional identity authentication system, centralized digital identity often results in users not having a true personal identity, because identity-related information, in addition to necessary participants such as the issuer and the subject of the identity, must also be controlled and managed by the necessary service nodes.
[0003] Therefore, the distributed identity authentication system must not only ensure the realization of traditional functions, but also solve the problem of missing identity layer caused by centralized digital identity. In addition, in the process of generating verifiable credentials based on the distributed identity authentication system, it is also necessary to solve the security and correctness problems in the application, generation, and issuance of verifiable credentials. Otherwise, there will still be the risk of user identity information leakage and security risks. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a distributed zero-knowledge identity authentication method and system based on verifiable credentials, constructs verifiable credentials and verifiable expressions, and realizes identity authentication in a distributed system; at the same time, based on zero-knowledge proof, it further strengthens the privacy protection of users, supports the value authentication of numerical data and fixed-type data, and converts it into an equation problem of the value domain, ensuring that the identity authentication is completed without leaking specific information.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a distributed zero-knowledge identity authentication method based on verifiable credentials, which is applied to a verification party, comprising:
[0007] Receiving a verifiable expression sent by the holder according to a verifiable credential generation request; wherein the verifiable expression is generated by the holder according to the verifiable credential issued by the issuer, and the verifiable expression is generated by decrypting the verifiable credential, integrating the verifiable credentials required for combined use, and signing; the generation of the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure;
[0008] Obtain the public key of the holder to verify the verifiable expression based on the holder's DID identity identifier, thereby verifying the verifiable expression and parsing to obtain the verifiable credential;
[0009] The public key of the issuer for verifying the verifiable credential is obtained based on the issuer's DID identity identifier, and the verifiable credential is verified. After the verification is passed, the correctness of the identity attributes of the corresponding holder in the verifiable credential is confirmed, thereby completing the identity authentication of the holder.
[0010] In a second aspect, the present invention provides a distributed zero-knowledge identity authentication method based on verifiable credentials, which is applied to a holder, comprising:
[0011] Receiving a verifiable credential issued by an issuer; generating the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure;
[0012] The verifiable expression is generated by decrypting the verifiable credential, integrating the verifiable credential used in the required combination, and signing it;
[0013] The verifiable expression is sent to the verifier so that the verifier obtains the public key of the holder for verifying the verifiable expression according to the DID identity identifier of the holder, thereby verifying the verifiable expression and parsing to obtain the verifiable credential; the public key of the issuer for verifying the verifiable credential is obtained according to the DID identity identifier of the issuer, thereby verifying the verifiable credential. After the verification is passed, the correctness of the corresponding identity attributes of the holder in the verifiable credential is confirmed, thereby completing the identity authentication of the holder.
[0014] As an optional implementation, the basic structure of the main structure is a Json object, and the tail structure is composed of a proof field.
[0015] As an optional implementation, the proposition file includes a verification key verification_key.json, a public input public.json, and a proof proof.json, and the three proposition files are embedded in the proof field in the form of a json object.
[0016] As an optional implementation, for the verification of the credential information of the verifiable credential involved in the verifiable expression, zero-knowledge authentication is performed on numerical and fixed-type data, and when the verifiable credential is verified in the zero-knowledge authentication mode, three proposition files are used to verify the validity of the zero-knowledge proof.
[0017] As an optional implementation, the process of generating the main structure includes:
[0018] The holder signs and encrypts the request for generating verifiable credentials and sends it to the issuer. After the issuer decrypts the received encrypted request for generating verifiable credentials, it queries the corresponding DID Document according to the holder's DID identity identifier in the request for generating verifiable credentials, thereby obtaining the holder's public key to perform signature verification on the request for generating verifiable credentials and authenticate the holder's identity.
[0019] When the identity of the holder is authenticated as a legitimate user, the proof attribute of the verifiable credential generation request is verified, and after passing the verification, the main structure of the verifiable credential in zero-knowledge proof mode or non-zero-knowledge proof mode is generated according to the mode field of the verifiable credential.
[0020] As an optional implementation method, the verifier obtains the DID Document corresponding to the holder by parsing the holder's DID identity identifier to obtain the public key of the holder to verify the verifiable expression.
[0021] As an optional implementation method, the verifier obtains the corresponding DID Document based on the DID identity identifier of the issuer in the verifiable credential, and obtains the public key of the issuer for verifying the verifiable credential in the DID Document.
[0022] In a third aspect, the present invention provides a distributed zero-knowledge identity authentication system based on verifiable credentials, comprising:
[0023] A receiving module is configured to receive a verifiable expression sent by a holder according to a verifiable credential generation request; wherein the verifiable expression is generated by the holder according to the verifiable credential issued by the issuer, and the verifiable expression is generated by decrypting the verifiable credential, integrating the verifiable credentials required for combined use, and signing; the generation of the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure;
[0024] A parsing module is configured to obtain a public key for the holder to verify the verifiable expression based on the holder's DID identity identifier, thereby verifying the verifiable expression and parsing to obtain a verifiable credential;
[0025] The verification module is configured to obtain the public key of the issuer for verifying the verifiable credential based on the issuer's DID identity identifier, so as to verify the verifiable credential. After the verification is passed, the correctness of the identity attributes of the corresponding holder in the verifiable credential is confirmed, thereby completing the identity authentication of the holder.
[0026] In a fourth aspect, the present invention provides a distributed zero-knowledge identity authentication system based on verifiable credentials, comprising:
[0027] A receiving module is configured to receive a verifiable credential issued by an issuer; the generation of the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure;
[0028] A verifiable expression generation module is configured to generate a verifiable expression by decrypting the verifiable credentials, integrating the verifiable credentials required to be used in combination, and signing;
[0029] The sending module is configured to send a verifiable expression to the verifier, so that the verifier obtains the public key of the holder for verifying the verifiable expression according to the DID identity identifier of the holder, thereby verifying the verifiable expression and parsing to obtain the verifiable credential; obtains the public key of the issuer for verifying the verifiable credential according to the DID identity identifier of the issuer, thereby verifying the verifiable credential, and after the verification is passed, confirms the correctness of the corresponding holder identity attribute in the verifiable credential, thereby completing the identity authentication of the holder.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] The present invention proposes a distributed zero-knowledge identity authentication method and system based on verifiable credentials. According to the characteristics that identity information is held by user nodes themselves and user nodes are independently distributed, verifiable credentials (VC) and verifiable presentation (VP) are constructed to realize the functions of generating, issuing, holding, verifying and integrating verifiable credentials, realize identity authentication in a distributed system, and achieve the purpose of users independently managing their own identity information.
[0032] On the basis of distributed identity authentication, the user's privacy protection is further strengthened based on zero-knowledge proof, and the information proved in the verifiable expression is hidden, so that the verifier can complete the authentication work without knowing the specific content. It supports the value authentication of numerical data and categorized data, converting it into an equation problem of the value domain, and realizing the authentication function by using the zero-knowledge proof method, ensuring that the identity authentication is completed without leaking specific information.
[0033] The present invention proposes a distributed zero-knowledge identity authentication method and system based on verifiable credentials, which effectively solves the problem of missing identity layer through a distributed identity authentication mode, solves the privacy leakage problem caused by data providers through zero-knowledge proof, and greatly reduces the trust cost of information authentication; at the same time, it can also solve a series of shortcomings brought by centralization, such as high performance requirements, easy attacks and possible tampering.
[0034] The present invention generates a verifiable credential VC based on a distributed identity authentication system, distributes the verifiable credential VC to the user, controls the authority of identity proof in the user, and ensures the user's authority and identity privacy. The present invention applies secondary encryption and signature technology when generating the verifiable credential VC to ensure the security and correctness of the application, generation, and issuance of the verifiable credential VC. In the zero-knowledge proof, the proof material is directly encapsulated in the proof field of the tail structure to simplify the generation of zero-knowledge verifiable credentials VC. In the generation of the verifiable expression VP, a structure containing multiple verifiable credentials VC is designed, which is beneficial for users to face more complex verification scenario requirements, and multiple proofs of verifiable credentials VC with different attributes are given in one verifiable expression VP verification.
[0035] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 Flowchart of a distributed zero-knowledge identity authentication method based on verifiable credentials provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0038] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0039] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0040] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "comprise" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0042] Example 1
[0043] This embodiment provides a distributed zero-knowledge identity authentication method based on verifiable credentials, which is jointly implemented by the issuer, holder and verifier; it can be understood that the network entity that can issue a digital identity credential is referred to as the issuer (Issuer), the network entity that verifies the authenticity of the digital identity credential is referred to as the verifier, and the network entity that owns the digital identity credential is referred to as the holder (Holder).
[0044] In this embodiment, in view of the characteristics that identity information is held by the user node itself and the user nodes are independently distributed, a design for verifiable credentials VC and verifiable expressions VP is proposed to realize distributed identity authentication.
[0045] The purpose of using verifiable credentials VC and verifiable expressions VP in this embodiment is to adapt to the identity authentication needs of decentralized networks, focusing on solving the problem of centralized nodes holding user identities. In a distributed system based on distributed identity (DID, Decentralized Identity) and verifiable data models, users themselves hold and manage personal identity information, that is, the outflow of personal identity information is controlled by the users themselves.
[0046] Combination Figure 1 ,in, Figure 1 The Issuer is the issuer, the Holder is the holder, the Verifier is the verifier, and the Data is the data center. The data center stores: the encrypted private key of the holder's wallet, the public key for the holder's decryption request, the public key for the issuer to decrypt and verify VC, the private key for the holder to sign VP, the public key for the holder to verify VP, and the public key for the issuer to verify VC, etc.
[0047] Therefore, the specific implementation steps are as follows:
[0048] 1. Institution registration
[0049] Step 1: The organization registers in the distributed DID system and generates the organization DID and DID Document;
[0050] Step 2: The institution submits supporting documents and the review center authenticates the institution’s identity;
[0051] Step 3: After the review is completed, register and confirm in the registration form to store the DID identity identifier of the institution and the corresponding offline entity name.
[0052] 2. Issue VC.
[0053] Step 1: The holder uses the signature encryption private key stored in the data center to sign the verifiable credential generation request, and encrypts the holder's signed encryption request and DID identity identifier with the issuer's public key and sends them to the issuer.
[0054] Specifically:
[0055] Step 1-1: The holder generates a verifiable credential generation request and signs the verifiable credential generation request using the encrypted private key.
[0056] Step 1-2: The holder queries the corresponding DID Document based on the issuer's DID identity identifier and obtains the corresponding issuer's public key.
[0057] Step 1-3: The holder encrypts the holder's verifiable credential generation request using the issuer's public key, thereby issuing a valid verifiable credential generation encrypted request.
[0058] Step 2: After receiving the encrypted request for generating a verifiable credential, the issuer verifies the signature of the holder's request for generating a verifiable credential. After the verification is passed, a verifiable credential VC is generated. The issuer uses the holder's encrypted public key to encrypt the generated verifiable credential VC and sends it to the holder.
[0059] Specifically:
[0060] Step 2-1: After receiving the encrypted request for generating verifiable credentials, the issuer decrypts it, queries its DID Document based on the holder's DID identity identifier in the request for generating verifiable credentials, obtains the holder's public key, verifies the signature of the holder's request for generating verifiable credentials, and authenticates the holder's identity.
[0061] Step 2-2: The issuer determines whether the holder is a legitimate user of the organization based on the DID identity identifier, and further determines whether the proof attributes of the verifiable credential generation request are consistent with the attributes in the system. After the verification is completed, the main structure of the verifiable credential VC in zero-knowledge proof mode or non-zero-knowledge proof mode is generated based on the verifiable credential VC mode field.
[0062] Among them, the main structure of the verifiable credential (VC) is determined by the issuer, and the proof attributes are generated and supplemented by the issuer.
[0063] Among them, the basic structure of the main structure is a Json object, and the necessary key fields are "@context", "id", "type", "issuer", "issuance Date", "credential Subject", etc.
[0064] Step 2-3: After generating the main structure of the verifiable credential VC, sign the main structure;
[0065] The signature object includes all data of the main structure of the proof attribute and the verifiable credential VC, and the key is the private key of the issuer specifically issuing the verifiable credential VC type and the public key recorded in the holder's DID Document.
[0066] Step 2-4: Complete the tail structure of the verifiable credential VC consisting of the "proof" field;
[0067] The "proof" field contains secondary fields such as "type", "created", "jws", "proof Value", and "verification Method".
[0068] In this embodiment, in the PySNARK module (PySNARK is an open source library based on Python 3 that allows programmers to write zero-knowledge concise non-interactive proof programs directly in the Python environment), three files, verification_key.json, public.json, and proof.json, are generated as propositions for zero-knowledge proofs;
[0069] When creating a verifiable credential VC in zero-knowledge proof mode, the three files of verification key (verification_key.json), public input (public.json) and proof (proof.json) are embedded in the "proof" field in the form of json objects;
[0070] Based on this, in the verifiable credential VC authentication work under the zero-knowledge proof mode, the verification key (verification_key.json), public input (public.json) and proof (proof.json) can be used to verify the validity of the zero-knowledge proof.
[0071] Step 2-5: After completing the tail structure of the verifiable certificate VC, the verifiable certificate VC is finally obtained; the issuer encrypts the complete verifiable certificate VC using the holder's public key and sends it to the holder.
[0072] Step 2-6: After receiving the encrypted verifiable certificate VC sent by the issuer, the holder decrypts it to obtain the complete verifiable certificate VC.
[0073] 3. Generate VP.
[0074] Step 1: After receiving the identity authentication request, the holder integrates the verifiable credentials VC that need to be used in combination. Through the holder's personal signature, the holder converts the verifiable credentials VC issued by the issuer into a verifiable expression VP to ensure that the verifiable credentials VC for verification by other user nodes cannot be tampered with. Before generating the verifiable expression VP, only the issuer and the holder know the substantive content of the verifiable credentials VC.
[0075] Among them, the signature should use the private key used by the holder to generate such a verifiable expression VP, and the corresponding public key is stored in the DID Document.
[0076] Among them, after the holder decrypts and obtains the verifiable certificate VC, he integrates the verifiable certificates VC that need to be used in combination, and signs them with the private key used by the holder to sign the verifiable expression VP, thereby converting the verifiable certificate VC into the verifiable expression VP.
[0077] 4. Verify your identity.
[0078] After the verifier receives the verifiable expression VP sent by the holder, it uses the holder's public key to verify the verifiable expression VP, then parses the verifiable expression VP to obtain the verifiable certificate VC, and applies the public key of the issuer to verify the VC to complete the identity authentication.
[0079] Specifically include:
[0080] Step 1: Based on the holder's DID identity identifier, the verifier submits a DID identity identifier resolution request to the DID management system, obtains the holder's corresponding DID Document, and obtains the holder's public key for issuing this type of VP; to improve efficiency, the holder can send the public key and VP to the verifier at the same time.
[0081] Step 2: After the verifier verifies the signature of VP using the public key of the verified VP, it verifies the verifiable expression VP, which is actually verifying the VC.
[0082] Step 3: Verification of the verifiable credential VC requires first verifying the signature of the institution in the verifiable credential VC, querying the institution's DID Document in the DID management system based on the DID identity identifier of the issuer in the verifiable credential VC, obtaining the institution's VC signature public key in the DIDDocument, and using this public key to verify the signature of the VC in the holder's VP.
[0083] Step 4: After the VC signature verification is passed, the corresponding attribute field in the VC is verified to confirm the correctness of the identity attribute information of the corresponding holder in the VC.
[0084] In this embodiment, on the basis of implementing distributed identity authentication, in order to further strengthen the privacy protection of users, the design of zero-knowledge identity authentication is implemented. For the credential information of the verifiable credential VC involved in the verifiable expression VP, zero-knowledge authentication can be performed on the numerical and fixed data therein during authentication, so as to realize the identity authentication service under the distributed network, and the user can control his own identity information, so as to ensure that the purpose of identity authentication is achieved without leaking specific information.
[0085] Among them, zero-knowledge identity authentication includes: converting the zero-knowledge problem to be proved into an equation problem, generating three files corresponding to the zero-knowledge proof, verification_key.json, public.json, and proof.json, as the proposition of the zero-knowledge proof; embedding the three files into the "proof" field in the form of json objects to verify the validity of the zero-knowledge proof.
[0086] Example 2
[0087] Based on the distributed zero-knowledge identity authentication method based on verifiable credentials described in Example 1, this embodiment provides a distributed zero-knowledge identity authentication method based on verifiable credentials, which is applied to the verification party, including:
[0088] Receiving a verifiable expression sent by the holder according to a verifiable credential generation request; wherein the verifiable expression is generated by the holder according to the verifiable credential issued by the issuer, and the verifiable expression is generated by decrypting the verifiable credential, integrating the verifiable credentials required for combined use, and signing; the generation of the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure;
[0089] Obtain the public key of the holder to verify the verifiable expression based on the holder's DID identity identifier, thereby verifying the verifiable expression and parsing to obtain the verifiable credential;
[0090] The public key of the issuer for verifying the verifiable credential is obtained based on the issuer's DID identity identifier, and the verifiable credential is verified. After the verification is passed, the correctness of the identity attributes of the corresponding holder in the verifiable credential is confirmed, thereby completing the identity authentication of the holder.
[0091] Example 3
[0092] Based on the distributed zero-knowledge identity authentication method based on verifiable credentials described in Example 1, this embodiment provides a distributed zero-knowledge identity authentication method based on verifiable credentials, which is applied to the holder, including:
[0093] Receiving a verifiable credential issued by an issuer; generating the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure;
[0094] The verifiable expression is generated by decrypting the verifiable credential, integrating the verifiable credential used in the required combination, and signing it;
[0095] The verifiable expression is sent to the verifier so that the verifier obtains the public key of the holder for verifying the verifiable expression according to the DID identity identifier of the holder, thereby verifying the verifiable expression and parsing to obtain the verifiable credential; the public key of the issuer for verifying the verifiable credential is obtained according to the DID identity identifier of the issuer, thereby verifying the verifiable credential. After the verification is passed, the correctness of the corresponding identity attributes of the holder in the verifiable credential is confirmed, thereby completing the identity authentication of the holder.
[0096] Example 4
[0097] This embodiment provides a distributed zero-knowledge identity authentication system based on verifiable credentials, including:
[0098] A receiving module is configured to receive a verifiable expression sent by a holder according to a verifiable credential generation request; wherein the verifiable expression is generated by the holder according to the verifiable credential issued by the issuer, and the verifiable expression is generated by decrypting the verifiable credential, integrating the verifiable credentials required for combined use, and signing; the generation of the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure;
[0099] A parsing module is configured to obtain a public key for the holder to verify the verifiable expression based on the holder's DID identity identifier, thereby verifying the verifiable expression and parsing to obtain a verifiable credential;
[0100] The verification module is configured to obtain the public key of the issuer for verifying the verifiable credential based on the issuer's DID identity identifier, so as to verify the verifiable credential. After the verification is passed, the correctness of the identity attributes of the corresponding holder in the verifiable credential is confirmed, thereby completing the identity authentication of the holder.
[0101] It should be noted that the above modules correspond to the steps described in Example 1 or Example 2, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1 or Example 2. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.
[0102] Example 5
[0103] This embodiment provides a distributed zero-knowledge identity authentication system based on verifiable credentials, including:
[0104] A receiving module is configured to receive a verifiable credential issued by an issuer; the generation of the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure;
[0105] A verifiable expression generation module is configured to generate a verifiable expression by decrypting the verifiable credentials, integrating the verifiable credentials required to be used in combination, and signing;
[0106] The sending module is configured to send a verifiable expression to the verifier, so that the verifier obtains the public key of the holder for verifying the verifiable expression according to the DID identity identifier of the holder, thereby verifying the verifiable expression and parsing to obtain the verifiable credential; obtains the public key of the issuer for verifying the verifiable credential according to the DID identity identifier of the issuer, thereby verifying the verifiable credential, and after the verification is passed, confirms the correctness of the corresponding holder identity attribute in the verifiable credential, thereby completing the identity authentication of the holder.
[0107] It should be noted that the above modules correspond to the steps described in Example 1 or Example 3, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1 or Example 3. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.
[0108] In further embodiments, there is also provided:
[0109] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in any one of embodiments 1 to 3 is performed. For the sake of brevity, no further description is given here.
[0110] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0111] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0112] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in any one of Examples 1-3 is completed.
[0113] The methods in Examples 1-3 can be directly implemented as hardware processors, or can be implemented by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0114] A computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of embodiments 1-3 is implemented.
[0115] The present invention also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer executable instructions, such as instructions included in a program module, which are executed in a device on a real or virtual processor of the target to perform the process / method as described above. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functions of program modules can be combined or divided between program modules as needed. Machine executable instructions for program modules can be executed in local or distributed devices. In distributed devices, program modules can be located in local and remote storage media.
[0116] The computer program code for implementing the method of the present invention can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0117] In the context of the present invention, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, etc. Examples of signals may include electrical, optical, radio, acoustic or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0118] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0119] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A distributed zero-knowledge identity authentication method based on verifiable credentials, characterized in that: Applicable to the verification party, including: The organization registers in the distributed DID system and generates the organization DID and DID Document; The institution submits supporting documents, and the review center authenticates the institution's identity; After the review is completed, the registration is confirmed in the registration form, and the DID identifier of the depository institution and the corresponding offline entity name are stored; The holder generates a verifiable credential generation request and signs the verifiable credential generation request using the encrypted private key; The holder queries the corresponding DID Document based on the issuer's DID identity identifier and obtains the corresponding issuer's public key; The holder uses the issuer's public key to encrypt the holder's verifiable credential generation request, thereby issuing a valid verifiable credential generation encryption request; After generating the main structure of the verifiable credential, sign the main structure; The signature object includes all data of the main structure of the proof attribute and the verifiable credential. The key is the private key of the issuer that specifically issues the verifiable credential type and the public key recorded in the holder's DID Document. Completes the trailer structure of the verifiable credential consisting of the "proof" field; The "proof" field contains the secondary fields "type", "created", "jws", "proof Value", and "verification Method". When creating a verifiable credential in zero-knowledge proof mode, the verification key verification_key.json, public input public.json and proof proof.json files are embedded in the "proof" field as json objects; In the verifiable credential authentication work in zero-knowledge proof mode, the verification key verification_key.json, public input public.json and proof proof.json are used to verify the validity of the zero-knowledge proof; After completing the tail structure of the verifiable credential, the verifiable credential is finally obtained; the issuer encrypts the complete verifiable credential with the holder's public key and sends it to the holder; After receiving the encrypted verifiable credential sent by the issuer, the holder decrypts it and obtains the complete verifiable credential; After receiving the identity authentication request, the holder integrates the verifiable credential VC that needs to be used in combination. Through the holder's personal signature, the holder converts the verifiable credential VC issued by the issuer into a verifiable expression VP to ensure that the verifiable credential VC for verification by other user nodes cannot be tampered with. Before generating the verifiable expression VP, only the issuer and the holder know the substantive content of the verifiable credential VC. Among them, the signature should use the private key used by the holder to generate such a verifiable expression VP, and the corresponding public key is stored in the DIDDocument; Among them, after the holder decrypts and obtains the verifiable certificate VC, he integrates the verifiable certificates VC that need to be used in combination, and signs them with the private key used by the holder to sign the verifiable expression VP, thereby converting the verifiable certificate VC into the verifiable expression VP.
2. A distributed zero-knowledge identity authentication method based on verifiable credentials, characterized in that: Applicable to holders, including: Receiving a verifiable credential issued by an issuer; generating the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure; The verifiable expression is generated by decrypting the verifiable credential, integrating the verifiable credential used in the required combination, and signing it; Send the verifiable expression to the verifier, so that the verifier can obtain the public key of the holder to verify the verifiable expression according to the DID identity identifier of the holder, thereby verifying the verifiable expression and parsing to obtain the verifiable credential; obtain the public key of the issuer to verify the verifiable credential according to the DID identity identifier of the issuer, thereby verifying the verifiable credential. After the verification is passed, confirm the correctness of the corresponding identity attributes of the holder in the verifiable credential, thereby completing the identity authentication of the holder; The organization registers in the distributed DID system and generates the organization DID and DID Document; The institution submits supporting documents, and the review center authenticates the institution's identity; After the review is completed, the registration is confirmed in the registration form, and the DID identifier of the depository institution and the corresponding offline entity name are stored; The holder generates a verifiable credential generation request and signs the verifiable credential generation request using the encrypted private key; The holder queries the corresponding DID Document based on the issuer's DID identity identifier and obtains the corresponding issuer's public key; The holder uses the issuer's public key to encrypt the holder's verifiable credential generation request, thereby issuing a valid verifiable credential generation encryption request; After generating the main structure of the verifiable credential, sign the main structure; The signature object includes all data of the main structure of the proof attribute and the verifiable credential. The key is the private key of the issuer that specifically issues the verifiable credential type and the public key recorded in the holder's DID Document. Completes the trailer structure of the verifiable credential consisting of the "proof" field; The "proof" field contains the secondary fields "type", "created", "jws", "proof Value", and "verification Method". When creating a verifiable credential in zero-knowledge proof mode, the verification key verification_key.json, public input public.json and proof proof.json files are embedded in the "proof" field as json objects; In the verifiable credential authentication work in zero-knowledge proof mode, the verification key verification_key.json, public input public.json and proof proof.json are used to verify the validity of the zero-knowledge proof; After completing the tail structure of the verifiable credential, the verifiable credential is finally obtained; the issuer encrypts the complete verifiable credential with the holder's public key and sends it to the holder; After receiving the encrypted verifiable credential sent by the issuer, the holder decrypts it and obtains the complete verifiable credential; After receiving the identity authentication request, the holder integrates the verifiable credential VC that needs to be used in combination. Through the holder's personal signature, the holder converts the verifiable credential VC issued by the issuer into a verifiable expression VP to ensure that the verifiable credential VC for verification by other user nodes cannot be tampered with. Before generating the verifiable expression VP, only the issuer and the holder know the substantive content of the verifiable credential VC. Among them, the signature should use the private key used by the holder to generate such a verifiable expression VP, and the corresponding public key is stored in the DIDDocument; Among them, after the holder decrypts and obtains the verifiable certificate VC, he integrates the verifiable certificates VC that need to be used in combination, and signs them with the private key used by the holder to sign the verifiable expression VP, thereby converting the verifiable certificate VC into the verifiable expression VP.
3. A distributed zero-knowledge identity authentication method based on verifiable credentials as claimed in claim 1 or 2, characterized in that: The main structure generation process includes: When the identity of the holder is authenticated as a legitimate user, the proof attribute of the verifiable credential generation request is verified, and after passing the verification, the main structure of the verifiable credential in zero-knowledge proof mode or non-zero-knowledge proof mode is generated according to the mode field of the verifiable credential.
4. A distributed zero-knowledge identity authentication method based on verifiable credentials as claimed in claim 1 or 2, characterized in that: The verifier obtains the DID Document corresponding to the holder by parsing the holder's DID identity identifier to obtain the holder's public key for verifying the verifiable expression.
5. A distributed zero-knowledge identity authentication method based on verifiable credentials as claimed in claim 1 or 2, characterized in that: The verifier obtains the corresponding DID Document based on the DID identity identifier of the issuer in the verifiable credential, and obtains the public key of the issuer to verify the verifiable credential in the DIDDocument.
6. A system based on the distributed zero-knowledge identity authentication method based on verifiable credentials according to any one of claims 1 to 5, characterized in that: include: A receiving module is configured to receive a verifiable expression sent by a holder according to a verifiable credential generation request; wherein the verifiable expression is generated by the holder according to the verifiable credential issued by the issuer, and the verifiable expression is generated by decrypting the verifiable credential, integrating the verifiable credentials required for combined use, and signing; the generation of the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure; A parsing module is configured to obtain a public key for the holder to verify the verifiable expression based on the holder's DID identity identifier, thereby verifying the verifiable expression and parsing to obtain a verifiable credential; The verification module is configured to obtain the public key of the issuer for verifying the verifiable credential based on the issuer's DID identity identifier, so as to verify the verifiable credential. After the verification is passed, the correctness of the identity attributes of the corresponding holder in the verifiable credential is confirmed, thereby completing the identity authentication of the holder.
7. A system based on the distributed zero-knowledge identity authentication method based on verifiable credentials according to any one of claims 1 to 5, characterized in that: Also includes: A receiving module is configured to receive a verifiable credential issued by an issuer; the generation of the verifiable credential includes encrypting the main structure and embedding a proposition file for verifying the validity of the zero-knowledge proof in the tail structure; A verifiable expression generation module is configured to generate a verifiable expression by decrypting the verifiable credentials, integrating the verifiable credentials required to be used in combination, and signing; The sending module is configured to send a verifiable expression to the verifier, so that the verifier obtains the public key of the holder for verifying the verifiable expression according to the DID identity identifier of the holder, thereby verifying the verifiable expression and parsing to obtain the verifiable credential; obtains the public key of the issuer for verifying the verifiable credential according to the DID identity identifier of the issuer, thereby verifying the verifiable credential, and after the verification is passed, confirms the correctness of the corresponding holder identity attribute in the verifiable credential, thereby completing the identity authentication of the holder.
