Terminal authentication method, device, electronic device and storage medium
By receiving and verifying the verification information and signature information between terminals, CPK technology is used to generate a public key matrix and directly determine the public key information of the terminal, solving the problems of large data volume and low efficiency in the existing technology, and realizing certificate-less interaction. Terminal authentication improves efficiency and reduces costs.
Patent Information
- Application Number
- CN202211000038.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-08-19
AI Technical Summary
Existing entity identification mechanisms, such as password authentication and third-party certificate authentication, have problems such as large data volume, slow encryption and decryption operations, and long time consumption. This results in low identification efficiency and requires the participation of the CA system, which increases construction costs.
By receiving and verifying the verification information and signature information sent between terminals, CPK technology is used to generate a public key matrix to directly determine the public key information of the terminal, realize terminal authentication without certificate interaction, reduce the amount of data transmission, improve efficiency, and avoid the CA system participation.
It enables terminal authentication without the need for interactive certificates, reduces the amount of data transmitted during entity authentication, improves authentication efficiency, and reduces the construction cost of the entire authentication system.
Smart Images

Figure CN115549961B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of terminal authentication, and in particular to a terminal authentication method, device, electronic equipment and storage medium. Background Art
[0002] In the field of communications, before entities communicate, in order to ensure communication security, entity authentication needs to be performed on both communicating entities.
[0003] At present, commonly used entity authentication mechanisms include password authentication mechanism and third-party certificate authentication mechanism. The password authentication mechanism has the problems of difficulty in random password generation, limited password length, and easy duplication, which is not suitable for use in large-scale information networks; while the third-party certificate authentication mechanism requires the issuance of certificates by the CA (Certificate Authority) system before the entity is authenticated. During the entity authentication process, it is usually necessary to exchange certificates to verify the authenticity and validity of the certificates. Due to the need to exchange certificates, the amount of data transmitted during the authentication process is large. In addition, the encryption and decryption operations during the authentication process are slow and time-consuming, resulting in low authentication efficiency. Summary of the invention
[0004] In view of the above problems, a terminal authentication method, device, electronic device and storage medium are proposed to overcome the above problems or at least partially solve the above problems, including:
[0005] A terminal authentication method, applied to a second terminal, the method comprising:
[0006] Receiving first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal;
[0007] Determine first identification information for the first terminal from the first verification information;
[0008] Determine first public key information of the first terminal according to the first identification information;
[0009] The first signature information is verified based on the first public key information.
[0010] Optionally, after the second terminal verifies the first signature information based on the first public key information, the method further includes:
[0011] generating a first verification result of the first terminal;
[0012] Generate second verification information and second signature information according to the first verification result; wherein the second verification information includes a second terminal identifier and the first verification result, and the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal;
[0013] The second verification information and the second signature information are sent to the first terminal, so that the first terminal authenticates the second terminal.
[0014] Optionally, the determining the first public key information of the first terminal according to the first identification information includes:
[0015] Acquire a first public key matrix generated by encrypting the first identification information using the CPK technology;
[0016] Determine the first public key information of the first terminal corresponding to the first identification information from the first public key matrix.
[0017] A terminal authentication method, applied to a first terminal, the method comprising:
[0018] Sending first verification information and first signature information to a second terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal, so that the second terminal authenticates the first terminal according to the first verification information and the first signature information;
[0019] Receiving second verification information and second signature information sent by the second terminal; wherein the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal;
[0020] Determining second identification information for the second terminal from the second verification information;
[0021] Determine the second public key information of the second terminal according to the second identification information;
[0022] The second signature information is verified based on the second public key information.
[0023] Optionally, the second verification information further includes a first verification result obtained after the second terminal performs entity authentication on the first terminal, and after the first terminal verifies the second signature information based on the second public key information, further includes:
[0024] generating a second verification result of the second terminal;
[0025] When the second verification result is successful, obtaining the first verification result from the second verification information;
[0026] When the first verification result is verification success, it is confirmed that the entity verification between the first terminal and the second terminal is successful.
[0027] Optionally, the determining the second public key information of the second terminal according to the second identification information includes:
[0028] Acquire a second public key matrix generated by encrypting the second identification information using the CPK technology;
[0029] Determine the second public key information of the second terminal corresponding to the second identification information from the second public key matrix.
[0030] A terminal authentication device, applied to a second terminal, comprising:
[0031] A first information receiving module, configured to receive first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal;
[0032] A first identification determination module, configured to determine first identification information for the first terminal from the first verification information;
[0033] A first public key determination module, configured to determine first public key information of the first terminal from a first public key matrix corresponding to the first identification information;
[0034] The first signature verification module is used to verify the first signature information based on the first public key information.
[0035] A terminal authentication device, applied to a first terminal, comprising:
[0036] A first information sending module, configured to send first verification information and first signature information to a second terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal, so that the second terminal authenticates the first terminal according to the first verification information and the first signature information;
[0037] A second information receiving module, configured to receive second verification information and second signature information sent by a second terminal; wherein the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal;
[0038] A second identification determination module, configured to determine second identification information for the second terminal from the second verification information;
[0039] A second public key determination module, used to determine the second public key information of the second terminal from a second public key matrix corresponding to the second identification information;
[0040] The second signature verification module is used to verify the second signature information based on the second public key information.
[0041] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the terminal authentication method as described above when executed by the processor.
[0042] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the terminal authentication method described above is implemented.
[0043] The embodiments of the present invention have the following advantages:
[0044] In an embodiment of the present invention, a second terminal receives first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal; first identification information for the first terminal is determined from the first verification information; first public key information of the first terminal is determined based on the first identification information; and the first signature information is verified based on the first public key information, thereby realizing authentication between terminals without the need for interactive certificates, reducing the amount of data transmitted during entity authentication, improving authentication efficiency, and not requiring the participation of a CA system, which can reduce the construction cost of the entire authentication system. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0046] Figure 1 It is a flowchart of the steps of a terminal authentication method provided by one embodiment of the present invention;
[0047] Figure 2a is a flowchart of another terminal authentication method provided by an embodiment of the present invention;
[0048] Figure 2b This is a simplified diagram of a terminal authentication process provided by an embodiment of the present invention;
[0049] Figure 2cis another terminal authentication flow chart provided by an embodiment of the present invention;
[0050] Figure 3 It is a schematic diagram of the structure of a terminal authentication device provided by an embodiment of the present invention;
[0051] Figure 4 It is a schematic diagram of the structure of another terminal authentication device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] Reference Figure 1 , shows a flowchart of a terminal authentication method provided by an embodiment of the present invention, which is applied to a second terminal and may specifically include the following steps:
[0054] Step 101, receiving first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal;
[0055] Among them, the first terminal is a physical terminal, which can be specifically a visual network terminal; the second terminal is a physical terminal, which can be specifically a visual network physical terminal.
[0056] The first terminal and the second terminal may be two terminals to be communicating. In order to ensure the communication security between the first terminal and the second terminal, it is necessary to completely perform entity verification between the first terminal and the second terminal before the first terminal communicates with the second terminal, that is, the first terminal needs to confirm whether the second terminal is the communication terminal designated by the first terminal; the second terminal needs to determine whether the first terminal is the communication terminal designated by the second terminal, wherein different designated terminals can be set in the first terminal and the second terminal according to different data to be communicated.
[0057] Authentication is a security mechanism that confirms the identity of an entity by exchanging information. Its purpose is to prevent other entities from occupying and independently operating the identity of an entity, that is, to prevent impersonation. Impersonation means that an entity pretends to be another entity. Impersonation is usually used together with other attack methods (such as modification). Authentication mechanisms can be used to combat impersonation.
[0058] Authentication can be divided into message authentication and entity authentication; among them, message authentication: authenticate that the received message is indeed sent by the sender of the message, and not forged or tampered by others, so that message authentication can include endpoint authentication and message integrity authentication. Message authentication is to authenticate the sender of each received message; entity authentication (i.e. entity authentication): only authenticate the entity that sends the message. The entity can be a person, a device or a process. Entity authentication only needs to verify the other entity communicating with itself once during the entire duration of system access. Entity authentication occurs before the entity communicates to ensure communication security.
[0059] Among them, the first verification information can be generated by the first terminal and sent by the first terminal to the second terminal so that the second terminal can authenticate the first terminal. The first verification information can be generated by the first terminal assembling the first identification information of the first terminal and the second identification information of the second terminal according to a preset verification information format. The first identification information can be the MAC number of the first terminal, and the second identification information can be the MAC number of the second terminal. The MAC number is the unique identification of the terminal.
[0060] Among them, the terminal can pre-establish a mapping relationship between the identification information and the public key information of the terminal to be communicated with, so that the public key information of the terminal to be communicated can be determined through the identification information. The unique identification of the terminal is used for public key search, which can quickly locate the public key and greatly reduce the amount of data transmitted during the authentication process.
[0061] For example, the first identification information can be used to generate a first public key matrix, and the second identification information can be used to generate a second public key matrix. The first public key matrix pre-stores a mapping relationship between the first identification information of the first terminal and the first public key information, and the second public key matrix pre-stores a mapping relationship between the second identification information of the second terminal and the second public key information. The public key of the terminal can be determined through the identification information to achieve authentication of the terminal.
[0062] The first signature information may be generated by the first terminal performing a cryptographic operation on its own first private key information and the first verification information according to a preset signature algorithm and outputting the result in a preset signature information format.
[0063] During the process of the second terminal performing entity authentication on the first terminal, the first terminal can generate first verification information based on the first identification information of the first terminal and the pre-stored second identification information of the second terminal to communicate with it, and the first private key information of the first terminal can be obtained, so that the first verification information can be signed according to the first private key information to obtain the first signature information.
[0064] After the first terminal generates the first verification information and the first signature information, the first terminal can send the first verification information and the first signature information to the second terminal, so that the second terminal receives the first verification information and the first signature information, and verifies the first terminal based on the first verification information and the first signature information to confirm whether the first terminal that sends the first verification information and the first signature information is the terminal that the second terminal is ready to communicate with.
[0065] In one embodiment of the present invention, before step 101, the following steps may also be included:
[0066] After receiving the entity verification request sent by the first terminal, the second terminal generates a first random number; and sends the first random number to the first terminal, so that the first terminal generates first verification information based on the first random number.
[0067] In actual applications, during the entity authentication process between the first terminal and the second terminal, the first terminal can send an entity authentication request to the second terminal. When the second terminal receives the entity authentication request, it can generate a first random number and save the first random number. The second terminal can also send the first random number to the first terminal, and the first terminal can generate first verification information based on the received first random number.
[0068] Among them, the first random number can be used to prevent replay attacks. When the second terminal receives the first verification information, the second terminal can also confirm whether the first random number information has been tampered with by verifying the first random number information obtained from the first verification information, thereby confirming whether the received first verification information has been tampered with during the transmission process, thereby confirming the security of the data transmission process.
[0069] In one example, after receiving a first random number, the first terminal is used to generate a second random number, obtain first identification information of the first terminal and second identification information of the second terminal stored in advance, assemble the first random number, the second random number, the first identification information and the second identification information according to a preset format to obtain first verification information, obtain first private key information of the first terminal, sign the first verification information according to the first private key information, and generate first signature information.
[0070] In actual applications, the first terminal can generate a second random number and store the second random number when receiving the first random number sent by the second terminal. Then, the first terminal can determine the first identification information of the first terminal and the pre-stored second identification information of the second terminal with which it can communicate. Then, the first terminal can assemble the first random number, the second random number, the first identification information and the second identification information according to the preset verification information format to generate the first verification information.
[0071] The first terminal may also store the first private key information of the first terminal, so that the first terminal can sign the first verification information according to the first private key information, that is, after performing a cryptographic operation on the first private key information and the first verification information according to a preset signature algorithm, the result is output according to a preset signature format to obtain the first signature information.
[0072] The second random number can be used to prevent replay attacks. When the first terminal receives information containing the second random number sent by the second terminal, it can confirm whether the second random number information has been tampered with by verifying the second random number information, thereby confirming the security of the data transmission process.
[0073] It should be noted that the verification information format, preset signature algorithm and signature information format can be set according to the data transmission requirements of the terminal, and the verification information format, preset signature algorithm and signature information format are not limited in the embodiments of the present invention.
[0074] In another embodiment of the present invention, it also includes:
[0075] After receiving the first verification information sent by the first terminal, the first random number information in the first verification information is determined, and the first random number information is verified.
[0076] In actual applications, when the second terminal receives the first verification information sent by the first terminal, it can obtain the first random number stored in the second terminal, and extract the first random number information from the first verification information, and match the two to verify the first random number. When the two match, it can be confirmed that the verification result of the first random number information is successful verification; when the two do not match, the verification result of the first random number information is failed verification.
[0077] Step 102: determining first identification information for the first terminal from the first verification information;
[0078] After the second terminal receives the first verification information, the first verification information may include the first identification information of the first terminal, so that the second terminal can parse the first verification information to obtain the first identification information of the first terminal, so as to determine the public key information of the first terminal, and facilitate the signature verification. The first identification information may be the MAC number of the first terminal, which is the unique identification of the terminal, and can realize entity authentication before the two entities communicate, and ensure the security of data transmission.
[0079] Step 103: determining first public key information of the first terminal according to the first identification information;
[0080] After determining the first identification information, since the second terminal pre-stores the mapping relationship between the identification information and the public key information of the terminal communicating with it, the first public key information of the first terminal corresponding to the first identification information can be found based on the mapping relationship according to the first identification information.
[0081] In an embodiment of the present invention, step 103 may include:
[0082] Acquire a first public key matrix generated by encrypting the first identification information using the CPK technology; and determine the first public key information of the first terminal corresponding to the first identification information from the first public key matrix.
[0083] In practical applications, the second terminal may pre-store a first public key matrix for the terminal to be communicated with, in which a mapping relationship between the first identification information of the first terminal and the first public key information is pre-stored. After the second terminal parses and obtains the first tag information, it may search and match in the first public key matrix according to the first tag information to determine the first public key information corresponding to the first tag information, so as to further verify the first terminal through the first public key information.
[0084] The first public key matrix is a public key matrix generated by encrypting the first identification information using the CPK technology.
[0085] The first identification information based on the first terminal can be pre-stored in the second terminal, and then encrypted through CPK (Combined Public Key Cryptosystem) technology to generate a first public key matrix corresponding to the first tag information. In the first public key matrix, the mapping relationship between the first identification information and the first public key information of the first terminal can be stored.
[0086] Among them, CPK is a cryptographic system composed of a combination matrix and a split key sequence based on elliptic curve cryptography. The CPK key management system is a discrete logarithm problem-based key generation and management system. It constructs public key and private key matrices based on the mathematical principles of the discrete logarithm problem, and uses hash functions and cryptographic transformations to map the entity's identity to a sequence of row and column coordinates of the matrix, which is used to select and combine matrix elements, and generate a large number of public and private key pairs composed of public keys and private keys, thereby realizing ultra-large-scale key production and distribution based on identity.
[0087] By generating a public key matrix through CPK technology, large-scale keys can be generated with very small resources, saving storage space and improving authentication efficiency.
[0088] Step 104: verify the first signature information based on the first public key information.
[0089] After the second terminal obtains the first public key information, the second terminal may verify the first signature information based on the first public key information.
[0090] Specifically, the first signature information is generated by signing the first verification information based on the first private key information of the first terminal, and the first public key information is obtained at the second terminal. In addition, the second terminal also receives the first verification information, so that the first signature information can be verified based on the first public key information and the first verification information. By verifying the first signature information, the second terminal can confirm the identity of the first terminal. If the first signature information is successfully verified, the second terminal confirms that the first terminal is an entity that the second terminal can communicate with. If the first signature information verification fails, the second terminal confirms that the first terminal is not an entity that the second terminal can communicate with.
[0091] Entity terminal verification is performed through the public key matrix established through terminal identification. It can quickly realize verification between entities with a very small amount of data transmission without the help of a third-party verification system, thereby ensuring the security of entity communications.
[0092] In one embodiment of the present invention, after step 104, the following steps may also be included:
[0093] Step 105, generating a first verification result of the first terminal;
[0094] In actual applications, after verifying the first signature information, the second terminal may generate a first verification result of the first terminal, wherein the first verification result may include a verification result of the first random number information and / or a verification result of the first signature information.
[0095] For example, when the second terminal verifies the first terminal based on the first verification information and the first signature information, the verification process may include verification of the first signature information, and the first verification result is the verification result of the first signature information, that is, the first signature information verification is successful or the first signature information verification fails.
[0096] When the verification process includes first random number information verification and first signature information verification, the first verification result is the verification result of the first random number information and the verification result of the first signature information, that is, the first random number information verification is successful or the first random number information verification fails, the first signature information verification is successful or the first signature information verification fails.
[0097] Step 106: Generate second verification information and second signature information according to the first verification result; wherein the second verification information includes the second terminal identifier and the first verification result, and the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal;
[0098] Among them, the second verification information can be generated by the second terminal and sent by the second terminal to the first terminal, so that the first terminal can authenticate the second terminal. The second verification information can be generated by the second terminal assembling the first identification information of the first terminal, the second identification information of the second terminal and the first verification result according to a preset verification information format. The first identification information can be the MAC number of the first terminal, and the second identification information can be the MAC number of the second terminal. The MAC number is the unique identification of the terminal.
[0099] The first identification information can be used to generate a first public key matrix, and the second identification information can be used to generate a second public key matrix. The first public key matrix pre-stores a mapping relationship between the first identification information of the first terminal and the first public key information, and the second public key matrix pre-stores a mapping relationship between the second identification information of the second terminal and the second public key information. The public key of the terminal can be determined through the identification information to achieve authentication of the terminal.
[0100] The second signature information may be generated by the second terminal performing a cryptographic operation on its own second private key information and the second verification information according to a preset signature algorithm, and then outputting the result according to a preset signature information format.
[0101] After the second terminal obtains the first verification result of the first terminal, the first verification result can be used as a return value to assemble second verification information, and second signature information can be generated based on the second private key information of the second terminal and the second verification information.
[0102] It should be noted that the verification information format, preset signature algorithm and signature information format can be set according to the data transmission requirements of the terminal, and the verification information format, preset signature algorithm and signature information format are not limited in the embodiments of the present invention.
[0103] In one example, when random number verification is added between a first terminal and a second terminal, the second terminal may assemble and generate the first identification information of the first terminal, the second identification information of the second terminal, the first random number, the second random number, and the first verification result according to a preset verification information format when assembling and generating the second verification information.
[0104] Step 107: Send the second verification information and the second signature information to the first terminal, so that the first terminal authenticates the second terminal.
[0105] After assembling and generating the second verification information and the second signature information, the second terminal sends the second verification information and the second signature information to the first terminal. After receiving the second verification information and the second signature information, the first terminal can verify the identity of the second terminal based on the second verification information and the second signature information.
[0106] In another embodiment of the present invention, the method further includes: after receiving the second verification information sent by the second terminal, determining the second random number information in the second verification information, and verifying the second random number information.
[0107] In actual applications, when the first terminal receives the second verification information sent by the second terminal, it can obtain the second random number stored in the first terminal, and extract the second random number information from the second verification information, and match the two to verify the second random number. When the two match, it can be confirmed that the verification result of the second random number information is successful verification; when the two do not match, the verification result of the second random number information is failed verification.
[0108] In an embodiment of the present invention, a second terminal receives first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal; first identification information for the first terminal is determined from the first verification information; first public key information of the first terminal is determined based on the first identification information; and the first signature information is verified based on the first public key information, thereby realizing authentication between terminals without the need for interactive certificates, reducing the amount of data transmitted during entity authentication, improving authentication efficiency, and not requiring the participation of a CA system, which can reduce the construction cost of the entire authentication system.
[0109] Reference Figure 2a , shows a flowchart of another terminal authentication method provided by an embodiment of the present invention, which is applied to a first terminal and may specifically include the following steps:
[0110] Step 201: Send first verification information and first signature information to a second terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal, so that the second terminal authenticates the first terminal according to the first verification information and the first signature information;
[0111] Among them, the first terminal is a physical terminal, which can be specifically a visual network terminal; the second terminal is a physical terminal, which can be specifically a visual network physical terminal.
[0112] The first terminal and the second terminal may be two terminals to be communicating. In order to ensure the communication security between the first terminal and the second terminal, it is necessary to completely perform entity verification between the first terminal and the second terminal before the first terminal communicates with the second terminal, that is, the first terminal needs to confirm whether the second terminal is the communication terminal designated by the first terminal; the second terminal needs to determine whether the first terminal is the communication terminal designated by the second terminal, wherein different designated terminals can be set in the first terminal and the second terminal according to different data to be communicated.
[0113] Among them, the first verification information can be generated by the first terminal and sent by the first terminal to the second terminal so that the second terminal can authenticate the first terminal. The first verification information can be generated by the first terminal assembling the first identification information of the first terminal and the second identification information of the second terminal according to a preset verification information format. The first identification information can be the MAC number of the first terminal, and the second identification information can be the MAC number of the second terminal. The MAC number is the unique identification of the terminal.
[0114] Among them, the terminal can pre-establish a mapping relationship between the identification information and the public key information of the terminal to be communicated with, so that the public key information of the terminal to be communicated can be determined through the identification information. The unique identification of the terminal is used for public key search, which can quickly locate the public key and greatly reduce the amount of data transmitted during the authentication process.
[0115] The first signature information may be generated by the first terminal performing a cryptographic operation on its own first private key information and the first verification information according to a preset signature algorithm and outputting the result in a preset signature information format.
[0116] During the process of the second terminal performing entity authentication on the first terminal, the first terminal can generate first verification information based on the first identification information of the first terminal and the pre-stored second identification information of the second terminal to communicate with it, and the first private key information of the first terminal can be obtained, so that the first verification information can be signed according to the first private key information to obtain the first signature information.
[0117] After the first terminal generates the first verification information and the first signature information, the first terminal can send the first verification information and the first signature information to the second terminal, so that the second terminal receives the first verification information and the first signature information, and verifies the first terminal based on the first verification information and the first signature information to confirm whether the first terminal that sends the first verification information and the first signature information is the terminal that the second terminal is ready to communicate with.
[0118] In one example, the steps of performing terminal authentication on the first terminal by the second terminal are as follows:
[0119] Step S11, receiving first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal;
[0120] Step S12: determining first identification information for the first terminal from the first verification information;
[0121] Step S13, determining first public key information of the first terminal according to the first identification information;
[0122] Step S14: verify the first signature information based on the first public key information.
[0123] It should be noted that steps S11 to S14 in which the second terminal performs terminal authentication on the first terminal are the same as steps 101 to 104 .
[0124] Step 202: Receive second verification information and second signature information sent by a second terminal; wherein the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal;
[0125] Among them, the second verification information can be generated by the second terminal and sent by the second terminal to the first terminal, so that the first terminal can authenticate the second terminal. The second verification information can be generated by the second terminal by assembling the first identification information of the first terminal and the second identification information of the second terminal according to a preset verification information format. The first identification information can be the MAC number of the first terminal, and the second identification information can be the MAC number of the second terminal. The MAC number is the unique identification of the terminal.
[0126] The first identification information can be used to generate a first public key matrix, and the second identification information can be used to generate a second public key matrix. The first public key matrix pre-stores a mapping relationship between the first identification information of the first terminal and the first public key information, and the second public key matrix pre-stores a mapping relationship between the second identification information of the second terminal and the second public key information. The public key of the terminal can be determined through the identification information to achieve authentication of the terminal.
[0127] The second signature information may be generated by the second terminal performing a cryptographic operation on its own second private key information and the second verification information according to a preset signature algorithm, and then outputting the result according to a preset signature information format.
[0128] It should be noted that the verification information format, preset signature algorithm and signature information format can be set according to the data transmission requirements of the terminal, and the verification information format, preset signature algorithm and signature information format are not limited in the embodiments of the present invention.
[0129] After receiving the second verification information and the second signature information, the first terminal can verify the identity of the second terminal according to the second verification information and the second signature information to confirm whether the second terminal sending the second verification information and the second signature information is the terminal with which the first terminal is preparing to communicate.
[0130] Step 203: determining second identification information for the second terminal from the second verification information;
[0131] After the first terminal receives the second verification information, the second verification information may include the second identification information of the second terminal, so that the first terminal can parse the second verification information to obtain the second identification information of the second terminal to determine the public key information of the second terminal, thereby facilitating signature verification.
[0132] Step 204: determining the second public key information of the second terminal according to the second identification information;
[0133] After determining the second identification information, since the mapping relationship between the identification information and the public key information of the terminal communicating with it is pre-stored in the first terminal, the second public key information of the second terminal corresponding to the second identification information can be found based on the mapping relationship according to the second identification information.
[0134] In an embodiment of the present invention, step 204 may include:
[0135] Acquire a second public key matrix generated by encrypting the second identification information using the CPK technology; and determine the second public key information of the second terminal corresponding to the second identification information from the second public key matrix.
[0136] In practical applications, a second public key matrix for the terminal to be communicated can be pre-stored in the first terminal, and a mapping relationship between the second identification information of the second terminal and the second public key information is pre-stored in the first public key matrix. After the first terminal parses and obtains the second tag information, it can search and match in the second public key matrix according to the second tag information to determine the second public key information corresponding to the second tag information, so as to further realize the verification of the first terminal through the second public key information.
[0137] The second public key matrix is a public key matrix generated by encrypting the second identification information using the CPK technology.
[0138] The second identification information based on the second terminal can be pre-stored in the first terminal, and a second public key matrix corresponding to the second tag information is generated through CPK (Combined Public Key Cryptosystem) technology. In the second public key matrix, a mapping relationship between the second identification information and the second public key information of the second terminal can be stored.
[0139] Among them, the first public key matrix and the second public key matrix can be the same matrix, that is, a public key matrix (the first public key matrix or the second public key matrix) is generated according to the first identification information of the first terminal and the second identification information of the second terminal, and the first public key matrix is stored in the second terminal, which is used for the second terminal to determine the public key of the first terminal according to the identification information of the first terminal, so as to verify the received first signature information through the public key. Similarly, the second public key matrix is stored in the first terminal, which is used for the first terminal to determine the public key of the second terminal according to the identification information of the second terminal, so as to verify the received second signature information through the public key.
[0140] In addition, the first public key matrix and the second public key matrix can also be different matrices, wherein the first public key matrix can be generated according to the first identification information of the first terminal communicating with the second terminal; the second public key matrix can be generated according to the second identification information of the second terminal communicating with the first terminal.
[0141] By generating a public key matrix through CPK technology, large-scale keys can be generated with very small resources, saving storage space and improving authentication efficiency.
[0142] Step 205: Verify the second signature information based on the second public key information.
[0143] The second public key information is obtained at the first terminal, and the first terminal can verify the second signature information based on the second public key information.
[0144] Specifically, the second signature information is generated by signing the second verification information based on the second private key information of the second terminal. When the first terminal obtains the second public key information, the second signature information can be verified based on the second public key information and the second verification information. Through the verification of the second signature information, the first terminal can confirm the identity of the second terminal. If the second signature information is successfully verified, the first terminal confirms that the second terminal is an entity that the first terminal can communicate with. If the second signature information verification fails, the first terminal confirms that the second terminal is not an entity that the first terminal can communicate with.
[0145] Entity terminal verification is performed through the public key matrix established through terminal identification. It can quickly realize verification between entities with a very small amount of data transmission without the help of a third-party verification system, thereby ensuring the security of entity communications.
[0146] In one embodiment of the present invention, during the entity authentication process between the first terminal and the second terminal, when random number verification is added between the first terminal and the second terminal, the first terminal can send an entity authentication request to the second terminal, and the second terminal can generate a first random number when receiving the entity authentication request. The first terminal can generate a second random number when receiving the first random number sent by the second terminal, and store the second random number.
[0147] When generating the second verification information, the second terminal may assemble and generate the first identification information of the first terminal, the second identification information of the second terminal, the first random number, and the second random number according to a preset verification information format.
[0148] Therefore, when the first terminal receives the second verification information sent by the second terminal, it can obtain the second random number previously stored by the first terminal, and extract the second random number information from the second verification information, and match the two to verify the second random number. When the two match, it can be confirmed that the verification result of the second random number information is successful verification; when the two do not match, the verification result of the second random number information is failed verification.
[0149] In one embodiment of the present invention, the second verification information further includes a first verification result obtained after the second terminal performs entity authentication on the first terminal.
[0150] The first verification result may include a verification result of the first random number information and / or a verification result of the first signature information.
[0151] After step 205, the method further includes:
[0152] Step 206, generating a second verification result of the second terminal;
[0153] In practical applications, the first verification information and the first signature information can be used by the second terminal to verify the first terminal and obtain a first verification result of the first terminal. The second verification information and the second signature information can be used by the first terminal to verify the second terminal and obtain a second verification result of the second terminal.
[0154] The second verification result may include a verification result of the second random number information and / or a verification result of the second signature information.
[0155] Step 207: when the second verification result is successful, obtain the first verification result from the second verification information;
[0156] When each verification item in the second verification result is successful, the first terminal may further parse the second verification information to obtain the first verification result.
[0157] The first verification result may include a verification result of the first random number information and / or a verification result of the first signature information.
[0158] In one example, when one of the second verification results has a verification result indicating verification failure, the entity verification between the first terminal and the second terminal fails.
[0159] Step 208: When the first verification result is verification success, confirm that the entity verification between the first terminal and the second terminal is successful.
[0160] After obtaining the first verification result, the first terminal confirms whether each verification in the first verification result is successful. When it is determined that each verification in the first verification result is successful, it is determined that the first terminal and the second terminal are successfully authenticated, and the first terminal and the second terminal can communicate subsequently.
[0161] When one of the first verification results has a verification result that is a verification failure, the entity verification between the first terminal and the second terminal fails.
[0162] For example, if the verification of the first terminal by the second terminal includes first random information verification and first signature information verification, and the verification of the first terminal by the second terminal includes second random number verification and second signature information verification, when the verification result of the second random number information and the verification result of the second signature information are both successful verification, the first terminal can parse the second verification information to obtain the first verification result, and can confirm that the authentication of the first terminal and the second terminal is successful when the first verification result is that the verification result of the first random number information and the verification result of the first signature information are both successful verification.
[0163] In an embodiment of the present invention, a first terminal sends first verification information and first signature information to a second terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal, so that the second terminal can authenticate the first terminal according to the first verification information and the first signature information, and can receive the second verification information and the second signature information sent by the second terminal; wherein the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal; second identification information for the second terminal is determined from the second verification information; second public key information of the second terminal is determined according to the second identification information; and the second signature information is verified based on the second public key information, thereby realizing authentication between terminals without the need for interactive certificates, reducing the amount of data transmitted during entity authentication, improving authentication efficiency, and not requiring the participation of the CA system, which can reduce the construction cost of the entire authentication system.
[0164] The following combination Figure 2b-2cThe authentication process between the visual networking terminal A (i.e., the first terminal) and the visual networking terminal B (i.e., the second terminal) shown in FIG. 1 is used to exemplarily illustrate the above embodiment of the present invention:
[0165] (1) Visual networking terminal A sends a verification request to visual networking terminal B.
[0166] (2) After receiving the verification request, the visual network terminal B generates a random number RB (i.e., the first random number) and saves it.
[0167] (3) Visual networking terminal B sends the random number RB to visual networking terminal A.
[0168] (4) After receiving the random number RB, the visual network terminal A generates a random number RA (i.e., the second random number) and saves it, and then assembles the first verification information RA||RB||MacA||MacB, where MacA is the first identification information of the visual network terminal A, and MacB is the second identification information of the visual network terminal B pre-stored in the visual network terminal A). After assembling the first verification information, the first verification information can be signed SignA(PriKeyA,RA||RB||MacA||MacB) (i.e., the first signature information) with its own first private key PriKeyA.
[0169] (5) Visual network terminal A sends the first verification information and the first signature information TokenAB=RA||RB||MacA||MacB||SignA(PriKeyA,RA||RB||MacA||MacB) to visual network terminal B.
[0170] (6) After receiving TokenAB, the visual network terminal B performs the following steps:
[0171] I. Random number RB verification: Verify whether the random number RB is the random number previously sent to the visual network terminal A. If not, the random number RB verification fails, and the return value Rv is set to error code. If so, the random number RB verification is successful, and the next step is executed.
[0172] II. Verification of the first signature information: parse the unique identifier MacA of the networked terminal A, and obtain the first public key information PubKeyA from the first public key matrix based on MacA.
[0173] Use the first public key information PubKeyA to verify the signature Verify(PubKeyA,RA||RB||MacA||MacB,SignA) of the visual network terminal A.
[0174] Specifically, the visual network terminal B obtains PubKeyA, RA, and MacA, and the visual network terminal B pre-stores RB and MacB, and verifies the first signature information through the above information.
[0175] When the signature verification passes, execute the next step; when the signature verification fails, set the return value RV = error code.
[0176] III. Set the return value Rv (ie, the first verification result) according to the results of steps I and II.
[0177] IV. Assemble the confirmation information RB||RA||MacB||MacA||Rv (ie, the second verification information), and use the second private key information of the visual networking terminal B to sign the second verification information SignB(PriKeyB,RB||RA||MacB||MacA||Rv) (ie, the second signature information);
[0178] (7) Visual network terminal B sends the second verification information and the second signature information TokenBA=RB||RA||MacB||MacA||Rv||SignB(PriKeyB,RB||RA||MacB||MacA||Rv) to visual network terminal A.
[0179] (8) After receiving TokenBA, the visual network terminal A performs the following steps:
[0180] I. Random number RA verification: Verify whether the random number RA is the random number previously sent to the visual network terminal B.
[0181] If not, verification fails (i.e., entity authentication fails). If so, random number RA verification succeeds, and the next step is executed.
[0182] II. Verification of the second signature information: Parse the unique identifier MacB of the networked terminal B, and obtain the second public key information PubKeyB from the second public key matrix according to MacB;
[0183] Use the second public key information PubKeyB to verify the signature Verify(PubKeyB,RB||RA||MacB||MacA||Rv,SignB) of the visual network terminal B.
[0184] When the signature verification passes, the next step is executed; when the signature verification fails, the verification fails (i.e., the entity authentication fails).
[0185] III. Parse and verify the return value Rv and verify Rv to determine whether the verification is successful.
[0186] Determine whether Rv is a correct code. If Rv is a correct code, the verification is confirmed to be successful; if Rv is an incorrect code, the verification is confirmed to have failed.
[0187] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0188] Reference Figure 3 , shows a schematic diagram of the structure of a terminal authentication device provided by an embodiment of the present invention, which is applied to a second terminal and may specifically include the following modules:
[0189] The first information receiving module 301 is used to receive first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal;
[0190] A first identification determination module 302, configured to determine first identification information for the first terminal from the first verification information;
[0191] A first public key determination module 303, configured to determine first public key information of the first terminal according to the first identification information;
[0192] The first signature verification module 304 is used to verify the first signature information based on the first public key information.
[0193] In one embodiment of the present invention, the device further comprises:
[0194] A first verification result module, used to generate a first verification result of the first terminal;
[0195] A second verification information and second signature information module, configured to generate second verification information and second signature information according to the first verification result; wherein the second verification information includes a second terminal identifier and the first verification result, and the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal;
[0196] The second sending module is used to send the second verification information and the second signature information to the first terminal, so that the first terminal authenticates the second terminal.
[0197] In an embodiment of the present invention, the first public key determination module 303 may include:
[0198] A first public key matrix acquisition submodule, used to acquire a first public key matrix generated by encrypting the first identification information using the CPK technology;
[0199] The first public key information determination submodule is used to determine the first public key information of the first terminal corresponding to the first identification information from the first public key matrix.
[0200] In an embodiment of the present invention, a second terminal receives first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal; first identification information for the first terminal is determined from the first verification information; first public key information of the first terminal is determined based on the first identification information; and the first signature information is verified based on the first public key information, thereby realizing authentication between terminals without the need for interactive certificates, reducing the amount of data transmitted during entity authentication, improving authentication efficiency, and not requiring the participation of a CA system, which can reduce the construction cost of the entire authentication system.
[0201] Reference Figure 4 , shows a schematic diagram of the structure of another terminal authentication device provided by an embodiment of the present invention, which is applied to a first terminal and may specifically include the following modules:
[0202] A first information sending module 401 is configured to send first verification information and first signature information to a second terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal, so that the second terminal authenticates the first terminal according to the first verification information and the first signature information;
[0203] The second information receiving module 402 is configured to receive second verification information and second signature information sent by a second terminal; wherein the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal;
[0204] A second identification determination module 403, configured to determine second identification information for the second terminal from the second verification information;
[0205] A second public key determination module 404, configured to determine second public key information of the second terminal according to the second identification information;
[0206] The second signature verification module 405 is used to verify the second signature information based on the second public key information.
[0207] In an embodiment of the present invention, the second verification information further includes a first verification result obtained after the second terminal performs entity authentication on the first terminal, and the device further includes:
[0208] A second verification result generating module, used to generate a second verification result of the second terminal;
[0209] A first verification result acquisition module, configured to acquire a first verification result from the second verification information when the second verification result is successful verification;
[0210] The entity authentication success module is used to confirm that the entity authentication between the first terminal and the second terminal is successful when the first authentication result is successful.
[0211] In an embodiment of the present invention, the second public key determination module 404 may include:
[0212] A second public key matrix acquisition submodule, used to acquire a second public key matrix generated by encrypting the second identification information using the CPK technology;
[0213] The second public key information determination submodule is used to determine the second public key information of the second terminal corresponding to the second identification information from the second public key matrix.
[0214] In an embodiment of the present invention, a first terminal sends first verification information and first signature information to a second terminal; wherein, the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal, so that the second terminal can authenticate the first terminal according to the first verification information and the first signature information, and can receive the second verification information and the second signature information sent by the second terminal; wherein, the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal; second identification information for the second terminal is determined from the second verification information; the second public key information of the second terminal is determined from the second public key matrix corresponding to the second identification information; the second signature information is verified based on the second public key information, thereby realizing authentication between terminals without the need for interactive certificates, reducing the amount of data transmitted during entity authentication, improving authentication efficiency, and not requiring the participation of the CA system, which can reduce the construction cost of the entire authentication system.
[0215] An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the steps of the terminal authentication method as described above are implemented.
[0216] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the terminal authentication method described above are implemented.
[0217] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0218] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0219] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0220] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.
[0221] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0222] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0223] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0224] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0225] The terminal authentication method, device, electronic device and storage medium provided above are introduced in detail. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A terminal authentication method, characterized in that: Applied to the second terminal, the method includes: Receive an entity verification request sent by a first terminal, generate a first random number; send the first random number to the first terminal so that the first terminal generates a second random number, and generate first verification information based on the first random number, the second random number, the first identification information of the first terminal, and the second identification information of the second terminal; Receiving first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal; Verifying the first random number based on the first verification information, and determining first identification information for the first terminal from the first verification information when the first random number verification succeeds; Determine first public key information of the first terminal according to the first identification information; The first signature information is verified based on the first public key information.
2. The method according to claim 1, characterized in that After the second terminal verifies the first signature information based on the first public key information, the method further includes: generating a first verification result of the first terminal; Generate second verification information and second signature information according to the first verification result; wherein the second verification information includes a second terminal identifier and the first verification result, and the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal; The second verification information and the second signature information are sent to the first terminal, so that the first terminal authenticates the second terminal.
3. The method according to claim 1 or 2, characterized in that: The determining the first public key information of the first terminal according to the first identification information includes: Acquire a first public key matrix generated by encrypting the first identification information using the CPK technology; Determine the first public key information of the first terminal corresponding to the first identification information from the first public key matrix.
4. A terminal authentication method, characterized in that: Applied to a first terminal, the method includes: Sending an entity authentication request to the second terminal, so that the second terminal generates a first random number after receiving the entity authentication request; receiving a first random number sent by the second terminal, and generating a second random number; generating first verification information based on the first random number, the second random number, first identification information of the first terminal, and second identification information of the second terminal; Sending first verification information and first signature information to a second terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal, so that the second terminal authenticates the first terminal according to the first verification information and the first signature information; receiving second verification information and second signature information sent by a second terminal; wherein the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal; and the second verification information is generated by the second terminal based on the first random number, the second random number, the first identification information of the first terminal, and the second identification information of the second terminal; Verifying the second random number based on the second verification information, and determining second identification information for the second terminal from the second verification information when the second random number verification succeeds; Determine the second public key information of the second terminal according to the second identification information; The second signature information is verified based on the second public key information.
5. The method according to claim 4, characterized in that The second verification information also includes a first verification result obtained after the second terminal performs entity authentication on the first terminal, and after the first terminal verifies the second signature information based on the second public key information, further includes: generating a second verification result of the second terminal; When the second verification result is successful, obtaining the first verification result from the second verification information; When the first verification result is verification success, it is confirmed that the entity verification between the first terminal and the second terminal is successful.
6. The method according to claim 4 or 5, characterized in that: The determining the second public key information of the second terminal according to the second identification information includes: Acquire a second public key matrix generated by encrypting the second identification information using the CPK technology; Determine the second public key information of the second terminal corresponding to the second identification information from the second public key matrix.
7. A terminal authentication device, characterized in that: Applied to a second terminal, the device includes: A first information receiving module, configured to receive first verification information and first signature information sent by a first terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal; a first identification determination module, configured to verify the first random number based on the first verification information, and determine first identification information for the first terminal from the first verification information when the first random number verification succeeds; A first public key determination module, configured to determine first public key information of the first terminal according to the first identification information; A first signature verification module, used to verify the first signature information based on the first public key information; The device is also used to receive an entity verification request sent by a first terminal, generate a first random number; send the first random number to the first terminal so that the first terminal generates a second random number, and generate first verification information based on the first random number, the second random number, the first identification information of the first terminal, and the second identification information of the second terminal.
8. A terminal authentication device, characterized in that: Applied to a first terminal, the device includes: A first information sending module, configured to send first verification information and first signature information to a second terminal; wherein the first signature information is generated by the first terminal signing the first verification information based on the first private key information of the first terminal, so that the second terminal authenticates the first terminal according to the first verification information and the first signature information; A second information receiving module is used to receive second verification information and second signature information sent by a second terminal; wherein the second signature information is generated by the second terminal signing the second verification information based on the second private key information of the second terminal; and the second verification information is generated by the second terminal based on the first random number, the second random number, the first identification information of the first terminal, and the second identification information of the second terminal; a second identification determination module, configured to verify the second random number based on the second verification information, and determine second identification information for the second terminal from the second verification information when the second random number verification succeeds; A second public key determination module, configured to determine second public key information of the second terminal according to the second identification information; A second signature verification module, used to verify the second signature information based on the second public key information; The device is also used to send an entity authentication request to a second terminal, so that the second terminal generates a first random number after receiving the entity authentication request; receives the first random number sent by the second terminal and generates a second random number; and generates first verification information based on the first random number, the second random number, the first identification information of the first terminal, and the second identification information of the second terminal.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the terminal authentication method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the terminal authentication method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Software copyright protection and management method based on combined public key identity authentication technology
CN104899480A
Security control method and system based on CPK intelligent switch device
CN107769926A
Two-way authentication system and two-way authentication method based on CPK identification key
CN109067550A
CPK-based VoIP (Voice Over Internet Protocol) communication processing method, terminal, server and storage medium
CN109302412A
Identity authentication method, terminal and server
CN112291190A
