Identity authentication method and system
By using the encrypted second certificate and random number in the wireless network access control device, combined with the identification results of the first authentication device, the problem of information exposure risk in the identity authentication mechanism in the prior art is solved, and higher security and efficiency are achieved.
Patent Information
- Application Number
- CN202510331864.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-05-13
AI Technical Summary
The identity authentication mechanism in the prior art has the risk of information exposure and it is difficult to provide sufficient security protection for wireless network access.
By receiving the access authentication request message of the terminal device, information containing the second ciphertext is obtained, which consists of a second certificate encrypted by the second public key and a second random number. Then, a certificate authentication request message is sent to the first authentication device, including the first ciphertext and the second ciphertext, and the third ciphertext is decrypted by the first random number to obtain the authentication result, the credibility of the terminal device is determined based on the second authentication result, and the authentication result is transmitted to the terminal device using the second random number to encrypt the authentication result.
It effectively improves the security of the identity authentication process, avoids the risk of information exposure, simplifies the identity authentication process, and improves the overall processing efficiency.
Smart Images

Figure CN119997023A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication security technology, and in particular to an identity authentication method and system. Background Art
[0002] With the rapid development of communication technology, wireless networks are widely used in various scenarios. In order to improve the security and privacy of wireless network environments, identity authentication mechanisms are introduced into wireless LAN access scenarios. However, the identity authentication mechanisms in related technologies have the risk of information exposure and are difficult to provide sufficient security protection for wireless network access. Summary of the invention
[0003] Based on this, it is necessary to provide an identity authentication method and system to address the above technical issues.
[0004] In a first aspect, the present application provides an identity authentication method, applied to an access control device, comprising:
[0005] Receiving an access authentication request message from a terminal device, and acquiring a second ciphertext contained in the access authentication request message; the second ciphertext includes a second certificate and a second random number encrypted by a second public key;
[0006] Sending a certificate authentication request message to a first authentication device; the certificate authentication request message includes a first ciphertext and a second ciphertext; the first ciphertext includes a first certificate and a first random number encrypted by a first public key;
[0007] receiving a certificate authentication response message from the first authentication device, and obtaining a third ciphertext contained in the certificate authentication response message; the third ciphertext includes a first authentication result, a second authentication result, and the second random number encrypted by the first random number; the first authentication result corresponds to the first certificate, and the second authentication result corresponds to the second certificate;
[0008] decrypting the third ciphertext using the first random number to obtain the second random number, the first authentication result, and the second authentication result; and determining whether the terminal device is credible according to the second authentication result;
[0009] The first authentication result is encrypted using the second random number to obtain a fourth ciphertext; and an access authentication response message including the fourth ciphertext is sent to the terminal device.
[0010] In one embodiment, the second ciphertext also includes a second temporary public key encrypted by the second public key; the third ciphertext also includes the second temporary public key encrypted by the first random number; the decrypting the third ciphertext using the first random number to obtain the second random number, the first identification result, and the second identification result includes: decrypting the third ciphertext using the first random number to obtain the second random number, the first identification result, the second identification result, and the second temporary public key; encrypting the first identification result using the second random number to obtain a fourth ciphertext includes: encrypting the first identification result and the first temporary public key using the second random number to obtain a fourth ciphertext; the first temporary public key is used for the terminal device to calculate a shared key; after determining whether the terminal device is trustworthy based on the second identification result, it also includes: if the terminal device is trustworthy, obtaining the shared key based on the second temporary public key and the first temporary private key corresponding to the first temporary public key.
[0011] In one of the embodiments, the access authentication request message also includes a second summary of the second certificate; after using the first random number to decrypt the third ciphertext to obtain the second random number, the first authentication result, and the second authentication result, it also includes: if the second authentication result includes a summary value of the authenticated certificate, determining whether the second authentication result is credible based on the consistency between the summary value and the second summary; if the second authentication result includes an authenticated certificate, calculating the summary value of the authenticated certificate, and determining whether the second authentication result is credible based on the consistency between the summary value and the second summary.
[0012] In a second aspect, the present application also provides an identity authentication method, applied to a terminal device, comprising:
[0013] Encrypting the second certificate and the second random number using the second public key to obtain a second ciphertext;
[0014] Sending an access authentication request message including the second ciphertext to the access control device;
[0015] receiving an access authentication response message from the access control device, and obtaining a fourth ciphertext contained in the access authentication response message; the fourth ciphertext is obtained by the access control device encrypting the first authentication result using the second random number; the second random number and the first authentication result are obtained by the access control device according to the certificate authentication response message received from the first authentication device; the first authentication result is obtained by the first authentication device verifying the first certificate of the access control device;
[0016] The fourth ciphertext is decrypted using the second random number to obtain the first authentication result; and whether the access control device is credible is determined according to the first authentication result.
[0017] In one of the embodiments, the encrypting the second certificate and the second random number using the second public key to obtain the second ciphertext includes: encrypting the second certificate, the second random number, and the second temporary public key using the second public key to obtain the second ciphertext; the second temporary public key is used by the access control device to calculate the shared key; the fourth ciphertext also includes the first temporary public key encrypted by the second random number; the decrypting the fourth ciphertext using the second random number to obtain the first authentication result includes: decrypting the fourth ciphertext using the second random number to obtain the first authentication result and the first temporary public key; after determining whether the access control device is trustworthy based on the first authentication result, it includes: if the access control device is trustworthy, obtaining the shared key based on the first temporary public key and the second temporary private key corresponding to the second temporary public key.
[0018] In one of the embodiments, before sending the access authentication request message including the second ciphertext to the access control device, it includes: receiving an authentication activation message from the access control device; the authentication activation message includes the first summary of the first certificate; after decrypting the fourth ciphertext using the second random number to obtain the first authentication result, it includes: if the first authentication result includes the summary value of the authenticated certificate, determining whether the first authentication result is credible based on the consistency between the summary value and the first summary; if the first authentication result includes the authenticated certificate, calculating the summary value of the authenticated certificate, and determining whether the first authentication result is credible based on the consistency between the summary value and the first summary.
[0019] In a third aspect, the present application further provides an identity authentication method, applied to a first authentication device, comprising:
[0020] receiving a certificate authentication request message from an access control device, and obtaining a first ciphertext and a second ciphertext contained in the certificate authentication request message; the first ciphertext is obtained by the access control device encrypting a first certificate and a first random number using a first public key, and the second ciphertext is received by the access control device from a terminal device; the second ciphertext is obtained by the terminal device encrypting a second certificate and a second random number using a second public key;
[0021] Decrypting the first ciphertext using a first private key corresponding to the first public key to obtain the first certificate and the first random number; verifying the first certificate to obtain a first verification result;
[0022] Obtaining the second random number and the second authentication result; the second random number is obtained by decrypting the second ciphertext using the second private key corresponding to the second public key; the second authentication result includes a second verification result obtained by verifying the second certificate;
[0023] Obtaining a first authentication result of the first certificate according to the first verification result and the second verification result;
[0024] Encrypting the first authentication result, the second authentication result, and the second random number using the first random number to obtain a third ciphertext;
[0025] A certificate authentication response message including the third ciphertext is sent to the access control device.
[0026] In one embodiment, the first authentication result of the first certificate is obtained based on the first verification result and the second verification result, including: if the first verification result and / or the second verification result indicate that the verification failed, calculating the summary value of the first certificate, and obtaining the first authentication result based on the summary value and the first verification result; if the first verification result and the second verification result indicate that the verification passed, obtaining the first authentication result based on the first certificate and the first verification result; and / or, when the first verification result and / or the second verification result indicate that the verification failed, the second authentication result also includes the summary value of the second certificate; when the first verification result and the second verification result indicate that the verification passed, the second authentication result also includes the second certificate.
[0027] In one of the embodiments, obtaining the second random number and the second authentication result includes: sending a roaming authentication request message to a second authentication device; the roaming authentication request message includes the first public key, the first verification result, and the second ciphertext; receiving a roaming authentication response message from the second authentication device, and obtaining a fifth ciphertext contained in the roaming authentication response message; the fifth ciphertext is obtained by encrypting the second random number and the second authentication result by the second authentication device using the first public key; the second random number is obtained by decrypting the second ciphertext by the second authentication device using the second private key corresponding to the second public key; the second authentication result includes the second verification result obtained by the second authentication device verifying the second certificate; the fifth ciphertext is decrypted using the first private key corresponding to the first public key to obtain the second random number and the second authentication result.
[0028] In a fourth aspect, the present application further provides an identity authentication system, comprising: a terminal device, an access control device, and a first authentication device;
[0029] The terminal device is used to encrypt the second certificate and the second random number using the second public key to obtain a second ciphertext; and send an access authentication request message including the second ciphertext to the access control device;
[0030] The access control device is used to receive the access authentication request message and obtain the second ciphertext; send a certificate authentication request message to the first authentication device; the certificate authentication request message includes the first ciphertext and the second ciphertext; the first ciphertext includes the first certificate and the first random number encrypted by the first public key;
[0031] The first authentication device is used to receive the certificate authentication request message, obtain the first ciphertext and the second ciphertext contained in the certificate authentication request message; decrypt the first ciphertext using the first private key corresponding to the first public key to obtain the first certificate and the first random number; verify the first certificate to obtain a first verification result; obtain the second random number and the second authentication result; the second random number is obtained by decrypting the second ciphertext using the second private key corresponding to the second public key; the second authentication result includes a second verification result obtained by verifying the second certificate; obtain the first authentication result of the first certificate according to the first verification result and the second verification result; encrypt the first authentication result, the second authentication result and the second random number using the first random number to obtain a third ciphertext; and send a certificate authentication response message containing the third ciphertext to the access control device;
[0032] The access control device is further configured to receive the certificate authentication response message, obtain the third ciphertext contained in the certificate authentication response message; decrypt the third ciphertext using the first random number to obtain the second random number, the first authentication result, and the second authentication result; determine whether the terminal device is credible according to the second authentication result; encrypt the first authentication result using the second random number to obtain a fourth ciphertext; and send an access authentication response message containing the fourth ciphertext to the terminal device;
[0033] The terminal device is further used to receive the access authentication response message to obtain the fourth ciphertext; use the second random number to decrypt the fourth ciphertext to obtain the first authentication result; and determine whether the access control device is credible based on the first authentication result.
[0034] In one of the embodiments, the system further includes: a second authentication device; the first authentication device is further used to send a roaming authentication request message to the second authentication device; the roaming authentication request message includes the first public key, the first verification result, and the second ciphertext; the second authentication device is used to receive the roaming authentication request message, obtain the first public key, the first verification result, and the second ciphertext; decrypt the second ciphertext using a second private key corresponding to the second public key to obtain the second random number and the second certificate; verify the second certificate to obtain the second verification result; obtain the second authentication result based on the second verification result; encrypt the second random number and the second authentication result using the first public key to obtain a fifth ciphertext; send a roaming authentication response message containing the fifth ciphertext to the first authentication device; the first authentication device is further used to receive the roaming authentication response message to obtain the fifth ciphertext; decrypt the fifth ciphertext using the first private key corresponding to the first public key to obtain the second random number and the second authentication result.
[0035] The above-mentioned identity authentication method and system first receive an access authentication request message from a terminal device and obtain a second ciphertext contained in the access authentication request message, wherein the second ciphertext contains a second certificate and a second random number encrypted by a second public key, and then send a certificate authentication request message including a first ciphertext and a second ciphertext to a first authentication device, wherein the first ciphertext contains a first certificate and a first random number encrypted by a first public key, and then receive a certificate authentication response message from the first authentication device, obtain a third ciphertext contained in the certificate authentication response message, wherein the third ciphertext contains a first authentication result, a second authentication result and a second random number encrypted by a first random number, and then use the first random number to decrypt the third ciphertext to obtain a second random number, a first authentication result and a second authentication result, determine whether the terminal device is credible according to the second authentication result, and use the second random number to encrypt the first authentication result to obtain a fourth ciphertext, and then send an access authentication response message containing the fourth ciphertext to the terminal device.
[0036] In this solution, the terminal device encrypts its identity information and protection random number and provides it to the access control device. The access control device then transmits the ciphertext information of the terminal device and its own encrypted identity information and protection random number to the authentication device. The authentication device decrypts the ciphertext information of the terminal device and the access control device respectively and performs identity authentication. The protection random number of the access control device is then used to encrypt the identity authentication results of both parties and the protection random number of the terminal device, and provides them to the access control device, so that the access control device can obtain the identity authentication results of both parties and the protection random number of the terminal device in a secure manner, and then determine whether the terminal device is trustworthy based on the identity authentication result, and use the protection random number of the terminal device to transmit its own identity authentication result to the terminal device in a secure manner. In this identity authentication process, there is no plaintext identity information and key transmission in the air interface domain, which can effectively improve the security of the identity authentication process and avoid the risk of information exposure. Moreover, in this solution, the two parties who need to perform identity authentication do not need to negotiate the protection information required to keep the identity authentication process confidential, which can simplify the identity authentication process and improve the overall processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 is a schematic diagram of the structure of an identity authentication system in an embodiment;
[0039] Figure 2 A schematic diagram of the structure of an identity authentication system in another embodiment;
[0040] Figure 3 A schematic diagram of an interaction process of an identity authentication system in an embodiment;
[0041] Figure 4 A schematic diagram of the structure of the identification result in one embodiment;
[0042] Figure 5 A schematic diagram of a flow chart of an identity authentication method in an embodiment;
[0043] Figure 6 is a flow chart of an identity authentication method in another embodiment;
[0044] Figure 7 is a flowchart of an identity authentication method in another embodiment;
[0045] Figure 8 is a structural block diagram of an identity authentication device in one embodiment;
[0046] Fig. 9 is a structural block diagram of an identity authentication device in another embodiment;
[0047] Fig.10 is a structural block diagram of an identity authentication device in yet another embodiment;
[0048] Fig.11 is an internal structure diagram of a communication device in one embodiment;
[0049] Fig.12 FIG. 4 is a diagram showing the internal structure of a communication device in another embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] Specifically, for secure access to wireless LANs, related technologies usually perform identity authentication of both parties based on the WLAN Authentication and Privacy Infrastructure (WAPI). WAPI uses digital certificates to identify the identities of wireless access points (APs) and wireless terminals (STAs). STAs and APs perform identity authentication through their mutually trusted authentication service elements (AS) to ensure the security of wireless access. Based on WAPI, APs will not allow STAs that fail identity authentication to access the network, and STAs will not access APs that fail identity authentication. During the WAPI identity authentication process, digital certificates representing the identities of APs and STAs are usually transmitted in plain text on the network, which poses a risk of information exposure.
[0052] In response to this risk, the related art provides a solution in which the two parties of identity authentication exchange temporary public keys to negotiate encryption keys, and then use the encryption keys to encrypt and transmit identity information. However, the temporary public keys exchanged by the two parties of identity authentication in this process are unencrypted, which can be easily cracked under quantum attacks, leading to the exposure of identity information. Moreover, since the encryption keys need to be negotiated in advance in the solutions of the related art, the number of negotiations required for identity authentication increases and the complexity increases, thereby increasing the network access time and affecting the user experience.
[0053] Based on this, in one embodiment, Figure 1 As shown, an identity authentication system is provided, which may include: a terminal device, an access control device, and a first authentication device.
[0054] Among them, the terminal device can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The access control device can be a wireless access point (AP). The first identification device can be an authentication service network element (AS), which can be a server, for example, an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0055] The terminal device may be installed with a second authentication certificate of an authentication service network element that it trusts, and a second certificate issued by the authentication service network element for the terminal device. The authentication service network element trusted by the terminal device may be the first authentication device or another authentication device. The second certificate may be used to represent the identity information of the terminal device.
[0056] The access control device may be installed with a first authentication certificate of an authentication service network element that it trusts, and a first certificate issued by the authentication service network element for the access control device. The authentication service network element that the access control device trusts may be a first authentication device. The first certificate may be used to represent the identity information of the access control device.
[0057] The following combination Figure 1 , further illustrating the identity authentication system provided in this embodiment.
[0058] The terminal device is used to encrypt the second certificate and the second random number by using the second public key to obtain a second ciphertext; and send an access authentication request message containing the second ciphertext to the access control device.
[0059] The second random number is a temporary random number generated by the terminal device. After generating the second random number, the terminal device can use the second public key of the second authentication certificate installed by it to encrypt the data content including the second certificate and the second random number to obtain the second ciphertext. Then, the terminal device can send an access authentication request message including the second ciphertext to the access control device.
[0060] Optionally, the terminal device may generate the second random number after receiving an authentication activation message from the access control device.
[0061] The access control device is used to receive the access authentication request message and obtain the second ciphertext; and send the certificate authentication request message to the first authentication device.
[0062] The access control device may receive an access authentication request message from a terminal device and extract the second ciphertext contained in the message. The access control device may also generate a first random number and encrypt the data content containing the first certificate and the first random number using the first public key of the first authentication certificate installed by the access control device to obtain the first ciphertext.
[0063] Subsequently, the access control device may send a certificate authentication request message including the first ciphertext and the second ciphertext to the first authentication device it trusts.
[0064] The first authentication device is used to receive a certificate authentication request message, obtain a first ciphertext and a second ciphertext contained in the certificate authentication request message; decrypt the first ciphertext using a first private key corresponding to a first public key to obtain a first certificate and a first random number; verify the first certificate to obtain a first verification result; obtain a second random number and a second authentication result; obtain a first authentication result of the first certificate based on the first verification result and the second verification result; encrypt the first authentication result, the second authentication result, and the second random number using the first random number to obtain a third ciphertext; and send a certificate authentication response message containing the third ciphertext to the access control device.
[0065] The first authentication device may receive a certificate authentication request message from the access control device, and extract the first ciphertext and the second ciphertext contained in the message.
[0066] Among them, since the first ciphertext is encrypted using the first public key corresponding to the first authentication certificate of the first authentication device, the first authentication device can directly use the first private key corresponding to the first authentication certificate to decrypt the first ciphertext to obtain the first certificate and the first random number of the access control device. Among them, since the first certificate is a certificate issued by the first authentication device, the first authentication device can verify the first certificate and obtain the corresponding first verification result. Exemplarily, the first verification result may include verification passed or verification failed.
[0067] Wherein, when the first authentication device is an authentication service network element trusted by the terminal device, the second authentication certificate installed by the terminal device may be the certificate of the first authentication device (the second authentication certificate may be the same as or different from the first authentication certificate). Thus, the first authentication device may directly use the second private key corresponding to the second authentication certificate to decrypt the second ciphertext to obtain the second certificate and the second random number of the terminal device. At the same time, in this case, the second certificate of the terminal device may be a certificate issued by the first authentication device. Therefore, the first authentication device may verify the second certificate and obtain the corresponding second verification result. Exemplarily, the second verification result may include verification passed or verification failed. Wherein, after obtaining the second verification result, the first authentication device may obtain the second authentication result of the second certificate according to the first verification result and the second verification result. Optionally, when both the first verification result and the second verification result indicate that the verification is passed, the second authentication result may include the second certificate and the second verification result, and when either the first verification result or the second verification result indicates that the verification is failed, the second authentication result may include the second verification result but not the second certificate.
[0068] Among them, when the first authentication device is not an authentication service network element trusted by the terminal device, the first authentication device cannot decrypt the second ciphertext. In this case, the first authentication device can forward the first verification result and the second ciphertext to the authentication service network element trusted by the terminal device, for example, the second authentication device, and the second authentication device uses the second private key corresponding to the second authentication certificate to decrypt the second ciphertext, obtain the second certificate and the second random number of the terminal device, and verify the second certificate to obtain the corresponding second verification result. Then, the second authentication device can obtain the second authentication result of the second certificate according to the first verification result and the second verification result. Optionally, when both the first verification result and the second verification result indicate that the verification is passed, the second authentication result can include the second certificate and the second verification result, and when either the first verification result or the second verification result indicates that the verification is not passed, the second authentication result can include the second verification result but not the second certificate. The second authentication device can then send the second authentication result and the second random number to the first authentication device together. Optionally, the second authentication result and the second random number can be sent to the first authentication device in a manner of being encrypted by the first public key of the first authentication certificate of the first authentication device, and the first authentication device can obtain the second authentication result and the second random number after decrypting the corresponding information.
[0069] After obtaining the second authentication result, the first authentication device may obtain the second verification result contained therein, and obtain the first authentication result of the first certificate according to the first verification result and the second verification result. Exemplarily, when both the first verification result and the second verification result indicate that the verification is passed, the first authentication result may include the first certificate and the first verification result, and when either the first verification result or the second verification result indicates that the verification is not passed, the first authentication result may include the first verification result but not the first certificate.
[0070] The first authentication device may use the first random number obtained by decrypting the first ciphertext to encrypt the data content including the first authentication result, the second authentication result, and the second random number to obtain a third ciphertext. Then, a certificate authentication response message including the third ciphertext may be sent to the access control device.
[0071] The access control device is also used to receive a certificate authentication response message, obtain a third ciphertext contained in the certificate authentication response message; use the first random number to decrypt the third ciphertext to obtain a second random number, a first authentication result and a second authentication result; determine whether the terminal device is trustworthy according to the second authentication result; use the second random number to encrypt the first authentication result to obtain a fourth ciphertext; and send an access authentication response message containing the fourth ciphertext to the terminal device.
[0072] The access control device may receive the certificate authentication response message from the first authentication device and extract the third ciphertext contained in the message. Then, the access control device may decrypt the third ciphertext using the first random number to obtain the second random number, the first authentication result and the second authentication result contained therein.
[0073] The access control device may obtain the second verification result included in the second authentication result, and determine whether the terminal device is credible according to the second verification result. Exemplarily, when the second verification result indicates that the verification is passed, it can be determined that the terminal device is credible. When the second verification result indicates that the verification is not passed, it can be determined that the terminal device is not credible.
[0074] The access control device may also use the second random number to encrypt the data content including the first authentication result to obtain a fourth ciphertext, and then send the fourth ciphertext to the terminal device.
[0075] The terminal device is also used to receive the access authentication response message to obtain a fourth ciphertext; decrypt the fourth ciphertext using the second random number to obtain a first authentication result; and determine whether the access control device is credible based on the first authentication result.
[0076] The terminal device may receive the access authentication response message from the access control device and extract the fourth ciphertext contained in the message. Then, the terminal device may decrypt the fourth ciphertext using the second random number to obtain the first authentication result contained therein.
[0077] The terminal device may obtain the first verification result included in the first authentication result, and determine whether the terminal device is credible according to the first verification result. Exemplarily, when the first verification result indicates that the verification is passed, it may be determined that the access control device is credible. When the first verification result indicates that the verification is not passed, it may be determined that the access control device is not credible.
[0078] In the above-mentioned identity authentication system, the terminal device encrypts its identity information and protection random number and provides it to the access control device, and then the access control device transmits the ciphertext information of the terminal device and its own encrypted identity information and protection random number to the authentication device, and the authentication device decrypts the ciphertext information of the terminal device and the access control device respectively and performs identity authentication, and then uses the protection random number of the access control device to encrypt the identity authentication results of both parties and the protection random number of the terminal device, and provides them to the access control device, so that the access control device can obtain the identity authentication results of both parties and the protection random number of the terminal device in a secure manner, and then determine whether the terminal device is credible based on the identity authentication result, and use the protection random number of the terminal device to transmit its own identity authentication result to the terminal device in a secure manner. In the identity authentication process, there is no plaintext identity information and key transmission in the air interface domain, which can effectively improve the security of the identity authentication process and avoid the risk of information exposure. Moreover, in this scheme, the two parties who need to perform identity authentication do not need to negotiate the protection information required to keep the identity authentication process confidential, which can simplify the identity authentication process and improve the overall processing efficiency.
[0079] In an exemplary embodiment, Figure 2 As shown, the identity authentication system may include: a terminal device, an access control device, a first authentication device, and a second authentication device. The second authentication device may be an authentication service element (AS) trusted by the terminal device, which may be a server, such as an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0080] The first authentication device is further used to send a roaming authentication request message to the second authentication device.
[0081] Wherein, in the case that the first authentication device is not an authentication service network element trusted by the terminal device, the first authentication device may send a roaming authentication request message to a second authentication device trusted by the terminal device. Wherein, the roaming authentication request message may include the first public key of the first authentication certificate, the first verification result corresponding to the first certificate, and the second ciphertext.
[0082] The second authentication device is used to receive a roaming authentication request message, obtain a first public key, a first verification result, and a second ciphertext; decrypt the second ciphertext using a second private key corresponding to the second public key to obtain a second random number and a second certificate; verify the second certificate to obtain a second verification result; obtain a second authentication result based on the second verification result; encrypt the second random number and the second authentication result using the first public key to obtain a fifth ciphertext; and send a roaming authentication response message containing the fifth ciphertext to the first authentication device.
[0083] The second authentication device may receive a roaming authentication request message from the first authentication device, and extract the first public key, the first verification result and the second ciphertext contained in the message.
[0084] Among them, since the second ciphertext is encrypted using the second public key corresponding to the second authentication certificate, the second authentication device can directly use the second private key corresponding to the second authentication certificate to decrypt the second ciphertext to obtain the second certificate and the second random number of the terminal device. Among them, since the second certificate is a certificate issued by the second authentication device, the second authentication device can verify the second certificate and obtain the corresponding second verification result. Exemplarily, the second verification result may include verification passed or verification failed.
[0085] Exemplarily, the second authentication device may obtain a second authentication result of the second certificate according to the first authentication result and the second authentication result. Optionally, when both the first authentication result and the second authentication result indicate that the authentication is passed, the second authentication result may include the second certificate and the second authentication result, and when either the first authentication result or the second authentication result indicates that the authentication is not passed, the second authentication result may include the second authentication result but not the second certificate.
[0086] After obtaining the second random number and the second authentication result, the second authentication device can use the first public key to encrypt the data content including the second random number and the second authentication result to obtain the fifth ciphertext. Then, the second authentication device can send a roaming authentication response message including the fifth ciphertext to the first authentication device.
[0087] The first authentication device is further used to receive the roaming authentication response message to obtain a fifth ciphertext; and decrypt the fifth ciphertext using a first private key corresponding to the first public key to obtain a second random number and a second authentication result.
[0088] The first authentication device may receive the roaming authentication response message from the second authentication device and extract the fifth ciphertext contained in the message. Then, the first authentication device may decrypt the fifth ciphertext using the first private key of the first authentication certificate to obtain the second random number and the second authentication result contained therein.
[0089] In this embodiment, when the terminal device and the access control device trust different authentication service network elements, the first authentication device transmits the second ciphertext to the second authentication device, and the second authentication device is responsible for verifying the second certificate and encrypting and transmitting the obtained second authentication result and the second random number to the first authentication device. This can ensure data security while achieving identity authentication of the terminal device and acquisition of the second random number, which is beneficial to improving the overall security of the identity authentication process.
[0090] In an exemplary embodiment, the terminal device and the access control device may also negotiate a shared key during the identity authentication process.
[0091] The terminal device is also used to encrypt the second certificate, the second random number, and the second temporary public key using the second public key to obtain a second ciphertext; the second temporary public key is used by the access control device to calculate the shared key.
[0092] The first authentication device is used to encrypt the first authentication result, the second authentication result, the second random number, and the second temporary public key by using the first random number to obtain a third ciphertext.
[0093] The access control device is also used to decrypt the third ciphertext using the first random number to obtain the second random number, the first authentication result, the second authentication result, and the second temporary public key; and encrypt the first authentication result and the first temporary public key using the second random number to obtain the fourth ciphertext.
[0094] The access control device is further used to obtain a shared key according to the second temporary public key and the first temporary private key corresponding to the first temporary public key if the terminal device is trustworthy.
[0095] The terminal device is also used to decrypt the fourth ciphertext using the second random number to obtain the first authentication result and the first temporary public key; if the access control device is trustworthy, the shared key is obtained according to the first temporary public key and the second temporary private key corresponding to the second temporary public key.
[0096] Specifically, in order to negotiate a shared key, the terminal device can generate a second temporary public key, and the access control device can generate a first temporary public key. The terminal device can use the second public key to encrypt the data content containing the second certificate, the second random number, and the second temporary public key to obtain a second ciphertext. Thus, as the second ciphertext is transmitted to the first authentication server and / or the second authentication server and decrypted, the first authentication server can eventually obtain the second temporary public key. After obtaining the first authentication result, the second authentication result, the second random number, and the second temporary public key, the first authentication device can use the first random number to encrypt the data content containing these contents to obtain a third ciphertext. Thus, a certificate authentication response message containing the third ciphertext can be sent to the access control device later.
[0097] After receiving the certificate authentication response message from the first authentication device and decrypting the third ciphertext contained therein using the first random number, the access control device can obtain the first authentication result, the second authentication result, the second random number, and the second temporary public key. Based on this, the access control device can use the second random number to encrypt the data content containing the first authentication result and the first temporary public key to obtain the fourth ciphertext, and then send the access authentication response message containing the fourth ciphertext to the terminal device. At the same time, the access control device can also use the information including the first temporary private key and the second temporary public key corresponding to the first temporary public key to perform key exchange calculation to generate a shared key when judging that the terminal device is trustworthy according to the second authentication result.
[0098] After receiving the access authentication response message from the access control device and decrypting the fourth ciphertext contained therein using the second random number, the terminal device can obtain the first authentication result and the first temporary public key. If the access control device is judged to be credible according to the second authentication result, the terminal device can use the information including the first temporary public key and the second temporary private key corresponding to the second temporary public key to perform key exchange calculation to generate a shared key.
[0099] In this embodiment, by implementing the exchange of the first temporary public key and the second temporary public key during the identity authentication process, the interaction required for key negotiation between the terminal device and the access control device can be reduced, which is conducive to simplifying the protocol process and improving the efficiency of protocol interaction. Among them, by enabling the terminal device to add the second temporary public key to the second ciphertext, and enabling the access control device to add the first temporary public key to the fourth ciphertext, the encrypted transmission of the first temporary public key and the second temporary public key can be implemented, so that there is no plaintext temporary public key transmission in the air interface domain during the identity authentication process, which is conducive to improving the security of the protocol.
[0100] In an exemplary embodiment, the terminal device and the access control device may also use the summary value of the certificate to verify the credibility of the first authentication result or the second authentication result.
[0101] The access control device is further used to send an authentication activation message to the terminal device; the authentication activation message includes a first summary of the first certificate.
[0102] The access control device may calculate the summary information of the first certificate using a summary algorithm to obtain a first summary. Then, the access control device may send an authentication activation message including the first summary to the terminal device. Exemplarily, the authentication activation message may be sent by the access control device to the terminal device at the beginning of the identity authentication process.
[0103] The terminal device is further used to send an access authentication request message to the access control device; the access authentication request message includes the second ciphertext and the second summary of the second certificate.
[0104] After receiving the authentication activation message from the access control device, the terminal device can use the second public key to encrypt the second certificate and the second random number to obtain the second ciphertext; and use the summary information of the second certificate calculated by the summary algorithm to obtain the second summary of the second certificate. Then, the terminal device can send the second ciphertext and the second summary of the second certificate to the access control device through the access authentication request message.
[0105] The first authentication device is also used to calculate the summary value of the first certificate if the first verification result and / or the second verification result indicates that the verification failed, and obtain the first authentication result based on the summary value and the first verification result; if the first verification result and the second verification result indicate that the verification passed, obtain the first authentication result based on the first certificate and the first verification result.
[0106] The first authentication device may obtain the first authentication result according to the first verification result, the second verification result and the first certificate. Specifically, when any one of the first verification result and the second verification result indicates that the corresponding certificate verification has not passed, the first authentication device may calculate the digest value of the first certificate and include the digest value and the first verification result in the first authentication result. When both the first verification result and the second verification result indicate that the corresponding certificate verification has passed, the first authentication device may include the first certificate and the first verification result in the first authentication result.
[0107] The first authentication device or the second authentication device is further used to calculate the summary value of the second certificate if the first verification result and / or the second verification result indicates that the verification failed, and obtain the second authentication result based on the summary value and the second verification result; if the first verification result and the second verification result indicate that the verification passed, obtain the second authentication result based on the second certificate and the second verification result.
[0108] Similar to the method of obtaining the first authentication result, after the first authentication device or the second authentication device verifies the second certificate, it can obtain the second authentication result by using the first verification result, the second verification result and the second certificate. When any one of the first verification result and the second verification result indicates that the corresponding certificate verification fails, the second authentication result may include the summary value of the second certificate and the second verification result; and when both the first verification result and the second verification result indicate that the corresponding certificate verification passes, the second authentication result may include the second certificate and the second verification result.
[0109] The access control device is further used to determine whether the second authentication result is credible based on the consistency between the summary value and the second summary if the second authentication result includes the summary value of the authenticated certificate; if the second authentication result includes the authenticated certificate, calculate the summary value of the authenticated certificate, and determine whether the second authentication result is credible based on the consistency between the summary value and the second summary.
[0110] After obtaining the second authentication result, the access control device may first determine whether the second authentication result includes the authenticated certificate itself or includes the digest value of the authenticated certificate. When the second authentication result includes the authenticated certificate, the access control device may calculate the digest value of the authenticated certificate.
[0111] Then, the access control device may compare the digest value of the authenticated certificate with the second digest of the second certificate. If the comparison is consistent, it proves that the second authentication result is an authentication result for the second certificate, and thus the result is credible; if the comparison is inconsistent, it proves that the second authentication result is not an authentication result for the second certificate, and thus the result is unreliable. In this case, the access control device may determine that this identity authentication has failed.
[0112] The terminal device is also used to determine whether the first authentication result is credible based on the consistency between the summary value and the first summary if the first authentication result includes the summary value of the authenticated certificate; if the first authentication result includes the authenticated certificate, calculate the summary value of the authenticated certificate, and determine whether the first authentication result is credible based on the consistency between the summary value and the first summary.
[0113] After obtaining the first authentication result, the terminal device may first determine whether the first authentication result includes the authenticated certificate itself or includes the digest value of the authenticated certificate. When the first authentication result includes the authenticated certificate, the access control device may calculate the digest value of the authenticated certificate.
[0114] Then, the terminal device can compare the digest value of the authenticated certificate with the first digest of the first certificate. If the comparison is consistent, it proves that the first authentication result is the authentication result for the first certificate, so the result is credible; if the comparison is inconsistent, it proves that the first authentication result is not the authentication result for the first certificate, so the result is not credible. In this case, the terminal device can determine that this identity authentication has failed.
[0115] In this embodiment, by first obtaining the first verification result and the second verification result, when both are verified, the first authentication result and the second authentication result include the corresponding authenticated certificates, and when either of the two fails to be verified, the first authentication result and the second authentication result include the digest values of the corresponding authenticated certificates, so that no matter whether the certificate authentication of either party of the identity authentication fails, the identity information will not be exposed to the other party, which is conducive to improving the security of the protocol. Moreover, in this embodiment, by verifying the digest value of the authenticated certificate included in the authentication result by the terminal device and the access control device, the credibility of the authentication result can be evaluated, further improving the security of the protocol.
[0116] In order to further explain the identity authentication system of the present application, it is described below through detailed embodiments.
[0117] Among them, please refer to Figure 3 The identity authentication system in this embodiment may include: a terminal device, an access control device, a first authentication device, and a second authentication device. The system may perform identity authentication between the terminal device and the access control device according to the following process:
[0118] Step S0: The access control device sends an authentication activation message to the terminal device.
[0119] Specifically, after the access control device establishes a wireless association with the terminal device, the access control device may send an authentication activation message to the terminal device to initiate access authentication. The authentication activation message includes a first authentication identifier and a first summary of a first certificate. The first authentication identifier may be a random number generated by the access control device when initiating access authentication.
[0120] Step S1: The terminal device sends an access authentication request message to the access control device.
[0121] Specifically, the terminal device may generate a second random number, a second temporary public key, and a second authentication identifier after receiving the authentication activation message, wherein the second authentication identifier may be a random number generated by the terminal device.
[0122] Among them, the terminal device can also use the private key corresponding to the second certificate to sign the content including the second random number, the second certificate, and the second temporary public key to obtain a second signature. The terminal device can also use the digest algorithm to calculate the digest value of the second certificate to obtain a second digest. Subsequently, the terminal device can use the second public key of the second authentication certificate to encrypt the second random number, the second temporary public key, the second certificate, and the second signature to obtain a second ciphertext. Subsequently, the terminal device can send an access authentication request message including the second ciphertext, the second digest of the second certificate, the first authentication identifier, and the second authentication identifier to the access control device.
[0123] Step S2: The access control device sends a certificate authentication request message to the first authentication device.
[0124] Specifically, after receiving the certificate authentication request message, the access control device can generate a first random number and a first temporary public key. The access control device can also use the private key corresponding to the first certificate to sign the content including the first random number and the first certificate to obtain a first signature. Subsequently, the access control device can use the first public key of the first authentication certificate to encrypt the first random number, the first certificate, and the first signature to obtain a first ciphertext. Subsequently, the access control device can send a certificate authentication request message containing the first ciphertext, the second ciphertext, the first authentication identifier, and the second authentication identifier to the first authentication device.
[0125] Step S3: The first authentication device sends a roaming authentication request message to the second authentication device.
[0126] Specifically, after receiving the certificate authentication request message, the first authentication device may extract the first ciphertext, the second ciphertext, the first authentication identifier, and the second authentication identifier contained therein.
[0127] The first authentication device can use the first private key of the first authentication certificate to decrypt the first ciphertext and obtain the first random number, the first certificate, and the first signature. The first authentication device can first verify the first signature. If the verification fails, the first verification result corresponding to the first certificate is obtained as verification failure. If the first signature verification passes, the first authentication device can verify the first certificate and obtain the corresponding first verification result.
[0128] After obtaining the first verification result, the first authentication device may send a roaming authentication request message including the first authentication certificate, the first verification result, the second ciphertext, the second authentication identifier, and the roaming authentication request signature to the second authentication device. The roaming authentication request signature may be obtained by the first authentication device using the first private key corresponding to the first authentication certificate to sign other contents in the roaming authentication request message except the roaming authentication request signature field.
[0129] Step S4: The second authentication device sends a roaming authentication response message to the first authentication device.
[0130] Specifically, after receiving the roaming authentication request message, the second authentication device can parse and obtain the first authentication certificate, the first verification result, the second ciphertext, the second authentication identifier, and the roaming authentication request signature. The second authentication device can first verify the roaming authentication request signature and discard it if the verification fails.
[0131] When the signature verification of the roaming authentication request is passed, the second authentication device can use the second private key of the second authentication certificate to decrypt the second ciphertext to obtain the second random number, the second certificate, the second temporary public key and the second signature. The second authentication device can first verify the second signature. If the verification fails, the second verification result corresponding to the second certificate is obtained as verification failure. If the second signature verification passes, the second authentication device can verify the second certificate and obtain the corresponding second verification result.
[0132] The second authentication device may obtain a second authentication result of the second certificate according to the first authentication result and the second authentication result. When both the first authentication result and the second authentication result indicate that the authentication is passed, the second authentication result may include the second certificate and the second authentication result, and when either the first authentication result or the second authentication result indicates that the authentication is not passed, the second authentication result may include the digest value of the second certificate and the second authentication result.
[0133] Optionally, the structure of the identification result in this embodiment can be as follows: Figure 4As shown. The authentication result may include type, length, verification result, authentication identifier, authenticated certificate information, and authenticator certificate. The type may be used to indicate that the information is an authentication result, the length may be used to indicate the length of the authentication result, and the authenticated certificate information may be an authenticated certificate or a summary value of an authenticated certificate. The verification result may be a numerical value. When the verification result is 0, it indicates that the authentication certificate verification is passed. When the verification result is not 0, different values may be used to indicate the reason why the authentication certificate verification is not passed. Taking the authentication result as the second authentication result as an example, the verification result is the second verification result corresponding to the second certificate, the authentication identifier is the second authentication identifier, the authenticated certificate information may be the second certificate obtained by the second authentication device, or the summary value of the second certificate calculated by the second authentication device using a summary algorithm, and the authenticator certificate is the second authentication certificate.
[0134] After obtaining the second authentication result, the second authentication device may use the second private key corresponding to the second authentication certificate to perform signature calculation on the second authentication result to form a second authentication result signature. Then, the second authentication device may use the first public key of the first authentication certificate to encrypt the data content including the second random number, the second temporary public key, the second authentication result, and the second authentication result signature to obtain the fifth ciphertext. Subsequently, the second authentication device may send a roaming authentication response message including the second authentication certificate, the fifth ciphertext, and the roaming authentication response signature to the first authentication device. The roaming authentication response signature may be obtained by the second authentication device using the second private key corresponding to the second authentication certificate to sign other contents in the roaming authentication response message except the roaming authentication response signature field.
[0135] Step S5: The first authentication device sends a certificate authentication response message to the access control device.
[0136] Specifically, after receiving the roaming authentication response message, the first authentication device can parse and obtain the second authentication certificate, the fifth ciphertext and the roaming authentication response signature. The first authentication device can first verify the roaming authentication response signature and discard it if the verification fails.
[0137] Wherein, when the signature verification of the roaming authentication response passes, the first authentication device can use the first private key of the first authentication certificate to decrypt the fifth ciphertext to obtain the second random number, the second temporary public key, the second authentication result, and the second authentication result signature. Wherein, the first authentication device can first use the second authentication certificate to verify the signature of the second authentication result. If the verification fails, the received message is discarded. At the same time, the first authentication device can also obtain the authentication identifier contained in the second authentication result, and check whether the authentication identifier is consistent with the second authentication identifier obtained from the certificate authentication request message. Wherein, when the signature verification of the second authentication result passes and the authentication identifier contained in the second authentication result is consistent with the second authentication identifier, the first authentication device can use the second verification result contained in the second authentication result.
[0138] The first authentication device may obtain a first authentication result of the first certificate according to the first verification result and the second verification result. When both the first verification result and the second verification result indicate that the verification is passed, the first authentication result may include the first certificate and the first verification result, and when either the first verification result or the second verification result indicates that the verification is not passed, the first authentication result may include the digest value of the first certificate and the first verification result.
[0139] Optionally, the first identification result may also be obtained by Figure 4 In the structure shown, the verification result is the first verification result corresponding to the first certificate, the identification identifier is the first identification identifier, the authentication certificate information can be the first certificate obtained by the first authentication device, or the summary value of the first certificate calculated by the first authentication device using the summary algorithm, and the authenticator certificate is the first authentication certificate.
[0140] After obtaining the first authentication result, the first authentication device can use the first private key corresponding to the first authentication certificate to perform signature calculation on the first authentication result to form a first authentication result signature. Then, the first authentication device can use the first random number to encrypt the data content including the second random number, the second temporary public key, the second authentication result, the second authentication result signature, the first authentication result, and the first authentication result signature to obtain a third ciphertext. Subsequently, the first authentication device can send a certificate authentication response message including the third ciphertext and the certificate authentication response signature to the access control device. The certificate authentication response signature can be obtained by the first authentication device using the first private key corresponding to the first authentication certificate to sign other contents in the certificate authentication response message except the certificate authentication response signature field.
[0141] Step S6: The access control device sends an access authentication response message to the terminal device.
[0142] Specifically, after receiving the certificate authentication response message, the access control device can parse and obtain the third ciphertext and the certificate authentication response signature. The access control device can first verify the certificate authentication response signature and discard it if the signature fails the verification.
[0143] Among them, when the certificate authentication response signature verification is passed, the access control device can use the first random number to decrypt the third message to obtain the second random number, the second temporary public key, the second authentication result, the second authentication result signature, the first authentication result, and the first authentication result signature.
[0144] The access control device may verify the signature of the second authentication result using the authenticator certificate included in the second authentication result. If the verification fails, the received message is discarded. At the same time, the access control device may also obtain the authentication identifier included in the second authentication result, and check whether the authentication identifier is consistent with the second authentication identifier obtained from the access authentication request message. When the signature verification of the second authentication result passes and the authentication identifier included in the second authentication result is consistent with the second authentication identifier, the access control device may use the second authentication result.
[0145] The access control device may determine whether the authenticated certificate information contained in the second authentication result corresponds to the digest value of the authenticated certificate or to the authenticated certificate itself. When the authenticated certificate information corresponds to the authenticated certificate, the access control device may calculate the digest value of the authenticated certificate using a digest algorithm. Then, the access control device may compare the digest value of the authenticated certificate with the second digest of the second certificate previously obtained from the access authentication request message. If the comparison is consistent, it proves that the second authentication result is an authentication result for the second certificate, and thus the result is credible; and if the comparison is inconsistent, it proves that the second authentication result is not an authentication result for the second certificate, and thus the result is unreliable. In this case, the access control device may not need to continue processing the second authentication result, but directly determine that this identity authentication has failed.
[0146] If the second authentication result is determined to be credible, the access control device may continue to process the second authentication result and determine whether the terminal device is credible according to the second verification result included in the second authentication result. If the second verification result indicates that the verification is passed, the terminal device may be determined to be credible; otherwise, the terminal device may be determined to be untrustworthy.
[0147] In the case where it is determined that the terminal device is credible, the access control device may use information including the first temporary private key and the second temporary public key corresponding to the first temporary public key to perform key exchange calculation to generate a shared key.
[0148] The access control device may also use the second random number to encrypt the data content including the first authentication result, the first authentication result signature and the first temporary public key to obtain a fourth ciphertext. Then, the access authentication response message may send an access authentication response message including the fourth ciphertext to the terminal device.
[0149] Step S7: The terminal device processes the access authentication response message.
[0150] Specifically, after receiving the access authentication response message, the terminal device can parse and obtain the fourth ciphertext. Then, the fourth ciphertext is decrypted using the second random number to obtain the first authentication result, the first authentication result signature and the first temporary public key.
[0151] The terminal device may verify the signature of the first authentication result using the authenticator certificate included in the first authentication result. If the verification fails, the received message is discarded. At the same time, the terminal device may also obtain the authentication identifier included in the first authentication result, and check whether the authentication identifier is consistent with the first authentication identifier obtained from the authentication activation message. When the signature verification of the first authentication result passes and the authentication identifier included in the first authentication result is consistent with the first authentication identifier, the terminal device may use the first authentication result.
[0152] Among them, the terminal device can determine whether the authenticated certificate information contained in the first authentication result corresponds to the digest value of the authenticated certificate or to the authenticated certificate itself. Among them, when the authenticated certificate information corresponds to the authenticated certificate, the access control device can calculate the digest value of the authenticated certificate using a digest algorithm. Then, the terminal device can compare the digest value of the authenticated certificate with the first digest of the first certificate previously obtained from the authentication activation message. Among them, if the comparison is consistent, it proves that the first authentication result is an authentication result for the first certificate, so that the result is credible; and if the comparison is inconsistent, it proves that the first authentication result is not an authentication result for the first certificate, so that the result is unreliable. In this case, the terminal device does not need to continue to process the first authentication result, and directly determines that this identity authentication has failed.
[0153] Wherein, if it is determined that the first authentication result is credible, the terminal device may continue to process the first authentication result, and determine whether the access control device is credible according to the first verification result included in the first authentication result. Wherein, if the first verification result indicates that the verification is passed, it can be determined that the access control device is credible; otherwise, it can be determined that the access control device is not credible.
[0154] In which, when it is determined that the access control device is trustworthy, the terminal device can use information including the second temporary private key corresponding to the second temporary public key and the first temporary public key to perform key exchange calculation to generate a shared key.
[0155] Optionally, in order to improve the efficiency of encryption and decryption, the encryption method of the first ciphertext, the second ciphertext, and the fifth ciphertext in this embodiment can be: the message encryption party uses the public key of the message decryption party to asymmetrically encrypt the random number in the content to be encrypted to form the first sub-ciphertext, and uses the random number as the key to symmetrically encrypt the remaining content to be encrypted to form the second sub-ciphertext; when decrypting, the message decryption party first uses the private key corresponding to the public key of the decryption party to asymmetrically decrypt the first sub-ciphertext to obtain the random number, and then uses the random number to symmetrically decrypt the second sub-ciphertext to obtain the corresponding data content. Exemplarily, the asymmetric encryption algorithm in this process can adopt the SM2 asymmetric encryption algorithm, and the symmetric encryption algorithm can adopt the SM4-GCM encryption algorithm. The latter algorithm itself has a message authentication code, so that if the second sub-ciphertext is modified or forged, the decryption party will fail when checking the message authentication code of the second sub-ciphertext; at the same time, if the first sub-ciphertext is modified or forged, the decryption party will fail to check the message authentication code when using the encrypted random number to decrypt the second sub-ciphertext. If the message authentication code check of the second sub-ciphertext fails, the message decryption party may discard the received message.
[0156] It is understandable that when the terminal device and the access control device trust the same authentication service network element, the system may only include the terminal device, the access control device and the first authentication device. The first authentication device may respectively verify the first signature and the second signature, respectively decrypt the first ciphertext and the second ciphertext, and then respectively verify the first certificate and the second certificate to obtain the first verification result and the second verification result respectively, and then respectively form the corresponding first authentication result and the second authentication result, and sign them.
[0157] In this embodiment, both parties of the authentication transmit the ciphertext identity information to the authentication device, and the authentication device decrypts the identity ciphertext and then performs identity authentication, and returns the authentication result, temporary protection random number and key negotiation information in a secure manner, so that the two parties of the authentication do not need to negotiate the message protection password required for the confidentiality of the identity authentication process, simplifying the protocol process and improving the protocol interaction efficiency; and because there is no plaintext identity information and temporary public key transmission in the air interface domain during the identity authentication process, and the identity is not exposed to the other authentication party when the identity authentication of either party fails, it is conducive to improving the security of the protocol. Moreover, in this embodiment, by verifying the digest value of the authentication certificate contained in the authentication result by the terminal device and the access control device, the credibility of the authentication result can be evaluated, and the security of the protocol can be further improved. At the same time, in this embodiment, by generating a first authentication identifier by the access control device and generating a second authentication identifier by the terminal device, and adding the first authentication identifier and the second authentication identifier to the interactive information, the freshness of the identity authentication process can be ensured by verifying the authentication identifier. Furthermore, in this embodiment, by having each device in the identity authentication process sign the information it sends respectively, and having the information processor verify the signature, the reliability of the information source can be guaranteed, which is conducive to further improving the security of the identity authentication process.
[0158] Based on the same inventive concept, the embodiment of the present application also provides an identity authentication method. The implementation scheme for solving the problem provided by the method is similar to the implementation scheme recorded in the above system embodiment, so the specific limitations in one or more identity authentication method embodiments provided below can refer to the limitations on the identity authentication system above, and will not be repeated here.
[0159] In an exemplary embodiment, Figure 5 As shown, an identity authentication method is provided, which is applied to Figure 1 The access control device in the example is used as an example to illustrate the following steps:
[0160] Step S501: Receive an access authentication request message from a terminal device and obtain a second ciphertext contained in the access authentication request message, wherein the second ciphertext contains a second certificate and a second random number encrypted by a second public key.
[0161] Step S502: Send a certificate authentication request message to the first authentication device; the certificate authentication request message includes a first ciphertext and a second ciphertext, wherein the first ciphertext includes a first certificate and a first random number encrypted by a first public key.
[0162] Step S503, receiving a certificate authentication response message from the first authentication device, and obtaining a third ciphertext contained in the certificate authentication response message. The third ciphertext includes a first authentication result encrypted by a first random number, a second authentication result, and a second random number; the first authentication result corresponds to the first certificate, and the second authentication result corresponds to the second certificate.
[0163] Step S504, using the first random number to decrypt the third ciphertext, obtain a second random number, a first authentication result, and a second authentication result; and determine whether the terminal device is credible based on the second authentication result.
[0164] Step S505: encrypt the first authentication result using the second random number to obtain a fourth ciphertext; and send an access authentication response message including the fourth ciphertext to the terminal device.
[0165] In an exemplary embodiment, the second ciphertext further includes a second temporary public key encrypted by a second public key; the third ciphertext further includes a second temporary public key encrypted by a first random number. Decrypting the third ciphertext using the first random number to obtain the second random number, the first authentication result, and the second authentication result includes: decrypting the third ciphertext using the first random number to obtain the second random number, the first authentication result, the second authentication result, and the second temporary public key. Encrypting the first authentication result using the second random number to obtain the fourth ciphertext includes: encrypting the first authentication result and the first temporary public key using the second random number to obtain the fourth ciphertext; the first temporary public key is used for the terminal device to calculate the shared key; after determining whether the terminal device is trustworthy based on the second authentication result, it also includes: if the terminal device is trustworthy, obtaining the shared key based on the second temporary public key and the first temporary private key corresponding to the first temporary public key.
[0166] In an exemplary embodiment, the access authentication request message also includes a second summary of the second certificate; after decrypting the third ciphertext using the first random number to obtain the second random number, the first authentication result, and the second authentication result, it also includes: if the second authentication result includes a summary value of the authenticated certificate, then determining whether the second authentication result is credible based on the consistency between the summary value and the second summary; if the second authentication result includes an authenticated certificate, calculating the summary value of the authenticated certificate, and determining whether the second authentication result is credible based on the consistency between the summary value and the second summary.
[0167] In an exemplary embodiment, Figure 6 As shown, an identity authentication method is provided, which is applied to Figure 1 The terminal device in the example is used to illustrate, including the following steps:
[0168] Step S601: Use the second public key to encrypt the second certificate and the second random number to obtain a second ciphertext.
[0169] Step S602: Send an access authentication request message including a second ciphertext to the access control device.
[0170] Step S603, receiving an access authentication response message from the access control device, and obtaining a fourth ciphertext contained in the access authentication response message. The fourth ciphertext is obtained by the access control device encrypting the first authentication result using the second random number; the second random number and the first authentication result are obtained by the access control device according to the certificate authentication response message received from the first authentication device; the first authentication result is obtained by the first authentication device verifying the first certificate of the access control device.
[0171] Step S604: decrypt the fourth ciphertext using the second random number to obtain a first authentication result; and determine whether the access control device is credible based on the first authentication result.
[0172] In an exemplary embodiment, the second certificate and the second random number are encrypted with the second public key to obtain the second ciphertext, including: the second certificate, the second random number, and the second temporary public key are encrypted with the second public key to obtain the second ciphertext; the second temporary public key is used for the access control device to calculate the shared key; the fourth ciphertext also includes the first temporary public key encrypted by the second random number; the fourth ciphertext is decrypted with the second random number to obtain the first authentication result, including: the fourth ciphertext is decrypted with the second random number to obtain the first authentication result and the first temporary public key. After determining whether the access control device is credible according to the first authentication result, it includes: if the access control device is credible, the shared key is obtained according to the first temporary public key and the second temporary private key corresponding to the second temporary public key.
[0173] In an exemplary embodiment, before sending an access authentication request message including a second ciphertext to an access control device, the method includes: receiving an authentication activation message from the access control device; the authentication activation message includes a first summary of a first certificate; after decrypting a fourth ciphertext using a second random number to obtain a first authentication result, the method includes: if the first authentication result includes a summary value of an authenticated certificate, determining whether the first authentication result is credible based on the consistency between the summary value and the first summary; if the first authentication result includes an authenticated certificate, calculating the summary value of the authenticated certificate, and determining whether the first authentication result is credible based on the consistency between the summary value and the first summary.
[0174] In an exemplary embodiment, Figure 7 As shown, an identity authentication method is provided, which is applied to Figure 1 Taking the first identification device in the example as an example, the method includes the following steps:
[0175] Step S701, receiving a certificate authentication request message from an access control device, and obtaining a first ciphertext and a second ciphertext contained in the certificate authentication request message. The first ciphertext is obtained by the access control device using a first public key to encrypt a first certificate and a first random number, the second ciphertext is received by the access control device from a terminal device, and the second ciphertext is obtained by the terminal device using a second public key to encrypt a second certificate and a second random number.
[0176] Step S702: decrypt the first ciphertext using the first private key corresponding to the first public key to obtain a first certificate and a first random number; verify the first certificate to obtain a first verification result.
[0177] Step S703, obtaining a second random number and a second authentication result, wherein the second random number is obtained by decrypting the second ciphertext using a second private key corresponding to the second public key; and the second authentication result includes a second verification result obtained by verifying the second certificate.
[0178] Step S704: Obtain a first authentication result of the first certificate according to the first verification result and the second verification result.
[0179] Step S705: Use the first random number to encrypt the first authentication result, the second authentication result, and the second random number to obtain a third ciphertext.
[0180] Step S706: Send a certificate authentication response message including the third ciphertext to the access control device.
[0181] In an exemplary embodiment, a first authentication result of the first certificate is obtained based on the first verification result and the second verification result, including: if the first verification result and / or the second verification result indicates that the verification failed, calculating the summary value of the first certificate, and obtaining the first authentication result based on the summary value and the first verification result; if the first verification result and the second verification result indicate that the verification passed, obtaining the first authentication result based on the first certificate and the first verification result; and / or, when the first verification result and / or the second verification result indicates that the verification failed, the second authentication result also includes the summary value of the second certificate; when the first verification result and the second verification result indicate that the verification passed, the second authentication result also includes the second certificate.
[0182] In an exemplary embodiment, obtaining a second random number and a second authentication result includes: sending a roaming authentication request message to a second authentication device; the roaming authentication request message includes a first public key, a first verification result, and a second ciphertext; receiving a roaming authentication response message from the second authentication device, and obtaining a fifth ciphertext contained in the roaming authentication response message; the fifth ciphertext is obtained by encrypting the second random number and the second authentication result by the second authentication device using the first public key; the second random number is obtained by decrypting the second ciphertext by the second authentication device using the second private key corresponding to the second public key; the second authentication result includes a second verification result obtained by the second authentication device verifying the second certificate; the fifth ciphertext is decrypted using the first private key corresponding to the first public key to obtain the second random number and the second authentication result.
[0183] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0184] Based on the same inventive concept, the embodiment of the present application also provides an identity authentication device for implementing the identity authentication method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more identity authentication device embodiments provided below can refer to the limitations on the identity authentication method above, and will not be repeated here.
[0185] In an exemplary embodiment, Figure 8 As shown, an identity authentication device 800 is provided, comprising:
[0186] The first receiving module 801 is used to receive an access authentication request message from a terminal device and obtain a second ciphertext contained in the access authentication request message; the second ciphertext contains a second certificate and a second random number encrypted by a second public key.
[0187] The first sending module 802 is used to send a certificate authentication request message to the first authentication device; the certificate authentication request message includes a first ciphertext and a second ciphertext; the first ciphertext includes a first certificate and a first random number encrypted by a first public key.
[0188] The second receiving module 803 is used to receive the certificate authentication response message from the first authentication device, and obtain the third ciphertext contained in the certificate authentication response message; the third ciphertext includes the first authentication result, the second authentication result and the second random number encrypted by the first random number; the first authentication result corresponds to the first certificate, and the second authentication result corresponds to the second certificate.
[0189] The decryption module 804 is used to decrypt the third ciphertext using the first random number to obtain a second random number, a first authentication result, and a second authentication result; and determine whether the terminal device is credible according to the second authentication result.
[0190] The third sending module 805 is configured to encrypt the first authentication result by using the second random number to obtain a fourth ciphertext; and send an access authentication response message including the fourth ciphertext to the terminal device.
[0191] In an exemplary embodiment, the second ciphertext also includes a second temporary public key encrypted by a second public key; the third ciphertext also includes a second temporary public key encrypted by a first random number; the decryption module 804 is used to: use the first random number to decrypt the third ciphertext to obtain a second random number, a first identification result, a second identification result, and a second temporary public key; the third sending module 805 is used to: use the second random number to encrypt the first identification result and the first temporary public key to obtain a fourth ciphertext; the first temporary public key is used for the terminal device to calculate a shared key; the device also includes: a key calculation module, which is used to obtain a shared key based on the second temporary public key and the first temporary private key corresponding to the first temporary public key if the terminal device is trustworthy.
[0192] In an exemplary embodiment, the access authentication request message also includes a second summary of the second certificate; the device also includes: a first comparison module, which is used to determine whether the second authentication result is credible based on the consistency between the summary value and the second summary if the second authentication result includes the summary value of the authenticated certificate; and a second comparison module, which is used to calculate the summary value of the authenticated certificate if the second authentication result includes the authenticated certificate, and determine whether the second authentication result is credible based on the consistency between the summary value and the second summary.
[0193] In an exemplary embodiment, Fig. 9 As shown, an identity authentication device 900 is provided, comprising:
[0194] The encryption module 901 is used to encrypt the second certificate and the second random number using the second public key to obtain a second ciphertext.
[0195] The sending module 902 is configured to send an access authentication request message including a second ciphertext to the access control device.
[0196] The receiving module 903 is used to receive an access authentication response message from the access control device, and obtain a fourth ciphertext contained in the access authentication response message; the fourth ciphertext is obtained by the access control device encrypting the first authentication result using the second random number; the second random number and the first authentication result are obtained by the access control device according to the certificate authentication response message received from the first authentication device; the first authentication result is obtained by the first authentication device verifying the first certificate of the access control device;
[0197] The decryption module 904 is configured to decrypt the fourth ciphertext using the second random number to obtain a first authentication result; and determine whether the access control device is credible according to the first authentication result.
[0198] In an exemplary embodiment, the encryption module 901 is used to: use the second public key to encrypt the second certificate, the second random number, and the second temporary public key to obtain a second ciphertext; the second temporary public key is used for the access control device to calculate the shared key; the fourth ciphertext also includes the first temporary public key encrypted by the second random number; the decryption module 904 is used to: use the second random number to decrypt the fourth ciphertext to obtain a first authentication result and a first temporary public key; the device also includes: a key calculation module, which is used to obtain the shared key based on the first temporary public key and the second temporary private key corresponding to the second temporary public key if the access control device is trustworthy.
[0199] In an exemplary embodiment, the apparatus further includes: an activation receiving module for receiving an authentication activation message from an access control device; the authentication activation message includes a first summary of a first certificate; a result acquisition module for acquiring a first verification result included in a first authentication result; a first comparison module for determining whether the first authentication result is credible based on the consistency between the summary value and the first summary if the first authentication result includes a summary value of an authenticated certificate; and a second comparison module for calculating the summary value of the authenticated certificate if the first authentication result includes an authenticated certificate, and determining whether the first authentication result is credible based on the consistency between the summary value and the first summary.
[0200] In an exemplary embodiment, Fig.10 As shown, an identity authentication device 1000 is provided, comprising:
[0201] The receiving module 1001 is used to receive a certificate authentication request message from an access control device, and obtain a first ciphertext and a second ciphertext contained in the certificate authentication request message; the first ciphertext is obtained by the access control device using a first public key to encrypt a first certificate and a first random number, and the second ciphertext is received by the access control device from a terminal device; the second ciphertext is obtained by the terminal device using a second public key to encrypt a second certificate and a second random number.
[0202] The decryption module 1002 is used to decrypt the first ciphertext using the first private key corresponding to the first public key to obtain a first certificate and a first random number; and verify the first certificate to obtain a first verification result.
[0203] The first acquisition module 1003 is used to obtain a second random number and a second authentication result; the second random number is obtained by decrypting the second ciphertext using a second private key corresponding to the second public key; the second authentication result includes a second verification result obtained by verifying the second certificate.
[0204] The second acquisition module 1004 is configured to obtain a first authentication result of the first certificate according to the first verification result and the second verification result.
[0205] The encryption module 1005 is used to encrypt the first authentication result, the second authentication result, and the second random number using the first random number to obtain a third ciphertext.
[0206] The sending module 1006 is configured to send a certificate authentication response message including a third ciphertext to the access control device.
[0207] In an exemplary embodiment, the second acquisition module 1004 is used to: if the first verification result and / or the second verification result indicates that the verification failed, calculate the summary value of the first certificate, and obtain the first authentication result based on the summary value and the first verification result; if the first verification result and the second verification result indicate that the verification passed, obtain the first authentication result based on the first certificate and the first verification result; and / or, in an exemplary embodiment, when the first verification result and / or the second verification result indicates that the verification failed, the second authentication result also includes the summary value of the second certificate; when the first verification result and the second verification result indicate that the verification passed, the second authentication result also includes the second certificate.
[0208] In an exemplary embodiment, the first acquisition module 1003 is used to: send a roaming authentication request message to a second authentication device; the roaming authentication request message includes a first public key, a first verification result, and a second ciphertext; receive a roaming authentication response message from the second authentication device, and obtain a fifth ciphertext contained in the roaming authentication response message; the fifth ciphertext is obtained by the second authentication device encrypting the second random number and the second authentication result using the first public key; the second random number is obtained by the second authentication device decrypting the second ciphertext using the second private key corresponding to the second public key; the second authentication result includes the second verification result obtained by the second authentication device verifying the second certificate; the fifth ciphertext is decrypted using the first private key to obtain the second random number and the second authentication result.
[0209] Each module in the above-mentioned identity authentication device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a communication device in the form of hardware, or can be stored in a memory in a communication device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0210] In an exemplary embodiment, a communication device is provided. The communication device may be a server, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The communication device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the communication device is used to provide computing and control capabilities. The memory of the communication device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the communication device is used to exchange information between the processor and an external device. The communication interface of the communication device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an identity authentication method is implemented.
[0211] In an exemplary embodiment, a communication device is provided. The communication device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.12As shown. The communication device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the communication device is used to provide computing and control capabilities. The memory of the communication device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the communication device is used to exchange information between the processor and an external device. The communication interface of the communication device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an identity authentication method is implemented. The display unit of the communication device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the communication device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the communication device housing, or an external keyboard, touchpad or mouse.
[0212] Those skilled in the art will understand that Fig.11 or Fig.12 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the communication device to which the scheme of the present application is applied. The specific communication device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0213] In one embodiment, a communication device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0214] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0215] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0216] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0217] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0218] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0219] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An identity authentication method, characterized in that: Applied to an access control device, the method comprises: Receiving an access authentication request message from a terminal device, and acquiring a second ciphertext contained in the access authentication request message; the second ciphertext includes a second certificate and a second random number encrypted by a second public key; Sending a certificate authentication request message to a first authentication device; the certificate authentication request message includes a first ciphertext and a second ciphertext; the first ciphertext includes a first certificate and a first random number encrypted by a first public key; receiving a certificate authentication response message from the first authentication device, and obtaining a third ciphertext contained in the certificate authentication response message; the third ciphertext includes a first authentication result, a second authentication result, and the second random number encrypted by the first random number; the first authentication result corresponds to the first certificate, and the second authentication result corresponds to the second certificate; decrypting the third ciphertext using the first random number to obtain the second random number, the first authentication result, and the second authentication result; and determining whether the terminal device is credible according to the second authentication result; The first authentication result is encrypted using the second random number to obtain a fourth ciphertext; and an access authentication response message including the fourth ciphertext is sent to the terminal device.
2. The method according to claim 1, characterized in that The second ciphertext further includes a second temporary public key encrypted by the second public key; the third ciphertext further includes the second temporary public key encrypted by the first random number; The step of decrypting the third ciphertext using the first random number to obtain the second random number, the first identification result, and the second identification result includes: decrypting the third ciphertext using the first random number to obtain the second random number, the first identification result, the second identification result, and the second temporary public key; The step of encrypting the first authentication result by using the second random number to obtain a fourth ciphertext includes: encrypting the first authentication result and a first temporary public key by using the second random number to obtain a fourth ciphertext; the first temporary public key is used by the terminal device to calculate a shared key; After determining whether the terminal device is credible according to the second authentication result, the method further includes: if the terminal device is credible, obtaining the shared key according to the second temporary public key and the first temporary private key corresponding to the first temporary public key.
3. The method according to claim 1, characterized in that The access authentication request message also includes a second summary of the second certificate; after decrypting the third ciphertext using the first random number to obtain the second random number, the first authentication result, and the second authentication result, the method further includes: If the second authentication result includes a digest value of the authenticated certificate, determining whether the second authentication result is credible based on the consistency between the digest value and the second digest; If the second authentication result includes an authenticated certificate, a digest value of the authenticated certificate is calculated, and whether the second authentication result is credible is determined based on the consistency between the digest value and the second digest.
4. An identity authentication method, characterized in that: Applied to a terminal device, the method comprises: Encrypting the second certificate and the second random number using the second public key to obtain a second ciphertext; Sending an access authentication request message including the second ciphertext to the access control device; receiving an access authentication response message from the access control device, and obtaining a fourth ciphertext contained in the access authentication response message; the fourth ciphertext is obtained by the access control device encrypting the first authentication result using the second random number; the second random number and the first authentication result are obtained by the access control device according to the certificate authentication response message received from the first authentication device; the first authentication result is obtained by the first authentication device verifying the first certificate of the access control device; The fourth ciphertext is decrypted using the second random number to obtain the first authentication result; and whether the access control device is credible is determined according to the first authentication result.
5. The method according to claim 4, characterized in that The method of encrypting the second certificate and the second random number by using the second public key to obtain the second ciphertext includes: The second certificate, the second random number, and the second temporary public key are encrypted using the second public key to obtain a second ciphertext; the second temporary public key is used by the access control device to calculate a shared key; The fourth ciphertext also includes a first temporary public key encrypted by the second random number; and decrypting the fourth ciphertext using the second random number to obtain the first authentication result includes: Decrypting the fourth ciphertext using the second random number to obtain the first authentication result and the first temporary public key; After determining whether the access control device is credible according to the first authentication result, the method further comprises: If the access control device is credible, the shared key is obtained according to the first temporary public key and a second temporary private key corresponding to the second temporary public key.
6. The method according to claim 4, characterized in that Before sending the access authentication request message including the second ciphertext to the access control device, the method includes: receiving an authentication activation message from the access control device; the authentication activation message including a first summary of the first certificate; After decrypting the fourth ciphertext by using the second random number to obtain the first identification result, the method includes: If the first authentication result includes a digest value of the authenticated certificate, determining whether the first authentication result is credible based on the consistency between the digest value and the first digest; If the first authentication result includes an authenticated certificate, a digest value of the authenticated certificate is calculated, and whether the first authentication result is credible is determined based on the consistency between the digest value and the first digest.
7. An identity authentication method, characterized in that: Applied to a first authentication device, the method comprises: receiving a certificate authentication request message from an access control device, and obtaining a first ciphertext and a second ciphertext contained in the certificate authentication request message; the first ciphertext is obtained by the access control device encrypting a first certificate and a first random number using a first public key, and the second ciphertext is received by the access control device from a terminal device; the second ciphertext is obtained by the terminal device encrypting a second certificate and a second random number using a second public key; Decrypting the first ciphertext using a first private key corresponding to the first public key to obtain the first certificate and the first random number; verifying the first certificate to obtain a first verification result; Obtaining the second random number and the second authentication result; the second random number is obtained by decrypting the second ciphertext using the second private key corresponding to the second public key; the second authentication result includes a second verification result obtained by verifying the second certificate; Obtaining a first authentication result of the first certificate according to the first verification result and the second verification result; Encrypting the first authentication result, the second authentication result, and the second random number using the first random number to obtain a third ciphertext; A certificate authentication response message including the third ciphertext is sent to the access control device.
8. The method according to claim 7, characterized in that The obtaining, according to the first verification result and the second verification result, a first authentication result of the first certificate includes: If the first verification result and / or the second verification result indicates that the verification fails, calculating the digest value of the first certificate, and obtaining the first authentication result according to the digest value and the first verification result; If the first verification result and the second verification result indicate that the verification is successful, obtaining the first authentication result according to the first certificate and the first verification result; and / or, In the case where the first verification result and / or the second verification result indicates that the verification fails, the second authentication result includes a digest value of the second certificate; In the case where the first verification result and the second verification result indicate that the verification is passed, the second authentication result includes the second certificate.
9. The method according to claim 7, characterized in that: The obtaining of the second random number and the second identification result includes: Sending a roaming authentication request message to a second authentication device; the roaming authentication request message includes the first public key, the first verification result, and the second ciphertext; receiving a roaming authentication response message from the second authentication device, and obtaining a fifth ciphertext contained in the roaming authentication response message; the fifth ciphertext is obtained by encrypting the second random number and the second authentication result by the second authentication device using the first public key; the second random number is obtained by decrypting the second ciphertext by the second authentication device using the second private key corresponding to the second public key; the second authentication result includes a second verification result obtained by the second authentication device verifying the second certificate; The fifth ciphertext is decrypted using the first private key corresponding to the first public key to obtain the second random number and the second identification result.
10. An identity authentication system, characterized in that: The system comprises: a terminal device, an access control device, and a first identification device; The terminal device is used to encrypt the second certificate and the second random number using the second public key to obtain a second ciphertext; and send an access authentication request message including the second ciphertext to the access control device; The access control device is configured to receive the access authentication request message and obtain the second ciphertext; send a certificate authentication request message to the first authentication device; the certificate authentication request message includes the first ciphertext and the second ciphertext; the first ciphertext includes the first certificate and the first random number encrypted by the first public key; The first authentication device is used to receive the certificate authentication request message, obtain the first ciphertext and the second ciphertext contained in the certificate authentication request message; decrypt the first ciphertext using the first private key corresponding to the first public key to obtain the first certificate and the first random number; verify the first certificate to obtain a first verification result; obtain the second random number and the second authentication result; the second random number is obtained by decrypting the second ciphertext using the second private key corresponding to the second public key; the second authentication result includes a second verification result obtained by verifying the second certificate; obtain the first authentication result of the first certificate according to the first verification result and the second verification result; encrypt the first authentication result, the second authentication result and the second random number using the first random number to obtain a third ciphertext; and send a certificate authentication response message containing the third ciphertext to the access control device; The access control device is further configured to receive the certificate authentication response message, obtain the third ciphertext contained in the certificate authentication response message; decrypt the third ciphertext using the first random number to obtain the second random number, the first authentication result, and the second authentication result; determine whether the terminal device is credible according to the second authentication result; encrypt the first authentication result using the second random number to obtain a fourth ciphertext; and send an access authentication response message containing the fourth ciphertext to the terminal device; The terminal device is further used to receive the access authentication response message to obtain the fourth ciphertext; use the second random number to decrypt the fourth ciphertext to obtain the first authentication result; and determine whether the access control device is credible based on the first authentication result.
11. The identity authentication system according to claim 10, characterized in that: The system further comprises: a second authentication device; The first authentication device is further used to send a roaming authentication request message to the second authentication device; the roaming authentication request message includes the first public key, the first verification result, and the second ciphertext; The second authentication device is configured to receive the roaming authentication request message, obtain the first public key, the first verification result, and the second ciphertext; decrypt the second ciphertext using the second private key corresponding to the second public key to obtain the second random number and the second certificate; verify the second certificate to obtain the second verification result; obtain the second authentication result according to the second verification result; encrypt the second random number and the second authentication result using the first public key to obtain a fifth ciphertext; and send a roaming authentication response message including the fifth ciphertext to the first authentication device; The first authentication device is further used to receive the roaming authentication response message to obtain the fifth ciphertext; and decrypt the fifth ciphertext using the first private key corresponding to the first public key to obtain the second random number and the second authentication result.
Citation Information
Patent Citations
Method for controlling communication access, AP and communication device
CN114731513A
Identity authentication method and device
CN114760036A
Identity authentication method and device
CN114760038A
Identity authentication method and device
CN114760040A