Authentication method, device and system
By generating unique identification and encrypting authentication information on the server, the problem of identity information leakage in the communication connection between user equipment and server is solved, and a more secure and reliable identity authentication process is achieved.
Patent Information
- Application Number
- CN202510812189.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-18
AI Technical Summary
During the process of establishing a communication connection between the user equipment and the server, the transmitted identity information is easily intercepted, resulting in information leakage, and the security of the existing identity authentication method is low.
By generating a unique identifier on the server, matching the authentication information reserved by the user based on the authentication request, building the item to be authenticated and encrypted, generating the authentication ciphertext, the terminal device displays the key and authentication ciphertext, the user decrypts and encrypts the verification ciphertext, and the server performs identity verification to improve security.
It improves the security and reliability of identity authentication, prevents information leakage, enhances the difficulty and timeliness of the authentication process, and reduces the risk of privacy leakage.
Smart Images

Figure CN120321052B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of identity authentication, and in particular relates to an identity authentication method, device and system. Background Art
[0002] Identity authentication technology is an effective solution for verifying the identity of an operator in a computer network. It primarily includes three methods: 1. Verbal authentication, such as passwords and verification codes; 2. Token authentication, such as digital certificates; and 3. Biometric authentication, such as fingerprint, iris, and facial recognition.
[0003] Authorizing the use of shared devices (shared printers, power banks, charging stations, etc.) and smart devices such as access control systems requires user identity authentication before authorization can be granted. Authorization requires establishing a communication connection between the user's mobile phone and the server corresponding to the smart device to be authorized. The user then uploads their identity information to the server, and after successful authentication on the server, the user is granted access.
[0004] However, during the process of establishing a communication connection between the user device and the server, the transmitted identity information can be easily intercepted, resulting in information leakage. This authentication method has low security. Summary of the Invention
[0005] The purpose of the present invention is to provide an identity authentication method, device and system to solve the problem in the prior art that during the process of establishing a communication connection between a user device and a server, the transmitted identity information is easily intercepted, resulting in information leakage, and the security of this authentication method is low.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides an identity authentication method, which is applied to a server, wherein the server is communicatively connected to a terminal device, and the method comprises:
[0008] Obtaining an authentication request entered by the user on the terminal device, wherein the authentication request is a unique identifier randomly generated on the server based on the user's basic information;
[0009] Matching the authentication information reserved by the user based on the authentication request, wherein the authentication information includes multiple authentication items and authentication content corresponding to each authentication item;
[0010] Constructing an item to be authenticated based on the authentication item, and encrypting the item to be authenticated based on a key of a preset encryption algorithm to obtain an authentication ciphertext;
[0011] The key and authentication ciphertext are sent to a terminal device, which is used to visually display the key and authentication ciphertext. The key and authentication ciphertext are input to a user terminal, which is used to decrypt the authentication ciphertext using the key to obtain the item to be authenticated, and encrypt the authentication content input by the user with reference to the item to be authenticated to obtain the verification ciphertext.
[0012] Obtain the verification ciphertext entered by the user on the terminal device, decrypt the verification ciphertext, and obtain the authentication content entered by the user;
[0013] The authentication content input by the user is authenticated to obtain a verification result, which is then sent to the terminal device. The terminal device is used to grant the user the right to use the terminal device based on the verification result.
[0014] Preferably, the items to be authenticated include a first authentication item and a plurality of second authentication items, and constructing the items to be authenticated based on the authentication items includes:
[0015] Randomly selecting an authentication item from the multiple authentication items of the user as a first authentication item;
[0016] Extract keywords from all authentication items, cluster all keywords, and obtain multiple categories;
[0017] At least two categories are randomly selected from the plurality of categories, and a plurality of second authentication items are generated based on the at least two selected categories.
[0018] Preferably, the authentication content input by the user includes: first content corresponding to the first authentication item and second content corresponding to multiple second authentication items; performing identity authentication on the authentication content input by the user to obtain a verification result includes:
[0019] Comparing the first content with the authentication content corresponding to each authentication item of the user to obtain a first result;
[0020] Calculating similarities between each second content and the authentication content corresponding to each authentication item of the user to obtain a second result;
[0021] Based on the first result and the second result, a verification result is determined.
[0022] Preferably, the terminal device is integrated with a display screen and a camera, and the method further includes:
[0023] The terminal device generates a first identification code including the key and the authentication ciphertext based on the key and the authentication ciphertext, where the first identification code is a barcode and / or a QR code;
[0024] The terminal device visually displays the first identification code through a display screen; the user terminal obtains the key and the authentication ciphertext by scanning the first identification code displayed by the terminal device.
[0025] Preferably, the method further comprises:
[0026] The user terminal generates a second identification code including the verification ciphertext based on the verification ciphertext, where the second identification code is a barcode and / or a QR code, and visually displays the second identification code;
[0027] The camera of the terminal device scans the second identification code displayed by the user terminal to obtain the verification ciphertext;
[0028] The terminal device uploads the verification ciphertext to the server.
[0029] Preferably, the server stores the private key corresponding to each user, decrypts the verification ciphertext, and obtains the authentication content input by the user, including:
[0030] Obtain all private keys, decrypt the verification ciphertext based on all private keys, and determine whether the decryption is successful;
[0031] If not, generate a verification failure prompt and send the verification failure prompt to the terminal device, and the terminal device is used to visually display the verification failure prompt;
[0032] If yes, get the authentication content entered by the user.
[0033] Preferably, the authentication item is encrypted using a key of a preset encryption algorithm to obtain an authentication ciphertext, including:
[0034] Acquisition time based on authentication request;
[0035] Hash the acquired time to obtain the hash value of the time;
[0036] The acquired time and the item to be authenticated are concatenated to obtain plaintext, and the hash value of the time is used as the key of the preset encryption algorithm to encrypt the plaintext to obtain the authentication ciphertext.
[0037] In a second aspect, the present invention provides an identity authentication device for implementing the above-mentioned identity authentication method, the device comprising:
[0038] A request acquisition module is used to acquire an authentication request input by a user on a terminal device, wherein the authentication request is a unique identifier randomly generated on a server based on the user's basic information;
[0039] An authentication matching module, configured to match authentication information reserved by a user based on an authentication request, wherein the authentication information includes multiple authentication items and authentication content corresponding to each authentication item;
[0040] The authentication encryption module is used to construct an item to be authenticated based on the authentication item, and encrypt the item to be authenticated based on a key of a preset encryption algorithm to obtain an authentication ciphertext;
[0041] An authentication sending module, configured to send a key and authentication ciphertext to a terminal device, which is configured to visually display the key and authentication ciphertext, input the key and authentication ciphertext to a user terminal, and decrypt the authentication ciphertext using the key to obtain an item to be authenticated, and encrypt the authentication content input by the user with reference to the item to be authenticated to obtain a verification ciphertext;
[0042] The ciphertext acquisition module is used to obtain the verification ciphertext entered by the user on the terminal device, decrypt the verification ciphertext, and obtain the authentication content entered by the user;
[0043] The identity authentication module is used to authenticate the authentication content input by the user, obtain the authentication result, and send the authentication result to the terminal device. The terminal device is used to grant the user the right to use the terminal device based on the authentication result.
[0044] In a third aspect, the present invention provides an identity authentication system, comprising: a server, a terminal device, and a user terminal, wherein the server is communicatively connected to the terminal device, and the server is configured to implement the above-mentioned identity authentication method;
[0045] The user terminal is used to input a key and an authentication ciphertext, decrypt the authentication ciphertext using the key to obtain an item to be authenticated, and encrypt the authentication content input by the user with reference to the item to be authenticated to obtain a verification ciphertext.
[0046] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned identity authentication method when executed by a processor.
[0047] Beneficial effects:
[0048] 1. The present invention improves the security and reliability of identity authentication by inputting an authentication request and a verification ciphertext on a terminal device. At this time, the user terminal does not establish a communication connection with the terminal device, nor does it establish a communication connection with the server. The user terminal only provides an input key and an authentication ciphertext, decrypts the authentication ciphertext using the key to obtain the item to be authenticated, and encrypts the authentication content input by the user with reference to the item to be authenticated to obtain the verification ciphertext.
[0049] 2. The present invention only sends the authentication items in the authentication information to the terminal device, and the authentication content corresponding to the authentication items is stored on the server; even if the authentication items are stolen, it will not cause privacy leakage, and the authentication items are also encrypted using an encryption algorithm, which can further improve security. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:
[0051] Figure 1 is a flow chart of an identity authentication method provided by one embodiment of the present invention;
[0052] Figure 2 is a block diagram of an identity authentication device provided by one embodiment of the present invention;
[0053] Figure 3 It is a block diagram of an identity authentication system provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be briefly introduced below in conjunction with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0055] Example 1
[0056] Figure 1 This is a flow chart of an identity authentication method provided by one embodiment of the present invention. Figure 1 As shown, this embodiment provides an identity authentication method, which is applied to a server. The server is communicatively connected to a terminal device. In this embodiment, the terminal device can be a shared device (such as a shared printer, a power bank, and a charging station) or a smart device such as an access control system. A user obtains permission to use the smart device through identity authentication. For example, after identity authentication, the user obtains permission to use the printer. The method runs on the server and includes the following steps:
[0057] Step S10: Acquire an authentication request input by the user on the terminal device, where the authentication request is a unique identifier randomly generated on the server based on the basic information of the user.
[0058] In this embodiment, when each user needs to use the terminal device, he needs to access the server in advance to register and upload the user's basic information (for example, name, gender, age, identity information, contact information, etc.) to the server. The server randomly generates a unique identifier based on the user's basic information. The unique identifier is a string that is bound to the user and returns this unique identifier to the user, who can save it locally.
[0059] When the same type of smart device needs to be used, the user only needs to enter the unique identifier into the smart device, and the smart device will upload the unique identifier to the server. The server can then start the identity authentication process and begin authenticating the user's identity.
[0060] In this embodiment, the terminal device may be integrated with an input keyboard or camera, and the input keyboard may be used to input the unique identifier. Furthermore, to improve the efficiency of inputting the unique identifier, the user terminal may convert the unique identifier into a barcode or a QR code, use the camera on the terminal device to obtain the unique identifier in the barcode or QR code, and upload the recognized unique identifier to the server.
[0061] Step S20: matching the authentication information reserved by the user based on the authentication request, wherein the authentication information includes multiple authentication items and authentication content corresponding to each authentication item.
[0062] In this embodiment, after registration, the user needs to reserve some authentication information, such as: authentication password, authentication security, etc. The authentication password and authentication security are used as authentication items, and the specific password and security content are used as authentication content corresponding to the authentication items.
[0063] Step S30: Construct an item to be authenticated based on the authentication item, and encrypt the item to be authenticated based on a key of a preset encryption algorithm to obtain an authentication ciphertext. In this embodiment, an authentication item can be randomly selected from all authentication items of the user as the item to be authenticated.
[0064] In this embodiment, users typically set multiple authentication items. The greater the number of authentication items, the more likely they are to forget the corresponding authentication content. Therefore, randomly selecting an authentication item increases the probability of authentication failure, forcing users to repeat authentication. Furthermore, the authentication content reserved on different servers may vary, further increasing the difficulty of authentication.
[0065] In this regard, the items to be authenticated in this embodiment include a first authentication item and multiple second authentication items. Constructing the items to be authenticated based on the authentication items includes:
[0066] Step a10: Randomly select an authentication item from the multiple authentication items of the user as the first authentication item.
[0067] Step a20: Extract keywords from all authentication items, cluster all keywords, and obtain multiple categories; for example: the authentication password set by the user is: my favorite food is xx, my least favorite food is xx, my favorite cat is xx, my best friend is xx, etc. The specific content set by each user is different; keywords such as food, friends, cats, etc. can be extracted, and then these keywords can be clustered to obtain categories: for example: food, pets, relatives and friends, etc.
[0068] Step a30: Randomly select at least two categories from multiple categories, and generate multiple second authentication items based on the at least two selected categories. When selecting categories, this embodiment selects at least one category from the user's categories, and then selects at least one category from the categories of other users as an interference item. Finally, a second authentication item is generated based on the selected categories. The second authentication item is an optional item for the user. If the user forgets the specific content of the first authentication item, the user can fill in the specific content in the optional item for auxiliary authentication.
[0069] Step S40: Send the key and authentication ciphertext to the terminal device, which is used to visually display the key and authentication ciphertext, input the key and authentication ciphertext to the user terminal, and the user terminal is used to use the key to decrypt the authentication ciphertext to obtain the item to be authenticated, encrypt the authentication content input by the user with reference to the item to be authenticated, and obtain the verification ciphertext.
[0070] In this embodiment, the terminal device is integrated with a display screen and a camera, and the display screen can be used to display the key and the authentication ciphertext. Secondly, in order to improve the convenience of inputting the key and the authentication ciphertext into the user terminal, the method further includes:
[0071] Step b10: The terminal device generates a first identification code including the key and the authentication ciphertext based on the key and the authentication ciphertext, where the first identification code is a barcode and / or a QR code;
[0072] Step b20: the terminal device visually displays the first identification code through a display screen; the user terminal obtains the key and the authentication ciphertext by scanning the first identification code displayed by the terminal device.
[0073] Step S50: Obtain the verification ciphertext input by the user on the terminal device, decrypt the verification ciphertext, and obtain the authentication content input by the user.
[0074] In this embodiment, the server stores the private key corresponding to each user, decrypts the verification ciphertext, and obtains the authentication content entered by the user, including:
[0075] Step S501: Obtain all private keys, decrypt the verification ciphertext based on all private keys, and determine whether the decryption is successful;
[0076] Step S502: If not, generate a verification failure prompt, and send the verification failure prompt to the terminal device, and the terminal device is used to visually display the verification failure prompt;
[0077] Step S503: If yes, obtain the authentication content input by the user.
[0078] Similarly, in order to improve the convenience of inputting the verification ciphertext into the terminal device, the method further includes:
[0079] Step c10: The user terminal generates a second identification code including the verification ciphertext based on the verification ciphertext, where the second identification code is a barcode and / or a QR code, and displays the second identification code visually;
[0080] Step c20: The camera of the terminal device scans the second identification code displayed by the user terminal to obtain the verification ciphertext;
[0081] Step c30: The terminal device uploads the verification ciphertext to the server.
[0082] Step S60: authenticating the authentication content input by the user, obtaining a verification result, and sending the verification result to the terminal device. The terminal device is used to grant the user the right to use the terminal device according to the verification result.
[0083] In this embodiment, the authentication content input by the user includes: first content corresponding to the first authentication item and second content corresponding to multiple second authentication items; performing identity authentication on the authentication content input by the user to obtain a verification result includes:
[0084] Step S601: Compare the first content with the authentication content corresponding to each authentication item of the user to obtain a first result;
[0085] Step S602: Calculating the similarity between each second content and the authentication content corresponding to each authentication item of the user to obtain a second result;
[0086] Step S603: Determine a verification result based on the first result and the second result.
[0087] In this embodiment, when the first result is that the first content exists in the authentication content corresponding to each authentication item, it indicates that the verification is passed, and the user is granted the right to use the terminal device.
[0088] When the first result is that the first content does not exist in the authentication content corresponding to each authentication item, auxiliary authentication needs to be performed in combination with the second content.
[0089] For example: in step a30, two categories are selected, relatives and friends, and food; among them, only the category "relatives and friends" that exists in the authentication information reserved by the user is used as the real item, and "food" is an interference item. The categories of these authentication items are used to prompt the relevance of the security questions. The user can flexibly answer according to the usual setting habits, and the content of these answers is used as the second content; at this time, the similarity between the second content and the authentication content corresponding to each authentication item of the user is calculated. When the similarity is higher than the threshold, it means that the user answered correctly and the authentication is passed; at the same time, the number of answers of the user is also used to determine whether the authentication is passed. For example; if the interference item is not answered and the similarity of the answer content is high, it can be considered that the verification is passed; the more interference items are answered (even if the similarity of the real item answers is high), it can be considered that the authentication failed.
[0090] Therefore, the present invention improves the security and reliability of identity authentication by inputting an authentication request and a verification ciphertext on the terminal device. At this time, the user end will not establish a communication connection with the terminal device, nor will it establish a communication connection with the server. The user end only provides an input key and an authentication ciphertext, and uses the key to decrypt the authentication ciphertext to obtain the item to be authenticated, encrypts the authentication content input by the user with reference to the item to be authenticated, and obtains the verification ciphertext, etc.; and only the authentication item in the authentication information is sent to the terminal device, and the authentication content corresponding to the authentication item is stored on the server; if the authentication item is stolen, it will not cause privacy leakage, and the authentication item is also encrypted using an encryption algorithm, which can further improve security.
[0091] As a further optimization of this embodiment, in step S30, encrypting the item to be authenticated based on a key of a preset encryption algorithm to obtain an authentication ciphertext includes:
[0092] Step d10: Acquisition time based on the authentication request.
[0093] Step d20: Hash the acquisition time to obtain a hash value of the time; this embodiment uses the MD5 algorithm to hash the acquisition time; the MD5 algorithm is a widely used digest algorithm. It is a common hash function used to convert data input of any length into a fixed-length output of 128 bits, and has the characteristics of irreversibility, data integrity, and non-repudiation.
[0094] Step d30: Concatenate the acquired time and the item to be authenticated to obtain plaintext, and use the hash value of the time as the key of the preset encryption algorithm to encrypt the plaintext to obtain authentication ciphertext. The preset encryption algorithm is an asymmetric encryption algorithm, such as the RSA algorithm, the ECC algorithm, etc.
[0095] In this embodiment, the acquisition time is dynamically changed, and each generated authentication ciphertext is encrypted using a different key. Even if an attacker intercepts the authentication ciphertext, he cannot replay the attack in a short time because the key has changed.
[0096] Since the plain text contains the acquisition time, if the user does not respond within the specified time and enters the authentication ciphertext into the terminal device, it can be determined that the authentication has failed, ensuring the timeliness of the authentication.
[0097] Example 2
[0098] Figure 2 FIG is a block diagram of an identity authentication device provided by an embodiment of the present invention. Figure 2 As shown, this embodiment provides an identity authentication device for implementing the identity authentication method in Example 1, the device comprising:
[0099] A request acquisition module is used to acquire an authentication request input by a user on a terminal device, wherein the authentication request is a unique identifier randomly generated on a server based on the user's basic information;
[0100] An authentication matching module, configured to match authentication information reserved by a user based on an authentication request, wherein the authentication information includes multiple authentication items and authentication content corresponding to each authentication item;
[0101] The authentication encryption module is used to construct an item to be authenticated based on the authentication item, and encrypt the item to be authenticated based on a key of a preset encryption algorithm to obtain an authentication ciphertext;
[0102] An authentication sending module, configured to send a key and authentication ciphertext to a terminal device, which is configured to visually display the key and authentication ciphertext, input the key and authentication ciphertext to a user terminal, and decrypt the authentication ciphertext using the key to obtain an item to be authenticated, and encrypt the authentication content input by the user with reference to the item to be authenticated to obtain a verification ciphertext;
[0103] The ciphertext acquisition module is used to obtain the verification ciphertext entered by the user on the terminal device, decrypt the verification ciphertext, and obtain the authentication content entered by the user;
[0104] The identity authentication module is used to authenticate the authentication content input by the user, obtain the authentication result, and send the authentication result to the terminal device. The terminal device is used to grant the user the right to use the terminal device based on the authentication result.
[0105] The present invention improves the security and reliability of identity authentication by inputting an authentication request and a verification ciphertext on a terminal device. At this time, the user end will not establish a communication connection with the terminal device, nor will it establish a communication connection with the server. The user end only provides an input key and an authentication ciphertext, uses the key to decrypt the authentication ciphertext to obtain the item to be authenticated, encrypts the authentication content input by the user with reference to the item to be authenticated, obtains the verification ciphertext, etc.; and only the authentication item in the authentication information is sent to the terminal device, and the authentication content corresponding to the authentication item is stored on the server; even if the authentication item is stolen, it will not cause privacy leakage, and the authentication item is also encrypted using an encryption algorithm, which can further improve security.
[0106] Example 3
[0107] Figure 3 FIG. 1 is a block diagram of an identity authentication system provided by an embodiment of the present invention. Figure 3 As shown, this embodiment provides an identity authentication system, which includes: a server, a terminal device and a user terminal, wherein the server is in communication with the terminal device and is used to implement the identity authentication method in the first embodiment;
[0108] The user terminal is used to input a key and an authentication ciphertext, decrypt the authentication ciphertext using the key to obtain an item to be authenticated, and encrypt the authentication content input by the user with reference to the item to be authenticated to obtain a verification ciphertext.
[0109] The present invention improves the security and reliability of identity authentication by inputting an authentication request and a verification ciphertext on a terminal device. At this time, the user end will not establish a communication connection with the terminal device, nor will it establish a communication connection with the server. The user end only provides an input key and an authentication ciphertext, uses the key to decrypt the authentication ciphertext to obtain the item to be authenticated, encrypts the authentication content input by the user with reference to the item to be authenticated, obtains the verification ciphertext, etc.; and only the authentication item in the authentication information is sent to the terminal device, and the authentication content corresponding to the authentication item is stored on the server; even if the authentication item is stolen, it will not cause privacy leakage, and the authentication item is also encrypted using an encryption algorithm, which can further improve security.
[0110] Example 4
[0111] This embodiment further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the identity authentication method in the first embodiment is implemented.
[0112] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the identity authentication method in the first embodiment is implemented.
[0113] The present invention improves the security and reliability of identity authentication by inputting an authentication request and a verification ciphertext on a terminal device. At this time, the user end will not establish a communication connection with the terminal device, nor will it establish a communication connection with the server. The user end only provides an input key and an authentication ciphertext, uses the key to decrypt the authentication ciphertext to obtain the item to be authenticated, encrypts the authentication content input by the user with reference to the item to be authenticated, obtains the verification ciphertext, etc.; and only the authentication item in the authentication information is sent to the terminal device, and the authentication content corresponding to the authentication item is stored on the server; even if the authentication item is stolen, it will not cause privacy leakage, and the authentication item is also encrypted using an encryption algorithm, which can further improve security.
[0114] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0116] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. An identity authentication method, characterized in that: The method is applied to a server, the server being communicatively connected to a terminal device, and the method includes: Obtaining an authentication request input by a user on a terminal device, wherein the authentication request is a unique identifier randomly generated on a server based on basic information of the user, and the terminal device is integrated with a display screen and a camera; Matching the authentication information reserved by the user based on the authentication request, wherein the authentication information includes multiple authentication items and authentication content corresponding to each authentication item; Constructing an item to be authenticated based on the authentication item, and encrypting the item to be authenticated based on a key of a preset encryption algorithm to obtain an authentication ciphertext; the item to be authenticated includes a first authentication item and multiple second authentication items, and constructing the item to be authenticated based on the authentication item includes: Randomly selecting an authentication item from the multiple authentication items of the user as a first authentication item; Extract keywords from all authentication items, cluster all keywords, and obtain multiple categories; randomly selecting at least two categories from a plurality of categories, and generating a plurality of second authentication items based on the at least two selected categories; The key and authentication ciphertext are sent to a terminal device, which is used to visually display the key and authentication ciphertext. The key and authentication ciphertext are input to a user terminal, which is used to decrypt the authentication ciphertext using the key to obtain the item to be authenticated, and encrypt the authentication content input by the user with reference to the item to be authenticated to obtain the verification ciphertext. Based on the verification ciphertext, the user terminal generates a second identification code containing the verification ciphertext, the second identification code being a barcode and / or a QR code, and visually displays the second identification code; the terminal device's camera scans the second identification code displayed by the user terminal to obtain the verification ciphertext, and the terminal device uploads the verification ciphertext to the server, decrypts the verification ciphertext, and obtains the authentication content entered by the user; The authentication content input by the user is authenticated to obtain a verification result, which is then sent to the terminal device. The terminal device is used to grant the user the right to use the terminal device based on the verification result.
2. The identity authentication method according to claim 1, wherein: The authentication content input by the user includes: first content corresponding to the first authentication item and second content corresponding to multiple second authentication items; performing identity authentication on the authentication content input by the user to obtain a verification result, including: Comparing the first content with the authentication content corresponding to each authentication item of the user to obtain a first result; Calculating similarities between each second content and the authentication content corresponding to each authentication item of the user to obtain a second result; Based on the first result and the second result, a verification result is determined.
3. The identity authentication method according to claim 1, wherein: The method further comprises: The terminal device generates a first identification code including the key and the authentication ciphertext based on the key and the authentication ciphertext, where the first identification code is a barcode and / or a QR code; The terminal device visually displays the first identification code through a display screen; the user terminal obtains the key and the authentication ciphertext by scanning the first identification code displayed by the terminal device.
4. The identity authentication method according to claim 1, wherein: The server stores the private key corresponding to each user, decrypts the verification ciphertext, and obtains the authentication content entered by the user, including: Obtain all private keys, decrypt the verification ciphertext based on all private keys, and determine whether the decryption is successful; If not, generate a verification failure prompt and send the verification failure prompt to the terminal device, and the terminal device is used to visually display the verification failure prompt; If so, get the authentication content entered by the user.
5. The identity authentication method according to any one of claims 1 to 4, characterized in that: The key of the preset encryption algorithm is used to encrypt the authentication item to obtain the authentication ciphertext, including: Acquisition time based on authentication request; Hash the acquired time to obtain the hash value of the time; The acquired time and the item to be authenticated are concatenated to obtain plaintext, and the hash value of the time is used as the key of the preset encryption algorithm to encrypt the plaintext to obtain the authentication ciphertext.
6. An identity authentication device for implementing the identity authentication method according to any one of claims 1 to 5, characterized in that: The device comprises: A request acquisition module is used to acquire an authentication request input by a user on a terminal device, wherein the authentication request is a unique identifier randomly generated on a server based on the user's basic information; An authentication matching module, configured to match authentication information reserved by a user based on an authentication request, wherein the authentication information includes multiple authentication items and authentication content corresponding to each authentication item; The authentication encryption module is used to construct an item to be authenticated based on the authentication item, and encrypt the item to be authenticated based on a key of a preset encryption algorithm to obtain an authentication ciphertext; An authentication sending module, configured to send a key and authentication ciphertext to a terminal device, which is configured to visually display the key and authentication ciphertext, input the key and authentication ciphertext to a user terminal, and decrypt the authentication ciphertext using the key to obtain an item to be authenticated, and encrypt the authentication content input by the user with reference to the item to be authenticated to obtain a verification ciphertext; The ciphertext acquisition module is used to obtain the verification ciphertext entered by the user on the terminal device, decrypt the verification ciphertext, and obtain the authentication content entered by the user; The identity authentication module is used to authenticate the authentication content input by the user, obtain the authentication result, and send the authentication result to the terminal device. The terminal device is used to grant the user the right to use the terminal device based on the authentication result.
7. An identity authentication system, characterized in that: The system comprises: a server, a terminal device and a user terminal, wherein the server is in communication with the terminal device, and the server is used to implement the identity authentication method according to any one of claims 1 to 5; The user terminal is used to input a key and an authentication ciphertext, decrypt the authentication ciphertext using the key to obtain an item to be authenticated, and encrypt the authentication content input by the user with reference to the item to be authenticated to obtain a verification ciphertext.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the identity authentication method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Identity authentication method and device thereof, electronic equipment and storage medium
CN113645257A
Method for authenticating a user to a machine
US20150371214A1