Identity authentication method and system with self-defined authentication mode
By storing encrypted information on the blockchain network and matching the custom identity authentication method using decision trees, the problem of inflexible authentication and poor security in the existing technology is solved, and user-defined flexible identity authentication and high security are realized. Identity authentication method.
Patent Information
- Application Number
- CN202411151467.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119094177A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of identity authentication, and in particular to an identity authentication method and system of a user-defined authentication mode. Background Art
[0002] With the rapid development and popularization of the Internet, problems such as false identities and online fraud have become increasingly prominent, and online identity authentication has become an important means to ensure network security and maintain network order. Through effective online identity authentication, we can effectively prevent malicious network incidents, protect the security of user personal information, establish a trustworthy network environment, and promote the healthy development of the network economy. At the same time, online identity authentication also provides a reliable user identity authentication mechanism for Internet services such as e-commerce, online payment, and social networks, improving user experience and service quality.
[0003] Existing network identity authentication methods mainly include password authentication, biometrics, and authentication based on public key infrastructure (PKI). Password authentication is the most common method, but it is vulnerable to weak passwords, password leaks, and brute force attacks. Although biometric technologies such as fingerprint and face recognition provide higher security, they still face problems such as forgery, theft of biometric features, and difficulty in data storage. PKI-based authentication uses digital certificates for identity authentication, providing strong security and non-repudiation, but relies on a reliable certificate management mechanism.
[0004] After research, it is found that existing systems or platforms are basically divided into two authentication modes. The first one uses only a single authentication method for authentication, such as an application that only provides a password authentication method. The second one uses more than one authentication method for authentication, such as a social platform that allows users to choose either a password or a fingerprint for authentication.
[0005] However, in the first method, the authentication method is fixed. That is, the use of a single authentication method has the disadvantage that the authentication process is too rigid and inflexible. Moreover, the use of a single method makes it easy for others to crack and counterfeit passwords or information in a targeted manner, which has poor security. The second method, although it can provide users with a method to choose authentication, is relatively less secure. For example, for a certain social software, users are allowed to choose either a password or a fingerprint for authentication. Then, when either the password or the fingerprint is illegally cracked, the user's social account can be easily logged in. It can be seen that the existing authentication methods have the problems of poor flexibility in the authentication process and poor security. Summary of the invention
[0006] In order to solve the above-mentioned problems in the prior art, the present invention provides an identity authentication method and system with a customized authentication mode.
[0007] In a first aspect, an embodiment of the present application provides an identity authentication method of a custom authentication method, comprising: obtaining target account information and multiple identity authentication information input by a first user; obtaining encrypted information corresponding to the target account information from a blockchain network; the encrypted information comprises a first encryption unit and unique identification information; using a password accumulator stored in itself to decrypt the first encryption unit to obtain a user public key; decrypting the unique identification information based on the user public key to obtain a decision tree; wherein the decision tree comprises multiple leaf nodes, each leaf node corresponds to an identity authentication method custom set by the user, and each leaf node comprises identity authentication information pre-entered by the user; matching the multiple identity authentication information input by the first user with the decision tree, and determining whether the first user is successfully authenticated based on the matching result.
[0008] Optionally, the encrypted information also includes signature information; the signature information is configured to use a user private key to sign the decision tree, or is configured to use a user private key to sign the unique identification information; before matching the multiple identity authentication information input by the first user with the decision tree, the method also includes: decrypting the signature information based on the user public key to obtain decrypted information; and determining that the decrypted information authentication is passed.
[0009] Optionally, before obtaining the account information and multiple identity authentication information input by the user, the method also includes: in response to the registration request of the second user, generating a user private key and a user public key corresponding to the second user; obtaining multiple identity authentication methods customized by the second user and the identity authentication information corresponding to each identity authentication method entered; constructing a decision tree based on the multiple identity authentication methods customized by the second user and the identity authentication information corresponding to each identity authentication method entered; wherein the decision tree includes multiple leaf nodes, each leaf node corresponds to an identity authentication method customized by the second user, and each leaf node includes the identity authentication information entered by the second user; encrypting the decision tree based on the hash function and the user private key to generate unique identification information corresponding to the second user; using the password accumulator to encrypt the user public key to generate a first encryption unit corresponding to the second user; transmitting the unique identification information and the first encryption unit to the blockchain network for storage, and at the same time locally deleting the unique identification information, the decision tree, the user private key, the user public key and the first encryption unit.
[0010] Optionally, in response to a registration request from a second user, generating a user private key and a user public key corresponding to the second user includes: in response to the registration request from the second user, randomly selecting a value from 1 to a set prime number to form a sequence of length Q; wherein the sequence is the user private key corresponding to the second user; Q is a positive integer; and generating a user public key corresponding to the second user based on the user private key, a set generator, and the set prime number.
[0011] Optionally, the decision tree is encrypted based on the hash function and the user's private key to generate unique identification information corresponding to the second user, including: performing hash operations on all leaf nodes in the decision tree based on the hash function to obtain multiple first hash values; performing an XOR operation on the first hash values to obtain an XOR result value; processing the user's private key based on the hash function to obtain a second hash value; performing an XOR operation on the XOR result value and the second hash value to generate unique identification information corresponding to the second user.
[0012] Optionally, the cryptographic accumulator is constructed using a set generator, a set prime number, and a non-singular curve; the expression of the cryptographic accumulator is: Where E represents the non-singular curve, and the expression is y 2 =x 3 +ax+b,x 1 ~x n represents the actual value of the non-singular curve; a represents the coefficient of the non-singular curve, and b represents the constant term of the non-singular curve; A(a,b) represents the cryptographic accumulator, and the subscripts correspond to a and b in the expression of the non-singular curve; g represents the set generator; mod represents the modulo operation; q represents the set prime number.
[0013] Optionally, the method further includes: using the user's private key to sign the decision tree to generate signature information, or using the user's private key to sign the unique identification information to generate signature information; transmitting the signature information to the blockchain network for storage, and deleting the signature information stored locally.
[0014] Optionally, the decision tree is encrypted based on a hash function and the user's private key to generate unique identification information corresponding to the second user; a hash function is randomly selected from a set function library; the decision tree is encrypted based on the hash function and the user's private key to generate unique identification information corresponding to the second user.
[0015] Optionally, obtaining multiple identity authentication information input by the first user includes: obtaining multiple identity authentication information input by the first user, and recording the input order of each identity authentication information; matching the multiple identity authentication information input by the first user with the decision tree includes: matching the multiple identity authentication information input by the first user with multiple leaf nodes in the decision tree in sequence according to the input order of each identity authentication information; wherein the order of the multiple leaf nodes in the decision tree is the authentication order of the multiple identity authentication methods customized by the user.
[0016] In the second aspect, the present application provides an identity authentication system with a custom authentication method, including: a first acquisition module, used to obtain target account information and multiple identity authentication information input by a first user; a second acquisition module, used to obtain encrypted information corresponding to the target account information from the blockchain network; the encrypted information includes a first encryption unit and unique identification information; a first decryption module, used to use a password accumulator stored in itself to decrypt the first encryption unit to obtain a user public key; a second decryption module, used to decrypt the unique identification information based on the user public key to obtain a decision tree; wherein the decision tree includes multiple leaf nodes, each leaf node corresponds to an identity authentication method custom set by the user, and each leaf node includes identity authentication information pre-entered by the user; an authentication module, used to match the multiple identity authentication information input by the first user with the decision tree, and based on the matching result, determine whether the first user is successfully authenticated.
[0017] The beneficial effects of the present invention include:
[0018] First, a user-defined identity authentication method is provided, and different users can flexibly set or select multiple identity authentication methods that meet their needs. That is, for the same platform, application or system, users can freely and flexibly choose to use multiple authentication methods for identity authentication, which can make up for the defects of inflexible and single authentication in the existing technology.
[0019] Second, the identity authentication method of the custom authentication method provided by this application is highly secure. And the security is reflected in the following aspects: First, the encrypted information corresponding to the account information is stored in the blockchain network. Since the blockchain has the characteristics of immutability, distributed storage, and multiple encryption protections, it is safer to store the encrypted information in the blockchain network than to store it locally. Second, the authentication method used is a combination of multiple identity authentication methods selected by the user. The combination of multiple identity authentication methods is random from the user's perspective, and it is difficult for others to know the form of the user's identity authentication method combination. At the same time, it is also difficult to crack multiple identity authentication methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of the steps of an identity authentication method of a custom authentication method provided by an embodiment of the present invention;
[0021] Figure 2 A flowchart of another identity authentication method provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a decision tree provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of another decision tree provided by an embodiment of the present invention;
[0024] Figure 5 A module block diagram of an identity authentication system with a custom authentication method provided by an embodiment of the present invention;
[0025] Figure 6 A module block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0027] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0028] After research, it is found that existing systems or platforms are basically divided into two authentication modes. The first one uses only a single authentication method for authentication, such as an application that only provides a password authentication method. The second one uses more than one authentication method for authentication, such as a social platform that allows users to choose either a password or a fingerprint for authentication.
[0029] However, in the first method, the authentication method is fixed. That is, the use of a single authentication method has the disadvantage that the authentication process is too rigid and inflexible. Moreover, the use of a single method makes it easy for others to crack and counterfeit passwords or information in a targeted manner, which has poor security. The second method, although it can provide users with a method to choose authentication, is relatively less secure. For example, for a certain social software, users are allowed to choose either a password or a fingerprint for authentication. Then, when either the password or the fingerprint is illegally cracked, the user's social account can be easily logged in. It can be seen that the existing authentication methods have the problems of poor flexibility in the authentication process and poor security.
[0030] In view of the above problems, the present application proposes the following embodiments to solve the above technical problems.
[0031] See also Figure 1 , an embodiment of the present application provides an identity authentication method with a custom authentication method, including: steps 101 to 105.
[0032] Step 101: Obtain target account information and multiple identity authentication information input by a first user.
[0033] Here, the target account information can be an account or user name provided by the software, application or system, or it can be the user's own mobile phone number, ID card, or the user name provided by the user when registering. This application does not limit this.
[0034] Here, the identity authentication information entered may include a password, face recognition information, fingerprint recognition information, pattern code, etc.
[0035] That is, the embodiment of the present application provides a combination authentication of multiple identity authentication methods customized by the user. For example, the user pre-sets the authentication method through face and fingerprint, and the user needs to choose to provide face information and fingerprint recognition information by himself. For another example, the user pre-sets the authentication method through face, fingerprint and pattern code, and the user needs to provide face information, fingerprint recognition information and pattern code by himself.
[0036] Step 102: Obtain encrypted information corresponding to the target account information from the blockchain network; the encrypted information includes a first encryption unit and unique identification information.
[0037] In the embodiment of the present application, the encrypted information corresponding to the target account information is stored in the blockchain network. Since the blockchain has the characteristics of immutability, distributed storage, and multiple encryption protections, it is safer to store the encrypted information in the blockchain network than to store it locally.
[0038] It should be noted that the encrypted information here includes the first encryption unit and the unique identification information, both of which are encrypted information, and neither of them is confidential content corresponding to the target account information. Therefore, the encrypted information can be stored in the blockchain network.
[0039] Step 103: Use the password accumulator stored in itself to decrypt the first encryption unit to obtain the user public key.
[0040] After retrieving the encrypted information (first encryption unit and unique identification information) corresponding to the target account information from the blockchain network, the first encryption unit is decrypted using the password accumulator stored in itself to obtain the user public key.
[0041] It can be understood that the first encryption unit is obtained by encrypting the user public key in advance through the password accumulator.
[0042] Step 104: Decrypt the unique identification information based on the user public key to obtain a decision tree.
[0043] The decision tree includes a plurality of leaf nodes, each leaf node corresponds to an identity authentication method customized by a user, and each leaf node includes identity authentication information pre-entered by the user.
[0044] That is, the user can pre-define multiple identity authentication methods and enter the identity authentication information corresponding to each identity authentication method, thereby generating a decision tree corresponding to the user.
[0045] For example, if the user pre-sets the authentication method through face and fingerprint, the user needs to enter the face information and fingerprint recognition information, and thus generate a decision tree corresponding to the user. For another example, if the user pre-sets the authentication method through face, fingerprint and pattern code, the user needs to enter the face information, fingerprint recognition information and set the pattern code, and thus generate a decision tree corresponding to the user.
[0046] It can be understood that the unique identification information is obtained by encrypting the decision tree in advance with the user's public key.
[0047] Step 105: Match the multiple identity authentication information input by the first user with the decision tree, and determine whether the identity authentication of the first user is successful based on the matching result.
[0048] Finally, the various identity authentication information input by the first user is matched with the cracked decision tree. If the matching result satisfies all leaf nodes of the decision tree, it is determined that the identity authentication of the first user is successful.
[0049] If there is any leaf node that does not satisfy the decision tree, it is determined that the identity authentication of the first user has failed.
[0050] Exemplarily, assuming that the identity authentication methods included in the decision tree are fingerprint authentication method, password authentication method and face authentication method, then when the multiple identity authentication information input by the first user corresponds to the three methods in the decision tree and matches, it is determined that the identity authentication of the first user is successful. It should be noted that. Matching can include the face recognition information input by the first user, and the similarity with the face recognition information pre-entered in the decision tree is greater than the first set value; matching can include the fingerprint recognition information input by the first user, and the similarity with the fingerprint recognition information pre-entered in the decision tree is greater than the second set value, and matching can include the password input by the first user is the same as the password pre-entered in the decision tree. (The specific values of the above-mentioned first setting value and the second setting value can be set according to actual needs and are not limited here).
[0051] Determining that the identity authentication of the first user has failed includes two forms. The first form is that the match fails. For example, in a certain leaf node, the authentication information fails to match. For example, if the facial recognition information input by the first user is less than the similarity of the facial recognition information pre-entered in the decision tree is less than the first set value, it means that the user is falsifying.
[0052] The second form is that the multiple identity authentication information input by the user does not correspond to the multiple leaf nodes of the decision tree. It includes: 1. The multiple identity authentication information input by the first user is more than the multiple identity authentication information corresponding to the decision tree. 2. The multiple identity authentication information input by the first user is less than the multiple identity authentication information corresponding to the decision tree. 3. The authentication method of the multiple identity authentication information input by the first user is different from the multiple identity authentication of the decision tree. For example, the authentication methods of the multiple identity authentication information input by the first user are password, face and fingerprint, but the multiple identity authentication methods corresponding to the decision tree are password, face and pattern code.
[0053] In summary, the identity authentication method of a custom authentication method provided in the embodiment of the present application has the following advantages:
[0054] First, a user-defined identity authentication method is provided, and different users can flexibly set or select multiple identity authentication methods that meet their needs. That is, for the same platform, application or system, users can freely and flexibly choose to use multiple authentication methods for identity authentication, which can make up for the defects of inflexible and single authentication in the existing technology.
[0055] Second, the identity authentication method of the custom authentication method provided by this application is highly secure. And the security is reflected in the following aspects: First, the encrypted information corresponding to the account information is stored in the blockchain network. Since the blockchain has the characteristics of immutability, distributed storage, and multiple encryption protections, it is safer to store the encrypted information in the blockchain network than to store it locally. Second, the authentication method used is a combination of multiple identity authentication methods selected by the user. The combination of multiple identity authentication methods is random from the user's perspective, and it is difficult for others to know the form of the user's identity authentication method combination. At the same time, it is also difficult to crack multiple identity authentication methods.
[0056] Optionally, before obtaining the account information and multiple identity authentication information entered by the user, the user registration process is also involved. Please refer to Figure 2 The user registration process may include: steps 201 to 206.
[0057] Step 201: In response to a registration request from a second user, a user private key and a user public key corresponding to the second user are generated.
[0058] Here, when the second user initiates a registration request, he or she may carry registration information, such as the second user's own mobile phone number and ID card (which may be used as account information for logging in later).
[0059] In addition, the software, application or system may also provide the second user with an account number and a user name as subsequent account information after the second user initiates a registration request.
[0060] This step can be understood as generating a user private key and a user public key corresponding to each user for each registration of the user.
[0061] Step 202: Acquire multiple identity authentication methods customized by the second user and the entered identity authentication information corresponding to each identity authentication method.
[0062] Then, the second user can customize multiple identity authentication methods and enter information for the multiple identity authentication methods.
[0063] For example, if the user selects face, fingerprint and pattern code as the authentication method, the user needs to enter the face information, fingerprint recognition information and set the pattern code to complete the information entry of multiple customized identity authentication methods.
[0064] Step 203: construct a decision tree based on the multiple identity authentication methods customized by the second user and the entered identity authentication information corresponding to each identity authentication method.
[0065] The decision tree includes a plurality of leaf nodes, each leaf node corresponds to an identity authentication method customized by the second user, and each leaf node includes identity authentication information entered by the second user.
[0066] Step 204: Encrypt the decision tree based on the hash function and the user's private key to generate unique identification information corresponding to the second user.
[0067] Here, the decision tree is encrypted using a hash function and the user's private key, thereby generating unique identification information UserID corresponding to the second user. That is, each registered user corresponds to their own unique identification information UserID.
[0068] Step 205: Use a cryptographic accumulator to encrypt the user public key to generate a first encryption unit corresponding to the second user.
[0069] Step 206: The unique identification information and the first encryption unit are transmitted to the blockchain network for storage, and the unique identification information, the decision tree, the user private key, the user public key and the first encryption unit are deleted locally.
[0070] That is, in the embodiment of the present application, after the second user's registration is completed, the unique identification information and the first encryption unit related to the second user involved in the registration process are transmitted to a more secure blockchain network for storage, and what is stored in the blockchain here is all encrypted information, including the first encryption unit and the unique identification information, not the confidential content corresponding to the second user. At the same time, after the registration is completed, the information corresponding to the second user is deleted locally, and in this way, the security of the registration stage is guaranteed.
[0071] Optionally, the above steps generate a user private key and a user public key corresponding to the second user in response to a registration request from the second user, including: in response to the registration request from the second user, randomly selecting a value from 1 to a set prime number to form a sequence of length Q; wherein the sequence is the user private key corresponding to the second user; Q is a positive integer; and generating a user public key corresponding to the second user based on the user private key, a set generator, and a set prime number.
[0072] Assuming that the prime number is set to q, a certain number of values are randomly selected from 1 to the set prime number q to form a sequence of length Q, which corresponds to the user private key k of the second user. s .
[0073] Assuming that the generator is set to g, it can be combined with the user's private key k s , set the generator g, set the prime number to q to jointly generate the user public key k corresponding to the second user p .
[0074] It should be noted that a group G can be set in advance, and g is used as a generator of the group G. Specifically, by performing a finite number of group calculations on g and its inverse, such as product or power operations, all elements in the group G can be obtained, and the set generator g can be determined in this way.
[0075] In the embodiment of the present application, the length of the selected sequence is 20. Therefore, the prime number q needs to be set to a larger value, for example, the prime number q can be set to any prime number greater than 73, so as to ensure that the sequence composed of the subsequently randomly selected values has stronger randomness.
[0076] Exemplarily, the above steps may be specifically to randomly select numbers in [1, q] to form a sequence of length 20, and use the sequence as the private key k s [x 1 ,x 2 ,...,x 20 ]. Then, use the user's private key k s , set the generator g, set the prime number to q to jointly generate the user public key k corresponding to the second user p .in,
[0077] Optionally, the above steps encrypt the decision tree based on the hash function and the user's private key to generate unique identification information corresponding to the second user, including: performing hash operations on all leaf nodes in the decision tree based on the hash function to obtain multiple first hash values; performing XOR operations on the first hash values to obtain XOR result values; processing the user's private key based on the hash function to obtain a second hash value; performing XOR operations on the XOR result value and the second hash value to generate unique identification information corresponding to the second user.
[0078] As an implementation method, the user private key is processed based on a hash function to obtain a second hash value, which can be specifically: e=H(m||k s ); where e represents the second hash value, H represents the hash function, m represents the user's account information, and k s Represents the user's private key.
[0079] That is, the embodiment of the present application also provides a method for calculating a second hash value, which is obtained by performing a hash calculation on a user's private key and the user's account information.
[0080] Optionally, the cryptographic accumulator is constructed using a set generator, a set prime number, and a non-singular curve; the expression of the cryptographic accumulator is: Where E represents a non-singular curve, and the expression is y 2 =x 3 +ax+b,x1 ~x n represents the actual value of the non-singular curve; a represents the coefficient of the non-singular curve, b represents the constant term of the non-singular curve; A(a,b) represents the cryptographic accumulator, and the subscripts correspond to a and b in the expression of the non-singular curve; g represents the set generator; mod represents the modulo operation; q represents the set prime number.
[0081] In one embodiment, the number of the cryptographic accumulators may be two.
[0082] The specific expression is:
[0083] as well as Among them, a 1 and a 2 They represent two different coefficients of non-singular curves, b 1 and b 2 They represent two different constant terms of the non-singular curve. Subsequently, two cryptographic accumulators may be used to encrypt the user public key to generate a first encryption unit corresponding to the second user, so as to improve the complexity and randomness of the encryption.
[0084] Optionally, the above steps encrypt the decision tree based on the hash function and the user's private key to generate unique identification information corresponding to the second user; randomly select a hash function from a set function library; encrypt the decision tree based on the hash function and the user's private key to generate unique identification information corresponding to the second user.
[0085] That is, different types of hash functions may be pre-stored in the set function library, which may specifically include different string hash functions and different encryption hash functions. Then, for each registered user, a hash function may be randomly selected from the set function library to encrypt the decision tree and generate unique identification information corresponding to the registered user.
[0086] It can be understood that the embodiment of the present application also randomly selects the hash function so that the unique identification information generated by different users is generated in different ways, further increasing security.
[0087] The following is a specific example:
[0088] When a user registers, the system or platform can perform initialization operations for the user, including randomly selecting a hash function H and constructing a set of initialization parameters {q, E, g, H}, where q is a set prime number, g is a generator of the group G, and E represents a non-singular curve, expressed as y 2 =x 3 +ax+b.
[0089] Then, using g as the initial value, construct two password accumulators, namely:
[0090]
[0091]
[0092] The description and explanation of the above formula can refer to the above embodiment, and are not limited here. In the embodiment of the present application, n can be 20.
[0093] Then, randomly select numbers from [1, q] to form a sequence of length 20, and use this sequence as the private key k s [x 1 ,x 2 ,...,x 20 ]. Then, use the user's private key k s , set the generator g, set the prime number to q to jointly generate the user public key k corresponding to the second user p .in,
[0094] Optionally, the above method also includes: using the user's private key to sign the decision tree to generate signature information, or using the user's private key to sign the unique identification information to generate signature information; transmitting the signature information to the blockchain network for storage, and deleting the signature information stored locally.
[0095] Taking into account the integrity of the authentication information, in an embodiment of the present application, after the decision tree is digitally signed, the signature information is also transmitted to the blockchain network for storage, and the locally stored signature information is deleted.
[0096] Correspondingly, in subsequent practical applications, the encrypted information obtained from the blockchain network also includes signature information.
[0097] Among them, the signature information is configured to use the user's private key to sign the decision tree, or is configured to use the user's private key to sign the unique identification information; accordingly, before matching the multiple identity authentication information input by the first user with the decision tree, the above method also includes: decrypting the signature information based on the user's public key to obtain decrypted information; and determining that the decrypted information authentication is passed.
[0098] It can be seen that here, the decision tree is signed with the user's private key to generate signature information, or the unique identification information is signed with the user's private key to generate signature information; then the signature information is transmitted to the blockchain network for storage, and the locally stored signature information is deleted. In subsequent practical applications, the signature information is decrypted based on the user's public key to obtain decrypted information; and the integrity of the decrypted information is determined. In this way, the integrity and authenticity of the decision tree can be effectively verified.
[0099] In the first implementation mode, the decision tree can be directly signed by the user's private key, that is, the decision tree can be encrypted by the user's private key to form a digital signature (i.e., signature information); in the application, the digital signature can be decrypted by the user's public key to obtain the decision tree, and then the decision tree obtained by decrypting the unique identification information and the decision tree obtained by decrypting the digital signature can be compared to verify the integrity of the data.
[0100] In the second implementation, the unique identification information can be directly signed by the user's private key, that is, the unique identification information is encrypted by the user's private key to form a digital signature (i.e., signature information); in the application, the digital signature can be decrypted by the user's public key to obtain a decision tree, and then the unique identification information transmitted from the blockchain network is compared with the unique identification information after decryption of the digital signature to verify the integrity of the data. Since the unique identification information is encrypted and constructed based on the decision tree, the integrity of the decision tree can also be verified by verifying the unique identification information.
[0101] The third implementation method can be based on the user's private key and the set prime number q for signing, and the expression of the signature is: s = x 20 -x 1 *UserID mod q; s represents the signature information; x 1 and x 20 Corresponding to the two values in the user's private key. This method can further enhance the complexity of the signature process and provide guarantees for subsequent authentication.
[0102] In addition, in other embodiments, the password accumulator can be used to encrypt the user's private key to generate a second encryption unit. At the same time, the second encryption unit can also be transmitted to the blockchain network for storage, and the second encryption unit can be deleted locally. In the subsequent application process, the second encryption unit can also be obtained through the blockchain network, and the second encryption unit can be decrypted through the password accumulator stored in itself to obtain the user's private key. It should be noted that in this embodiment, the above-mentioned process that can be decrypted by the user's public key can also be decrypted using the user's private key here.
[0103] Optionally, obtaining multiple identity authentication information input by the first user includes: obtaining multiple identity authentication information input by the first user, and recording the input order of each identity authentication information; accordingly, the above steps match the multiple identity authentication information input by the first user with the decision tree, including: matching the multiple identity authentication information input by the first user with multiple leaf nodes in the decision tree in sequence according to the input order of each identity authentication information; wherein the order of the multiple leaf nodes in the decision tree is the authentication order of the multiple identity authentication methods customized by the user.
[0104] It is understandable that the present application embodiment provides two matching methods based on multiple identity authentication information. The first method is as follows: Figure 3 As shown, the matching process of multiple identity authentication information is a parallel process. As long as the identity authentication information output by the user can be successfully authenticated with the three leaf nodes in the decision tree (the order is not limited), it is determined that the user authentication is successful.
[0105] The second type Figure 4 As shown, on the basis of the above, the authentication order can also be increased, and the order of the leaf nodes of the decision tree is customized by the user. Then, in the actual authentication process, the user must strictly follow the order of the leaf nodes of the decision tree, that is, the fingerprint recognition information must be entered first, then the password, and finally the face recognition can be performed to complete the identity authentication under this method. If the order is wrong, it will be judged as an authentication failure. It can be seen that this method can further improve the security of authentication.
[0106] In summary, the embodiment of the present application proposes a network identity authentication method with customizable authentication. Users can set their own identity authentication decision tree, which contains multiple user-defined authentication methods, such as passwords, fingerprints, etc. The information in the decision tree will be calculated through hash values and XORed with the private key to generate the user's unique identification information. A signature can then be generated based on the unique identification information to ensure the integrity of the authentication information. In addition, both the secret user key and the user public key can be encrypted twice and stored together with the rest of the information in the blockchain network, further improving the security of the authentication. This method makes up for the shortcomings of the existing authentication methods, which are inflexible and have security risks.
[0107] See also Figure 5Based on the same inventive concept, the embodiment of the present application also provides an identity authentication system 50 with a custom authentication method, including: a first acquisition module 501, used to obtain target account information and multiple identity authentication information input by a first user; a second acquisition module 502, used to obtain encrypted information corresponding to the target account information from the blockchain network; the encrypted information includes a first encryption unit and unique identification information; a first decryption module 503, used to use the password accumulator stored in itself to decrypt the first encryption unit to obtain a user public key; a second decryption module 504, used to decrypt the unique identification information based on the user public key to obtain a decision tree; wherein the decision tree includes multiple leaf nodes, each leaf node corresponds to an identity authentication method customized by the user, and each leaf node includes identity authentication information pre-entered by the user; an authentication module 505, used to match the multiple identity authentication information input by the first user with the decision tree, and based on the matching result, determine whether the first user is successfully authenticated.
[0108] See also Figure 6 Based on the same inventive concept, the present application embodiment provides a module frame of an electronic device 600 that applies the above method. The electronic device 600 includes: at least one processor 601 ( Figure 6 Only one is shown), a memory 602, a computer program 603 stored in the memory 602 and executable on at least one processor 601, and when the processor 601 executes the computer program 603, the steps of the method in any of the foregoing embodiments are implemented.
[0109] The electronic device 600 may be a server, a computer, or the like.
[0110] Those skilled in the art will understand that Figure 6 This is merely an example of the electronic device 600 and does not constitute a limitation on the electronic device 600 , which may include more or less components than those shown in the figure, or a combination of certain components, or different components.
[0111] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0112] In some embodiments, the memory 602 may be an internal storage unit of the electronic device 600, such as a hard disk or memory of the electronic device 600. In other embodiments, the memory 602 may also be an external storage device of the electronic device 600, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 600. Further, the memory 602 may also include both an internal storage unit of the electronic device 600 and an external storage device.
[0113] It should be noted that the above-mentioned systems, devices, etc. are based on the same concept as the method embodiments of the present application. The modules designed for the systems, the steps performed by the devices, and the technical effects brought about can all be found in the method embodiment section and will not be repeated here.
[0114] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0115] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0116] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0118] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0119] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein 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.
[0120] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An identity authentication method with a custom authentication method, It is characterized in that include: Obtain target account information and multiple identity authentication information input by the first user; Obtaining encrypted information corresponding to the target account information from the blockchain network; the encrypted information includes a first encryption unit and unique identification information; Decrypting the first encryption unit using the password accumulator stored in the self to obtain the user public key; Decrypting the unique identification information based on the user public key to obtain a decision tree; wherein the decision tree includes a plurality of leaf nodes, each leaf node corresponds to an identity authentication method customized by the user, and each leaf node includes identity authentication information pre-entered by the user; The multiple identity authentication information input by the first user is matched with the decision tree, and based on the matching result, it is determined whether the identity authentication of the first user is successful.
2. The identity authentication method according to claim 1, It is characterized in that The encrypted information also includes signature information; the signature information is configured to use a user private key to sign the decision tree, or is configured to use a user private key to sign the unique identification information; Before matching the multiple identity authentication information input by the first user with the decision tree, the method further includes: Decrypting the signature information based on the user public key to obtain decrypted information; Determine whether the decryption information is authenticated.
3. The identity authentication method according to claim 1, It is characterized in that Before obtaining the account information and multiple identity authentication information input by the user, the method further includes: In response to a registration request from a second user, generating a user private key and a user public key corresponding to the second user; Acquire multiple identity authentication methods customized by the second user and the entered identity authentication information corresponding to each identity authentication method; Based on the multiple identity authentication methods customized by the second user and the identity authentication information entered corresponding to each identity authentication method, a decision tree is constructed; wherein the decision tree includes a plurality of leaf nodes, each leaf node corresponds to an identity authentication method customized by the second user, and each leaf node includes the identity authentication information entered by the second user; Encrypting the decision tree based on a hash function and the user's private key to generate unique identification information corresponding to the second user; The password accumulator is used to encrypt the user public key to generate a first encryption unit corresponding to the second user; The unique identification information and the first encryption unit are transmitted to the blockchain network for storage, and the unique identification information, the decision tree, the user private key, the user public key and the first encryption unit are deleted locally.
4. The identity authentication method according to claim 3, It is characterized in that The step of generating a user private key and a user public key corresponding to the second user in response to a registration request of the second user includes: In response to the registration request of the second user, randomly select a value from 1 to a set prime number to form a sequence of length Q; wherein the sequence is a user private key corresponding to the second user; Q is a positive integer; A user public key corresponding to the second user is generated based on the user private key, the set generator and the set prime number.
5. The identity authentication method according to claim 3, It is characterized in that The step of encrypting the decision tree based on a hash function and a private key of the user to generate unique identification information corresponding to the second user includes: Performing a hash operation on all leaf nodes in the decision tree based on the hash function to obtain a plurality of first hash values; Perform an XOR operation on the first hash value to obtain an XOR result value; Processing the user private key based on the hash function to obtain a second hash value; An XOR operation is performed on the XOR result value and the second Hash value to generate unique identification information corresponding to the second user.
6. The identity authentication method according to claim 3, It is characterized in that The cryptographic accumulator is constructed using a set generator, a set prime number and a non-singular curve; The expression of the password accumulator is: A(a,b)=g E(x1)·E(x2)...E(xn) mod q; Where E represents the non-singular curve, and the expression is y 2 =x 3 +ax+b,x 1 ~x n represents the actual value of the non-singular curve; a represents the coefficient of the non-singular curve, and b represents the constant term of the non-singular curve; A(a,b) represents the cryptographic accumulator, and the subscripts correspond to a and b in the expression of the non-singular curve; g represents the set generator; mod represents the modulo operation; q represents the set prime number.
7. The identity authentication method according to claim 3, It is characterized in that The method further comprises: The decision tree is signed using the user's private key to generate signature information, or the unique identification information is signed using the user's private key to generate signature information; The signature information is transmitted to the blockchain network for storage, and the locally stored signature information is deleted.
8. The identity authentication method according to claim 3, It is characterized in that encrypting the decision tree based on a hash function and a private key of the user to generate unique identification information corresponding to the second user; Randomly select a hash function from the set function library; The decision tree is encrypted based on the hash function and the user private key to generate unique identification information corresponding to the second user.
9. The identity authentication method of the custom authentication method according to claim 1, It is characterized in that Obtain multiple identity authentication information input by the first user, including: Acquire multiple identity authentication information input by the first user, and record the input order of each identity authentication information; The matching of the multiple identity authentication information input by the first user with the decision tree includes: According to the input order of each identity authentication information, the multiple identity authentication information input by the first user is matched with the multiple leaf nodes in the decision tree in sequence; wherein the sequence of the multiple leaf nodes in the decision tree is the authentication order of the multiple identity authentication methods customized by the user.
10. An identity authentication system with a custom authentication method, It is characterized in that include: A first acquisition module, used to acquire target account information and multiple identity authentication information input by a first user; A second acquisition module is used to obtain encrypted information corresponding to the target account information from the blockchain network; the encrypted information includes a first encryption unit and unique identification information; A first decryption module, used to decrypt the first encryption unit using the password accumulator stored in the module to obtain a user public key; A second decryption module is used to decrypt the unique identification information based on the user public key to obtain a decision tree; wherein the decision tree includes a plurality of leaf nodes, each leaf node corresponds to an identity authentication method customized by the user, and each leaf node includes identity authentication information pre-entered by the user; The authentication module is used to match the multiple identity authentication information input by the first user with the decision tree, and determine whether the identity authentication of the first user is successful based on the matching result.
Citation Information
Cited By
Electronic component authentication method and system
CN120012809A
