WO2018095050A1 - 身份认证方法与设备及*** - Google Patents
身份认证方法与设备及*** Download PDFInfo
- Publication number
- WO2018095050A1 WO2018095050A1 PCT/CN2017/092900 CN2017092900W WO2018095050A1 WO 2018095050 A1 WO2018095050 A1 WO 2018095050A1 CN 2017092900 W CN2017092900 W CN 2017092900W WO 2018095050 A1 WO2018095050 A1 WO 2018095050A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- identity
- key
- identity identifier
- message
- public key
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/04—Key management, e.g. using generic bootstrapping architecture [GBA]
- H04W12/043—Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
- H04W12/0433—Key management protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
- H04L63/061—Network architectures or network communication protocols for network security for supporting key management in a packet data network for key exchange, e.g. in peer-to-peer networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
- H04L63/062—Network architectures or network communication protocols for network security for supporting key management in a packet data network for key distribution, e.g. centrally by trusted party
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0823—Network architectures or network communication protocols for network security for authentication of entities using certificates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/16—Implementing security features at a particular protocol layer
- H04L63/166—Implementing security features at a particular protocol layer at the transport layer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/04—Key management, e.g. using generic bootstrapping architecture [GBA]
- H04W12/041—Key generation or derivation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/04—Key management, e.g. using generic bootstrapping architecture [GBA]
- H04W12/043—Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
- H04W12/0431—Key distribution or pre-distribution; Key agreement
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
- H04W12/069—Authentication using certificates or pre-shared keys
Definitions
- the present application relates to the field of communications, and in particular, to an identity authentication method and device and system.
- the non-interactive key agreement technique is a technique for generating a pre-shared key for both parties. Different from the traditional key negotiation, the non-interactive key negotiation can realize that when the two parties do not exchange information, they can use the key information of the communication and the public information of the other party to generate the same pre-shared key.
- Identity-based non-interactive key agreement is a special type of key negotiation. The technology is based on an identity-based password-based key agreement protocol. The public information of both parties is their own identity, such as email address. IP address and domain name, etc.
- the cryptographic algorithm protocol, authentication, and key agreement between the communication parties need to adopt the transport layer.
- the Transport Protocol Security (TLS) is completed. Therefore, in the IoT scenario, if the two parties need to perform identity-based non-interactive key agreement, then both parties need to use the information specified in the TLS protocol to send their own identity to the other party to complete the identity authentication.
- the communication party can usually send the identity identifier by using the ClientHello message and the ServerHello message specified in the TLS protocol; that is, the terminal device can send the identity of the terminal device to the server through the ClientHello message, and the server can send the identity of the server through the ServerHello message.
- logo the identity identifier
- the terminal device can send the identity of the terminal device to the server through the ClientHello message
- the server can send the identity of the server through the ServerHello message.
- logo the identity identifier by transmitting the identity identifier through the ClientHello message and the ServerHello message, it is necessary to add a new field in the ClientHello message and the ServerHello message, that is, the TLS protocol supported by the terminal device and the network device needs to be extended. Due to the large number of terminal devices in the Internet of Things, the extension of the TLS protocol supported by the peer device and the network device may bring compatibility problems between the devices during the identity authentication process.
- the application provides an identity authentication method, device and system, which can not only enable the communication parties to use the message specified in the TLS protocol to send the identity, but also avoid the compatibility caused by the extension of the TLS protocol to the identity authentication process. problem.
- the present application provides an identity authentication method, where the method includes: acquiring, by a first device, a first master public key and a first private key corresponding to a first identity identifier from a key generation center, where The first identity is an identity of the first device; the first device sends a secure transport protocol TLS client hello ClientHello message, and the client hello message carries a cipher suite of an alternate pre-shared key PSK mode; The first device obtains the second identity identifier from a TLS server key exchange ServerKeyExchange message, where the second identity identifier is an identity identifier of the second device, and the first device uses the second identity identifier, the first device a private key and the first a primary public key, generating a pre-shared key of the selected PSK mode, wherein the selected PSK mode is one selected by the second device from the candidate PSK mode; the first device uses the The pre-shared key completes identity authentication with the second device.
- the first device sends a TLS client key exchange ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier.
- the first device acquires the second identity identifier from a TLS server key exchange ServerKeyExchange message.
- the method includes: the first device acquiring the second identity identifier and the second master public key from the ServerKeyExchange message.
- the first device obtains the second identity identifier from a TLS server key exchange ServerKeyExchange message.
- the first device obtains an alternate identity of the second device from the ServerKeyExchange message, and the first device selects one of the candidate identity identifiers as the second identity identifier.
- the first device acquires the second identity identifier from a TLS server key exchange ServerKeyExchange message.
- the first device obtains, from the ServerKeyExchange message, an alternative identity identifier of the second device and an alternate primary public key corresponding to each of the candidate identity identifiers; the first device from the candidate identity A second identity identifier is selected in the identifier, where the candidate master public key corresponding to the second identity identifier is the same as the first master public key.
- the first device uses the second identity, the first private key, and the first primary a public key, generating a pre-shared key of the selected PSK mode, including: if the second primary public key is the same as the first primary public key, the first device uses the second identity, the first A private key and the first primary public key generate a pre-shared key of the selected PSK mode.
- the first device sends a TLS client key exchange ClientKeyExchange message, where the ClientKeyExchange message carries the first
- the identity identifier includes: the first device sends a ClientKeyExchange message, and the ClientKeyExchange message carries the first identity identifier and the first master public key.
- the first device sends a TLS client key exchange ClientKeyExchange message, the ClientKeyExchange message
- the first identifier is carried by the first device, and the first device sends a ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier and the second identity identifier.
- the first device sends a TLS client key exchange ClientKeyExchange message, the ClientKeyExchange message
- the carrying the first identity identifier includes: the first device sends a ClientKeyExchange message, and the ClientKeyExchange message carries the first identity identifier and the second identity identifier indication information.
- the present application further provides another identity authentication method, including: acquiring, by a second device, a second primary public key from a key generation center and a second private key corresponding to the second identity identifier, the second Identity is the identity of the second device Identifying; the second device sends a secure transport protocol TLS server greeting ServerHello message, where the ServerHello message carries a cipher suite of the selected PSK mode; and the second device obtains the first identity from the TLS client key exchange ClientKeyExchange message Identifying that the first identity is an identity of the first device; the second device uses the first identity, the second private key, and the second primary public key to generate the selected PSK a pre-shared key of the mode; the second device uses the pre-shared key to complete identity authentication with the first device.
- the second device sends a TLS server key exchange ServerKeyExchange message, where the ServerKeyExchange message carries a second identity identifier.
- the second device obtains the second primary public key and the second identity from the key generation center Identifying a corresponding second private key, comprising: the second device acquiring a second primary public key and an optional private key from the key generation center, wherein each of the candidate private keys and the second An alternate identifier for the device corresponds.
- the second device obtains the second master public key and the second identity from the key generation center Identifying a corresponding second private key, comprising: the second device acquiring an alternate primary public key and an optional private key from the key generation center, wherein each of the candidate private keys and an alternate primary The public key corresponds to each of the alternative private keys corresponding to an alternate identification of the second device.
- the second device sends a TLS server key exchange ServerKeyExchange message, where the ServerKeyExchange message carries the second identity identifier,
- the second device sends a ServerKeyExchange message, where the ServerKeyExchange message carries a second identity identifier and a second master public key.
- the second device sends a TLS server key exchange ServerKeyExchange message, where the ServerKeyExchange message carries a second identity identifier
- the method includes: the second device sends a ServerKeyExchange message, where the sending ServerKeyExchange message carries the candidate primary public key.
- the second device sends a TLS server key exchange ServerKeyExchange message, where the ServerKeyExchange message carries the second identity
- the identifier includes: the second device sends a ServerKeyExchange message, where the sending ServerKeyExchange message carries the candidate identifier and the candidate primary public key corresponding to each of the candidate identifiers.
- the second device obtains the first identity identifier from the TLS client key exchange ClientKeyExchange message, including: The second device obtains the first identity identifier and the second identity identifier from the ClientKeyExchange message.
- the present application provides a communication device, including: a transceiver unit, configured to acquire a first master public key and a first private key corresponding to a first identity identifier from a key generation center, where An identity identifier is an identity of the first device; a secure transport protocol TLS client greets a ClientHello message, the clientHello message carries a cipher suite of an alternate pre-shared key PSK mode; and a processing unit is used for the slave TLS server Obtaining the second identity identifier in the key exchange ServerKeyExchange message, where the second identity identifier is an identity identifier of the second device, using the second identity identifier, the first private key, and the first primary public key , generating the selected PSK mode a pre-shared key, wherein the selected PSK mode is one selected by the second device from the candidate PSK mode; using the pre-shared key to complete an identity with the second device Certification.
- the transceiver unit may be implemented by a transceiver or
- the transceiver unit is further configured to send a TLS client key exchange ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier.
- the processing unit is further configured to obtain the second identity identifier from the ServerKeyExchange message. And the second master public key.
- the processing unit is further configured to obtain an alternative of the second device from the ServerKeyExchange message.
- An identity identifier one of the candidate identity identifiers is selected as the second identity identifier.
- the processing unit is further configured to obtain an alternative of the second device from the ServerKeyExchange message.
- the processing unit is further configured to: if the second primary public key is the same as the first primary public key And using the second identity, the first private key, and the first primary public key to generate a pre-shared key of the selected PSK mode.
- the transceiver unit is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier and the The first primary public key is described.
- the transceiver unit is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier And the second identity.
- the transceiver unit is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier And indication information of the second identity.
- the present application further provides another communication device, including: a transceiver unit, configured to acquire a second master public key and a second private key corresponding to the second identity identifier from the key generation center, where The second identity is the identity of the second device; the secure transport protocol TLS server greets the ServerHello message, the ServerHello message carries the cipher suite of the selected PSK mode; and the processing unit is configured to exchange the ClientKeyExchange message from the TLS client key.
- a transceiver unit configured to acquire a second master public key and a second private key corresponding to the second identity identifier from the key generation center, where The second identity is the identity of the second device
- the secure transport protocol TLS server greets the ServerHello message, the ServerHello message carries the cipher suite of the selected PSK mode
- the processing unit is configured to exchange the ClientKeyExchange message from the TLS client key.
- the transceiver unit may be implemented by a transceiver or a processor of the communication device in combination with a transceiver, and the processing unit may be implemented by a transceiver of the communication device.
- the transceiver unit is further configured to send an The full transport layer protocol TLS server key exchange ServerKeyExchange message, the ServerKeyExchange message carries the second identity identifier.
- the processing unit is further configured to acquire a second primary public key from the key generation center And an alternate private key, wherein each of the alternate private keys corresponds to an alternate identification of the second device.
- the processing unit is further configured to obtain an alternate primary public key from the key generation center And an alternate private key, wherein each of the alternate private keys corresponds to an alternate primary public key, and each of the alternate private keys corresponds to an alternate identification of the second device.
- the transceiver unit is further configured to send a ServerKeyExchange message, where the ServerKeyExchange message carries the second identity identifier and the second The main public key.
- the transceiver unit is further configured to send a ServerKeyExchange message, where the sending ServerKeyExchange message carries the candidate host key.
- the transceiver unit is further configured to send a ServerKeyExchange message, where the sending ServerKeyExchange message carries the candidate And identifying the candidate primary public key corresponding to each of the candidate identifiers.
- the processing unit is further configured to obtain, by using the ClientKeyExchange message, a first identity identifier and the foregoing Two identity.
- the present application further provides a communication system, including: a key generation center, a first device, and a second device; wherein the first device is configured to acquire a first primary public key from a key generation center. And a first private key corresponding to the first identity, where the first identity is an identity of the first device, and a secure transport protocol TLS client grees a client Hello message, where the client Hello message carries Selecting a cipher suite of a pre-shared key PSK mode; obtaining the second identity from the TLS server key exchange ServerKeyExchange message, the second identity being an identity of the second device; using the second identity, Generating, by the first private key and the first primary public key, a pre-shared key of a selected PSK mode, wherein the selected PSK mode is selected by the second device from the candidate PSK mode One that uses the pre-shared key to complete identity authentication with the second device; the second device is configured to obtain a second master public key from the key generation center and is opposite to the second identity
- the first device and the second device can use the information in the TLS protocol to implement the transmission of the identity identifier without extending the TLS protocol, thereby avoiding Compatibility issues caused by the extension of the TLS protocol.
- FIG. 1 is a schematic structural diagram of an embodiment of a communication system according to the present application.
- FIG. 2 is a flowchart of an embodiment of an identity authentication method according to the present application.
- FIG. 3 is a schematic structural diagram of another embodiment of an identity authentication method according to the present application.
- FIG. 4 is a schematic structural diagram of another embodiment of an identity authentication method according to the present application.
- FIG. 5 is a schematic structural diagram of another embodiment of an identity authentication method according to the present application.
- FIG. 6 is a schematic structural diagram of another embodiment of an identity authentication method according to the present application.
- FIG. 7 is a schematic structural diagram of another embodiment of an identity authentication method according to the present application.
- FIG. 8 is a schematic structural diagram of an embodiment of a communication device according to the present application.
- FIG. 9 is a schematic structural diagram of another embodiment of a communication device according to the present application.
- FIG. 1 is a schematic structural diagram of an embodiment of a communication system according to the present application.
- the communication system may include a first device 101, a second device 102, and a key generation center 103.
- the first device 101 can perform encrypted data transmission with the second device 102.
- the cryptographic algorithm protocol, the authentication, and the key agreement process required for the encrypted data transmission between the first device 101 and the second device 102 may all be completed by using the TLS protocol.
- the TLS protocol consists of two layers: the TLS Record Protocol (TLS Record) and the TLS Handshake Protocol (TLS Handshake).
- the handshake protocol is the core part of TLS. Completing the functions of cryptographic algorithm protocol, authentication and session key generation between the client and the server is the prerequisite for the secure communication of data between the two parties.
- TLS supports a variety of cipher suites, one of which is based on pre-shared key cipher suites (PSK).
- PSK pre-shared key cipher suites
- the TLS of the cipher suite that supports the pre-shared key is abbreviated as TLS-PSK.
- the pre-shared key used in the TLS-PSK is a symmetric key, that is, the first device 101 and the second device 102 use the same symmetric key. Based on the same pre-shared key, the first device 101 and the second device 102 complete authentication and key generation by interaction.
- the first device 101 may be a terminal device; the second device 102 may be a network device, or may be other terminal devices than the first device 101.
- the first device 101 may be referred to as a client, and the second device 102 may be referred to as a server.
- the terminal device may be a device that provides voice and or data connectivity to the user, a handheld device with wireless connectivity, or other processing device that is connected to the wireless modem.
- the wireless terminal can communicate with one or more core networks via a radio access network (RAN), which can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a mobile terminal.
- RAN radio access network
- the computer for example, can be a portable, pocket, handheld, computer built-in or in-vehicle mobile device that exchanges language and or data with the wireless access network.
- PCS personal communication service
- SIP session initiation protocol
- WLL wireless local loop
- PDA personal Digital assistant
- a wireless terminal may also be referred to as a system, a subscriber unit (SU), a subscriber station (SS), a mobile station (MS), a remote station (RS), and an access station.
- Point access point, AP for short), remote terminal (RT), access terminal (AT), user terminal (UT), user agent (UA) User equipment, or user equipment (UE).
- the network device may be a base station, or an access point, or may refer to a device in the access network that communicates with the wireless terminal over one or more sectors on the air interface.
- the base station can be used to convert the received air frame and the IP packet into a router between the wireless terminal and the rest of the access network, wherein the rest of the access network can include an Internet Protocol (IP) network.
- IP Internet Protocol
- the base station can also coordinate attribute management of the air interface.
- the base station may be a Base Transceiver Station (BTS) in GSM or CDMA, or may be a base station (NodeB) in WCDMA, or may be an evolved base station (eNodeB) in LTE.
- BTS Base Transceiver Station
- NodeB base station
- eNodeB evolved base station
- the key generation center 103 is configured to generate a public key and a private key for each network device, and the first device 101 and the second device 102 can respectively generate and share a private key using the corresponding public key and private key.
- the key generation center 103 can generate a required public key and private key by using a Bilinear Pairing technology or a Schnorr signature technology.
- the manner in which the key generation center 103 generates the master public key and the private key corresponding to the identity by using the bilinear pairing can be as follows:
- the manner in which the key generation center 103 generates the master public key and the private key corresponding to the identity by using the chnorr signature technology can be as follows:
- the identity identifier may include a first identity identifier, a second identity identifier, or an alternate identity identifier.
- the identity authentication method of the present application will be described below with reference to the accompanying drawings.
- the authentication method can be used to implement identity authentication between the first device 101 and the second device 102.
- FIG. 2 it is a schematic flowchart of another embodiment of the identity authentication method of the present application.
- Step 201 The first device acquires the first primary public key and the first corresponding to the first identity identifier from the key generation center. a private key, wherein the first identity is an identity of the first device.
- Step 202 The first device obtains the second identity identifier from a TLS server key exchange ServerKeyExchange message, where the second identity identifier is an identity identifier of the second device.
- the ServerKeyExchange message carries the second identity identifier, and may also carry multiple candidate identity identifiers of the second device. If the ServerKeyExchange message carries multiple candidate identity identifiers, the first device may select one of the candidate identity identifiers as the second identity identifier.
- the ServerKeyExchange message may further carry at least one public key, so that the first device selects a second identity identifier from the candidate identity identifiers.
- the public key carried by the ServerKeyExchange message may be only the second primary public key corresponding to the second identity identifier, or may be multiple candidate primary public keys. When the number of the public key is multiple, each candidate primary public key corresponds to an alternate identity carried in the ServerKeyExchange message.
- Step 203 The first device generates a pre-shared key of the selected PSK mode by using the second identity, the first private key, and the first primary public key.
- the first device may use the second identity, the first private key, and the The first master public key generates a pre-shared key.
- the first device may generate the pre-shared key using a Bilinear Pairing technique or using a Schnorr signature technique.
- Step 204 The first device uses the pre-shared key to complete identity authentication with the second device.
- the method may further include:
- Step 205 The first device sends a TLS client key exchange ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier.
- the ClientKeyExchange message may also carry the corresponding content according to the content carried in the ServerKeyExchange message, except that the first identifier is carried.
- the ServerKeyExchange message carries the second identity identifier and the second master public key
- the first identity identifier and the first master public key may be carried in the ClientKeyExchange message.
- the first identity identifier and the second identity identifier may be carried in the ClientKeyExchange message.
- the second identity identifier may also be replaced by the indication information of the second identity identifier.
- the server key exchange message carries the alternate primary public key corresponding to each candidate identity identifier
- the ClientKeyExchange message carries the first identity identifier and the In addition to the second identity, the second primary public key may also be carried.
- the second primary public key may be carried by a field in the ClientKeyExchange that can be specified by the application layer, such as a psk_identity field.
- the first device can obtain the second identity identifier by using the information specified in the TLS protocol, and send the first identity identifier, so that the TLS protocol can be extended without being extended. Pre-shared key negotiation to avoid compatibility issues caused by the extension of the TLS protocol.
- FIG. 3 it is a schematic flowchart of another embodiment of the identity authentication method of the present application.
- Step 301 The second device acquires a second primary public key and a second private key corresponding to the second identity identifier, where the second identity identifier is an identity identifier of the second device.
- Step 302 The second device obtains a first identity identifier from a TLS client key exchange ClientKeyExchange message, where the first identity identifier is an identity identifier of the first device.
- Step 303 The second device generates a pre-shared key by using the first identity identifier, the second private key, and the second master public key.
- the second device may obtain the second device directly from the key generation center, or when the second identity identifier is selected by the first device from the candidate identity identifier, The second device may also obtain the second identity identifier from the ClientKeyExchange message. Correspondingly, the second device may also obtain the second master public key from the ClientKeyExchange message.
- Step 304 The second device uses the pre-shared key to complete identity authentication with the first device.
- the method may further include:
- Step 305 The second device sends a secure transport layer protocol TLS server key exchange ServerKeyExchange message, where the second key identifier is carried in the ServerKeyExchange message.
- the carrying of the ServerKeyExchange message may directly carry the second identity identifier, or may also carry multiple candidate identity identifiers, so that the first device can select the second identity identifier from the candidate identity identifiers.
- the second key public key corresponding to the second identity identifier or each of the plurality of candidate identity identifiers may be carried in the ServerKeyExchange message. Select the public key.
- the primary public key, the alternate identity, or the alternate primary public key may all be carried by a field in the ServerKeyExchange that may be specified by the application layer, such as a psk_identity_hint field.
- the second device can obtain the first identity identifier by using the information specified in the TLS protocol, and send the second identity identifier, so that the TLS protocol can be extended without being extended. Pre-shared key negotiation to avoid compatibility issues caused by the extension of the TLS protocol.
- FIG. 4 it is a schematic flowchart of another embodiment of the identity authentication method of the present application.
- Step 401 The first device acquires a first primary public key and a first private key corresponding to the first identity identifier from the key generation center.
- Step 402 The second device acquires a second primary public key and a second private key corresponding to the second identity identifier from the key generation center.
- the key generation center may utilize a Bilinear Pairing technology or a chnorr signature technology to generate a first private key corresponding to the first identity and a second private key corresponding to the second identity.
- the first primary public key and the second primary public key may be the same primary public key.
- the first identity identifier may be an email address, an IP address, or a domain name of the first device, and the second identity identifier may also be an email address, an IP address, or a domain name of the second device, and the first private
- the manner of generating the key and the second private key can be referred to the foregoing, and will not be described herein.
- Step 403 The first device sends a TLS ClientHello message.
- the TLS ClientHello message may carry the indication information of the cipher suite of the alternative PSK mode, and the cipher suite of the alternative PSK mode is the cipher suite of the PSK mode supported by the first device.
- the TLS ClientHello message may carry information such as TLS_PSK_WITH_AES_256_CBC_SHA, TLS_DHE_PSK_WITH_AES_256_CBC_SHA, TLS_RSA_PSK_WITH_AES_256_CBC_SHA, etc., to indicate that the first device supports the corresponding cipher suite.
- Step 404 The second device sends a TLS Server Hello message.
- the second device may select one of the candidate PSK modes as the selected PSK mode used by the first device and the second device for encrypted data transmission. After the selected PSK mode is selected, the second device may send a TLS Server Hello message.
- the TLS Server Hello message may carry indication information for indicating the selected PSK mode.
- the indication new may be TLS_PSK_WITH_AES_256_CBC_SHA, TLS_DHE_PSK_WITH_AES_256_CBC_SHA or TLS_RSA_PSK_WITH_AES_256_CBC_SHA, or may be a number corresponding to TLS_PSK_WITH_AES_256_CBC_SHA, TLS_DHE_PSK_WITH_AES_256_CBC_SHA or TLS_RSA_PSK_WITH_AES_256_CBC_SHA.
- Step 405 The second device sends a ServerKeyExchange message.
- the psk_identity_hint field of the ServerKeyExchange message may carry the second identity identifier.
- step 406 the second device sends a TLS Server HelloDone message.
- Step 407 The first device acquires the second identity identifier from a psk_identity_hint field of the ServerKeyExchange message.
- Step 408 The first device generates a pre-shared key by using the second identity identifier, the first private key, and the first master public key.
- the first device can implement the pre-shared key calculation by directly adding the content in the TLS implementation source code in the openssl open source code; or, the pre-shared key can be implemented in the application layer by specifying the callback function in the TLS-PSK mode of the openssl source code.
- the calculation that is, the first device can calculate the pre-shared key by using an application layer callback function such as SSL_CTX_set_psk_client_callback() and SSL_CTX_set_psk_server_callback().
- the calculation method of the first device to generate the pre-shared key may be as follows:
- the calculation method of the first device to generate the pre-shared key may be as follows:
- Step 409 The first device sends a ClientKeyExchange message.
- the first identity identifier may be carried in the psk_identity field of the ClientKeyExchange message.
- step 410 the first device sends a TLS Finished message.
- Step 411 The second device acquires the first identity identifier from a psk_ideneity field of the ClientKeyExchange message.
- Step 412 The second device generates a pre-shared key by using the first identity, the second private key, and the first primary public key.
- the second device can implement the pre-shared key calculation by directly adding the content in the TLS implementation source code in the openssl open source code; or, the pre-shared key can be implemented in the application layer by specifying the callback function in the TLS-PSK mode of the openssl source code.
- the calculation that is, the second device can calculate the pre-shared key by using an application layer callback function such as SSL_CTX_set_psk_client_callback() and SSL_CTX_set_psk_server_callback().
- the calculation method of the second device to generate the pre-shared key may be as follows:
- the calculation method of the second device to generate the pre-shared key may be as follows:
- step 413 the second device sends a TLS Finished message.
- the first identity can be transmitted through the psk_identity field and the second identity can be transmitted through the psk_identity_hint field.
- the psk_identity_hint and psk_identity fields can be specified by the application layer, and thus can be based on the TLS standard. The identity transfer is completed.
- the first device may need to communicate with a plurality of second devices, and the second device may communicate with the plurality of first devices, if the first device is inconsistent with the primary public key used by the second device , which will cause communication failure between the first device and the second device. Therefore, the second primary public key may be sent by the second device or the second primary public key may be sent by the second device to avoid communication failure caused by the inconsistency of the primary public key used by the first device and the second device.
- the specific implementation can be as follows:
- Step 501 The first device acquires a first primary public key and a first private key from a key generation center.
- Step 502 The second device acquires the second primary public key and the second private key from the key generation center.
- Step 503 The first device sends a TLS ClientHello message.
- Step 504 The second device sends a TLS Server Hello message.
- Step 505 The second device sends a ServerKeyExchange message.
- the second identity identifier and the second master public key may be carried in the psk_identity_hint field of the ServerKeyExchange message.
- the psk_identity_hint field of the ServerKeyExchange message may carry the indication information of the second identity identifier and the second master public key, for example, the sequence number of the second master public key.
- the first device can pass The indication information of the second primary public key determines whether the first primary public key and the second primary public key are consistent.
- Step 506 The second device sends a TLS Server HelloDone message.
- Step 507 The first device acquires the second identity identifier and the second master public key from a psk_identity_hint field of the ServerKeyExchange message.
- Step 508 If the second primary public key is the same as the first primary public key, the first device uses the second identity identifier, the first private key, and the first primary public key. Generate a pre-shared key for the selected PSK mode.
- step 509 the first device sends a ClientKeyExchange message.
- the first identity identifier and the first master public key may be carried in the psk_identity field of the ClientKeyExchange message.
- step 510 the first device sends a TLS Finished message.
- Step 511 The second device acquires the first identity identifier and the first master public key from a psk_ideneity field of the ClientKeyExchange message.
- Step 512 If the first primary public key is the same as the second primary public key, the second device uses the first identity identifier, the second private key, and the first primary public key. Generate a pre-shared key.
- step 513 the second device sends a TLS Finished message.
- the second primary public key is carried in the psk_identity_hint field, so that the first device and the second device determine whether the public keys used by the two parties are the same before the communication, thereby avoiding the first device and the second device.
- FIG. 6 is a schematic flowchart diagram of another embodiment of an identity authentication method according to the present application.
- the first device may need to communicate with the first device in different identities.
- the identity of the first device is different, the private key to be used is different, so that the second device can use different identities.
- the second device can transmit a plurality of alternate identity identifiers to the first device.
- the specific implementation can be as follows:
- Step 601 The first device acquires a first primary public key and a first private key from a key generation center.
- Step 602 The second device acquires a second primary public key and n candidate private keys from the key generation center.
- each candidate private key corresponds to an alternate identity of the second device.
- the value of n is a positive integer. In general, the value of n is not less than 2.
- each of the candidate private keys corresponds to an alternate identity of the second device.
- Step 603 The first device sends a TLS ClientHello message.
- step 604 the second device sends a TLS Server Hello message.
- Step 605 The second device sends a ServerKeyExchange message.
- the psk_identity_hint field carried in the psk_identity_hint field of the ServerKeyExchange message carries at least one candidate identity of the second device.
- the alternate identity may be one or more of an email address, an IP address, a domain name, and the like of the second device.
- Step 606 The second device sends a TLS Server HelloDone message.
- Step 607 The first device acquires the candidate identity from a psk_identity_hint field of the ServerKeyExchange message.
- Step 608 The first device selects one of the candidate identity identifiers as the second identity identifier.
- Step 609 The first device generates the pre-shared key by using the second identity identifier, the first private key, and the first master public key.
- Step 610 The first device sends a ClientKeyExchange message.
- the second identity identifier and the first identity identifier may be carried in the psk_identity field of the ClientKeyExchange message.
- Step 611 the first device sends a TLS Finished message.
- Step 612 The second device obtains the second identity identifier and the first identity identifier from the psk_ideneity field of the ClientKeyExchange message.
- Step 613 The second device generates the pre-shared key by using the first identity identifier, a private key corresponding to the second identity identifier, and the first master public key.
- step 614 the second device sends a TLS Finished message.
- the second device can communicate with the first device by using different identities.
- FIG. 7 is a schematic flowchart diagram of another embodiment of an identity authentication method according to the present application.
- the first device may need to communicate with the first device in different identities.
- the identity of the first device is different, not only the private key to be used is different, but also the public key to be used may be different.
- the second device may send the plurality of alternate identities and the plurality of candidate master public keys to the first device.
- the specific implementation can be as follows:
- Step 701 The first device acquires the first primary public key and the first private key from the key generation center.
- Step 702 The second device acquires, from the key generation center, a public key corresponding to each candidate identity, and a private key corresponding to each candidate identity.
- Step 703 The first device sends a TLS ClientHello message.
- Step 704 The second device sends a TLS Server Hello message.
- Step 705 The second device sends a ServerKeyExchange message.
- the psk_identity_hint field carried in the psk_identity_hint field of the ServerKeyExchange message carries at least one alternative identity identifier of the second device and an alternate master public key corresponding to each of the candidate identity identifiers.
- Step 706 The second device sends a TLS Server HelloDone message.
- Step 707 The first device acquires an alternate identity identifier and an alternate primary public key corresponding to the candidate identity identifier from the psk_identity_hint field of the ServerKeyExchange message.
- Step 708 The device selects a second identity identifier from the candidate identity identifiers.
- the alternate primary public key corresponding to the second identity identifier is the same as the first primary public key.
- Step 709 The first device generates the pre-shared key by using the second identity identifier, the first private key, and the first master public key.
- Step 710 The first device sends a ClientKeyExchange message.
- the psk_identity field in the ClientKeyExchange message carries the second identity identifier first identity identifier.
- the psk_identity field may further carry an alternate primary public key corresponding to the second identity identifier.
- step 711 the first device sends a TLS Finished message.
- Step 712 The second device obtains the second identity from the psk_ideneity of the ClientKeyExchange message. And the first identity.
- the second device may further obtain an alternate primary public key corresponding to the second identity identifier from the psk_identity field.
- Step 713 The second device generates the pre-shared key by using the first identity identifier, the candidate private key corresponding to the second identity identifier, and the candidate master public key corresponding to the second identity identifier. .
- step 714 the second device sends a TLS Finished message.
- the psk_identity_hint field carries the candidate identity identifier and the candidate master public key, so that the first device can perform the second device with the public key matching the public key acquired by the first device. Communication.
- FIG. 8 is a schematic structural diagram of an embodiment of a communication device according to the present application.
- the communication device may include a transceiver unit 801, a processing unit 802, and a storage unit 803.
- the device may be the first device in the foregoing embodiment or the second device in the foregoing embodiment.
- the communication device is a second device
- the transceiver unit 801 is configured to acquire, by the key generation center, a first master public key and a first private key corresponding to the first identity identifier, where the first identity identifier is an identity identifier of the first device Sending a secure transport protocol TLS client greeting ClientHello message, the ClientHello message carrying a cipher suite of an alternate pre-shared key PSK mode; and a processing unit 802, configured to obtain the second from the TLS server key exchange ServerKeyExchange message An identity identifier, where the second identity is an identity of the second device, and using the second identity, the first private key, and the first primary public key to generate a pre-shared key of the selected PSK mode And wherein the selected PSK mode is one selected by the second device from the candidate PSK mode; and the identity authentication with the second device is completed using the pre-shared key.
- the transceiver unit 801 is further configured to send a TLS client key exchange ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier.
- processing unit 802 is further configured to obtain the second identity identifier and the second master public key from the ServerKeyExchange message.
- the processing unit 802 is further configured to obtain an alternate identity identifier of the second device from the ServerKeyExchange message, and select one of the candidate identity identifiers as the second identity identifier.
- the processing unit 802 is further configured to obtain, from the ServerKeyExchange message, an alternate identity identifier of the second device and an alternate primary public key corresponding to each of the candidate identity identifiers; A second identity identifier is selected in the identifier, where the candidate master public key corresponding to the second identity identifier is the same as the first master public key.
- the processing unit 802 is further configured to: if the second primary public key is the same as the first primary public key, use the second identity, the first private key, and the first A master public key that generates a pre-shared key for the selected PSK mode.
- the transceiver unit 801 is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier and the first master public key.
- the transceiver unit 801 is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier and the second identity identifier.
- the transceiver unit 801 is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the indication information of the first identity identifier and the second identity identifier.
- the communication device is the second device
- the transceiver unit 801 is configured to obtain, by the key generation center, a second primary public key and a second private key corresponding to the second identity, where the second identity is an identity of the second device, and the secure transmission protocol TLS is sent.
- the server greets the ServerHello message, and the ServerHello message carries the cipher suite of the selected PSK mode;
- the processing unit 802 is configured to obtain a first identity identifier from a TLS client key exchange ClientKeyExchange message, where the first identity identifier is an identity identifier of the first device, and the first identity identifier, the second private key is used. And the second master public key, generating a pre-shared key of the selected PSK mode; and using the pre-shared key to complete identity authentication with the first device.
- the transceiver unit 801 is further configured to send a secure transport layer protocol TLS server key exchange ServerKeyExchange message, where the ServerKeyExchange message carries a second identity identifier.
- the processing unit 802 is further configured to obtain, from the key generation center, a second primary public key and an optional private key, where each of the candidate private keys and one of the second devices The alternative identifier corresponds.
- the processing unit 802 is further configured to obtain, from the key generation center, an alternate primary public key and an optional private key, where each of the candidate private keys is associated with an alternate primary public key.
- each of the candidate private keys corresponds to an alternate identifier of the second device.
- the transceiver unit 801 is further configured to send a ServerKeyExchange message, where the ServerKeyExchange message carries the second identity identifier and the second master public key.
- the transceiver unit 801 is further configured to send a ServerKeyExchange message, where the sending ServerKeyExchange message carries the candidate primary public key.
- the transceiver unit 801 is further configured to send a ServerKeyExchange message, where the sending ServerKeyExchange message carries the candidate identifier and the candidate master public key corresponding to each of the candidate identifiers.
- processing unit 802 is further configured to obtain the first identity identifier and the second identity identifier from the ClientKeyExchange message.
- FIG. 9 is a schematic structural diagram of another embodiment of a communication device according to the present application.
- the communication device may include: FIG. 9 is a schematic structural diagram of an embodiment of a communication device according to the present application.
- the communication device may be the communication device in any of the foregoing embodiments, and may be used to perform any of the method steps in the identity authentication method shown in any of the embodiments of FIG. 2 to FIG.
- the communication device can include a processor 901, a memory 902, and a transceiver 903, which can include components such as a receiver, a transmitter, and an antenna.
- the communication device may also include more or less components, or some components in combination, or different component arrangements, which are not limited in this application.
- the processor 901 is a control center of the communication device that connects various portions of the entire communication device using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 902, and recalling data stored in the memory, To perform various functions of the communication device and/or process data.
- the processor 901 may be composed of an integrated circuit (IC), for example, may be composed of a single packaged IC, or may be composed of a plurality of packaged ICs having the same function or different functions.
- the processor may include only a central processing unit (CPU), or may be a GPU, a digital signal processor (DSP), and a control chip in the transceiver 903 (for example, a baseband). A combination of chips).
- the CPU may be a single operation core, and may also include a multi-operation core.
- the transceiver 903 is configured to establish a communication channel through which the communication device is connected to other communication devices, thereby implementing data transmission between the communication devices.
- the transceiver 903 may include a wireless local area network (WLAN) module, a Bluetooth module, a baseband module, and the like, and a radio frequency (RF) circuit corresponding to the communication module.
- WLAN wireless local area network
- RF radio frequency
- WCDMA wideband code division multiple access
- HSDPA high speed downlink packet access
- the transceiver 903 is used to control communication of components in the communication device and can support direct memory access.
- the various transceivers 903 in the transceiver 903 generally appear in the form of integrated circuit chips, and can be selectively combined without including all the transceivers 903 and Corresponding antenna group.
- the transceiver 903 can include only a baseband chip, a radio frequency chip, and a corresponding antenna to provide communication functionality in a cellular communication system.
- the communication device can be connected to a cellular network or the internet via a wireless communication connection established by the transceiver 903, such as wireless local area network access or WCDMA access.
- a communication module such as a baseband module, in the transceiver 903 can be integrated into the processor, typically an APQ+MDM series platform such as that provided by Qualcomm.
- the radio frequency circuit is used for receiving and transmitting signals during information transmission and reception or during a call. For example, after the downlink information of the network device is received, it is processed by the processor; in addition, the data designed for the uplink is sent to the network device.
- the radio frequency circuit includes well-known circuits for performing these functions, including but not limited to an antenna system, a radio frequency transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a codec.
- the RF circuit can communicate with the network and other devices through wireless communication.
- the wireless communication may use any communication standard or protocol, including but not limited to a global system of mobile communication (GSM), a general packet radio service (gprs), and code division multiple access.
- GSM global system of mobile communication
- gprs general packet radio service
- code division multiple access CDMA for short
- WCDMA wideband code division multiple access
- HSUPA high speed uplink packet access
- LTE long-term evolution
- SMS short messaging service
- the transceiver 903 is configured to obtain, by the key generation center, a second primary public key and a second private key corresponding to the second identity, where the second identity is an identity of the second device, and the secure transmission is sent.
- the protocol TLS server greets the ServerHello message, and the ServerHello message carries the cipher suite of the selected PSK mode;
- the processor 901 is configured to obtain the first identity from the TLS client key exchange ClientKeyExchange message, the first identity Identifying an identity of the first device; generating, by using the first identity, the second private key, and the second primary public key, a pre-shared key of the selected PSK mode; using the pre-share The key completes identity authentication with the first device.
- the transceiver 903 is further configured to send a TLS client key exchange ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier.
- the processor 901 is further configured to obtain the second identity identifier and the second master public key from the ServerKeyExchange message.
- the processor 901 is further configured to obtain an alternate identity of the second device from the ServerKeyExchange message, and select one of the candidate identity identifiers as the second identity identifier.
- the processor 901 is further configured to obtain, from the ServerKeyExchange message, an alternate identity identifier of the second device and an alternate primary public key corresponding to each of the candidate identity identifiers; from the candidate identity A second identity identifier is selected in the identifier, where the candidate master public key corresponding to the second identity identifier is the same as the first master public key.
- the processor 901 is further configured to: if the second primary public key is the same as the first primary public key, use the second identity, the first private key, and the first A master public key that generates a pre-shared key for the selected PSK mode.
- the transceiver 903 is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier and the first master public key.
- the transceiver 903 is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the first identity identifier and the second identity identifier.
- the transceiver 903 is further configured to send a ClientKeyExchange message, where the ClientKeyExchange message carries the indication information of the first identity identifier and the second identity identifier.
- the communication device is the second device
- the transceiver 903 is configured to obtain, by the key generation center, a second primary public key and a second private key corresponding to the second identity, where the second identity is an identity of the second device, and the secure transmission protocol TLS is sent.
- the server greets the ServerHello message, and the ServerHello message carries the cipher suite of the selected PSK mode;
- the processor 901 is configured to obtain a first identity identifier from a TLS client key exchange ClientKeyExchange message, where the first identity identifier is an identity identifier of the first device, and the first identity identifier, the second private key is used. And the second master public key, generating a pre-shared key of the selected PSK mode; and using the pre-shared key to complete identity authentication with the first device.
- the transceiver 903 is further configured to send a secure transport layer protocol TLS server key exchange ServerKeyExchange message, where the ServerKeyExchange message carries a second identity identifier.
- the processor 901 is further configured to obtain, from the key generation center, a second primary public key and an optional private key, where each of the candidate private keys and one of the second devices The alternative identifier corresponds.
- the processor 901 is further configured to obtain an alternate primary public key and an optional private key from the key generation center, where each of the candidate private keys is associated with an alternate primary public key.
- each of the candidate private keys corresponds to an alternate identifier of the second device.
- the transceiver 903 is further configured to send a ServerKeyExchange message, where the ServerKeyExchange message carries a second identity identifier and a second master public key.
- the transceiver 903 is further configured to send a ServerKeyExchange message, where the sending ServerKeyExchange message carries the candidate primary public key.
- the transceiver 903 is further configured to send a ServerKeyExchange message, where the sending ServerKeyExchange message carries the candidate identifier and the candidate master public key corresponding to each of the candidate identifiers.
- the processor 901 is further configured to obtain the first identity identifier and the second identity identifier from the ClientKeyExchange message.
- the application further provides a computer storage medium, wherein the computer storage medium can be stored
- the program when executed, may include some or all of the steps in various embodiments of the identity authentication method provided herein.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
- the technology in the embodiments of the present application can be implemented by means of software plus a necessary general hardware platform.
- the technical solution in the embodiments of the present application may be embodied in the form of a software product in essence or in the form of a software product, and the computer software product may be stored in a storage medium such as a ROM/RAM. , a diskette, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present application or portions of the embodiments.
- a computer device which may be a personal computer, server, or network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephonic Communication Services (AREA)
Abstract
本申请实公开了身份认证方法、设备及***。所述方法包括:第一设备从密钥生成中心获取第一主公钥及第一私钥;第一设备发送ClientHello消息,ClientHello消息中携带备选预共享密钥PSK模式的密码套件;第一设备从ServerKeyExchange消息中获取第二身份标识;第一设备使用第二身份标识、第一私钥以及第一主公钥,生成选定PSK模式的预共享密钥;第一设备使用预共享密钥完成与第二设备之间的身份认证。采用本申请各个实施例所提供的方法、设备及***,可以利用TLS协议中的信息实现身份标识的传输,而不必对TLS协议进行扩展,从而可以避免因为对TLS协议进行扩展所带来的兼容性问题。
Description
本申请要求于2016年11月24日提交中国专利局、申请号为201611052569.8发明名称为“身份认证方法与设备及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信领域,尤其涉及身份认证方法与设备及***。
非交互式密钥协商技术是一种用于通信双方生成预共享密钥的技术。与传统的密钥协商不同,非交互式密钥协商可以实现通信双方在未交互信息时,即可利用自身的密钥信息和对方的***息生成相同预共享密钥。基于身份的非交互式密钥协商是一种特殊的密钥协商,该技术是以基于身份的密码为基础的密钥协商协议,通信双方的***息均为自己的身份标识,例如email地址、IP地址和域名等。
由于在物联网场景中,不论是无论是终端设备与终端设备间的通信,还是终端设备与服务器间的通信,通信双方之间的密码算法协议、认证和密钥协商等,均需要采用传输层安全协议(Transport Layer Security,简称TLS)完成。因此在物联网场景中,如果通信双方需要进行基于身份的非交互式密钥协商,那么就需要通信双方均需要使用TLS协议中所规定的信息向对方发送自身的身份标识,以完成身份认证。
通信双方通常可以使用TLS协议中所规定的ClientHello消息和ServerHello消息来发送身份标识;即,终端设备可以通过ClientHello消息向服务器发送终端设备的身份标识,而服务器则可以通过ServerHello消息来发送服务器的身份标识。但是,通过ClientHello消息和ServerHello消息来传输身份标识,就需要在ClientHello消息和ServerHello消息中添加新的字段,也就是说,需要对终端设备及网络设备所支持的TLS协议进行扩展。由于物联网中终端设备的数量众多,对端设备及网络设备所支持的TLS协议进行扩展,可能会带来设备之间身份认证过程的兼容性问题。
发明内容
本申请提供了身份认证方法与设备及***,不但可以使通信双方通能够使用TLS协议中所规定的消息来发送身份标识,而且可以避免因为对TLS协议进行扩展为身份认证过程带来的兼容性问题。
第一方面,本申请提供了一种身份认证方法,该方法包括:第一设备从密钥生成中心获取第一主公钥及与第一身份标识相对应的第一私钥,其中,所述第一身份标识为所述第一设备的身份标识;所述第一设备发送安全传输协议TLS客户端问候ClientHello消息,所述ClientHello消息中携带备选预共享密钥PSK模式的密码套件;所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,所述第二身份标识为第二设备的身份标识;所述第一设备使用所述第二身份标识、所述第一私钥以及所述第一
主公钥,生成选定PSK模式的预共享密钥,其中,所述选定PSK模式为所述第二设备从所述备选PSK模式中选出的一个;所述第一设备使用所述预共享密钥完成与所述第二设备之间的身份认证。
结合第一方面,在第一方面第一种可能的实现方式中,所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识。
结合第一方面或第一方面第一种可能的实现方式,在第一方面第二种可能的实现方式中,所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,包括:所述第一设备从所述ServerKeyExchange消息中获取所述第二身份标识及第二主公钥。
结合第一方面或第一方面第一种可能的实现方式,在第一方面第三种可能的实现方式中,所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,包括:所述第一设备从所述ServerKeyExchange消息中获取第二设备的备选身份标识;所述第一设备从所述备选身份标识中选取一个作为所述第二身份标识。
结合第一方面或第一方面第一种可能的实现方式,在第一方面第四种可能的实现方式中,所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,包括:所述第一设备从所述ServerKeyExchange消息中获取第二设备的备选身份标识及各个所述备选身份标识对应的备选主公钥;所述第一设备从所述备选身份标识中选取第二身份标识,其中,所述第二身份标识对应的备选主公钥与所述第一主公钥相同。
结合第一方面第二种可能的实现方式,在第一方面第五种可能的实现方式中,所述第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥,包括:如果所述第二主公钥与所述第一主公钥相同,所述第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥。
结合第一方面第二种可能的实现方式,在第一方面第六种可能的实现方式中,所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识,包括:所述第一设备发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第一主公钥。
结合第一方面第三或四种可能的实现方式,在第一方面第七种可能的实现方式中,其特征在于,所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识,包括:所述第一设备发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识。
结合第一方面第三或四种可能的实现方式,在第一方面第八种可能的实现方式中,其特征在于,所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识,包括:所述第一设备发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识的指示信息。
第二方面,本申请还提供了另一种身份认证方法,包括:第二设备从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份
标识;所述第二设备发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定PSK模式的密码套件;所述第二设备从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;所述第二设备使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;所述第二设备使用所述预共享密钥完成与所述第一设备之间的身份认证。
结合第二方面,在第二方面第一种可能的实现方式中,所述第二设备发送TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识。
结合第二方面或第二方面第一种可能的实现方式,在第二方面第二种可能的实现方式中,所述第二设备从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,包括:所述第二设备从所述密钥生成中心获取第二主公钥以及备选私钥,其中,每一个所述备选私钥与所述第二设备的一个备选标识相对应。
结合第二方面或第二方面第一种可能的实现方式,在第二方面第三种可能的实现方式中,所述第二设备从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,包括:所述第二设备从所述密钥生成中心获取备选主公钥以及备选私钥,其中,每一个所述备选私钥与一个备选主公钥相对应,且每一个所述备选私钥与所述第二设备的一个备选标识相对应。
结合第二方面第一种可能的实现方式,在第二方面第四种可能的实现方式中,所述第二设备发送TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识,包括:所述第二设备发送ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识及第二主公钥。
结合第二方面第一种可能的实现方式,在第二方面第五种可能的实现方式中,所述第二设备发送TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识,包括:所述第二设备发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选主公钥。
结合第二方面第三或四种可能的实现方式,在第二方面第六种可能的实现方式中,所述第二设备发送TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识,包括:所述第二设备发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选标识及每一个所述备选标识对应的所述备选主公钥。
结合第二方面第三或四种可能的实现方式,在第二方面第七种可能的实现方式中,所述第二设备从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,包括:所述第二设备从所述ClientKeyExchange消息中获取第一身份标识及所述第二身份标识。
第三方面,本申请提供了一种通信设备,包括:收发单元,用于从密钥生成中心获取第一主公钥及与第一身份标识相对应的第一私钥,其中,所述第一身份标识为所述第一设备的身份标识;发送安全传输协议TLS客户端问候ClientHello消息,所述ClientHello消息中携带备选预共享密钥PSK模式的密码套件;处理单元,用于从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,所述第二身份标识为第二设备的身份标识;使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的
预共享密钥,其中,所述选定PSK模式为所述第二设备从所述备选PSK模式中选出的一个;使用所述预共享密钥完成与所述第二设备之间的身份认证。其中,所述收发单元可以由于通信设备的收发器或处理器与收发器相结合实现,所述处理单元可以由所述通信设备的收发器实现。
结合第三方面,在第三方面第一种可能的实现方式中,所述收发单元,还用于发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识。
结合第三方面或第三方面第一种可能的实现方式,在第三方面第二种可能的实现方式中,所述处理单元,还用于从所述ServerKeyExchange消息中获取所述第二身份标识及第二主公钥。
结合第三方面或第三方面第一种可能的实现方式,在第三方面第三种可能的实现方式中,所述处理单元,还用于从所述ServerKeyExchange消息中获取第二设备的备选身份标识;从所述备选身份标识中选取一个作为所述第二身份标识。
结合第三方面或第三方面第一种可能的实现方式,在第三方面第四种可能的实现方式中,所述处理单元,还用于从所述ServerKeyExchange消息中获取第二设备的备选身份标识及各个所述备选身份标识对应的备选主公钥;从所述备选身份标识中选取第二身份标识,其中,所述第二身份标识对应的备选主公钥与所述第一主公钥相同。
结合第三方面第二种可能的实现方式,在第三方面第五种可能的实现方式中,所述处理单元,还用于如果所述第二主公钥与所述第一主公钥相同,则使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥。
结合第三方面第二种可能的实现方式,在第三方面第六种可能的实现方式中,所述收发单元,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第一主公钥。
结合第三方面第三或四种可能的实现方式,在第三方面第七种可能的实现方式中,所述收发单元,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识。
结合第三方面第三或四种可能的实现方式,在第三方面第八种可能的实现方式中,所述收发单元,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识的指示信息。
第四方面,本申请还提供了另一种通信设备,包括:收发单元,用于从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识;发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定PSK模式的密码套件;处理单元,用于从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;使用所述预共享密钥完成与所述第一设备之间的身份认证。其中,所述收发单元可以由于通信设备的收发器或处理器与收发器相结合实现,所述处理单元可以由所述通信设备的收发器实现。
结合第四方面,在第四方面第一种可能的实现方式中,所述收发单元,还用于发送安
全传输层协议TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识。
结合第四方面或第四方面第一种可能的实现方式,在第四方面第二种可能的实现方式中,所述处理单元,还用于从所述密钥生成中心获取第二主公钥以及备选私钥,其中,每一个所述备选私钥与所述第二设备的一个备选标识相对应。
结合第四方面或第四方面第一种可能的实现方式,在第四方面第三种可能的实现方式中,所述处理单元,还用于从所述密钥生成中心获取备选主公钥以及备选私钥,其中,每一个所述备选私钥与一个备选主公钥相对应,且每一个所述备选私钥与所述第二设备的一个备选标识相对应。
结合第四方面第一种可能的实现方式,在第四方面第四种可能的实现方式中,所述收发单元,还用于发送ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识及第二主公钥。
结合第四方面第一种可能的实现方式,在第四方面第五种可能的实现方式中,所述收发单元,还用于发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选主公钥。
结合第四方面第三或四种可能的实现方式,在第四方面第六种可能的实现方式中,所述收发单元,还用于发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选标识及每一个所述备选标识对应的所述备选主公钥。
结合第四方面第三或四种可能的实现方式,在第四方面第七种可能的实现方式中,所述处理单元,还用于从所述ClientKeyExchange消息中获取第一身份标识及所述第二身份标识。
第五方面,本申请还提供了一种通信***,包括:密钥生成中心、第一设备与第二设备;其中,所述第一设备,用于从密钥生成中心获取第一主公钥及与第一身份标识相对应的第一私钥,其中,所述第一身份标识为所述第一设备的身份标识;发送安全传输协议TLS客户端问候ClientHello消息,所述ClientHello消息中携带备选预共享密钥PSK模式的密码套件;从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,所述第二身份标识为第二设备的身份标识;使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥,其中,所述选定PSK模式为所述第二设备从所述备选PSK模式中选出的一个;使用所述预共享密钥完成与所述第二设备之间的身份认证;所述第二设备,用于从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识;发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定PSK模式的密码套件;从安全传输层协议TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;使用所述预共享密钥完成与所述第一设备之间的身份认证。
采用本申请各个实施例所提供的方法、设备及***,第一设备与第二设备均可以利用TLS协议中的信息实现自身身份标识的传输,而不必对TLS协议进行扩展,从而可以避免因为对TLS协议进行扩展所带来的兼容性问题。
为了更清楚地说明本申请的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请通信***一个实施例的结构示意图。
图2为本申请身份认证方法一个实施例的流程图;
图3为本申请身份认证方法另一个实施例的结构示意图;
图4为本申请身份认证方法另一个实施例的结构示意图;
图5为本申请身份认证方法另一个实施例的结构示意图;
图6为本申请身份认证方法另一个实施例的结构示意图;
图7为本申请身份认证方法另一个实施例的结构示意图;
图8为本申请通信设备一个实施例的结构示意图;
图9为本申请通信设备另一个实施例的结构示意图。
参见图1,为本申请通信***一个实施例的结构示意图。
如图1所述,所述通信***可以包括第一设备101,第二设备102,以及密钥生成中心103。
其中,第一设备101可以与第二设备102之间进行加密数据传输。第一设备101与第二设备102之间进行加密数据传输时所需的密码算法协议、认证和密钥协商过程等,可以均可以采用TLS协议完成。
所述TLS协议由两层组成:TLS记录协议(TLS Record)和TLS握手协议(TLS Handshake)。握手协议是TLS的核心部分,完成客户端和服务端之间的密码算法协议、认证和会话密钥生成等功能,是通信双方进行数据安全传输的前提。TLS支持多种密码套件,其中一类密码套件是基于预共享密钥的密码套件(pre-shared key cipher suites,简称PSK)。支持预共享密钥的密码套件的TLS简称为TLS-PSK。TLS-PSK中使用的预共享密钥为对称密钥,即第一设备101与第二设备102使用相同的对称密钥。基于该相同的预共享密钥,第一设备101与第二设备102通过交互完成认证和密钥生成。
所述第一设备101可以为终端设备;所述第二设备102可以为网络设备,也可以为除第一设备101之外的其他终端设备。通常情况下,所述第一设备101可以被称为客户端,所述第二设备102可以被称为服务器。
所述终端设备可以是指向用户提供语音和或数据连通性的设备,具有无线连接功能的手持式设备、或连接到无线调制解调器的其他处理设备。无线终端可以经无线接入网(radio access network,简称RAN)与一个或多个核心网进行通信,无线终端可以是移动终端,如移动电话(或称为“蜂窝”电话)和具有移动终端的计算机,例如,可以是便携式、袖珍式、手持式、计算机内置的或车载的移动装置,它们与无线接入网交换语言和或数据。例如,个人通信业务(personal communication service,简称PCS)电话、无绳电话、会话发起协议(session initiation protocol,简称SIP)话机、无线本地环路(wireless local loop,简称WLL)站、个人数字助理(personal digital assistant,
简称PDA)等设备。无线终端也可以称为***、订户单元(subscriber unit,简称SU)、订户站(subscriber station,简称SS),移动站(mobile station,简称MS)、远程站(remote station,简称RS)、接入点(access point,简称AP)、远端设备(remote terminal,简称RT)、接入终端(access terminal,简称AT)、用户终端(user terminal,简称UT)、用户代理(user agent,简称UA)、用户设备、或用户装备(user equipment,简称UE)。
所述网络设备,可以是基站,或者接入点,或者可以是指接入网中在空中接口上通过一个或多个扇区与无线终端通信的设备。基站可用于将收到的空中帧与IP分组进行相互转换,作为无线终端与接入网的其余部分之间的路由器,其中接入网的其余部分可包括网际协议(Internet protocol,简称IP)网络。基站还可协调对空中接口的属性管理。例如,基站可以是GSM或CDMA中的基站(Base Transceiver Station,简称BTS),也可以是WCDMA中的基站(NodeB),还可以是LTE中的演进型基站(evolutional Node B,简称eNodeB),本申请并不限定。
所述密钥生成中心103用于为各个网络设备生成公钥与私钥,第一设备101与第二设备102可以使用对应的公钥及私钥分别生成与共享私钥。通常情况下,所述密钥生成中心103可以采用双线性配对(Bilinear Pairing)技术或Schnorr签名技术生成所需的公钥及私钥。
密钥生成中心103利用双线性配对生成主公钥及与身份标识对应的私钥的方式可以如下所示:
密钥生成中心103首先生成阶为q的两个循环群G1和G2,及一个双线性配对e:G1×G2→G2,其中,q为一个大素数;并随机选择G1群的一个生成元P及一个随机数然后计算Ppub,Ppub=sP;再选择两个哈希函数和其中n为密钥长度;从而可以得到主公钥mpk=<q,G1,G2,e,n,P,Ppub,H1,H2>及主私钥在主私钥确定之后,密钥生成中心103可以在主私钥的基础上,生成与各个身份标识对应的私钥,其中,SKi=sH1(IDi);其中s为主私钥,H1为哈希函数,IDi为身份标识;即,主私钥与该身份标识的哈希值的乘积即为该身份标识对应的私钥。其中,所述身份标识可以包括第一身份标识、第二身份标识或备选身份标识。
密钥生成中心103利用chnorr签名技术生成主公钥及与身份标识对应的私钥的方式可以如下所示:
密钥生成中心103首先生成阶为q的循环群G,其中,q为一个大素数;然后选择G的一个生成元g;选择哈数函数H:{0,1}*→{0,1}l,其中,l为特定的整数;再选择一个随机数计算y=gs;从而可以得到主公钥mpk=<q,G,y,H>,及主私钥在主私钥确定之后,密钥生成中心103可以在主私钥的基础上,生成与各个身份标识对应的私钥,其中,SKi=si,si=ri+sH(Ri,IDi)mod q,其中,为随机数,IDi为身份标识。其中,所述身份标识可以包括第一身份标识、第二身份标识或备选身份标识。
下面结合附图对本申请身份认证方法进行说明。该认证方法可以用于实现第一设备101与第二设备102之间的身份认证。
参见图2,为本申请身份认证方法另一个实施例流程示意图。
步骤201,第一设备从密钥生成中心获取第一主公钥及与第一身份标识相对应的第一
私钥,其中,所述第一身份标识为第一设备的身份标识。
第一主公钥及第一私钥的生成方式可以参见前述,在此就不再赘述。
步骤202,所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,所述第二身份标识为第二设备的身份标识。
所述ServerKeyExchange消息中携带可以直接携带有所述第二身份标识,也可以携带有所述第二设备的多个备选身份标识。如果所述ServerKeyExchange消息中携带有多个备选身份标识,那么所述第一设备可以从所述备选身份标识中选择一个作为所述第二身份标识。
除所述第二身份标识或所述备选身份标识之外,所述ServerKeyExchange消息还可以携带至少一个公钥,以便于所述第一设备从备选身份标识中选择第二身份标识。其中,所述ServerKeyExchange消息所携带的公钥可以仅为与所述第二身份标识相对应的第二主公钥,或者也可以是多个备选主公钥。当所述备询公钥为多个时,每一个备选主公钥与所述ServerKeyExchange消息中携带的一个备选身份标识相对应。其中,所述第二身份标识
步骤203,所述第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥。
在所述第二身份标识、所述第一私钥以及所述第一主公钥均被确定之后,所述第一设备可以使用所述第二身份标识、所述第一私钥以及所述第一主公钥生成预共享密钥。第一设备可以使用利用双线性配对(Bilinear Pairing)技术或利用Schnorr签名技术生成所述预共享密钥。
步骤204,所述第一设备使用所述预共享密钥完成与所述第二设备之间的身份认证。
所述第一设备使用所述与预共享密钥完成与所述第二设备之间身份认证的具体过程在此就不再赘述。
为使第二设备也能生成所述预共享密钥,除前述步骤201至步骤204之外,所述方法还可以包括:
步骤205,所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识。
除携带所述第一身份标识之外,根据所述ServerKeyExchange消息中携带所携带的内容不同,所述ClientKeyExchange消息也可以携带相应的内容。
如果所述ServerKeyExchange消息中携带第二身份标识及第二主公钥,那么所述ClientKeyExchange消息中则可以携带所述第一身份标识及所述第一主公钥。
如果所述ServerKeyExchange消息中携带有备选身份标识,那么所述ClientKeyExchange消息中则可以携带所述第一身份标识及所述第二身份标识。其中,所述第二身份标识也可以被所述第二身份标识的指示信息所替代。
如果除所述备选身份标识之外,所述ServerKeyExchange消息中携带还携带有各个备选身份标识所对应的备选主公钥,那么所述ClientKeyExchange消息中除携带所述第一身份标识及所述第二身份标识之外,还可以携带所述第二主公钥。
其中,当所述ClientKeyExchange消息中需要携带所述第一身份标识、所述第一主公钥或所述第二主公钥时,所述第一身份标识、所述第一主公钥或所述第二主公钥均可以由所述ClientKeyExchange中可以由应用层指定的字段,例如psk_identity字段承载。
在此需要说明的是,本申请不对步骤205与步骤201至204之间的执行顺序进行限定。
采用本申请各个实施例所提供的方法及设备,第一设备可以利用TLS协议中规定的信息实现获取第二身份标识,并发送第一身份标识,从而可以在不对TLS协议进行扩展的前提下完成预共享密钥协商,避免因为对TLS协议进行扩展所带来的兼容性问题。
参见图3,为本申请身份认证方法另一个实施例流程示意图。
步骤301,第二设备从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识。
第二主公钥及第二私钥的生成方式可以参见前述,在此不再赘述。
步骤302,所述第二设备从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识。
步骤303,所述第二设备使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成预共享密钥。
其中,所述第二设备可以直接从所述密钥生成中心获取所述第二设备,或者,当所述第二身份标识由所述第一设备从所述备选身份标识中选定时,所述第二设备也可以从所述ClientKeyExchange消息中获取所述第二身份标识;相应的,所述第二设备也可以从所述ClientKeyExchange消息中获取所述第二主公钥。
步骤304,所述第二设备使用所述预共享密钥完成与所述第一设备之间的身份认证。
所述第二设备使用所述与预共享密钥完成与所述第一设备之间身份认证的具体过程在此就不再赘述。
为使第一设备也能生成所述预共享密钥,除前述步骤301至步骤304之外,所述方法还可以包括:
步骤305,第二设备发送安全传输层协议TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带所述第二身份标识。
所述ServerKeyExchange消息中携带可以直接携带所述第二身份标识,或者也可以携带多个备选身份标识,以便于第一设备能从所述备选身份标识中选择第二身份标识。除所述第二身份标识或所述备选身份标识之外,所述ServerKeyExchange消息中携带还可以携带所和第二身份标识对应的第二主公钥或每个多数备选身份标识对应被备选公钥。
其中,当所述ServerKeyExchange消息中需要携带所述第二身份标识、所述第二主公钥、备选身份标识或所述备选主公钥时,所述第二身份标识、所述第二主公钥、备选身份标识或所述备选主公钥时均可以由所述ServerKeyExchange中可以由应用层指定的字段,例如psk_identity_hint字段承载。
在此需要说明的是,本申请不对步骤305与步骤301至304之间的执行顺序进行限定。
采用本申请各个实施例所提供的方法及设备,第二设备可以利用TLS协议中规定的信息实现获取第一身份标识,并发送第二身份标识,从而可以在不对TLS协议进行扩展的前提下完成预共享密钥协商,避免因为对TLS协议进行扩展所带来的兼容性问题。
下面结合附图对本申请身份认证方法做进一步说明。
参见图4,为本申请身份认证方法另一个实施例流程示意图。
步骤401,第一设备从密钥生成中心获取第一主公钥、以及与第一身份标识对应的第一私钥。
步骤402,第二设备从密钥生成中心获取第二主公钥、以及与第二身份标识对应的第二私钥。
密钥生成中心可以利用双线性配对(Bilinear Pairing)技术或chnorr签名技术来生成与第一身份标识对应的第一私钥和与第二身份标识对应的第二私钥。而第一主公钥与第二主公钥则可以为同一个主公钥。其中,所述第一身份标识可以是所述第一设备的email地址、IP地址或域名等,第二身份标识也可以是所述第二设备的email地址、IP地址或域名等,第一私钥和第二私钥的生成方式可以参见前述,在此就不再赘述。
步骤403、第一设备发送TLS ClientHello消息。
所述TLS ClientHello消息中可以携带备选PSK模式的密码套件的指示信息,所述备选PSK模式的密码套件为第一设备所支持PSK模式的密码套件。
例如,所述TLS ClientHello消息中可以携带TLS_PSK_WITH_AES_256_CBC_SHA、TLS_DHE_PSK_WITH_AES_256_CBC_SHA、TLS_RSA_PSK_WITH_AES_256_CBC_SHA等信息,用于指示第一设备支持相应的密码套件。
步骤404,第二设备发送TLS ServerHello消息。
在接收到TLS ClientHello消息之后,第二设备可以从备选PSK模式中选择一个,作为第一设备与第二设备进行加密数据传输时所采用的选定PSK模式。在所述选定PSK模式选定后,所述第二设备可以发送TLS ServerHello消息。所述TLS ServerHello消息中可以携带有用于指示所述选定PSK模式的指示信息。
例如,所述指示新可以是TLS_PSK_WITH_AES_256_CBC_SHA、TLS_DHE_PSK_WITH_AES_256_CBC_SHA或TLS_RSA_PSK_WITH_AES_256_CBC_SHA,也可以是TLS_PSK_WITH_AES_256_CBC_SHA、TLS_DHE_PSK_WITH_AES_256_CBC_SHA或TLS_RSA_PSK_WITH_AES_256_CBC_SHA所对应的编号。
步骤405,第二设备发送ServerKeyExchange消息。
其中,所述ServerKeyExchange消息的psk_identity_hint字段可以携带所述第二身份标识。
步骤406,第二设备发送TLS ServerHelloDone消息。
步骤407,第一设备从ServerKeyExchange消息的psk_identity_hint字段中获取所述第二身份标识。
步骤408,第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成预共享密钥。
第一设备可以通过在openssl开源代码中TLS实现源码中直接添加的内容实现预共享密钥的计算;或者,也可以通过openssl源码的TLS-PSK模式下指定callback函数在应用层实现预共享密钥的计算,即,第一设备可以利用SSL_CTX_set_psk_client_callback()和SSL_CTX_set_psk_server_callback()等应用层callback函数计算所述预共享密钥。
如果利用双线性配对(Bilinear Pairing)技术生成所述预共享密钥,那么第一设备生成预共享密钥的计算方法可以如下所示:
psk=e(SKA,H1(IDB))=e(sH1(IDA),H1(IDB))=e(H1(IDA),H1(IDB))S。
如果利用Schnorr签名技术生成所述预共享密钥,那么第一设备生成预共享密钥的计算方法可以如下所示:
步骤409,第一设备发送ClientKeyExchange消息。
其中,所述ClientKeyExchange消息的psk_identity字段中可以携带所述第一身份标识。
步骤410,第一设备发送TLS Finished消息。
步骤411,第二设备从ClientKeyExchange消息的psk_ideneity字段中获取所述第一身份标识。
步骤412,第二设备使用所述第一身份标识、所述第二私钥以及所述第一主公钥,生成预共享密钥。
第二设备可以通过在openssl开源代码中TLS实现源码中直接添加的内容实现预共享密钥的计算;或者,也可以通过openssl源码的TLS-PSK模式下指定callback函数在应用层实现预共享密钥的计算,即,第二设备可以利用SSL_CTX_set_psk_client_callback()和SSL_CTX_set_psk_server_callback()等应用层callback函数计算所述预共享密钥。
如果利用双线性配对(Bilinear Pairing)技术生成所述预共享密钥,那么第二设备生成预共享密钥的计算方法可以如下所示:
psk=e(SKB,H1(IDA))=e(sH1(IDB),H1(IDA))=e(H1(IDB),H1(IDA))S。
如果利用Schnorr签名技术生成所述预共享密钥,那么第二设备生成预共享密钥的计算方法可以如下所示:
步骤413,第二设备发送TLS Finished消息。
采用本实施例,可以通过psk_identity字段来传输第一身份标识并通过psk_identity_hint字段来传输第二身份标识,而按照TLS协议,psk_identity_hint和psk_identity字段可以由应用层指定,因此可以在符合TLS标准规定的基础上完成身份标识传输。
参见图5,为本申请身份认证方法另一个实施例流程示意图。由于在实际使用中,第一设备可能需要与多个第二设备进行通信,而第二设备有可能与多个第一设备进行通信,如果第一设备与第二设备所使用的主公钥不一致,则会导致第一设备与第二设备之间发生通信失败。因此还可以由第二设备发送第二主公钥或者第二设备发送第一主公钥来避免因为第一设备与第二设备所使用的主公钥不一致所导致的通信失败。具体实现方式可以如下所示:
步骤501,第一设备从密钥生成中心获取第一主公钥、以及第一私钥。
步骤502,第二设备从密钥生成中心获取第二主公钥、以及第二私钥。
步骤503、第一设备发送TLS ClientHello消息。
步骤504,第二设备发送TLS ServerHello消息。
步骤505,第二设备发送ServerKeyExchange消息。
其中,所述ServerKeyExchange消息的psk_identity_hint字段中可以携带所述第二身份标识及所述第二主公钥。
或者,所述ServerKeyExchange消息的psk_identity_hint字段中可以携带所述第二身份标识及所述第二主公钥的指示信息,例如,第二主公钥的序列号。第一设备可以通过
所述第二主公钥的指示信息判定所述第一主公钥与所述第二主公钥是否一致。
步骤506,第二设备发送TLS ServerHelloDone消息。
步骤507,第一设备从ServerKeyExchange消息的psk_identity_hint字段中获取所述第二身份标识及所述第二主公钥。
步骤508,若所述第二主公钥与所述第一主公钥相同,则所述第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥。
步骤509,第一设备发送ClientKeyExchange消息。
其中,所述ClientKeyExchange消息的psk_identity字段中可以携带所述第一身份标识及所述第一主公钥。
步骤510,第一设备发送TLS Finished消息。
步骤511,第二设备从ClientKeyExchange消息的psk_ideneity字段中获取所述第一身份标识以及所述第一主公钥。
步骤512,若所述第一主公钥与所述第二主公钥相同,则所述第二设备使用第一所述身份标识、所述第二私钥以及所述第一主公钥,生成预共享密钥。
步骤513,第二设备发送TLS Finished消息。
采用本实施例中所提供的方式,通过psk_identity_hint字段携带第二主公钥,可以使第一设备与第二设备在通信之前判定双方所用的公钥是否相同,从而避免因为第一设备与第二设备使用的主公钥不一致造成的通信失败。
参见图6,为本申请身份认证方法另一个实施例流程示意图。由于在实际使用中,第一设备可能需要以不同的身份与第一设备进行通信,在第一设备的身份不同时,所要采用的私钥也不相同,为实现第二设备能使用不同的身份与第一设备进行通信,第二设备可以向第一设备发送多个备选身份标识。具体实现方式可以如下所示:
步骤601,第一设备从密钥生成中心获取第一主公钥、以及第一私钥。
步骤602,第二设备从密钥生成中心获取第二主公钥、以及n个备选私钥。
其中,每一个备选私钥与所述第二设备的一个备选身份标识相对应。n的取值为正整数,通常情况下n的取值不小于2。
其中,每个一个所述备选私钥与所述第二设备的一个备选身份标识相对应。
步骤603,第一设备发送TLS ClientHello消息。
步骤604,第二设备发送TLS ServerHello消息。
步骤605,第二设备发送ServerKeyExchange消息。
其中,ServerKeyExchange消息的psk_identity_hint字段中携带的psk_identity_hint字段携带所述第二设备的至少一个备选身份标识。所述备选身份标识可以是所述第二设备的email地址、IP地址和域名等的一个或多个。
步骤606,第二设备发送TLS ServerHelloDone消息。
步骤607,第一设备从ServerKeyExchange消息的psk_identity_hint字段中获取所述备选身份标识。
步骤608,第一设备从所述备选身份标识中选择一个作为第二身份标识。
步骤609,第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成所述预共享密钥。
步骤610,第一设备发送ClientKeyExchange消息。
其中,ClientKeyExchange消息的psk_identity字段中可以携带所述第二身份标识以及所述第一身份标识。
步骤611,第一设备发送TLS Finished消息;
步骤612,第二设备从ClientKeyExchange消息的psk_ideneity字段中获取第二身份标识和第一身份标识
步骤613,第二设备使用所述第一身份标识、与第二身份标识相对应的私钥和所述第一主公钥,生成所述预共享密钥。
步骤614,第二设备发送TLS Finished消息。
采用本实施例中所提供的方式,通过psk_identity_hint字段携带备选身份标识,可以使第二设备用不同的身份与第一设备进行通信。
参见图7,为本申请身份认证方法另一个实施例流程示意图。由于在实际使用中,第一设备可能需要以不同的身份与第一设备进行通信,在第一设备的身份不同时,不但所要采用的私钥也不相同,而且所要采用的公钥也可能不同,为实现第二设备能使用不同的身份与第一设备进行通信,第二设备可以向第一设备发送多个备选身份标识以及多个备选主公钥。具体实现方式可以如下所示:
步骤701,第一设备从密钥生成中心获取第一主公钥、以及第一私钥。
步骤702,第二设备从密钥生成中心获取每一个备选身份标识所对应的公钥,以及每一个备选身份标识所对应的私钥。
步骤703,第一设备发送TLS ClientHello消息。
步骤704,第二设备发送TLS ServerHello消息。
步骤705,第二设备发送ServerKeyExchange消息,
其中,ServerKeyExchange消息的psk_identity_hint字段中携带的psk_identity_hint字段携带第二设备的至少一个备选身份标识及每一个所述备选身份标识所对应的备选主公钥。
步骤706,第二设备发送TLS ServerHelloDone消息;
步骤707,第一设备从ServerKeyExchange消息的psk_identity_hint字段中获取备选身份标识及备选身份标识对应的备选主公钥。
步骤708,设备从所述备选身份标识中选取第二身份标识。
其中,所述第二身份标识所对应的备选主公钥与所述第一主公钥相同。
步骤709,第一设备使用所述第二身份标识、所述第一私钥、以及所述第一主公钥生成所述预共享密钥。
步骤710,第一设备发送ClientKeyExchange消息。
其中,ClientKeyExchange消息中的psk_identity字段携带所述第二身份标识第一身份标识。
除所述,第二身份标识之外,所述psk_identity字段中还可以携带有所述第二身份标识所对应的备选主公钥。
步骤711,第一设备发送TLS Finished消息。
步骤712,第二设备从ClientKeyExchange消息的psk_ideneity中获取第二身份标识
和第一身份标识。
所述第二设备还可以从所述psk_identity字段中获取所述第二身份标识所对应的备选主公钥。
步骤713,第二设备使用所述第一身份标识、所述第二身份标识对应的备选私钥、以及所述第二身份标识所对应的备选主公钥,生成所述预共享密钥。
步骤714,第二设备发送TLS Finished消息。
采用本实施例中所提供的方式,通过psk_identity_hint字段携带备选身份标识,及备选主公钥,从而可以使第一设备使用与自己所获取公钥相匹配的公钥进行与第二设备进行通信。
参见图8,为本申请通信设备一个实施例的结构示意图。
如图8所述,所述通信设备可以包括收发单元801、处理单元802以及存储单元803。所述装置可以为前述实施例中的第一设备也可以是前述实施例中的第二设备。
当所述通信设备为第二设备时,
所述收发单元801,用于从密钥生成中心获取第一主公钥及与第一身份标识相对应的第一私钥,其中,所述第一身份标识为所述第一设备的身份标识;发送安全传输协议TLS客户端问候ClientHello消息,所述ClientHello消息中携带备选预共享密钥PSK模式的密码套件;处理单元802,用于从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,所述第二身份标识为第二设备的身份标识;使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥,其中,所述选定PSK模式为所述第二设备从所述备选PSK模式中选出的一个;使用所述预共享密钥完成与所述第二设备之间的身份认证。
可选的,所述收发单元801,还用于发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识。
可选的,所述处理单元802,还用于从所述ServerKeyExchange消息中获取所述第二身份标识及第二主公钥。
可选的,所述处理单元802,还用于从所述ServerKeyExchange消息中获取第二设备的备选身份标识;从所述备选身份标识中选取一个作为所述第二身份标识。
可选的,所述处理单元802,还用于从所述ServerKeyExchange消息中获取第二设备的备选身份标识及各个所述备选身份标识对应的备选主公钥;从所述备选身份标识中选取第二身份标识,其中,所述第二身份标识对应的备选主公钥与所述第一主公钥相同。
可选的,所述处理单元802,还用于如果所述第二主公钥与所述第一主公钥相同,则使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥。
可选的,所述收发单元801,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第一主公钥。
可选的,所述收发单元801,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识。
可选的,所述收发单元801,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识的指示信息。
当所述通信设备为所述第二设备时,
收发单元801,用于从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识;发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定PSK模式的密码套件;
处理单元802,用于从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;使用所述预共享密钥完成与所述第一设备之间的身份认证。
可选的,所述收发单元801,还用于发送安全传输层协议TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识。
可选的,所述处理单元802,还用于从所述密钥生成中心获取第二主公钥以及备选私钥,其中,每一个所述备选私钥与所述第二设备的一个备选标识相对应。
可选的,所述处理单元802,还用于从所述密钥生成中心获取备选主公钥以及备选私钥,其中,每一个所述备选私钥与一个备选主公钥相对应,且每一个所述备选私钥与所述第二设备的一个备选标识相对应。
可选的,所述收发单元801,还用于发送ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识及第二主公钥。
可选的,所述收发单元801,还用于发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选主公钥。
可选的,所述收发单元801,还用于发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选标识及每一个所述备选标识对应的所述备选主公钥。
可选的,所述处理单元802,还用于从所述ClientKeyExchange消息中获取第一身份标识及所述第二身份标识。
参见图9,为本申请通信设备另一个实施例的结构示意图。
如图9所示,所述通信设备可以包括:参见图9为本申请通信设备一个实施例的结构示意图。所述通信设备可以是前述任意实施例中的通信设备,可以用于执行图2至图7任一个实施例所示身份认证方法中的任意方法步骤。
如图9所示,所述通信设备可以包括处理器901、存储器902及收发器903,所述收发器903可以包括接收机、发射机与天线等部件。所述通信设备还可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置,本申请对此不进行限定。
处理器901为通信设备的控制中心,利用各种接口和线路连接整个通信设备的各个部分,通过运行或执行存储在存储器902内的软件程序和/或模块,以及调用存储在存储器内的数据,以执行通信设备的各种功能和/或处理数据。所述处理器901可以由集成电路(integrated circuit,简称IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器可以仅包括中央处理器(central processing unit,简称CPU),也可以是GPU、数字信号处理器(digital signal processor,简称DSP)、及收发器903中的控制芯片(例如基带芯片)的组合。在本申请实施方式中,CPU可以是单运算核心,也可以包括多运算核心。
所述收发器903用于建立通信信道,使通信设备通过所述通信信道以连接至其他通信设备,从而实现通信设备之间的数据传输。所述收发器903可以包括无线局域网(wireless local area network,简称WLAN)模块、蓝牙模块、基带(base band)模块等通信模块,以及所述通信模块对应的射频(radio frequency,简称RF)电路,用于进行无线局域网络通信、蓝牙通信、红外线通信及/或蜂窝式通信***通信,例如宽带码分多重接入(wideband code division multiple access,简称WCDMA)及/或高速下行封包存取(high speed downlink packet access,简称HSDPA)。所述收发器903用于控制通信设备中的各组件的通信,并且可以支持直接内存存取(direct memory access)。
在本申请的不同实施方式中,所述收发器903中的各种收发器903一般以集成电路芯片(integrated circuit chip)的形式出现,并可进行选择性组合,而不必包括所有收发器903及对应的天线组。例如,所述收发器903可以仅包括基带芯片、射频芯片以及相应的天线以在一个蜂窝通信***中提供通信功能。经由所述收发器903建立的无线通信连接,例如无线局域网接入或WCDMA接入,所述通信设备可以连接至蜂窝网(cellular network)或因特网(internet)。在本申请的一些可选实施方式中,所述收发器903中的通信模块,例如基带模块可以集成到处理器中,典型的如高通(Qualcomm)公司提供的APQ+MDM系列平台。射频电路用于信息收发或通话过程中接收和发送信号。例如,将网络设备的下行信息接收后,给处理器处理;另外,将设计上行的数据发送给网络设备。通常,所述射频电路包括用于执行这些功能的公知电路,包括但不限于天线***、射频收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、编解码(codec)芯片组、用户身份模块(SIM)卡、存储器等等。此外,射频电路还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯***(global system of mobile communication,简称GSM)、通用分组无线服务(general packet radio service,简称gprs)、码分多址(code division multiple access,简称CDMA)、宽带码分多址(wideband code division multiple access,简称WCDMA)、高速上行行链路分组接入技术(high speed uplink packet access,简称HSUPA)、长期演进(long term evolution,简称LTE)、电子邮件、短消息服务(short messaging service,简称SMS)等。
所述通信设备作为前述实施例中第一设备时,
所述收发器903,用于从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识;发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定PSK模式的密码套件;所述处理器901,用于从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;使用所述预共享密钥完成与所述第一设备之间的身份认证。
可选的,所述收发器903,还用于发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识。
可选的,所述处理器901,还用于从所述ServerKeyExchange消息中获取所述第二身份标识及第二主公钥。
可选的,所述处理器901,还用于从所述ServerKeyExchange消息中获取第二设备的备选身份标识;从所述备选身份标识中选取一个作为所述第二身份标识。
可选的,所述处理器901,还用于从所述ServerKeyExchange消息中获取第二设备的备选身份标识及各个所述备选身份标识对应的备选主公钥;从所述备选身份标识中选取第二身份标识,其中,所述第二身份标识对应的备选主公钥与所述第一主公钥相同。
可选的,所述处理器901,还用于如果所述第二主公钥与所述第一主公钥相同,则使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥。
可选的,所述收发器903,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第一主公钥。
可选的,所述收发器903,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识。
可选的,所述收发器903,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识的指示信息。
当所述通信设备为所述第二设备时,
收发器903,用于从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识;发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定PSK模式的密码套件;
处理器901,用于从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;使用所述预共享密钥完成与所述第一设备之间的身份认证。
可选的,所述收发器903,还用于发送安全传输层协议TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识。
可选的,所述处理器901,还用于从所述密钥生成中心获取第二主公钥以及备选私钥,其中,每一个所述备选私钥与所述第二设备的一个备选标识相对应。
可选的,所述处理器901,还用于从所述密钥生成中心获取备选主公钥以及备选私钥,其中,每一个所述备选私钥与一个备选主公钥相对应,且每一个所述备选私钥与所述第二设备的一个备选标识相对应。
可选的,所述收发器903,还用于发送ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识及第二主公钥。
可选的,所述收发器903,还用于发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选主公钥。
可选的,所述收发器903,还用于发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选标识及每一个所述备选标识对应的所述备选主公钥。
可选的,所述处理器901,还用于从所述ClientKeyExchange消息中获取第一身份标识及所述第二身份标识。
具体实现中,本申请还提供一种计算机存储介质,其中,该计算机存储介质可存储有
程序,该程序执行时可包括本申请提供的身份认证方法的各实施例中的部分或全部步骤。所述的存储介质可为磁碟、光盘、只读存储记忆体(read-only memory,简称ROM)或随机存储记忆体(random access memory,简称RAM)等。
本领域的技术人员可以清楚地了解到本申请实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于设备及***实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。
以上所述的本申请实施方式并不构成对本申请保护范围的限定。
Claims (35)
- 一种身份认证方法,其特征在于,包括:第一设备从密钥生成中心获取第一主公钥及与第一身份标识相对应的第一私钥,其中,所述第一身份标识为所述第一设备的身份标识;所述第一设备发送安全传输协议TLS客户端问候ClientHello消息,所述ClientHello消息中携带备选预共享密钥PSK模式的密码套件;所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,所述第二身份标识为第二设备的身份标识;所述第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥,其中,所述选定PSK模式为所述第二设备从所述备选PSK模式中选出的一个;所述第一设备使用所述预共享密钥完成与所述第二设备之间的身份认证。
- 如权利要求1所述的方法,其特征在于,还包括:所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识。
- 如权利要求1或2所述的方法,其特征在于,所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,包括:所述第一设备从所述ServerKeyExchange消息中获取所述第二身份标识及第二主公钥。
- 如权利要求1或2所述的方法,其特征在于,所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,包括:所述第一设备从所述ServerKeyExchange消息中获取所述第二设备的备选身份标识;所述第一设备从所述备选身份标识中选取一个作为所述第二身份标识。
- 如权利要求1或2所述的方法,其特征在于,所述第一设备从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,包括:所述第一设备从所述ServerKeyExchange消息中获取所述第二设备的备选身份标识及各个所述备选身份标识对应的备选主公钥;所述第一设备从所述备选身份标识中选取第二身份标识,其中,所述第二身份标识对应的备选主公钥与所述第一主公钥相同。
- 如权利要求3所述的方法,其特征在于,所述第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥,包括:如果所述第二主公钥与所述第一主公钥相同,所述第一设备使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥。
- 如权利要求3所述的方法,其特征在于,所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识,包括:所述第一设备发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第一主公钥。
- 如权利要求4或5所述的方法,其特征在于,所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识,包括:所述第一设备发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识。
- 如权利要求4或5所述的方法,其特征在于,所述第一设备发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识,包括:所述第一设备发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识的指示信息。
- 一种身份认证方法,其特征在于,包括:第二设备从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识;所述第二设备发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定预共享密钥PSK模式的密码套件;所述第二设备从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;所述第二设备使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;所述第二设备使用所述预共享密钥完成与所述第一设备之间的身份认证。
- 如权利要求10所述的方法,其特征在于,还包括:所述第二设备发送TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识。
- 如权利要求10或11所述的方法,其特征在于,所述第二设备从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,包括:所述第二设备从所述密钥生成中心获取第二主公钥以及备选私钥,其中,每一个所述备选私钥与所述第二设备的一个备选标识相对应。
- 如权利要求10或11所述的方法,其特征在于,所述第二设备从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,包括:所述第二设备从所述密钥生成中心获取备选主公钥以及备选私钥,其中,每一个所述备选私钥与一个备选主公钥相对应,且每一个所述备选私钥与所述第二设备的一个备选标识相对应。
- 如权利要求11所述的方法,其特征在于,所述第二设备发送TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识,包括:所述第二设备发送ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识及第二主公钥。
- 如权利要求11所述的方法,其特征在于,所述第二设备发送TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识,包括:所述第二设备发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选主公钥。
- 如权利要求12或13所述的方法,其特征在于,所述第二设备发送TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识,包括:所述第二设备发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选标识及每一个所述备选标识对应的所述备选主公钥。
- 如权利要求12或13所述的方法,其特征在于,所述第二设备从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,包括:所述第二设备从所述ClientKeyExchange消息中获取第一身份标识及所述第二身份标识。
- 一种通信设备,其特征在于,包括:收发单元,用于从密钥生成中心获取第一主公钥及与第一身份标识相对应的第一私钥,其中,所述第一身份标识为所述第一设备的身份标识;发送安全传输协议TLS客户端问候ClientHello消息,所述ClientHello消息中携带备选预共享密钥PSK模式的密码套件;处理单元,用于从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,所述第二身份标识为第二设备的身份标识;使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥,其中,所述选定PSK模式为所述第二设备从所述备选PSK模式中选出的一个;使用所述预共享密钥完成与所述第二设备之间的身份认证。
- 如权利要求18所述的通信设备,其特征在于,所述收发单元,还用于发送TLS客户端密钥交换ClientKeyExchange消息,所述ClientKeyExchange消息中携带所述第一身份标识。
- 如权利要求18或19所述的通信设备,其特征在于,所述处理单元,还用于从所述ServerKeyExchange消息中获取所述第二身份标识及第二主公钥。
- 如权利要求18或19所述的通信设备,其特征在于,所述处理单元,还用于从所述ServerKeyExchange消息中获取第二设备的备选身份标识;从所述备选身份标识中选取一个作为所述第二身份标识。
- 如权利要求18或19所述的通信设备,其特征在于,所述处理单元,还用于从所述ServerKeyExchange消息中获取第二设备的备选身份标识及各个所述备选身份标识对应的备选主公钥;从所述备选身份标识中选取第二身份标识,其中,所述第二身份标识对应的备选主公钥与所述第一主公钥相同。
- 如权利要求20所述的通信设备,其特征在于,所述处理单元,还用于如果所述第二主公钥与所述第一主公钥相同,则使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥。
- 如权利要求20所述的通信设备,其特征在于,所述收发单元,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第一主公钥。
- 如权利要求21或22所述的通信设备,其特征在于,所述收发单元,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识。
- 如权利要求21或22所述的通信设备,其特征在于,所述收发单元,还用于发送ClientKeyExchange消息,所述ClientKeyExchange消息携带所述第一身份标识及所述第二身份标识的指示信息。
- 一种通信设备,其特征在于,包括:收发单元,用于从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识;发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定预共享密钥PSK模式的密码套件;处理单元,用于从TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;使用所述预共享密钥完成与所述第一设备之间的身份认证。
- 如权利要求27所述的通信设备,其特征在于,还包括:所述收发单元,还用于发送安全传输层协议TLS服务器密钥交换ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识。
- 如权利要求27或28所述的通信设备,其特征在于:所述处理单元,还用于从所述密钥生成中心获取第二主公钥以及备选私钥,其中,每一个所述备选私钥与所述第二设备的一个备选标识相对应。
- 如权利要求27或28所述的通信设备,其特征在于:所述处理单元,还用于从所述密钥生成中心获取备选主公钥以及备选私钥,其中,每一个所述备选私钥与一个备选主公钥相对应,且每一个所述备选私钥与所述第二设备的一个备选标识相对应。
- 如权利要求28所述的通信设备,其特征在于,所述收发单元,还用于发送ServerKeyExchange消息,所述ServerKeyExchange消息中携带第二身份标识及第二主公钥。
- 如权利要求29或30所述的通信设备,其特征在于,所述收发单元,还用于发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选主公钥。
- 如权利要求29或30所述的通信设备,其特征在于,所述收发单元,还用于发送ServerKeyExchange消息,所述发送ServerKeyExchange消息中携带所述备选标识及每一个所述备选标识对应的所述备选主公钥。
- 如权利要求29或30所述的通信设备,其特征在于,所述处理单元,还用于从所述ClientKeyExchange消息中获取第一身份标识及所述第二身份标识。
- 一种通信***,其特征在于,包括:密钥生成中心、第一设备与第二设备;其中,所述第一设备,用于从密钥生成中心获取第一主公钥及与第一身份标识相对应的第一私钥,其中,所述第一身份标识为所述第一设备的身份标识;发送安全传输协议TLS客户端问候ClientHello消息,所述ClientHello消息中携带备选预共享密钥PSK模式的密码套件;从TLS服务器密钥交换ServerKeyExchange消息中获取所述第二身份标识,所述第二身份标识为第二设备的身份标识;使用所述第二身份标识、所述第一私钥以及所述第一主公钥,生成选定PSK模式的预共享密钥,其中,所述选定PSK模式为所述第二设备从所述备选PSK模式中选出的一个;使用所述预共享密钥完成与所述第二设备之间的身份认证;所述第二设备,用于从密钥生成中心获取第二主公钥及与第二身份标识相对应的第二私钥,所述第二身份标识为第二设备的身份标识;发送安全传输协议TLS服务器问候ServerHello消息,所述ServerHello消息中携带选定PSK模式的密码套件;从安全传输层协议TLS客户端密钥交换ClientKeyExchange消息中获取第一身份标识,所述第一身份标识为第一设备的身份标识;使用所述第一身份标识、所述第二私钥以及所述第二主公钥,生成所述选定PSK模式的预共享密钥;使用所述预共享密钥完成与所述第一设备之间的身份认证。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/421,039 US11134379B2 (en) | 2016-11-24 | 2019-05-23 | Identity authentication method, device, and system |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611052569.8 | 2016-11-24 | ||
CN201611052569.8A CN108111467B (zh) | 2016-11-24 | 2016-11-24 | 身份认证方法与设备及*** |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/421,039 Continuation US11134379B2 (en) | 2016-11-24 | 2019-05-23 | Identity authentication method, device, and system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018095050A1 true WO2018095050A1 (zh) | 2018-05-31 |
Family
ID=62194825
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/092900 WO2018095050A1 (zh) | 2016-11-24 | 2017-07-14 | 身份认证方法与设备及*** |
Country Status (3)
Country | Link |
---|---|
US (1) | US11134379B2 (zh) |
CN (1) | CN108111467B (zh) |
WO (1) | WO2018095050A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109617675A (zh) * | 2018-11-15 | 2019-04-12 | 国网电动汽车服务有限公司 | 一种充放电设施与用户端间的双方标识认证方法及*** |
US20220337403A1 (en) * | 2019-10-04 | 2022-10-20 | Nippon Telegraph And Telephone Corporation | Terminal, server, method and program |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110896390B (zh) * | 2018-09-12 | 2021-05-11 | 华为技术有限公司 | 一种发送消息的方法、验证消息的方法、装置及通信*** |
JP2020195100A (ja) * | 2019-05-29 | 2020-12-03 | 株式会社bitFlyer Blockchain | 公開鍵の信頼性を証明するための装置、方法及びそのためのプログラム |
CN111814178A (zh) * | 2020-06-29 | 2020-10-23 | 四川长虹电器股份有限公司 | 一种针对第三方应用的数据回调熔断保护方法 |
CN114827999A (zh) * | 2020-07-28 | 2022-07-29 | 华为技术有限公司 | 一种节点配对方法及相关装置 |
CN114760026A (zh) * | 2020-12-26 | 2022-07-15 | 西安西电捷通无线网络通信股份有限公司 | 一种身份鉴别方法和装置 |
CN114268439B (zh) * | 2021-12-16 | 2023-09-15 | 中原工学院 | 一种基于格的身份基认证密钥协商方法 |
WO2023230983A1 (zh) * | 2022-06-02 | 2023-12-07 | Oppo广东移动通信有限公司 | 建立互操作通道的方法、装置、芯片和存储介质 |
US11968302B1 (en) | 2023-03-24 | 2024-04-23 | Srinivas Kumar | Method and system for pre-shared key (PSK) based secure communications with domain name system (DNS) authenticator |
US12015721B1 (en) | 2023-03-24 | 2024-06-18 | Srinivas Kumar | System and method for dynamic retrieval of certificates with remote lifecycle management |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040161110A1 (en) * | 2003-02-19 | 2004-08-19 | Kabushiki Kaisha Toshiba | Server apparatus, key management apparatus, and encrypted communication method |
CN101277512A (zh) * | 2007-03-27 | 2008-10-01 | 厦门致晟科技有限公司 | 一种无线移动终端通讯加密的方法 |
EP2271025A1 (en) * | 2008-04-21 | 2011-01-05 | Chengdu Huawei Symantec Technologies Co., Ltd. | Method, system and device for acquiring key |
CN103581167A (zh) * | 2013-07-29 | 2014-02-12 | 华为技术有限公司 | 基于安全传输层协议的安全认证方法、设备及*** |
CN103765842A (zh) * | 2011-07-25 | 2014-04-30 | 皇家飞利浦有限公司 | 用于建立端到端的安全连接和用于安全地传送数据分组的方法、设备以及*** |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2703719C (en) * | 2007-10-26 | 2014-07-08 | Telcordia Technologies, Inc. | Method and system for secure session establishment using identity-based encryption (vdtls) |
EP2604017B1 (en) * | 2010-08-10 | 2017-10-04 | Google Technology Holdings LLC | System and method for cognizant transport layer security |
CN104735037B (zh) * | 2013-12-24 | 2018-11-23 | ***通信集团公司 | 一种网络认证方法、装置及*** |
US10172000B2 (en) * | 2016-03-17 | 2019-01-01 | M2MD Technologies, Inc. | Method and system for managing security keys for user and M2M devices in a wireless communication network environment |
CN106060070B (zh) | 2016-07-01 | 2019-05-10 | 中国人民解放军国防科学技术大学 | 基于身份密码***的tls握手协议 |
CN105978906A (zh) | 2016-07-01 | 2016-09-28 | 中国人民解放军国防科学技术大学 | 一种基于身份的通信握手协议 |
-
2016
- 2016-11-24 CN CN201611052569.8A patent/CN108111467B/zh active Active
-
2017
- 2017-07-14 WO PCT/CN2017/092900 patent/WO2018095050A1/zh active Application Filing
-
2019
- 2019-05-23 US US16/421,039 patent/US11134379B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040161110A1 (en) * | 2003-02-19 | 2004-08-19 | Kabushiki Kaisha Toshiba | Server apparatus, key management apparatus, and encrypted communication method |
CN101277512A (zh) * | 2007-03-27 | 2008-10-01 | 厦门致晟科技有限公司 | 一种无线移动终端通讯加密的方法 |
EP2271025A1 (en) * | 2008-04-21 | 2011-01-05 | Chengdu Huawei Symantec Technologies Co., Ltd. | Method, system and device for acquiring key |
CN103765842A (zh) * | 2011-07-25 | 2014-04-30 | 皇家飞利浦有限公司 | 用于建立端到端的安全连接和用于安全地传送数据分组的方法、设备以及*** |
CN103581167A (zh) * | 2013-07-29 | 2014-02-12 | 华为技术有限公司 | 基于安全传输层协议的安全认证方法、设备及*** |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109617675A (zh) * | 2018-11-15 | 2019-04-12 | 国网电动汽车服务有限公司 | 一种充放电设施与用户端间的双方标识认证方法及*** |
CN109617675B (zh) * | 2018-11-15 | 2024-02-06 | 国网电动汽车服务有限公司 | 一种充放电设施与用户端间的双方标识认证方法及*** |
US20220337403A1 (en) * | 2019-10-04 | 2022-10-20 | Nippon Telegraph And Telephone Corporation | Terminal, server, method and program |
US12021974B2 (en) * | 2019-10-04 | 2024-06-25 | Nippon Telegraph And Telephone Corporation | Terminal, server, method and program |
Also Published As
Publication number | Publication date |
---|---|
US20190281453A1 (en) | 2019-09-12 |
US11134379B2 (en) | 2021-09-28 |
CN108111467A (zh) | 2018-06-01 |
CN108111467B (zh) | 2021-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11134379B2 (en) | Identity authentication method, device, and system | |
US11777716B2 (en) | Key exchange method and apparatus | |
JP6203985B1 (ja) | 認証証明のセキュアプロビジョニング | |
TWI475862B (zh) | 無線通信之安全引導 | |
US11570617B2 (en) | Communication method and communications apparatus | |
US10833876B2 (en) | Protection of the UE identity during 802.1x carrier hotspot and Wi-Fi calling authentication | |
CN111386720B (zh) | 通信终端、核心网络装置、核心网络节点、网络节点和密钥导出方法 | |
US10694376B2 (en) | Network authentication method, network device, terminal device, and storage medium | |
US20150244685A1 (en) | Generalized cryptographic framework | |
US20200100105A1 (en) | Network authentication method, network device, and core network device | |
WO2010023506A1 (en) | Methods, apparatuses, computer program products, and systems for providing secure pairing and association for wireless devices | |
CN117546441A (zh) | 一种安全通信方法及装置、终端设备、网络设备 | |
WO2020253408A1 (zh) | 二级认证的方法和装置 | |
CN113872755A (zh) | 一种密钥交换方法及装置 | |
US9356931B2 (en) | Methods and apparatuses for secure end to end communication | |
US20190149326A1 (en) | Key obtaining method and apparatus | |
US11553561B2 (en) | Protection of the UE identity during 802.1x carrier hotspot and wi-fi calling authentication | |
TWI650026B (zh) | Data transmission method, first device and second device | |
WO2023071836A1 (zh) | 一种通信方法及装置 | |
WO2020142884A1 (zh) | 切换传输路径的方法及装置 | |
WO2022237561A1 (zh) | 一种通信方法及装置 | |
US9960922B2 (en) | Device-to-device communication security with authentication certificates | |
TW201838464A (zh) | 通信方法、終端設備和接入網設備 | |
WO2020147602A1 (zh) | 一种认证方法、装置和*** | |
WO2024050846A1 (zh) | 近邻通信方法和装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17873305 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17873305 Country of ref document: EP Kind code of ref document: A1 |