Web3.0-oriented decentralized identity registration, authentication and recovery method and system
By adopting decentralized identity registration, authentication, and recovery methods in the Web3.0 environment, using OPRF and zero-knowledge proof, combined with oracle and off-chain storage, the problems of centralization, privacy leakage and random number acquisition of traditional identity authentication are solved. , achieving improvements in user sovereignty and security.
Patent Information
- Application Number
- CN202411188864.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-13
AI Technical Summary
The traditional Web3.0 identity authentication method has problems such as low decentralization, high risk of user privacy leakage, difficulty in obtaining reliable random numbers, lack of key management knowledge and resources for users, and easy disclosure of authentication information.
Adopt Web3.0-oriented decentralized identity registration, authentication, and recovery methods, and ensure user keys and identities through the identity authentication platform, oracle and off-chain storage module. Information is only mastered by users, and key information is stored through the blockchain, reliable random numbers are generated and encrypted.
It realizes complete control of identity information by users, improves security and decentralization characteristics, reduces the risk of authentication platform being attacked, reduces user key management costs, and solves the area through decentralized storage and oracles. Random numbers and storage problems in blockchain systems.
Smart Images

Figure CN119135341A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of identity registration and authentication, and in particular to a decentralized identity registration, authentication, and recovery method and system for Web3.0. Background Art
[0002] In the Web3.0 era, identity authentication technology is often combined with decentralization, blockchain and encryption technology to provide more secure, transparent and user-controlled identity authentication solutions. A secure and reliable identity authentication method is a key component in building a decentralized, secure and user-friendly Internet ecosystem.
[0003] Traditional authentication methods have some potential problems and challenges, such as the risks of centralized identity management, threats to user privacy, and security vulnerabilities that traditional encryption technologies may face. Common authentication methods include username and password verification, multi-factor authentication, and public key-based authentication mechanisms. However, these methods have many defects to varying degrees, as follows:
[0004] 1. Low degree of decentralization: In the Web3.0 era, users are increasingly concerned about the ownership of their data. Traditional decentralized identity registration, authentication, and recovery systems for Web3.0 usually rely on centralized identity providers, such as centralized CAs. Centralized identity systems are at risk of single point failures. If the identity provider is attacked, fails, or is destroyed, the entire identity system may be affected, resulting in service interruptions or user information leakage. Centralized identity systems may involve the centralized storage of a large amount of personal identity information. This centralized storage method increases the potential risk of user privacy leakage because once breached, attackers can obtain a large amount of sensitive data. Users need to rely on centralized identity providers, which makes them lose direct control over their identity information. User identity information may be indirectly shared by different service providers, and users lack control over it.
[0005] 2. Users lack the initiative to control their identities: Centralized identities are managed and controlled by a single authority, and most identities on the Internet are still centralized identities. Traditional identities are mainly in the hands of third-party institutions, not the users themselves. Users' personal information and authentication data, such as passwords and ID numbers, are usually stored on the service provider's servers. This means that the control of the data is actually in the hands of the service provider, not the user.
[0006] 3. Difficulty in obtaining reliable random numbers: Some verification systems using blockchain platforms need to generate some random numbers for the system to use. However, due to the publicity, verifiability and information imbalance of the blockchain system, the random numbers obtained are easy to predict and it is difficult to obtain secure and reliable pseudo-random numbers. This will cause some of the public and private key seeds we generate to become insecure, which in turn affects the user's authentication and encryption session.
[0007] 4. User authentication information is easily leaked: The password authentication method positions the server operator as a trusted party and places the password on an uncontrolled server. In today's complex network environment and intensified network attacks, the possibility of password leakage increases. Hackers can obtain user passwords by blasting databases and some pre-calculated attacks; it is also possible to impersonate user identities through man-in-the-middle attacks, as well as other targeted attacks.
[0008] 5. Users lack the knowledge and resources to properly handle keys: Many identity systems adopt the concept of public key cryptography to generate a private key and a public key for users. Public and private keys are a pair of keys in public key cryptography that are used to ensure confidentiality, integrity, and authentication of communications. This is achieved by using asymmetric encryption algorithms. Identity verification can be achieved by digitally signing with a private key known only to the user and decrypting with a public public key. However, users usually do not have the knowledge and resources required to properly handle cryptographic secrets, and it is difficult to manage keys securely. This can lead to security risks because users may generate keys in an insecure environment or accidentally lose their private keys, making it impossible to access their identities normally.
[0009] In view of the above, there is an urgent need for a decentralized, user-friendly, secure and efficient identity registration and authentication method to meet the new identity authentication requirements under Web3.0 and help build a decentralized, verifiable and secure new generation network. Summary of the invention
[0010] The purpose of the present invention is to provide a decentralized identity registration, authentication, and recovery method and system for Web3.0, aiming to solve at least one problem in the background technology.
[0011] In a first aspect, the present invention provides a decentralized identity registration, authentication, and recovery method for Web3.0, which is implemented by a decentralized identity registration, authentication, and recovery system for Web3.0. The decentralized identity registration, authentication, and recovery system for Web3.0 includes an identity authentication platform and a user terminal, an oracle, and an off-chain storage module that communicate with the identity authentication platform respectively;
[0012] The method comprises:
[0013] When the identity authentication platform receives the registration information uploaded by the user, it sends the first public key information to the oracle within a first preset time, so that the oracle sends the first feedback information according to the first public key information;
[0014] The identity authentication platform obtains a first intermediate output based on the registration information and the first feedback information and based on an inadvertent pseudo-random function, and sends the first intermediate output and the first public key information to the user end;
[0015] The user terminal runs the OPRF process to obtain a first final output, and encrypts the user key information and the first public key information according to the first final output to obtain first encrypted information, and encrypts the registration information, the first encrypted information and the user key information according to the first public key information to obtain second encrypted information, and sends the second encrypted information to the identity authentication platform;
[0016] The identity authentication platform decrypts the second encrypted information to obtain first decrypted information, and stores the first decrypted information in an off-chain storage module.
[0017] Furthermore, when the identity authentication platform receives the registration information uploaded by the user, the step of sending the first public key information to the oracle within a first preset time so that the oracle sends the first feedback information according to the first public key information includes:
[0018] When a registration request is made by the user terminal, the user terminal collects a facial information feature vector and obtains a first hash value by hashing the feature vector;
[0019] Blinding the user password with a first random value to obtain a first blinded value, and generating user key information;
[0020] Setting a decentralized identifier, and encrypting the first hash value, the first blinded value, and the decentralized identifier according to the first public key information to obtain registration information;
[0021] The first feedback information includes a second random value and a third random value. The oracle encrypts the second random value and the third random value according to the first public key information to obtain the first feedback information.
[0022] Furthermore, the identity authentication platform obtains a first intermediate output based on the registration information and the first feedback information and based on an inadvertent pseudo-random function, and sends the first intermediate output and the first public key information to the user end, including:
[0023] Decrypting the registration information according to the first private key in the memory, using the OPRF process to obtain a first intermediate output according to the second random value obtained by decryption and the first blinding value;
[0024] A zero-knowledge proof function is defined, and the zero-knowledge proof function and the third random value are introduced into a zero-knowledge proof key generation algorithm to obtain a first key and a second key.
[0025] Furthermore, the identity authentication platform decrypts the second encrypted information to obtain first decrypted information, and stores the first decrypted information in the off-chain storage module, including:
[0026] The first decryption information includes the first encryption information, the user key information, the first key, the second key, the second random value, and the first Hash value;
[0027] The decentralized identifier is used as a key, and the first encrypted information, the user key information, the first key, the second key, the second random value, and the first hash value are used as values and are stored on the blockchain.
[0028] Furthermore, the method further comprises:
[0029] When entering the identity authentication mode, the user terminal runs the OPRF process to blind the user password to obtain a second blinded value, and sends the second blinded value and the decentralized identifier to the server;
[0030] The server encrypts the second blinded value, the decentralized identifier, and the second public key information to obtain third encrypted information, and sends the third encrypted information to the identity authentication platform;
[0031] The identity authentication platform decrypts the third encrypted information, obtains the user's meta-identity information based on the decentralized identifier obtained by decryption, searches the database in the blockchain according to the meta-identity information, obtains the first encrypted information, the user key information, the first key, the second key, the second random value, the first hash value, runs the OPRF process according to the second random value and the second blinded value, obtains the second intermediate output, encrypts the second intermediate output and the first encrypted information according to the second public key information, obtains the fourth encrypted information, and sends the fourth encrypted information to the server;
[0032] The server decrypts the fourth encrypted information to send the second public key information, the second intermediate output, and the first encrypted information to the client;
[0033] The user terminal runs the OPRF process according to the second intermediate output and the user password to obtain the second final output, and decrypts the first encrypted information according to the second final output. If the second final output is the same as the first final output, the decryption is successful and the user key information is obtained.
[0034] Furthermore, the method further comprises:
[0035] When entering the identity recovery mode, the user terminal generates third public key information, and encrypts the third public key information and the decentralized identifier according to the first public key information to obtain fifth encrypted information, and sends the fifth encrypted information to the identity authentication platform;
[0036] The identity authentication platform decrypts the fifth encrypted information, searches the database in the blockchain based on the decentralized identifier, obtains the first encrypted information, the user key information, the first key, the second key, the second random value, and the first hash value, and encrypts the second key, the first hash value, and the user key information according to the third public key information to obtain the sixth encrypted information, and sends the sixth encrypted information to the user end;
[0037] The user end decrypts the sixth encrypted information, collects the facial information feature vector, inputs the first key, the facial information feature vector, and the first hash value into the zero-knowledge proof algorithm to obtain the zero-knowledge proof, encrypts the zero-knowledge proof according to the first public key information to obtain the seventh encrypted information, and sends the seventh encrypted information to the identity authentication platform;
[0038] The identity authentication platform decrypts the seventh encrypted information to input the decrypted zero-knowledge proof and the stored first key into the verification algorithm. If the verification is successful, the D ID set of the key to which the user belongs is set to empty, and the user key information is encrypted according to the third public key information to obtain the eighth encrypted information, and the eighth encrypted information is sent to the user end;
[0039] The user end decrypts the eighth encrypted information to compare the user key information obtained twice before and after. If they are the same, the user enters the identity registration mode to reset the user password and user key information.
[0040] In a second aspect, the present invention provides a decentralized identity registration, authentication, and recovery system for Web3.0, the system comprising:
[0041] The identity authentication platform is used to send the first public key information to the oracle within a first preset time when receiving the registration information uploaded by the user;
[0042] and obtaining a first intermediate output based on the registration information and the first feedback information and based on an inadvertent pseudo-random function, and sending the first intermediate output and the first public key information to a user terminal;
[0043] Also used for decrypting the second encrypted information to obtain first decrypted information, and storing the first decrypted information in the off-chain storage module;
[0044] A oracle, configured to issue first feedback information according to the first public key information;
[0045] The user end is used to run the OPRF process, obtain the first final output, and encrypt the user key information and the first public key information according to the first final output to obtain the first encrypted information, and encrypt the registration information, the first encrypted information and the user key information according to the first public key information to obtain the second encrypted information, and send the second encrypted information to the identity authentication platform.
[0046] Furthermore, the user terminal is also used to collect the facial information feature vector when there is a registration request, and obtain a first hash value after hashing the feature vector;
[0047] The identity authentication platform is also used to blind the user password through the first random value to obtain a first blinded value, and generate user key information;
[0048] Setting a decentralized identifier, and encrypting the first hash value, the first blinded value, and the decentralized identifier according to the first public key information to obtain registration information;
[0049] The first feedback information includes a second random value and a third random value. The oracle encrypts the second random value and the third random value according to the first public key information to obtain the first feedback information.
[0050] In a third aspect, the present invention provides a readable storage medium, which stores one or more programs, which, when executed by a processor, implement the above-mentioned decentralized identity registration, authentication, and recovery method for Web3.0.
[0051] In a fourth aspect, the present invention provides a computer device, the computer device comprising a memory and a processor, wherein:
[0052] The memory is used to store computer programs;
[0053] When the processor is used to execute the computer program stored in the memory, the above-mentioned decentralized identity registration, authentication, and recovery method for Web3.0 is implemented.
[0054] In summary, the embodiments of the present invention provide a user experience in the traditional Web2.0 environment in a Web3.0 environment, but it is more secure and decentralized, and the user can fully control his or her user identity sovereignty. At the same time, the beneficial effects of the embodiments of the present invention specifically include:
[0055] 1. Compared with the traditional authentication method of storing passwords or biometric information on the server, the user's information in the embodiments of the present invention is only in the hands of the user, that is, through the enhanced password authentication key exchange protocol, the password and biometric information are only in the hands of the user. Through the ORF process, only the encrypted user identity information is stored on the server. Even if the authentication platform is attacked, no information about the user's password or private key can be obtained.
[0056] 2. The embodiment of the present invention adopts decentralized oracle and decentralized storage to solve the problems that it is difficult to obtain safe and reliable random numbers due to the publicity, verifiability and information imbalance of the blockchain system, and it is difficult to store a large amount of data due to the preciousness of on-chain resources. With the help of oracle and decentralized storage, reliable random numbers can be input into the blockchain system and the storage under the chain can be expanded, so that only key information is stored on the chain.
[0057] 3. Compared with the traditional authentication method using digital certificates, the embodiments of the present invention use a blockchain platform as an identity authentication platform instead of a trusted third party, and use a memorable decentralized identifier DID instead of a public key as the user's identity. In the traditional method, when a problem occurs with the trusted third party, the authentication platform will be paralyzed, and this method is very complex and costly. However, in the embodiments of the present invention, there is no trust problem through the consensus of the blockchain platform, and users have sovereignty over their own identity information.
[0058] 4. Using zero-knowledge proof algorithm can help users authenticate their biometric information through zero-knowledge proof without showing the original biometric information to the verification party, and then recover the key;
[0059] 5. Compared with the traditional method in which users need to maintain public and private keys, the user end of the embodiment of the present invention does not need to spend a lot of money to maintain its own public and private keys, because the public and private keys can be restored through cryptographic algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a flow chart of a decentralized identity registration, authentication, and recovery method for Web3.0 proposed in one embodiment of the present invention;
[0061] Figure 2 This is a system architecture diagram of decentralized identity authentication based on enhanced password-authenticated key exchange protocol and zero-knowledge proof in one embodiment of the present invention;
[0062] Figure 3 is a schematic diagram of an inadvertent pseudo-random function in an embodiment of the present invention;
[0063] Figure 4 is a schematic diagram of a user registration process in an embodiment of the present invention;
[0064] Figure 5 is a schematic diagram of a user authentication process in an embodiment of the present invention;
[0065] Figure 6 Schematic diagram of user identity recovery in an embodiment of the present invention
[0066] Figure 7 This is a structural diagram of a decentralized identity registration, authentication, and recovery system for Web3.0 proposed in one embodiment of the present invention.
[0067] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with general skills in the field to which the present invention belongs. "Including" and similar words used in this article mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0069] About the technical term "oblivious pseudorandom function" refers to oblivious pseudorandom function (OPRFs) is a cryptographic primitive that allows two parties to have a special interaction, in which one party (client) can calculate the output of a function from the other party (server), and this output is invisible to the server. This calculation process ensures that the server does not know the client's input, and the client cannot know any additional information except the function output of its input.
[0070] Regarding the technical term "decentralized oracle", a decentralized oracle refers to an oracle with a distributed consensus mechanism, which aims to safely and reliably introduce external data (real-world data or other on-chain data) into smart contracts, solving the problem that smart contracts have difficulty in obtaining off-chain data.
[0071] About the technical term "decentralized storage" Decentralized storage is a data storage method that replaces traditional centralized storage services by distributing data on multiple nodes on the network. It stores large amounts of data securely and decentralizedly while reducing the load on the chain, and stores data summaries on the chain to ensure its integrity.
[0072] Regarding the technical term "non-interactive zero-knowledge proof", the prover only proves the key generation proof based on public parameters and the proof algorithm, and the verifier verifies the proof. If the verification passes, it can be proved that the prover knows the secret information. Only one verification is required to decide whether to choose to trust the prover.
[0073] See also Figures 1 to 6 , which is a flow chart of a decentralized identity registration, authentication, and recovery method for Web3.0 provided by an embodiment of the present invention, the method comprises steps S101 to S104, wherein:
[0074] Step S101: When the identity authentication platform receives the registration information uploaded by the user, it sends the first public key information to the oracle within a first preset time, so that the oracle sends the first feedback information according to the first public key information;
[0075] It should be noted that, in the process of obtaining registration information: first, when a user terminal has a registration request, the user terminal collects a facial information feature vector V, and obtains a first hash value H after hashing the feature vector V;
[0076] The user password pwn is blinded by the first random value R to obtain the first blinded value R_M, and the user key information is generated. The user key information includes the user public key P U and user private key p u
[0077] In addition, it is necessary to set a decentralized identifier DID, which is the unique identifier of the user in the system, and encrypt the first hash value H, the first blinded value R_M, and the decentralized identifier DID according to the first public key information to obtain registration information D;
[0078] The first public key information is the public key P of the identity authentication platform B The first feedback information includes a second random value and a third random value. The oracle encrypts the second random value and the third random value according to the first public key information to obtain the first feedback information.
[0079] Specifically, when registering a smart contract on the identity verification platform for process processing, it will request a random number from the oracle and send its own public key P B , the oracle uses the algorithm (k,λ)←
[0080] RNG(Orac le(blackchai n_state)) generates two random numbers, one for the orpf process (the orpf function here can use OPRF based on Diffie-Hellman), and one for the zero-knowledge proof key generation algorithm. These two random numbers are the second random value K and the third random value λ. Finally, the public key P of the identity authentication platform is used B Encrypted into the first feedback information W, and returned to the identity authentication platform.
[0081] Step S102: the identity authentication platform obtains a first intermediate output according to the registration information and the first feedback information based on an inadvertent pseudo-random function, and sends the first intermediate output and the first public key information to the user terminal;
[0082] In this step, the identity authentication platform uses the first private key p in the memory b (the private key of the identity authentication platform itself) decrypts the registration information, that is, decrypts U transmitted by the user and W transmitted by the oracle, and obtains random numbers K, λ and DID, H, R_M respectively, and uses the OPRF process to obtain the first intermediate output oprf_z according to the second random value k obtained by decryption and the first blinded value R_M; defines a zero-knowledge proof function Z_F(h,H), for example, when the hash value of h satisfies H, this function is true, where h is the position, and H is obtained by the platform from the user, and then through the zero-knowledge proof key generation The algorithm (zk_pk, zk_vk)←G(Z_F(h,H), λ) is formed. The zero-knowledge proof function Z_F(h,H) and the third random value λ are introduced into the zero-knowledge proof key generation algorithm to obtain the first key zk_pk and the second key zk_vk. Among them, the zk_pk key is used by the user to generate zero-knowledge proof, and the zk_vk key is used by the platform to verify the zero-knowledge proof. These two keys are used in the user's identity key recovery process to confirm that the user is recovering his identity. Then the identity authentication platform sends oprf_z, P B To the user end.
[0083] Step S103: The user terminal runs the OPRF process to obtain a first final output, and encrypts the user key information and the first public key information according to the first final output to obtain first encrypted information, and encrypts the registration information, the first encrypted information and the user key information according to the first public key information to obtain second encrypted information, and sends the second encrypted information to the identity authentication platform;
[0084] It should be noted that in this step, the user receives oprf_z, P B, through the first random value R of the blinded password during registration and the user password pwn, oprf_z and get the first final output oprf_y. Only users who know the password pwn can interact with the identity authentication platform to get the first final output oprf_y. First use the first final output oprf_y to convert the user identity public and private key P U and p u and the authentication platform public key P B Encryption obtains the first encrypted information C, which ensures that when logging in, only users who know the password can obtain oprf_y and then decrypt C, and then obtain the user's identity private key, complete the identity authentication and enter the session key exchange protocol; the identity private key in the authentication process is obtained by decrypting C, and the user end does not need to remember and keep the private key, which reduces the burden on the user end.
[0085] Specifically, DID, C, P U The second encrypted information ρ is obtained by encrypting it with the platform public key and sent to the identity authentication platform.
[0086] Step S104: the identity authentication platform decrypts the second encrypted information to obtain first decrypted information, and stores the first decrypted information in the off-chain storage module;
[0087] It should be noted that, in some embodiments, the first decryption information includes the first encryption information C, the P in the user key information, U , a first key zk_vk, a second key zk_pk, a second random value k, and a first hash value H; specifically, the DID identifier is used as the key, C, P U , zk_vk, zk_pk, k, H are values stored on the blockchain, and the generated DID documents including the public information about the user identity including the service endpoints are stored in the chain for decentralized storage, saving on-chain resources.
[0088] In summary, through the above-mentioned decentralized identity registration, authentication, and recovery method for Web3.0, users can independently create sovereign identities for registration, and only users with passwords can decrypt this identity. The hash value of the facial feature vector is used as the public parameter of zero-knowledge proof to recover the identity, and an oracle is used to generate reliable random numbers for cryptographic operations of the identity authentication platform, and the DID document representing the identity is stored in a decentralized storage device; users can recover the identity key information through password authentication and perform identity authentication without worrying about the loss of the key and the high cost of keeping the key; when the user loses the password or wants to change the password or identity key, the user obtains the public parameters of the biometric information and the zero-knowledge proof key from the identity authentication platform, generates a zero-knowledge proof through a non-interactive zero-knowledge proof algorithm, and sends it to the identity authentication platform for verification, and performs identity recovery after the verification is passed. In addition, users can customize DID identifiers and blinded passwords, as well as hashed biometric vector values for registration; the identity authentication platform registration smart contract and the user interact based on the Diffie-Hellman oblivious pseudo-random function (OPRF) to generate an OPRF key that can only be generated by the user's password, and use this key to encrypt the user's identity private key for subsequent use; the identity authentication platform registration smart contract defines a zero-knowledge proof function, and uses this function and secret value to generate a zero-knowledge proof key and verification key for use in restoring the identity; through the interaction between the identity authentication platform interactive contract and the oracle, the random number used in the registration process is obtained, and finally the user identity metadata is encrypted and stored on the chain, and the user D ID file is stored off the chain.
[0089] In addition, in some optional embodiments, the present invention also relates to an identity authentication process, specifically including steps S201 to S205, wherein:
[0090] S201: When entering the identity authentication mode, the user terminal runs the OPRF process to blind the user password to obtain a second blinded value, and sends the second blinded value and the decentralized identifier to the server;
[0091] It should be noted that when identity authentication is required, the user sends the DID identifier DID_s of the service to be used to request the authentication login contract of the identity authentication platform for processing: the identity authentication platform queries the DID document of the service in the decentralized storage, and returns the open endpoint D ID_s_endpoint of the service to the user after finding it.
[0092] In addition, the user password pwn is blinded by a random value r to obtain a second blinded value α, and then the user DID and α are sent to the server.
[0093] S202: The server encrypts the second blinded value, the decentralized identifier, and the second public key information to obtain third encrypted information, and sends the third encrypted information to the identity authentication platform;
[0094] In this step, the server encrypts according to the first public key information to obtain the third encrypted information ρ', and the second public key information is the server public key P S .
[0095] S203: The identity authentication platform decrypts the third encrypted information, obtains the user's meta-identity information based on the decentralized identifier obtained by decryption, searches the database in the blockchain according to the meta-identity information, obtains the first encrypted information, the user key information, the first key, the second key, the second random value, the first hash value, runs the OPRF process according to the second random value and the second blinded value, obtains the second intermediate output, encrypts the second intermediate output and the first encrypted information according to the second public key information, obtains the fourth encrypted information, and sends the fourth encrypted information to the server;
[0096] It should be pointed out that after receiving ρ', the identity authentication platform uses the private key to decrypt and obtain DID,α,P S , use DID as the key to query the user's identity metadata during registration to obtain C, P_U, zk_vk, zk_pk, k, H. Continue to run the orpf process through this k and α to obtain the second intermediate output oprf_z, and then use the service public key P S De-encrypt the second intermediate output oprf_z, C, obtain the fourth encrypted information β, and send it to the server.
[0097] S204: The server decrypts the fourth encrypted information to send the second public key information, the second intermediate output, and the first encrypted information to the client;
[0098] For example, after receiving the fourth encrypted information, the server uses its own private key to decrypt it to obtain oprf_z, C, P U , the second intermediate output oprf_z, C, P S Sent to the user end.
[0099] S205: The user terminal runs the OPRF process according to the second intermediate output and the user password to obtain the second final output, and decrypts the first encrypted information according to the second final output. If the second final output is the same as the first final output, the decryption is successful and the user key information is obtained.
[0100] In this step, the user uses oprf_z, pwn, and the blinding factor r to obtain the second final output oprf_y. If the user password is correct, the second final output is exactly the same as the first final output. Then the second final output oprf_y can be used to decrypt C. The user recovers the identity public and private keys P from C. U 、p u , the authentication is completed. At this point, the client knows the server's public key P S , P U , p u , the client knows P U , P S 、p s , then session key negotiation can be performed to determine the specific session key.
[0101] In addition, it should be noted that regarding the user registration scheme, Figure 3 As shown, the user customizes the password and the DID identifier, the hash value of the face information vector, and the oprf (inadvertent pseudo-random function) is used after the random password is randomized, as shown Figure 4 As shown, the registration information is sent to the identity authentication platform. The identity authentication platform generates random numbers through the decentralized oracle network on the chain for further processing, generates the private key of orpf, and inputs the orpf function with this private key to obtain the orpf output. This key user encrypts the user's identity information. Then define a non-interactive zero-knowledge proof function, input the face information hash value into the function to obtain the proof key and verification key, which are used for identity recovery when the password is forgotten or you want to reset the password. Send the obtained orpf function output to the user, and the user continues to run the orpf process to obtain the orpf key, use this key to encrypt his or her own identity public key and private key and the identity authentication platform public key, and send it to the identity authentication platform after encryption. Finally, the identity registration platform stores the user information metadata and did documents on the decentralized storage device on the chain.
[0102] Regarding user login scheme, such as Figure 5 As shown in the figure, the user sends the service identifier to be used to the identity authentication platform. The platform goes to the decentralized storage on the chain to query the D ID document and returns the service endpoint to the user. Next, the user runs the authentication protocol and sends the randomized password and identity to the server. The server makes an authentication request to the identity authentication platform and obtains the output of orpf. The server encrypts and sends it to the user. The user decrypts the orpf key according to the password and then uses this key to decrypt the registered metadata to obtain the user's identity public key and private key, and then negotiates the key of the session to conduct the session.
[0103] Regarding the key reset scheme, such as Figure 6As shown in the figure, when the user cannot authenticate because he forgets his password or wants to reset his password, the user runs the key reset protocol and obtains the zero-knowledge proof key, face information hash and other public parameters from the identity authentication platform. Then the face information feature vector is collected as the confidential value and the obtained public parameters are input into the zero-knowledge proof function to obtain the zero-knowledge proof and send it to the identity authentication platform. After the platform verifies the verification key, the user goes through the registration process to re-register his identity.
[0104] In summary, when a user requests a service and performs identity authentication, the identity authentication platform login authentication smart contract receives the request and first obtains the service endpoint through the DID document of the service in the decentralized storage and returns it to the user. Then the user and the identity authentication platform login authentication contract perform an inadvertent pseudo-random function (OPRF) interaction to recover the user's identity private key authentication successfully. After that, the user and the service further negotiate the session key.
[0105] In addition, in some optional embodiments, the present invention also relates to an identity recovery process, specifically including steps S301 to S305, wherein:
[0106] S301: When entering the identity recovery mode, the user terminal generates third public key information, and encrypts the third public key information and the decentralized identifier according to the first public key information to obtain fifth encrypted information, and sends the fifth encrypted information to the identity authentication platform;
[0107] When a user loses his password or wants to change his password, he can perform the identity recovery process. The third public key information refers to the temporary session public and private key T generated by the user. U and t u , and then use the first public key information P B Encrypt user DID identifier and temporary public key T U , the fifth encrypted information T is obtained and sent to the identity authentication platform.
[0108] S302: The identity authentication platform decrypts the fifth encrypted information, and searches the database in the blockchain based on the decentralized identifier to obtain the first encrypted information, the user key information, the first key, the second key, the second random value, and the first hash value, and encrypts the second key, the first hash value, and the user key information according to the third public key information to obtain the sixth encrypted information, and sends the sixth encrypted information to the user end;
[0109] The identity verification platform processes the contract through recovery, which involves decrypting T to obtain the user's DID and T U , use DID as the key to find user identity metadata C, P U ,zk_vk,zk_pk,k,H,use T UThe proof key zk_pk of the encrypted non-interactive zero-knowledge proof, the hash value H of the user's face information, and the third public key information is the user's identity public key P U , and then encrypt to obtain the sixth encrypted information T', and send it to the user end.
[0110] S303: The user terminal decrypts the sixth encrypted information, collects the facial information feature vector, inputs the first key, the facial information feature vector, and the first hash value into the zero-knowledge proof algorithm to obtain the zero-knowledge proof, encrypts the zero-knowledge proof according to the first public key information to obtain the seventh encrypted information, and sends the seventh encrypted information to the identity authentication platform;
[0111] Specifically, the user end decrypts T' to obtain zk_pk, H, P U ; Next, collect the user's face information feature vector to ensure that the key is restored by the registered P U The user at that time inputs zk_pk, H, and V into the zero-knowledge proof algorithm to obtain the zero-knowledge proof zk_proof, and uses the public key P of the identity authentication platform to verify the zero-knowledge proof. B The seventh encrypted information prf is obtained by encryption and sent to the identity authentication platform.
[0112] S304: The identity authentication platform decrypts the seventh encrypted information, and inputs the decrypted zero-knowledge proof and the stored first key into the verification algorithm. If the verification is successful, the DID set of the key to which the user belongs is set to empty, and the user key information is encrypted according to the third public key information to obtain the eighth encrypted information, and the eighth encrypted information is sent to the user end;
[0113] In this step, the identity authentication platform decrypts the seventh encrypted information prf to obtain the zero-knowledge proof zk_proof, inputs the zero-knowledge proof zk_proof and the zero-knowledge proof verification key (first key) stored in the user metadata into the verification algorithm, and if the result is true, the zero-knowledge proof verification passes, sets the DID set of the user's key to empty, and uses the temporary public key T U Encrypted user identity public key P U Get O and send it to the user; if the zero-knowledge proof verification result is false, terminate the process.
[0114] S305: The user terminal decrypts the eighth encrypted information to compare the user key information obtained twice before and after. If they are the same, the user terminal enters the identity registration mode to reset the user password and user key information.
[0115] Specifically, during the comparison process, if the P obtained twice is U If they are equal, enter the registration process to reset the user password and the user's public and private keys.
[0116] Through the above identity recovery process, when the user forgets the password or the password is leaked, the user can generate a temporary session and interact with the identity verification platform to restore the smart contract. Combined with the non-interactive zero-knowledge proof algorithm, the user obtains the public parameters of the zero-knowledge proof key and biometric information from the platform, runs the proof function to generate a zero-knowledge proof, and the identity verification platform then runs the verification method to verify the proof and authentication key as input. If the verification is passed, the registration process will be entered to reset the password. The process will not reveal any user's private information, and their identity authentication information can be safely restored.
[0117] In summary, the embodiments of the present invention provide a user experience in the traditional Web2.0 environment in a Web3.0 environment, but it is more secure and decentralized, and the user can fully control his or her user identity sovereignty. At the same time, the beneficial effects of the embodiments of the present invention specifically include:
[0118] 1. Compared with the traditional authentication method of storing passwords or biometric information on the server, the user's information in the embodiments of the present invention is only in the hands of the user, that is, through the enhanced password authentication key exchange protocol, the password and biometric information are only in the hands of the user. Through the ORF process, only the encrypted user identity information is stored on the server. Even if the authentication platform is attacked, no information about the user's password or private key can be obtained.
[0119] 2. The embodiment of the present invention adopts decentralized oracle and decentralized storage to solve the problems that it is difficult to obtain safe and reliable random numbers due to the publicity, verifiability and information imbalance of the blockchain system, and it is difficult to store a large amount of data due to the preciousness of on-chain resources. With the help of oracle and decentralized storage, reliable random numbers can be input into the blockchain system and the storage under the chain can be expanded, so that only key information is stored on the chain.
[0120] 3. Compared with the traditional authentication method using digital certificates, the embodiments of the present invention use a blockchain platform as an identity authentication platform instead of a trusted third party, and use a memorable decentralized identifier DID instead of a public key as the user's identity. In the traditional method, when a problem occurs with the trusted third party, the authentication platform will be paralyzed, and this method is very complex and costly. However, in the embodiments of the present invention, there is no trust problem through the consensus of the blockchain platform, and users have sovereignty over their own identity information.
[0121] 4. Using zero-knowledge proof algorithm can help users authenticate their biometric information through zero-knowledge proof without showing the original biometric information to the verification party, and then recover the key;
[0122] 5. Compared with the traditional method in which users need to maintain public and private keys, the user end of the embodiment of the present invention does not need to spend a lot of money to maintain its own public and private keys, because the public and private keys can be restored through cryptographic algorithms.
[0123] See also Figure 7 , which is a schematic diagram of the structure of a decentralized identity registration, authentication, and recovery system for Web3.0 in one embodiment of the present invention, wherein the decentralized identity registration, authentication, and recovery system for Web3.0 includes an identity authentication platform 12 and a user terminal 10, an oracle 16, and an off-chain storage module 14 that are respectively connected to the identity authentication platform 12 in communication, wherein:
[0124] The identity authentication platform 12 is used to send the first public key information to the oracle within a first preset time when receiving the registration information uploaded by the user terminal;
[0125] and obtaining a first intermediate output based on the registration information and the first feedback information and based on an inadvertent pseudo-random function, and sending the first intermediate output and the first public key information to a user terminal;
[0126] It is also used to decrypt the second encrypted information to obtain first decrypted information, and store the first decrypted information in the off-chain storage module 14;
[0127] The oracle 16 is used to send the first feedback information according to the first public key information;
[0128] The user terminal 10 is used to run the OPRF process, obtain a first final output, and encrypt the user key information and the first public key information according to the first final output to obtain the first encrypted information, and encrypt the registration information, the first encrypted information and the user key information according to the first public key information to obtain the second encrypted information, and send the second encrypted information to the identity authentication platform.
[0129] On the other hand, the present invention also proposes a readable storage medium, on which one or more programs are stored, which, when executed by a processor, implement the above-mentioned decentralized identity registration, authentication, and recovery method for Web3.0.
[0130] On the other hand, the present invention also proposes a computer device, including a memory and a processor, wherein the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so as to implement the above-mentioned decentralized identity registration, authentication, and recovery method for Web3.0.
[0131] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0132] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0133] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0134] Although the embodiments of the present invention are described in detail above, it is obvious to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations are within the scope and spirit of the present invention as described in the claims. Moreover, the present invention described herein may have other embodiments and may be implemented or realized in a variety of ways.
Claims
1. A decentralized identity registration, authentication, and recovery method for Web3.
0. It is characterized in that The decentralized identity registration, authentication, and recovery system for Web3.0 is implemented through an identity registration system, and includes an identity authentication platform and a user terminal, an oracle, and an off-chain storage module that are respectively connected to the identity authentication platform in communication; The method comprises: When the identity authentication platform receives the registration information uploaded by the user, it sends the first public key information to the oracle within a first preset time, so that the oracle sends the first feedback information according to the first public key information; The identity authentication platform obtains a first intermediate output based on the registration information and the first feedback information and based on an inadvertent pseudo-random function, and sends the first intermediate output and the first public key information to the user end; The user terminal runs the OPRF process to obtain a first final output, and encrypts the user key information and the first public key information according to the first final output to obtain first encrypted information, and encrypts the registration information, the first encrypted information and the user key information according to the first public key information to obtain second encrypted information, and sends the second encrypted information to the identity authentication platform; The identity authentication platform decrypts the second encrypted information to obtain first decrypted information, and stores the first decrypted information in an off-chain storage module.
2. According to the decentralized identity registration, authentication, and recovery method for Web3.0 according to claim 1, It is characterized in that When the identity authentication platform receives the registration information uploaded by the user, the step of sending the first public key information to the oracle within a first preset time so that the oracle sends the first feedback information according to the first public key information includes: When a registration request is made by the user terminal, the user terminal collects a facial information feature vector and obtains a first hash value by hashing the feature vector; Blinding the user password with a first random value to obtain a first blinded value, and generating user key information; Setting a decentralized identifier, and encrypting the first hash value, the first blinded value, and the decentralized identifier according to the first public key information to obtain registration information; The first feedback information includes a second random value and a third random value. The oracle encrypts the second random value and the third random value according to the first public key information to obtain the first feedback information.
3. According to the decentralized identity registration, authentication, and recovery method for Web3.0 according to claim 2, It is characterized in that The steps of the identity authentication platform obtaining a first intermediate output based on the registration information and the first feedback information and based on an inadvertent pseudo-random function, and sending the first intermediate output and the first public key information to the user end include: Decrypting the registration information according to the first private key in the memory, using the OPRF process to obtain a first intermediate output according to the second random value obtained by decryption and the first blinding value; A zero-knowledge proof function is defined, and the zero-knowledge proof function and the third random value are introduced into a zero-knowledge proof key generation algorithm to obtain a first key and a second key.
4. According to the decentralized identity registration, authentication, and recovery method for Web3.0 according to claim 3, It is characterized in that The steps of the identity authentication platform decrypting the second encrypted information to obtain first decrypted information, and storing the first decrypted information in the off-chain storage module include: The first decryption information includes the first encryption information, the user key information, the first key, the second key, the second random value, and the first Hash value; The decentralized identifier is used as a key, and the first encrypted information, the user key information, the first key, the second key, the second random value, and the first hash value are used as values and are stored on the blockchain.
5. According to the decentralized identity registration, authentication, and recovery method for Web3.0 according to claim 4, It is characterized in that The method further comprises: When entering the identity authentication mode, the user terminal runs the OPRF process to blind the user password to obtain a second blinded value, and sends the second blinded value and the decentralized identifier to the server; The server encrypts the second blinded value, the decentralized identifier, and the second public key information to obtain third encrypted information, and sends the third encrypted information to the identity authentication platform; The identity authentication platform decrypts the third encrypted information, obtains the user's meta-identity information based on the decentralized identifier obtained by decryption, searches the database in the blockchain according to the meta-identity information, obtains the first encrypted information, the user key information, the first key, the second key, the second random value, the first hash value, runs the OPRF process according to the second random value and the second blinded value, obtains the second intermediate output, encrypts the second intermediate output and the first encrypted information according to the second public key information, obtains the fourth encrypted information, and sends the fourth encrypted information to the server; The server decrypts the fourth encrypted information to send the second public key information, the second intermediate output, and the first encrypted information to the client; The user terminal runs the OPRF process according to the second intermediate output and the user password to obtain the second final output, and decrypts the first encrypted information according to the second final output. If the second final output is the same as the first final output, the decryption is successful and the user key information is obtained.
6. According to the decentralized identity registration, authentication, and recovery method for Web3.0 according to claim 4, It is characterized in that The method further comprises: When entering the identity recovery mode, the user terminal generates third public key information, and encrypts the third public key information and the decentralized identifier according to the first public key information to obtain fifth encrypted information, and sends the fifth encrypted information to the identity authentication platform; The identity authentication platform decrypts the fifth encrypted information, searches the database in the blockchain based on the decentralized identifier, obtains the first encrypted information, the user key information, the first key, the second key, the second random value, and the first hash value, and encrypts the second key, the first hash value, and the user key information according to the third public key information to obtain the sixth encrypted information, and sends the sixth encrypted information to the user end; The user end decrypts the sixth encrypted information, collects the facial information feature vector, inputs the first key, the facial information feature vector, and the first hash value into the zero-knowledge proof algorithm to obtain the zero-knowledge proof, encrypts the zero-knowledge proof according to the first public key information to obtain the seventh encrypted information, and sends the seventh encrypted information to the identity authentication platform; The identity authentication platform decrypts the seventh encrypted information to input the decrypted zero-knowledge proof and the stored first key into the verification algorithm. If the verification is successful, the DID set of the key to which the user belongs is set to empty, and the user key information is encrypted according to the third public key information to obtain the eighth encrypted information, and the eighth encrypted information is sent to the user end; The user end decrypts the eighth encrypted information to compare the user key information obtained twice before and after. If they are the same, the user enters the identity registration mode to reset the user password and user key information.
7. A decentralized identity registration, authentication, and recovery system for Web3.
0. It is characterized in that The system comprises: The identity authentication platform is used to send the first public key information to the oracle within a first preset time when receiving the registration information uploaded by the user; and obtaining a first intermediate output based on the registration information and the first feedback information and based on an inadvertent pseudo-random function, and sending the first intermediate output and the first public key information to a user terminal; Also used for decrypting the second encrypted information to obtain first decrypted information, and storing the first decrypted information in the off-chain storage module; A oracle, configured to issue first feedback information according to the first public key information; The user end is used to run the OPRF process, obtain the first final output, and encrypt the user key information and the first public key information according to the first final output to obtain the first encrypted information, and encrypt the registration information, the first encrypted information and the user key information according to the first public key information to obtain the second encrypted information, and send the second encrypted information to the identity authentication platform.
8. According to the decentralized identity registration, authentication, and recovery system for Web3.0 as claimed in claim 7, It is characterized in that The user terminal is also used to collect the facial information feature vector when there is a registration request, and obtain a first hash value after hashing the feature vector; The identity authentication platform is also used to blind the user password through the first random value to obtain a first blinded value, and generate user key information; Setting a decentralized identifier, and encrypting the first hash value, the first blinded value, and the decentralized identifier according to the first public key information to obtain registration information; The first feedback information includes a second random value and a third random value. The oracle encrypts the second random value and the third random value according to the first public key information to obtain the first feedback information.
9. A readable storage medium, It is characterized in that The readable storage medium stores one or more programs, which, when executed by a processor, implement the decentralized identity registration, authentication, and recovery method for Web3.0 as described in any one of claims 1 to 6.
10. A computer device comprising a memory and a processor, in: The memory is used to store computer programs; When the processor is used to execute a computer program stored in the memory, it implements the decentralized identity registration, authentication, and recovery method for Web3.0 as described in any one of claims 1-6.
Citation Information
Cited By
Decentralization management method and system for user registration and storage medium
CN119728080A
Decentralized management method, system and storage medium for user registration
CN119728080B
