WO2019000405A1 - 一种认证方法及终端、网络设备 - Google Patents

一种认证方法及终端、网络设备 Download PDF

Info

Publication number
WO2019000405A1
WO2019000405A1 PCT/CN2017/091136 CN2017091136W WO2019000405A1 WO 2019000405 A1 WO2019000405 A1 WO 2019000405A1 CN 2017091136 W CN2017091136 W CN 2017091136W WO 2019000405 A1 WO2019000405 A1 WO 2019000405A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
key
rand
message
management entity
Prior art date
Application number
PCT/CN2017/091136
Other languages
English (en)
French (fr)
Inventor
衣强
龙水平
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2017/091136 priority Critical patent/WO2019000405A1/zh
Priority to CN201780092233.0A priority patent/CN110809892B/zh
Publication of WO2019000405A1 publication Critical patent/WO2019000405A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication

Definitions

  • the present application relates to the field of communications, and in particular, to an authentication method, a terminal, and a network device.
  • wearable devices With the popularity of wearable devices, wearable devices are directly connected to the network, becoming a trend.
  • the wearable device accesses the network by using other terminals, such as a mobile phone, as a relay terminal, which can save the power of the wearable device and also improve the data transmission efficiency of the wearable device.
  • the present invention provides an authentication method, a terminal, and a network device, and aims to solve the problem of how to implement direct authentication of the wearable device by the operator network in the case that the wearable device uses the terminal as the relay access network to improve security. problem.
  • a first aspect of the present application provides an authentication method, including: a first terminal discovering a second terminal, and the second terminal is a relay terminal.
  • the first terminal sends a direct communication request message to the second terminal, where the direct communication request message includes an identifier of the first terminal.
  • the first terminal receives a direct security mode command message sent by the second terminal, where the direct security mode command message includes a random number RAND, and the RAND is moved by the second terminal from the second terminal.
  • Sexual management entity obtained.
  • the first terminal generates a response value RES according to the RAND.
  • the first terminal Transmitting, by the first terminal, a direct security mode complete message to the second terminal, where the direct security mode complete message includes the RES, so that the second terminal belongs to the mobility management entity of the second terminal And sending the RES, and the first terminal is authenticated by a mobility management entity to which the second terminal belongs.
  • the first terminal can enable the mobility management entity to which the second terminal belongs to authenticate the first terminal by interacting with the second terminal. Therefore, the network device directly authenticates the first terminal accessed through the relay device, and the security can be improved.
  • a second aspect of the present application provides a terminal, where the terminal is a first terminal, including: a processor, a transmitter, and a receiver.
  • the processor is configured to discover the second terminal, and the second terminal is a relay terminal.
  • the transmitter is configured to send a direct communication request message to the second terminal, where the direct communication request message includes an identifier of the first terminal.
  • the receiver is configured to receive a direct security mode command message sent by the second terminal, where the direct security mode command message includes a random number RAND, where the RAND is managed by the second terminal from the mobility of the second terminal Entity obtained.
  • the processor is further configured to generate a response value RES according to the RAND.
  • the transmitter is further configured to send a direct security mode complete message to the second terminal, where the direct security mode complete message includes the RES, so that the second terminal sends a home to the second terminal. Said RES, the first terminal is authenticated by the second terminal.
  • the method further includes: the first terminal moving to the first terminal by using the second terminal
  • the affiliation management entity sends an attach request, where the attach request includes the RAND, and the RAND is used to indicate that the first terminal to which the second terminal belongs is used by the first terminal to use the secret in the authentication vector corresponding to the RAND.
  • the key communicates as the root key.
  • the root vector Kasme between the remote UE and the MME may be determined by using the authentication vector obtained during the establishment of the short-range communication link, without performing the remote UE and the MME in the prior art.
  • the AKA process between the two generates a root key for authentication and negotiation.
  • the method further includes: the first terminal moving to the second terminal by using the second terminal
  • the affiliation management entity sends an attach request, where the attach request includes the RAND and the RES, and the RES is used by the mobility management entity to which the second terminal belongs to authenticate the first terminal, and the RAND is used to indicate The mobility management entity to which the second terminal belongs, in the case that the first terminal passes the authentication, the first terminal performs communication by using a key in the authentication vector corresponding to the RAND as a root key.
  • the root vector Kasme between the remote UE and the MME may be determined by using the authentication vector obtained during the establishment of the short-range communication link, without performing the remote UE and the MME in the prior art.
  • the AKA process between the two generates a root key for authentication and negotiation.
  • the direct security mode command message further includes: accessing a security management entity key AUTN.
  • the method further includes: the first terminal generates a second key according to the RAND and the AUTN, and generates a first key based on the second key, where the first key is the first A root key communicated between the terminal and the second terminal. It can be seen that, in addition to authenticating the first terminal, a root key for communication between the first terminal and the second terminal may also be generated.
  • a third aspect of the present application provides an authentication method, including: receiving, by a second terminal, a direct communication request message sent by a first terminal, where the direct communication request message includes an identifier of the first terminal.
  • the second terminal sends the identifier of the first terminal to a mobility management entity to which the second terminal belongs.
  • the second terminal receives the random number RAND sent by the mobility management entity to which the second terminal belongs, and the RAND is obtained by the mobility management entity to which the second terminal belongs according to the identifier of the first terminal.
  • the second terminal sends a direct security mode command message to the first terminal, where the direct security mode command message includes the RAND.
  • the second terminal receives the direct security mode complete message sent by the first terminal, where the direct security mode complete message includes a response value RES, and the RES is generated by the first terminal according to the RAND.
  • the second terminal sends the RES to a mobility management entity to which the second terminal belongs, so that the mobility management entity to which the second terminal belongs authenticates the first terminal. It can be seen that, by using the interaction between the first terminal and the mobility management entity to which the second terminal belongs, the network device can directly authenticate the first terminal accessed by the relay device, thereby improving security. .
  • a fourth aspect of the present application provides a terminal, where the terminal is a second terminal, including a receiver and a transmitter.
  • the receiver is configured to receive a direct communication request message sent by the first terminal, where the direct communication request message includes an identifier of the first terminal.
  • the transmitter is configured to send the identifier of the first terminal to a mobility management entity to which the second terminal belongs.
  • the receiver is further configured to receive a random transmission sent by the mobility management entity to which the second terminal belongs
  • the RAND is obtained by the mobility management entity to which the second terminal belongs according to the identifier of the first terminal.
  • the transmitter is further configured to send a direct security mode command message to the first terminal, where the direct security mode command message includes the RAND.
  • the receiver is further configured to receive a direct security mode complete message sent by the first terminal, where the direct security mode complete message includes a response value RES, and the RES is generated by the first terminal according to the RAND.
  • the transmitter is further configured to send the RES to a mobility management entity to which the second terminal belongs, so that the mobility management entity to which the second terminal belongs authenticates the first terminal.
  • the method before the sending, by the second terminal, the direct security mode command message to the first terminal, the method further includes: the second terminal receiving the AUTN sent by the mobility management entity to which the second terminal belongs a first key, where the first key is a root key that is communicated by the first terminal and the second terminal.
  • the direct security mode command message further includes: the AUTN, so that the first terminal generates a second key according to the RAND and the AUTN, and generates a third key based on the second key, The third key is a symmetric key of the first key, and the first key is a root key that is communicated by the first terminal and the second terminal.
  • a fifth aspect of the present application provides an authentication method, including: a mobility management entity to which a second terminal belongs receives an identifier of a first terminal sent by the second terminal.
  • the mobility management entity to which the second terminal belongs acquires the authentication vector of the first terminal according to the identifier of the first terminal, and the authentication vector of the first terminal includes a random number RAND and an expected response value XRES.
  • the mobility management entity to which the second terminal belongs sends the RAND to the second terminal, so that the second terminal sends the RAND to the first terminal; the RAND is used for the first
  • the terminal generates a response value RES.
  • the mobility management entity to which the second terminal belongs receives the RES that is sent by the first terminal by using the second terminal.
  • the mobility management entity to which the second terminal belongs compares the RES with the XRES, and if the RES is the same as the XRES, it is determined that the first terminal passes the authentication. It can be seen that the mobility management entity to which the second terminal belongs can directly authenticate the first terminal accessed by the second terminal as the relay device, thereby improving security.
  • a sixth aspect of the present application provides a mobility management entity, where the mobility management entity is a mobility management entity to which the second terminal belongs, including: a receiver, a processor, and a transmitter.
  • the receiver is configured to receive an identifier of the first terminal sent by the second terminal.
  • the processor is configured to acquire an authentication vector of the first terminal according to the identifier of the first terminal, where the authentication vector of the first terminal includes a random number RAND and a desired response value XRES.
  • the transmitter is configured to send the RAND to the second terminal, so that the second terminal sends the RAND to the first terminal; and the RAND is used by the first terminal to generate a response value RES.
  • the receiver is further configured to receive the RES that is sent by the first terminal by using the second terminal.
  • the processor is further configured to compare the RES with the XRES, and if the RES is the same as the XRES, determine that the first terminal passes the authentication.
  • the method further includes: mobility management of the second terminal attribution
  • the entity generates a first key according to the authentication vector and sends the first key to the second terminal, where the first key is a root key that is communicated by the first terminal and the second terminal.
  • the authentication vector further includes a second key.
  • Acquiring the authentication vector and the first key of the first terminal according to the identifier of the first terminal, the mobility management entity to which the second terminal belongs includes: the mobility management entity to which the second terminal belongs The identity of the first terminal to the first terminal
  • the subscription user server HSS requests the acquisition of the authentication vector of the first terminal; the mobility management entity to which the second terminal belongs generates the first key based on the second key.
  • the acquiring, by the mobility management entity, the authentication vector and the first key of the first terminal according to the identifier of the first terminal includes: the mobility management entity to which the second terminal belongs The identifier of the first terminal determines the mobility management entity to which the first terminal belongs. The mobility management entity to which the second terminal belongs sends a first message to the mobility management entity to which the first terminal belongs, where the first message is used to request to obtain security information and a short-distance communication with the first terminal. Said first key.
  • the mobility management entity to which the second terminal belongs receives the second message sent by the mobility management entity to which the first terminal belongs, where the second message includes the authentication vector and the first key, The first key is generated by the mobility management entity to which the first terminal belongs; or the second message includes the authentication vector, the authentication vector further includes a second key, and the second terminal belongs to the mobile
  • the sex management entity generates the first key according to the second key.
  • the authentication vector of the first terminal further includes a second key.
  • the mobility management entity that belongs to the second terminal compares the RES with the XRES, and if the RES is the same as the XRES, determining that the first terminal passes the authentication, the method further includes: the second terminal
  • the home mobility management entity receives the attach request of the first terminal, where the attach request includes the RAND, and the mobility management entity to which the second terminal belongs determines the communication of the first terminal according to the RAND.
  • the root key is the second key in the authentication vector corresponding to the RAND.
  • the authentication vector of the first terminal further includes a second key and a desired response value XRES.
  • the mobility management entity that belongs to the second terminal compares the RES with the XRES, and if the RES is the same as the XRES, determining that the first terminal passes the authentication, the method further includes: the second terminal
  • the home mobility management entity receives the attach request of the first terminal, and the attach request includes the RAND and the RES.
  • the mobility management entity to which the second terminal belongs determines the authentication vector of the first terminal according to the RAND.
  • the mobility management entity to which the second terminal belongs compares whether the RES is the same as the XRES in the authentication vector of the first terminal, and if the same, the mobility management entity to which the second terminal belongs will The second key serves as the root key of the first terminal communication.
  • the authentication vector further includes: AUTN.
  • the method further includes: the mobility management entity to which the second terminal belongs sends the AUTN to the second terminal, so that the second terminal sends the AUTN to the first terminal, where The first terminal generates a second key according to the RAND and the AUTN, and generates a third key based on the second key, where the third key is a symmetric key of the first key, The first key is a root key that is communicated by the first terminal and the second terminal.
  • a seventh aspect of the present application provides an authentication method, including: a first terminal discovering a second terminal, and the second terminal is a relay terminal.
  • the first terminal sends a first message to the second terminal, where the first message is used to request to obtain a random number RAND in the authentication vector of the first terminal, where the first message includes the first message The identity of the terminal.
  • the first terminal receives the second message sent by the second terminal, where the second message includes the RAND in the authentication vector of the first terminal; the authentication vector is used by the second terminal
  • the proximity service function entity prose function or the proximity key management function entity PKMF to which the second terminal belongs is obtained.
  • the first terminal Transmitting, by the first terminal, a direct communication request message to the second terminal, where the direct communication request message includes a response a value RES and the RAND, the RES being generated by the first terminal according to the RAND, such that the second terminal sends the RES and the RAND to a mobility management entity, by the mobility management
  • the entity authenticates the first terminal.
  • An eighth aspect of the present application provides a terminal, where the terminal is a first terminal, including: a processor, a transmitter, and a receiver.
  • the processor is configured to discover the second terminal, and the second terminal is a relay terminal.
  • the sender is configured to send a first message to the second terminal, where the first message is used to request to acquire a random number RAND in an authentication vector of the first terminal, where the first message includes the first terminal Logo.
  • the receiver is configured to receive a second message sent by the second terminal, where the second message includes the RAND in an authentication vector of the first terminal, and the authentication vector is used by the second terminal from the The proximity service function entity prose function or the proximity key management function entity PKMF obtained by the second terminal is obtained.
  • the transmitter is further configured to send a direct communication request message to the second terminal, where the direct communication request message includes a response value RES and the RAND, where the RES is generated by the first terminal according to the RAND, So that the second terminal sends the RES and the RAND to the mobility management entity, and the mobility management entity authenticates the first terminal.
  • the first message is a binding request message
  • the binding request message includes indication information for acquiring a random number RAND in the authentication vector of the first terminal.
  • the second message is a binding confirmation message.
  • the second message further includes: an AUTN in the authentication vector.
  • the method further includes: the first terminal generates a second key according to the RAND and the AUTN, and according to the second The key generates a first key, and the first key is a root key that is communicated by the first terminal and the second terminal.
  • a ninth aspect of the present application provides an authentication method, including: receiving, by a second terminal, a first message sent by a first terminal, where the first message is used to request to acquire a random number RAND in an authentication vector of the first terminal.
  • the first message includes an identifier of the first terminal.
  • the second terminal obtains an authentication vector of the first terminal from a proximity service function entity prose function or a proximity key management function entity PKMF to which the second terminal belongs, and the authentication vector includes a random number RAND.
  • the second terminal sends a second message to the first terminal, where the second message includes the RAND in the authentication vector of the first terminal.
  • the second terminal receives the direct communication request message sent by the first terminal, where the direct communication request message includes a response value RES and the RAND, and the RES is generated by the first terminal according to the RAND.
  • the second terminal sends the RES and the RAND to a mobility management entity to cause the mobility management entity to authenticate the first terminal.
  • a tenth aspect of the present application provides a terminal, where the terminal is a second terminal, including: a receiver, a processor, and a transmitter.
  • the receiver is configured to receive a first message sent by the first terminal, where the first message is used to request to acquire a random number RAND in the authentication vector of the first terminal, where the first message includes the identifier of the first terminal .
  • the processor is configured to obtain an authentication vector of the first terminal from a proximity service function entity prose function or a proximity key management function entity PKMF to which the second terminal belongs, the authentication vector including a random number RAND.
  • the transmitter is configured to send a second message to the first terminal, where the second message includes the RAND in the authentication vector of the first terminal.
  • the receiver is further configured to receive a direct communication request message sent by the first terminal, where the direct communication request message includes a response value RES and the RAND, and the RES is used by the first terminal according to the RAND generate.
  • the transmitter is further configured to send the RES and the RAND to a mobility management entity, so that the mobility management entity authenticates the first terminal.
  • the second terminal sends the RES and the RAND to the mobility management entity, so that after the mobility management entity authenticates the first terminal, the method further includes: at the first After the terminal is authenticated, the second terminal receives the first key sent by the mobility management entity, where the first key is a root key that is communicated by the first terminal and the second terminal.
  • the authentication vector further includes an AUTN, so that the first terminal generates a second key based on the RAND and the AUTN, and generates a third key based on the second key, where
  • the third key is a symmetric key of the first key, and the first key is a root key that is communicated by the first terminal and the second terminal.
  • An eleventh aspect of the present application provides an authentication method, including: a proximity service function entity prose function or a proximity key management function entity PKMF to which the second terminal belongs to receive a first terminal authentication vector acquisition request sent by the second terminal
  • the identifier of the first terminal is included in the authentication vector acquisition request.
  • the prose function or the PKMF to which the second terminal belongs acquires an authentication vector of the first terminal, and the authentication vector includes a random number RAND. Transmitting the RAND in the authentication vector to the second terminal by the prose function or PKMF to which the second terminal belongs, so that the second terminal sends the RAND in the authentication vector to the The first terminal.
  • the twelfth aspect of the present application provides a proximity service function entity prose function or a proximity key management function entity PKMF, where the prose function or PKMF is a prose function or PKMF to which the second terminal belongs, including: a receiver, a processor And the sender.
  • the receiver is configured to receive a first terminal authentication vector acquisition request sent by the second terminal, where the authentication vector acquisition request includes an identifier of the first terminal.
  • the processor is configured to obtain an authentication vector of the first terminal, where the authentication vector includes a random number RAND.
  • the transmitter is configured to send the RAND in the authentication vector to the second terminal, so that the second terminal sends the RAND in the authentication vector to the first terminal.
  • the acquiring the authentication vector of the first terminal by the prose function or the PKMF to which the second terminal belongs includes: the prose function or the PKMF to which the second terminal belongs, according to the authentication vector acquiring request, from the attribution
  • the subscription subscriber server HSS obtains the authentication vector of the first terminal.
  • the prose function or the PKMF to which the second terminal belongs is determined according to the identifier of the first terminal, and the prose function or the PKMF to which the second terminal belongs belongs to the first terminal.
  • the prose function sends a first message, where the first message is used to request an authentication vector of the first terminal, and the prose function of the first terminal is obtained from the HSS to obtain an authentication vector of the first terminal,
  • the prose function or the PKMF to which the second terminal belongs receives the second message sent by the prose function to which the first terminal belongs, and the second message includes the authentication vector of the first terminal.
  • the method further includes: the prose function or the PKMF to which the second terminal belongs, the first terminal
  • the authentication vector is sent to the mobility management entity to which the second terminal belongs.
  • the prose function or PKMF to which the second terminal belongs sends the authentication vector to the home subscription subscriber server HSS, so that the HSS sends the authentication vector of the first terminal to the mobile of the second terminal.
  • the authentication vector further includes an AUTN.
  • the method further includes: transmitting, by the second terminal, a prose function or a PKMF to the second terminal, so that the second terminal sends the AUTN to the first terminal.
  • a thirteenth aspect of the present application provides an authentication method, including: a mobility management entity to which a second terminal belongs receives an authentication request message sent by the second terminal, where the authentication request message includes the first terminal Identifying, a random number RAND of the first terminal, and a response value RES, wherein the RES is generated by the first terminal according to the RAND, and the identifier of the first terminal, the RAND, and the RES are A terminal sends to the second terminal.
  • the mobility management entity to which the second terminal belongs acquires the XRES in the authentication vector corresponding to the RAND of the first terminal.
  • the mobility management entity to which the second terminal belongs authenticates the first terminal by comparing the RES with the XRES.
  • the fourteenth aspect of the present application provides a mobility management entity, where the mobility management entity is a mobility management entity to which the second terminal belongs, and includes: a receiver and a processor.
  • the receiver is configured to receive an authentication request message sent by the second terminal, where the authentication request message includes an identifier of the first terminal, a random number RAND of the first terminal, and a response value RES, where the RES is
  • the first terminal is generated according to the RAND, and the identifier of the first terminal, the RAND, and the RES are sent by the first terminal to the second terminal.
  • the processor is configured to obtain an XRES in the authentication vector corresponding to the RAND of the first terminal, and authenticate the first terminal by comparing the RES with the XRES.
  • the acquiring, by the mobility management entity of the second terminal, the XRES in the authentication vector corresponding to the RAND includes: acquiring, by the mobility management entity, an XRES in the authentication vector corresponding to the RAND.
  • the XRES in the authentication vector corresponding to the RAND is obtained from the home subscription subscriber server HSS; or the XRES in the authentication vector corresponding to the RAND is obtained from the mobility management entity to which the first terminal belongs.
  • the authentication vector corresponding to the RAND further includes a second key.
  • the mobility management entity that belongs to the second terminal authenticates the first terminal after the first terminal is authenticated by comparing the RES with the XRES.
  • the mobility management entity to which the second terminal belongs After the pass, the mobility management entity to which the second terminal belongs generates a first key based on the second key in the acquired authentication vector, where the first key is the first terminal and the second terminal a root key of the communication, the mobility management entity to which the second terminal belongs sends the first key to the second terminal.
  • a fifteenth aspect of the present application provides an authentication method, including: a first terminal discovering a second terminal, and the second terminal is a relay terminal.
  • the first terminal sends a direct communication request message to the second terminal, where the direct communication request message includes time information and integrity protection information, where the time information is that the first terminal sends the direct communication request message.
  • Time information the integrity protection information is obtained by the first terminal using at least the first key to perform integrity protection on the time information, so that the second terminal sets the time information and the integrity
  • the protection information is sent to the Prose function or the PKMF, and the first terminal is authenticated by the prose function or the PKMF according to the time information and the integrity protection information.
  • a sixteenth aspect of the present application provides a terminal, where the first terminal is a first terminal, and includes: a processor and a transmitter.
  • the processor is configured to discover the second terminal, and the second terminal is a relay terminal.
  • the transmitter is configured to send a direct communication request message to the second terminal, where the direct communication request message includes time information and integrity Protecting information, the time information is time information of the first terminal sending the direct communication request message, and the integrity protection information is used by the first terminal to perform at least the integrity of the time information by using the first key.
  • the protection is obtained, so that the second terminal sends the time information and the integrity protection information to a Prose function or a PKMF, and the prose function or the PKMF authenticates the location according to the time information and the integrity protection information.
  • the first terminal is described.
  • the first key is: a root key used by the first terminal to relay communications.
  • the direct communication request message further includes: an identifier of the root key used by the first terminal to relay communication.
  • the first key is: a third key established by the first terminal in a universal booting architecture GBA manner, where the third key is used to ensure that the first terminal and the application server are Communication between the two.
  • the direct communication request message further includes: an identifier of the third key.
  • the first key is: the first terminal uses the time information and a key generated by a key saved in a SIM card in the first terminal.
  • the method further includes: the first terminal generates a second key by using the first key, the second key It is used for communication between the first terminal and the second terminal.
  • a seventeenth aspect of the present application provides an authentication method, including: receiving, by a second terminal, a direct communication request message sent by a first terminal, where the direct communication request message includes time information and integrity generated by the first terminal Protection time information, where the time information is time information that the first terminal sends the direct communication request message, and the integrity protection information is obtained by the first terminal at least performing integrity protection on the time information.
  • the second terminal sends a first message to the prose function or the PKMF, where the first message includes the identifier of the first terminal, the time information in the direct communication request message, and the integrity protection information. Or causing the prose function or PKMF to authenticate the first terminal according to the time information and the integrity protection information.
  • the eighteenth aspect of the present application provides a terminal, where the terminal is a second terminal, including: a receiver and a transmitter.
  • the receiver is configured to receive a direct communication request message sent by the first terminal, where the direct communication request message includes time information and integrity protection information generated by the first terminal, where the time information is sent by the first terminal The time information of the direct communication request message, wherein the integrity protection information is obtained by the first terminal at least performing integrity protection on the time information.
  • the transmitter is configured to send a first message to the prose function or the PKMF, where the first message includes an identifier of the first terminal, the time information in the direct communication request message, and the integrity protection information, so that The prose function or the PKMF authenticates the first terminal according to the time information and the integrity protection information.
  • the sending, by the second terminal, the first message to the prose function or the PKMF includes: determining, by the second terminal, time information of receiving the direct communication request message and time in the direct communication request message The first message is sent to the prose function or PKMF if the difference of the information is within a preset range.
  • the method further includes: receiving, by the second terminal, the response of the first message sent by the prose function or the PKMF a message, the response message of the first message includes a second key, and the second key is generated by the first key by the Prose function or PKMF, and is generated by using the first key.
  • the second key is used for communication between the first terminal and the second terminal.
  • a nineteenth aspect of the present application provides an authentication method, including: a prose function or a PKMF, which receives a first message sent by the second terminal, where the first message includes an identifier, time information, and integrity of the first terminal. Protection time information, the time information is time information that the first terminal sends a direct communication request message to the second terminal, where the integrity protection information is used by the first terminal to use the first key at least for the time The information is integrity protected and sent to the second terminal via the direct communication request message.
  • the prose function or PKMF acquires the first key, and uses the first key to verify the integrity protection information to authenticate the first terminal.
  • a twentieth aspect of the present application provides a prose function or PKMF, including: a receiver and a processor.
  • the receiver is configured to receive the first message sent by the second terminal, where the first message includes an identifier, time information, and integrity protection information of the first terminal, where the time information is that the first terminal is in the first
  • the second terminal sends the time information of the direct communication request message, where the integrity protection information is obtained by the first terminal using at least the first key to perform integrity protection, and is sent to the short communication request message by using the first terminal.
  • the processor is configured to obtain the first key, and use the first key to verify the integrity protection information, and authenticate the first terminal.
  • the first message further includes an identifier of the first key.
  • the acquiring the first key by the prose function or the PKMF includes: the prose function or the PKMF acquiring the first key according to the identifier of the first key.
  • the first key is: a root key of the first terminal performing relay communication; or the first terminal is established in a universal booting architecture GBA manner to ensure the application and the application A secure key for communication between servers.
  • the obtaining, by the prose function or the PKMF, the first key comprises: sending, by the prose function or the PKMF, an identifier of the first terminal and the time information to an HSS.
  • the prose function or the PKMF acquires the first key, and before the verifying the integrity protection information by using the first key, the method further includes: the prose function or the PKMF determining to receive the first The difference between the time information of a message and the time information contained in the first message is within a preset range.
  • the method further includes: if the prose function or the PKMF authentication is that the first terminal is legal, the prose function or PKMF uses the first key to generate a first a second key, the second key being used for communication between the first terminal and the second terminal.
  • the prose function or the PKMF sends a response message of the first message to the second terminal, where the response message of the first message includes the second key.
  • FIG. 1 is a basic structural diagram of a first terminal accessing a network by using a second terminal as a relay terminal;
  • FIG. 2 is a flowchart of a method for authenticating according to an embodiment of the present application
  • FIG. 3 is a flowchart of still another authentication method disclosed in an embodiment of the present application.
  • FIG. 5 is a flowchart of still another authentication method according to an embodiment of the present application.
  • FIG. 6 is a flowchart of still another authentication method disclosed in the embodiment of the present application.
  • FIG. 7 is a flowchart of still another authentication method disclosed in the embodiment of the present application.
  • FIG. 8 is a flowchart of still another authentication method disclosed in the embodiment of the present application.
  • FIG. 9 is a flowchart of still another authentication method disclosed in the embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
  • FIG. 1 is a basic architecture of a first terminal using a second terminal as a relay terminal to access a network.
  • the first terminal may be an enhanced remote terminal
  • the second terminal may be an enhanced relay terminal.
  • the terminal is a remote UE
  • the second terminal is a relay UE.
  • the first terminal may be a wearable device such as a smart watch, a smart bracelet or smart glasses.
  • the first terminal may include a terminal in LTE and a 5G scenario.
  • the second terminal may include a terminal in LTE and a 5G scenario, such as a smart phone.
  • the mobile management entity (Mobile Management Entity) and the Home Subscriber Server are the core network devices.
  • the mobility management entity may also refer to the 5G core network responsible for mobility management.
  • the home subscription server may also be responsible for storage in 5G.
  • the contracting data and the core network device for calculating the authentication information are introduced in the embodiment by the mobility management entity MME in the 4G network and the home subscription user server HSS in the 4G network as an example.
  • the base station is an access network device, and may include an LTE and a base station in a 5G scenario.
  • both core network devices and access network devices are deployed by operators.
  • Prose function/PKMF is the server that the operator implements prose (proximity service).
  • the Prose function/PKMF in this paper refers to the prose function or PKMF, or the functional entity of the prose function and PKMF.
  • FIG. 2 is a method for accessing a network through a relay terminal according to an embodiment of the present application, including the following steps:
  • the remote UE sends a direct communication request to the relay UE.
  • the message includes the identifier of the remote UE in the direct communication request message.
  • the identifier of the remote UE may be an International Mobile Subscriber Identification Number (IMSI) of the remote UE, and the identifier of the remote UE may also use other forms.
  • IMSI International Mobile Subscriber Identification Number
  • the relay UE After receiving the direct communication request message, the relay UE sends the identifier of the remote UE to the MME to which the relay UE belongs.
  • the relay UE may send an authentication request, the authentication request message includes the identifier of the remote UE, and the relay UE may also send a service request, where the service request message includes the identifier of the remote UE, or the relay UE sends the location update request message.
  • the location update request message includes the identifier of the remote UE, or sends a key request message to the MME of the relay UE, where the message is used by the MME to authenticate the remote UE, and the present invention does not limit the specific type of the message.
  • the MME to which the relay UE belongs acquires the authentication vector AV (optional) of the remote UE from the HSS according to the identifier of the remote UE.
  • the MME to which the relay UE belongs directly obtains the authentication vector of the remote UE from the HSS according to the IMSI of the remote UE. If the identifier of the remote UE is other forms, the relay UE belongs to the The MME determines the IMSI of the remote UE according to the identifier of the remote UE, and obtains the authentication vector of the remote UE from the HSS according to the IMSI of the remote UE.
  • the MME of the relay UE may send an authentication data request authentication data request message to the HSS, and receive an authentication data response message sent by the HSS, and the authentication data response message carries the authentication vector AV. Both the authentication data request message and the authentication data response message carry the IMSI of the remote UE.
  • the authentication vector includes an access security management entity (Kasme), a random number RAND, an expected response (XRES), and an authentication token (AUTN).
  • Kasme access security management entity
  • XRES expected response
  • AUTN authentication token
  • the MME to which the relay UE belongs obtains the Kasme in the remote UE NAS (non-access stratum Non Access Stratum) security context according to the identification information of the remote UE.
  • NAS non-access stratum Non Access Stratum
  • the MME to which the relay UE belongs generates a root key (hereinafter referred to as a root key of short-range communication) for short-range communication between the remote UE and the relay UE according to the obtained Kasme.
  • a root key of short-range communication hereinafter referred to as a root key of short-range communication
  • S205 is an optional step.
  • the MME to which the relay UE belongs sends the generated root key, RAND, and AUTN of the short-range communication to the relay UE.
  • the MME to which the relay UE belongs may send an authentication response authentication response message to the relay UE, where the authentication response message includes the root key of the short-range communication, the RAND and the AUTN, and may also include the identifier of the remote UE. If the MME to which the relay UE belongs has obtained the Kasme of the remote UE, the RAND and AUTN information need not be transmitted.
  • the relay UE may send another non-access stratum (Non-access Stratum, The NAS message is sent to the MME to which the relay UE belongs, instead of the authentication request message.
  • the relay UE may send an authentication request message, where the authentication request message includes the root key of the short-range communication, RAND, and AUTN, and may also include The identifier of the remote UE is used to initiate authentication of the remote UE, and simultaneously distributes the short-range communication root key between the remote UE and the relay UE. That is, the messages sent by S203 and S206 are not corresponding request and response messages.
  • the relay UE sends a direct security mode command (direct SMC) message to the remote UE, where the direct SMC message includes RAND and AUTN.
  • direct SMC direct security mode command
  • the integrity protection key can be used to integrity protect the direct SMC message.
  • the method for obtaining the integrity protection key is: the relay UE generates a session key for short-range communication based on the obtained root key of the short-range communication, and generates encryption and integrity of the short-range communication based on the session key.
  • sexual protection key is: the relay UE generates a session key for short-range communication based on the obtained root key of the short-range communication, and generates encryption and integrity of the short-range communication based on the session key.
  • the relay UE may also send RAND and AUTN (and possibly other parameters) to the remote UE through other messages (other messages may also perform integrity protection), for example, by directly updating the key request during the direct key update process.
  • RAND and AUTN and possibly other parameters
  • other messages may also perform integrity protection, for example, by directly updating the key request during the direct key update process.
  • S208 The remote UE generates a key for short-range communication encryption and integrity protection in the same manner as step 207.
  • the remote UE may further generate a Kasme according to the received RAND and the AUTN, and generate a short-range communication between the remote UE and the relay UE in the same manner as the S205. Root key. Specifically, the remote UE performs the AKA process, and uses the keys K, RAND, and AUTN in the USIM of the remote UE as the basis for generating the Kasme. The key of the near field communication encryption and integrity protection is then generated using the root key of the close communication in the manner of step 207.
  • the remote UE generates a root key for short-range communication between the remote UE and the relay UE based on the saved Kasme in the same manner as the S205, and generates a near-root key using the short-range communication according to the method of step 207.
  • the key to communication encryption and integrity protection.
  • S209 The remote UE sends a direct security mode complete message to the relay UE, and the direct security mode complete message uses the short-range communication encryption and integrity protection key generated in S208 for encryption and integrity protection.
  • encryption is an optional step, and only integrity protection can be performed.
  • the relay UE authenticates the remote UE by using the encryption and integrity protection key of the short-range communication generated in S207 to authenticate the encryption and integrity protection of the direct security mode completion message.
  • the relay UE sends a direct communication accept message to the remote UE to receive the direct communication accept message, and saves the key used for the short-range communication. Otherwise, the relay UE sends a direct communication reject direct communication reject message to the remote UE, and deletes the message. The key for communication at close range.
  • the message between the remote UE and the relay UE can be implemented by the control plane message interface of the short-range communication between the two.
  • the relay UE sends the authentication result to the MME to which the relay UE belongs.
  • the relay UE may send an authentication acknowledgement acknowledgement message corresponding to the authentication response message in step 206 or an authentication response message corresponding to the authentication request to the MME to which the relay UE belongs, and the authentication acknowledgement message or the authentication response message carries the authentication result.
  • the MME to which the relay UE belongs saves the identifier of the remote UE, indicating that the remote UE is allowed to access the network through the relay UE.
  • the MME to which the relay UE belongs can also save the obtained authentication vector of the remote UE.
  • the obtained authentication vector can also be deleted if the authentication succeeds. If the authentication result indicates that the authentication fails, the MME to which the relay UE belongs deletes the identifier of the remote UE and the obtained authentication vector of the remote UE.
  • the authentication of the remote UE is completed.
  • the MME to which the relay UE belongs should also authenticate the remote UE through the relay UE access network, and assign the secret of the short-range communication after the authentication is passed.
  • the key visible, in the above process, establishes a short-range communication link between the remote UE and the relay UE.
  • the remote UE may initiate an attach request to the network, and may be utilized in the process of attaching the network to the remote UE. Establishing an authentication vector obtained during the short-range communication link, and determining a root key Kasme between the remote UE and the MME, without performing an AKA process between the remote UE and the MME in the prior art to generate and generate a root key by authentication and negotiation. .
  • the process of attaching the remote UE to the network is as follows:
  • the remote UE sends an attach request message to the relay UE, where the attach request message includes the identifier of the remote UE and the RAND.
  • the attach request message further includes a response value (response RES), and the RES is generated by the RAND obtained in step 207, and the RES is generated in the prior art, which is not described herein again.
  • response RES a response value
  • the relay UE sends an attach request message to the MME to which the relay UE belongs.
  • the base station to which the relay UE belongs can learn that the remote UE accesses the network through the relay UE in the process of selecting the MME, and sends the attach request message to the MME to which the relay UE belongs through the S1 interface.
  • the MME to which the relay UE belongs may be the MME of the remote UE, because the remote UE is not attached to the network.
  • the eNB that the relay UE belongs to obtains the remote UE accessing the network through the relay UE may be: after step 213, the MME to which the relay UE belongs may send the identifiers of the remote UE and the relay UE to the base station to which the relay UE is currently attached, so that remote When the UE sends the signaling to the network by using the relay UE, the obtained identity authentication allows the remote UE to access the network through the relay UE.
  • the remote UE may also learn that the remote UE accesses the network through the relay UE, or in step 214.
  • S-TMSI S-Temporary Mobile Subscriber Identity
  • the MME to which the relay UE belongs determines the authentication vector corresponding to the received RAND, and determines that the Kasme in the authentication vector corresponding to the RAND is the remote UE. Root key.
  • the authentication vector corresponding to RAND refers to an authentication vector including the same RAND.
  • the MME compares the XRES in the authentication vector corresponding to the RES and the RAND. If the same, the remote UE passes the authentication, and the MME of the relay UE determines that the Kasme in the authentication vector corresponding to the RAND is remote. The root key of the UE. If it is different, it means that the authentication remote UE fails, and the process is terminated.
  • the MME of the relay UE sends an attach confirmation (when XRES and RES are the same) or a failure (when XRES and RES are not the same) messages to the relay UE.
  • attach confirmation when XRES and RES are the same
  • failure when XRES and RES are not the same
  • the MME in the process of establishing a short-range communication link, the MME generates a key for short-range communication, and completes authentication of the relay UE, and can improve the remote UE as the relay UE.
  • the security of the terminal accessing the network.
  • the Kasme obtained by the MME in the authentication process can be used as the root key after the subsequent remote UE accesses the network.
  • FIG. 3 is a method for accessing a network by using a relay terminal according to an embodiment of the present disclosure. The method is different from the method shown in FIG. 2 in that the MME that the relay UE belongs to by comparing the RES and the remote UE fed back by the remote UE. Whether the XRES in the authentication vector AV is the same to authenticate the remote UE.
  • the MME to which the relay UE belongs acquires the authentication vector AV of the remote UE from the HSS according to the identifier of the remote UE.
  • the MME to which the relay UE belongs directly obtains the authentication vector of the remote UE from the HSS according to the IMSI of the remote UE. If the identifier of the remote UE is other forms, the relay UE belongs to the The MME determines the IMSI of the remote UE according to the identifier of the remote UE, and obtains the authentication vector of the remote UE from the HSS according to the IMSI of the remote UE.
  • the MME of the relay UE may send an authentication data request authentication data request message to the HSS, and receive an authentication data response message sent by the HSS, and the authentication data response message carries the authentication vector AV. Both the authentication data request message and the authentication data response message carry the IMSI of the remote UE.
  • the authentication vector includes Kasme, a random number RAND, an expected response value XRES, and an authentication token (AUTN).
  • the MME to which the relay UE belongs generates a root key (hereinafter referred to as a root key of short-range communication) for short-distance communication between the remote UE and the relay UE according to Kasme in the authentication vector.
  • a root key of short-range communication hereinafter referred to as a root key of short-range communication
  • S205 is an optional step.
  • S206 The MME to which the relay UE belongs sends the generated root key (optional) and RAND of the short-range communication to the relay UE.
  • the MME to which the relay UE belongs may send an authentication response authentication response message to the relay UE, where the authentication response message includes the root key of the short-range communication, RAND, and may also include remote The identity of the UE.
  • the relay UE may send another non-access stratum (NAS) message to the MME to which the relay UE belongs, instead of the authentication request message.
  • the relay UE may send an authentication request message, where the authentication request message includes a root key of the short-range communication, RAND, and may also include an identifier of the remote UE, which is used to initiate authentication of the remote UE, and simultaneously distribute the remote UE and A close communication root key between relay UEs. That is, the messages sent by S203 and S206 are not corresponding request and response messages.
  • the MME to which the relay UE belongs may also send the AUTN to the relay UE.
  • the relay UE sends a direct security mode command (direct SMC) message to the remote UE, where the direct SMC message includes RAND.
  • direct SMC direct security mode command
  • the integrity protection key can be used to integrity protect the direct SMC message.
  • the method for obtaining the integrity protection key is: the relay UE generates a session key for short-range communication based on the obtained root key of the short-range communication, and generates encryption and integrity of the short-range communication based on the session key.
  • sexual protection key is: the relay UE generates a session key for short-range communication based on the obtained root key of the short-range communication, and generates encryption and integrity of the short-range communication based on the session key.
  • the direct SMC message may also include an AUTN and/or other parameters, which are not enumerated in this application.
  • the relay UE may also send RAND (may also include AUTN and/or other parameters) to the remote UE through other messages (other messages may also perform integrity protection), for example, by directly updating the secret during direct key update.
  • RAND may also include AUTN and/or other parameters
  • other messages may also perform integrity protection, for example, by directly updating the secret during direct key update.
  • the direct communication keepalive request message is requested by the direct rekey request or the direct communication link keepalive process.
  • the remote UE may further generate a Kasme according to the RAND and the AUTN, and generate a root key for short-distance communication between the remote UE and the relay UE in the same manner as the S205.
  • the remote UE returns a direct security mode complete message to the relay UE, where the direct security mode completion message includes RES and RAND.
  • the relay UE sends the RES and the RAND to the MME to which the relay UE belongs.
  • the relay UE may send an authentication acknowledgement authorization message corresponding to the authentication response in step 206 or an authentication response message corresponding to the authentication request to the MME to which the relay UE belongs, and the authentication confirmation message or the authentication response message carries RES and RAND.
  • the MME to which the relay UE belongs determines the authentication vector corresponding to the received RAND, and compares whether the RES is the same as the XRES in the authentication vector. If the same, the remote UE passes the authentication, and the MME to which the relay UE belongs before or after the authentication It is also required that the remote UE can access the network through the relay UE. If the authentication succeeds, the MME to which the relay UE belongs saves the identifier of the remote UE, indicating that the remote UE is allowed to access the network through the relay UE. The MME to which the relay UE belongs can also save the obtained authentication vector of the remote UE.
  • the obtained authentication vector can also be deleted if the authentication succeeds, and there is no restriction here; if not, the remote UE authentication fails, and the relay fails.
  • the MME to which the UE belongs deletes the identifier of the remote UE and the obtained authentication vector of the remote UE.
  • FIG. 3 The other steps in FIG. 3 are the same as those in FIG. 2, and the details can be seen in FIG. 3, and details are not described herein again.
  • the MME to which the relay UE belongs does not depend on the authentication result of the relay UE to the remote UE, but the remote UE is authenticated, which can further improve the security of the communication.
  • the method for obtaining the authentication vector to the remote UE in the method shown in FIG. 2 or FIG. 3 is applicable to the case where the remote UE is not attached to the network, and may also be applied to the scenario where the remote UE is attached to the network.
  • the difference between the MME and the MME to which the remote UE belongs is required to be authenticated by the remote UE.
  • the authentication vector of the remote UE is obtained by the interaction, that is, the MME that the remote UE belongs to obtains the authentication vector, and sends the authentication vector to the MME to which the relay UE belongs.
  • the MME to which the relay UE belongs determines the MME to which the remote UE belongs according to the identifier of the remote UE, and sends a first message to the MME to which the remote UE belongs, where the first message is used to request to obtain short-range communication with the first terminal.
  • Security information and the first key may be an authentication request message, where the identifier of the remote UE is included.
  • the MME to which the remote UE belongs After receiving the first message, the MME to which the remote UE belongs obtains the authentication vector AV of the remote UE from the HSS, and generates a root key for short-range communication between the remote UE and the relay UE according to the Kasme in the authentication vector.
  • the MME to which the remote UE belongs sends a second message to the MME to which the relay UE belongs, and the second message includes the root key of the generated short-range communication and the RAND in the authentication vector.
  • the AUTN in the authentication vector may also be included.
  • the second message may be an authentication response message.
  • the MME to which the relay UE belongs sends the authentication result to the MME to which the remote UE belongs. If the authentication succeeds, the MME that the remote UE belongs to saves the identifier of the remote UE, indicating that the remote UE is allowed to access the network through the relay UE, and the acquired authentication vector of the remote UE may also be saved. Of course, the authentication may be deleted if the authentication succeeds.
  • the obtained authentication vector is not limited here. If the authentication result indicates that the authentication fails, the MME of the remote UE deletes the identifier of the remote UE and the obtained authentication vector of the remote UE.
  • FIG. 4 the specific process corresponding to the process shown in FIG. 2 is shown in FIG. 4, and the specific process corresponding to the process shown in FIG. 3 is shown in FIG. 5.
  • FIG. 6 is still another authentication method disclosed in the embodiment of the present application.
  • the difference from the foregoing method is that the remote service function entity prose function or the prose key management function (PKMF) is obtained from the relay UE.
  • the authentication vector of the UE (for convenience of explanation, the prose function or PKMF is denoted as prose function/PKMF). Specifically, the following steps are included:
  • the remote UE sends a first message to the relay UE, where the first message is used to request to obtain the random number RAND in the authentication vector of the remote UE, where the first message includes the identifier of the remote UE.
  • the first message may be a binding request message, where the binding request message includes the indication information of the RAND in the authentication vector of the remote UE, and the present invention does not limit the specific form of the indication information and the first message implementation form.
  • the relay UE sends a remote UE authentication vector acquisition request to the prose function/PKMF to which the relay UE belongs.
  • the remote UE authentication vector acquisition request includes the identifier of the remote UE.
  • the authentication vector acquisition request message may be implemented by using other information sent between the relay UE and the prose function/PKMF to obtain the authentication vector indication information, for example, the obtaining the authentication vector indication information in the establishing the trust relationship request,
  • the present invention does not limit the specific form of the indication information and the implementation form of the authentication vector acquisition request.
  • the prose function/PKMF to which the relay UE belongs acquires the authentication vector of the remote UE.
  • the authentication vector of the remote UE includes a Kasme, a random number RAND, an expected response value XRES, and an AUTN.
  • the prose function/PKMF to which the relay UE belongs acquires the authentication vector of the remote UE from the HSS.
  • the prose function/PKMF to which the relay UE belongs may also directly send the authentication vector to the MME to which the relay UE belongs, or send the authentication vector to the HSS, and the HSS sends the authentication vector to the MME to which the relay UE belongs.
  • the prose function/PKMF to which the relay UE belongs sends the RAND in the authentication vector of the remote UE to the relay UE.
  • the AUTN in the authentication vector may be concurrently sent to the relay UE.
  • the prose function to which the Relay UE belongs includes the RAND and the AUTN (if sent together) through the request response message in step 603, and is sent to the relay UE.
  • the relay UE sends a second message to the remote UE, where the second message includes RAND, and optionally, the AUTN.
  • the second message is a response message of the first message, and the second message may be a binding confirmation message.
  • the remote UE generates the RES according to the RAND.
  • the Kasme may also be generated according to the RAND and the AUTN.
  • the remote UE sends a direct communication request message to the relay UE, where the direct communication request message includes the response values RES and RAND.
  • the relay UE sends an authentication request message to the MME to which the relay UE belongs, where the authentication request message includes the identifier of the remote UE, RES, and RAND.
  • the authentication request message may also be implemented by other messages.
  • the relay UE may also send a service request, where the service request message includes the identifier of the remote UE, the RES and the RAND, or the relay UE sends the location update request message, and the location update request message is used.
  • the MME sends the key request message to the MME of the relay UE, and the key request message includes the identifier of the remote UE, the RES, and the RAND, where the message is used by the MME to authenticate the remote UE.
  • the specific type of implementation of this message is not limited.
  • the MME to which the relay UE belongs acquires the XRES in the authentication vector of the remote UE corresponding to the RAND, and compares the XRES and the RES. If the two are the same, the authentication succeeds, otherwise, the authentication fails.
  • the MME to which the relay UE belongs acquires the authentication vector corresponding to the RAND, and further compares the XRES in the authentication vector with the received RES, and the MME to which the relay UE belongs may obtain the authentication vector corresponding to the RAND locally; or, from the home subscription subscriber server
  • the HSS obtains the authentication vector corresponding to RAND.
  • the prose function/PKMF to which the relay UE belongs is sent to the MME to which the relay UE belongs or is sent to the MME to which the relay UE belongs through the HSS, and the MME to which the relay UE belongs may obtain the RAND locally. Corresponding authentication vector.
  • the MME to which the relay UE belongs should also authenticate the remote UE through the relay UE access network.
  • the MME to which the relay UE belongs saves the identifier of the remote UE, indicating that the remote UE is allowed to access the network through the relay UE.
  • the MME to which the relay UE belongs may also save the obtained authentication vector of the remote UE.
  • the obtained authentication vector may be deleted on the premise that the authentication and authentication succeeds, and no limitation is imposed here. If the authentication fails, the MME to which the relay UE belongs deletes the identifier of the remote UE and the obtained authentication vector of the remote UE.
  • the MME to which the relay UE belongs should also authenticate the remote UE through the relay UE access network.
  • the MME to which the relay UE belongs may generate a root key for short-range communication between the remote UE and the relay UE according to the obtained Kasme of the authentication vector of the remote UE.
  • the MME to which the relay UE belongs returns a response message of the authentication request message in step S609 to the relay UE.
  • the response message of the authentication request message in S611 includes a root key generated by the MME to which the relay UE belongs for remote communication of the remote UE and the relay UE.
  • the relay UE sends a direct SMC message to the remote UE, where the direct SMC message is used for secure negotiation between the relay UE and the remote UE to generate a session key.
  • the Remote UE After receiving the message, the Remote UE generates a root key for remote UE and relay UE short-range communication using Kasme based on the Kasme generated in step S607, and performs session key negotiation with the relay UE based on the root key of the short-range communication.
  • step S612 and step S613 For the specific session key negotiation process in step S612 and step S613, refer to the prior art, and details are not described herein again.
  • the relay UE may return a direct communication accept message to the remote UE.
  • the process of attaching the network to the remote UE may also be included, as shown in S214-S216 in FIG. 2, and details are not described herein again.
  • the solution is performed according to the foregoing scheme. If the remote UE belongs to the prose function/PKMF, the prose function/PKMF to which the relay UE belongs is different:
  • the prose function/PKMF to which the relay UE belongs determines the prose function/PKMF to which the remote UE belongs according to the identifier of the remote UE, and sends a message for requesting the authentication vector of the remote UE to the prose function/PKMF to which the remote UE belongs, and the prose to which the remote UE belongs.
  • the function/PKMF obtains the authentication vector of the remote UE from the HSS, and sends the prompt to the prose function/PKMF to which the relay UE belongs, including remote The message of the UE's authentication vector.
  • step S604 the prose function/PKMF to which the remote UE belongs is sent to the MME to which the remote UE belongs or sent to the MME to which the remote UE belongs, and the MME to which the remote UE belongs can obtain the authentication vector corresponding to the RAND locally.
  • the MME to which the relay UE belongs acquires the XRES in the authentication vector corresponding to the RAND from the MME to which the remote UE belongs, and performs the comparison between the RES and the XRES. Further, the MME to which the remote UE belongs may generate the short-range communication according to the Kasme in the authentication vector. The root key is returned to the MME to which the relay UE belongs. The MME to which the relay UE belongs may also generate the root key of the short-range communication after acquiring the Kasme in the authentication vector from the MME to which the remote UE belongs.
  • the MME to which the relay UE belongs sends the RES sent by the remote UE through the relay UE to the MME to which the remote UE belongs, and the MME to which the remote UE belongs obtains the XRES in the authentication vector, and compares the RES and the XRES to authenticate the remote UE, and The root key of the short-range communication is generated based on the Kasme in the corresponding authentication vector, and the authentication result and the generated root key of the short-range communication (generated after the authentication is passed) are further returned to the MME to which the relay UE belongs.
  • FIG. 7 is still another authentication method disclosed in the embodiment of the present application.
  • the difference from the foregoing method is that when the network entity prose function/PKMF establishes short-range communication between the remote UE and the relay UE, the prose function/PKMF is authenticated based on time information.
  • Remote UE Specifically, the following steps are included:
  • the remote UE sends a direct communication request message to the relay UE, where the direct communication request message includes time information and integrity protection information MIC.
  • the time information is time information that the remote UE sends a direct communication request message.
  • the format of the time information may be a time-encoded binary form in seconds or N-bit information therein.
  • the integrity protection information is obtained by the remote UE using at least the first key to perform integrity protection on the time information.
  • the time information included in the Direct communication request may be the same as the time information for generating the MIC information, or may be only part of the bit information in the time information of the MIC (such as a low N bit), and vice versa, the time information of the MIC is generated. It may also be a partial bit (such as a low N bit) encoded by the time information included in the Direct communication request, which is not limited by the present invention.
  • the specific forms of the first key are:
  • the direct communication request message further includes the identifier of the root key used by the remote UE for short-range communication.
  • the key established by the remote UE in the manner of a Generic Bootstrapping Architecture (GBA).
  • GBA Generic Bootstrapping Architecture
  • the key of the key is used to ensure communication security between the first terminal and the application server.
  • the direct communication request message further includes an identifier associated with the key, and the key can be obtained by the identifier.
  • the remote UE may have previously established the key, and if there is no pre-established condition and the condition for establishing the key, the remote UE establishes the key before S702.
  • the remote UE uses the time information and the key IK' generated by the key K stored in the SIM card in the remote UE.
  • the remote UE may first find or establish the first key of the above two forms, and use IK' if it is not found or successfully established.
  • the time information may be replaced by a counter value saved and maintained in the UE, and the MIC information is generated based on the counter value, and the counter communication value and the MIC information generated based on the counter value are included in the direct communication request, and after the direct communication request is successfully sent, , the counter value is increased by 1.
  • the Relay UE After receiving the direct communication request message, the Relay UE compares whether the time difference between the time information of the received direct communication request message and the time communication request message is within the allowed range, and if it is within the allowed range, to the Relay UE.
  • the belonging prose function/PKMF sends a key request message.
  • the key request message includes an identifier of the remote UE, time information in the direct communication request message, and integrity protection information MIC.
  • the key request message may further include an identifier of the first key.
  • Comparing whether the time information of the received direct communication request message and the time information in the direct communication request message are within an allowable range is optional, or may directly send the secret to the prose function/PKMF to which the Relay UE belongs without performing comparison.
  • the key request message (such as when the prose function/PKMF is verified or the MIC is generated by the counter value does not need to be verified), or the method of synchronizing by other verification time is adopted.
  • the prose function/PKMF to which the Relay UE belongs After receiving the key request message, the prose function/PKMF to which the Relay UE belongs, obtain the first key, and verify the integrity protection information by using the first key, thereby authenticating the remote UE.
  • the specific implementation manner of obtaining the first key by the prose function/PKMF to which the Relay UE belongs is as follows:
  • the prose function/PKMF to which the Relay UE belongs sends the identifier of the remote UE and the received time information to the HSS/Auc.
  • the HSS/Auc obtains the key K of the remote UE, and generates a symmetric key of IK' (collectively referred to as a first key IK' with IK') according to the received time information and K in the same manner as the remote UE.
  • HSS/Auc returns IK' to the prose function/PKMF to which the Relay UE belongs.
  • the remote UE may be authenticated by the HSS/Auc, that is, the foregoing solution 2 may also be replaced by: after the relay UE belongs to the prose function or the PKMF receives the key request message, sending the identifier and receiving of the remote UE to the HSS/Auc.
  • HSS/Auc obtains the key K of the remote UE, uses the received time information and K to generate IK', and HSS/Auc generates IK' using the same method as the UE side, using IK'
  • the integrity protection information is verified to authenticate the remote UE, and the authentication result is fed back to the prose function/PKMF to which the Relay UE belongs.
  • the verification integrity protection information refers to the prose function/PKMF using the first key to calculate the MIC' from the information containing at least the time information or the counter value, and comparing the calculated MIC' with the received MIC value. If the same, the verification is passed, otherwise the verification fails.
  • the prose function/PKMF needs to obtain and use the direct communication request sent by the remote UE in order to verify the MIC information. The same form of time information used by the MIC or the counter value used is used to calculate the MIC'.
  • the specific implementation method is not limited herein.
  • the Prose function/PKMF may verify that the difference between the received time information and the time when the key request message is received is within the allowable range, or verify that the received counter value information is greater than The maintenance counter value is saved in Prose function/PKMF.
  • the Prose function/PKMF to which the Relay UE belongs may also be authenticated to allow the remote UE to access the network through the relay UE, where the authentication process may be performed before or after the foregoing authentication step.
  • the prose function/PKMF to which the Relay UE belongs If the authenticated remote UE is legal and the remote UE is authenticated, the prose function/PKMF to which the Relay UE belongs generates the second key by using the first key, and sends a key response message to the Relay UE, where the key response message is sent.
  • the second key is included, and the second key is used for communication between the remote UE and the Relay UE.
  • S706 The remote UE and the relay UE generate a session key based on the second key, and establish a communication connection between the remote UE and the relay UE.
  • the remote UE also generates a second key by using the first key, and the second key is used for communication between the remote UE and the Relay UE.
  • the remote UE when the remote UE has been attached and registered to the prose function/PKMF, if the relay UE and the remote UE belong to the same prose function/PKMF, it is consistent with the above procedure. If the relay UE and the remote UE belong to different prose function/PKMF, the prose function/PKMF to which the relay UE belongs receives the key request message, and the prose function/PKMF to which the relay UE belongs sends the key to the prose function/PKMF of the remote UE.
  • the request includes the obtained time information and integrity protection information, so that the remote UE's prose function/PKMF authenticates the remote UE by verifying the MIC, and generates a communication key between the remote UE and the relay UE, and passes the prose function of the relay UE. /PKMF feeds back to the relay UE.
  • the foregoing key request message and the key response message are only a specific implementation manner of the message, and other messages may also be used.
  • FIG. 8 is another authentication method disclosed in the embodiment of the present disclosure. The method is different from the foregoing method.
  • the MME authenticates the remote UE based on the time information. Specifically, the following steps are included:
  • the remote UE sends a direct communication request message to the relay UE, where the direct communication request message includes time information and integrity protection information MIC.
  • the time information is time information that the remote UE sends a direct communication request message.
  • the format of the time information may be a time-encoded binary form in seconds or N-bit information therein.
  • the integrity protection information is obtained by the remote UE using at least the first key to perform integrity protection on the time information.
  • the time information included in the Direct communication request may be the same as the time information for generating the MIC information, or may be only part of the bit information in the time information of the MIC (such as a low N bit), and vice versa, the time information of the MIC is generated. It may also be a partial bit (such as a low N bit) encoded by the time information included in the Direct communication request, which is not limited by the present invention.
  • the specific forms of the first key are:
  • the remote UE uses the time information and the key IK' generated by the key K stored in the SIM card in the remote UE.
  • the remote UE may first find or establish the first key in the above form, and use IK' if it is not found or successfully established.
  • the time information may be replaced by a counter value saved and maintained in the UE, and the MIC information is generated based on the counter value, and the counter communication value and the MIC information generated based on the counter value are included in the direct communication request, and after the direct communication request is successfully sent, , the counter value is increased by 1.
  • the Relay UE After receiving the direct communication request message, the Relay UE compares whether the time information of the time information of the direct communication request message and the time communication request message is within an allowable range, and if it is within the allowed range, to the Relay UE.
  • the home MME sends a key request message.
  • the key request message includes an identifier of the remote UE, time information in the direct communication request message, and integrity protection information MIC.
  • the key request message may further include an identifier of the first key.
  • Comparing whether the time information of the received direct communication request message and the time information in the direct communication request message are within an allowable range is an optional step, or may directly send a key request message to the MME to which the Relay UE belongs without performing comparison. (If verification is performed by prose function/PKMF or MIC is generated by counter value method), or by other verification time synchronization method, this article does not expand.
  • the MME to which the Relay UE belongs After receiving the key request message, the MME to which the Relay UE belongs obtains the first key, and uses the first key to verify the integrity protection information, thereby authenticating the remote UE.
  • the specific implementation manner of obtaining the first key by the MME to which the relay UE belongs is as follows:
  • the MME to which the Relay UE belongs sends the identifier of the remote UE and the received time information to the HSS/Auc.
  • the HSS/Auc obtains the key K of the remote UE, and generates a symmetric key of IK' (collectively referred to as a first key IK' with IK') according to the received time information and K in the same manner as the remote UE.
  • the HS/Auc S returns IK' to the MME to which the Relay UE belongs.
  • the remote UE may be authenticated by the HSS/Auc, that is, the foregoing solution 2 may be replaced by: after receiving the key request message, the MME to which the relay UE belongs sends the identifier of the remote UE and the received time to the HSS/Auc.
  • Information and integrity protection information HSS/Auc obtains the key K of the remote UE, uses the received time information and K to generate IK', HSS/Auc generates IK' using the same method as the UE side, and uses IK' to verify the complete
  • the information is protected, and the remote UE is authenticated, and the authentication result is fed back to the MME to which the Relay UE belongs.
  • the verification integrity protection information refers to that the MME calculates the MIC' by using the first key to the information including at least the time or counter value information, and compares the calculated MIC' with the received MIC value. Then the verification is passed, otherwise the verification fails.
  • the MME needs to obtain and send with the remote UE in order to verify the MIC information.
  • the MIC' is calculated by using the same type of time information or the counter value used when generating the MIC during the direct communication request. The specific implementation method is not limited herein.
  • the MME to which the Relay UE belongs may verify that the difference between the received time information and the time when the key request message is received by itself is within the allowable range, or verify the received counter value information. Greater than the counter value saved in the Prose function/PKMF.
  • the MME to which the Relay UE belongs may also perform authentication to allow the remote UE to access the network through the relay UE, where the authentication process may be performed before or after the foregoing authentication step.
  • the MME to which the relay UE belongs If the first terminal is authenticated and the remote UE is authenticated, the MME to which the relay UE belongs generates a second key by using the first key, and sends a key response message to the Relay UE, where the key response message is sent.
  • the second key is included, and the second key is used for communication between the remote UE and the Relay UE.
  • the remote UE and the relay UE generate a session key based on the second key, and establish a communication connection between the remote UE and the relay UE.
  • the remote UE also generates a second key by using the first key, and the second key is used for communication between the remote UE and the Relay UE.
  • the remote UE has established a context in the network. If the relay UE and the remote UE belong to the same MME, the process is consistent with the foregoing process.
  • the MME to which the relay UE belongs receives the key request message, and the MME to which the relay UE belongs sends a key request to the MME to which the remote UE belongs, including the obtained time information and completeness.
  • the MME protects the information so that the MME to which the remote UE belongs is authenticated by the MME to authenticate the remote UE, and generates a communication key between the remote UE and the relay UE, and feeds back to the relay UE through the MME of the relay UE.
  • the foregoing key request message and the key response message are only a specific implementation manner of the message, and other messages may also be used.
  • FIG. 9 is still another authentication method disclosed in the embodiment of the present application.
  • the difference from the foregoing method is that, when the remote UE and the relay UE are used for short-distance communication by using the prose function/PKMF, the prose function/PKMF is authenticated based on the authentication vector.
  • Remote UE Specifically, the following steps are included:
  • the remote UE sends a direct communication request message to the relay UE, where the direct communication request message includes the identifier of the remote UE and the identifier of the relay UE.
  • the relay UE After receiving the direct communication request message, the relay UE sends a key request message to the prose function or the PKMF, where the key request message includes the identifier of the received remote UE and the identifier of the relay UE.
  • the prose function/PKMF After receiving the key request message, the prose function/PKMF obtains the IMSI of the remote UE, initiates an authentication process for the remote UE, and sends an authentication data request message to the HSS, where the authentication data request includes the IMSI of the remote UE.
  • the HSS returns the authentication vector of the remote UE to the prose function/PKMF.
  • the prose function/PKMF sends an authentication request message to the relay UE, where the identifier of the remote UE, the RAND and the AUTN in the authentication vector of the remote UE obtained from the HSS, where the AUTN is optional item.
  • the Relay UE receives the authentication request message and parses the identifier of the remote UE, and triggers the relay UE to send a direct authentication request to the remote UE, where the RAND is received by the relay UE, and optionally, the AUTN.
  • the relay UE After receiving the direct authentication request message, if the remote UE includes the AUTN, the relay UE first verifies the AUTN based on the key K included in the SIM card of the UE, to verify the validity of the network.
  • the Remote UE generates RES using RAND and key K.
  • the Remote UE returns a direct authentication response message, where the RES generated by the remote UE and the identifier of the remote UE are included.
  • the Relay UE returns an authentication response message, which includes the identifiers of the received RES and the remote UE.
  • Prose function/PKMF compares the RES with the XRES in the acquired authentication vector. If the same indicates that the authentication is passed, the authentication fails.
  • the prose function/PKMF Before the prose function/PKMF authenticates to the remote UE or after authentication, the prose function/PKMF also needs to authenticate to allow the remote UE to access the network through the relay UE.
  • the prose function/PKMF If the remote UE is authenticated and the authentication is passed, the prose function/PKMF generates a key used for communication between the remote UE and the relay UE, where the prose function can be generated by using the key Kasme in the authentication remote UE authentication vector as the root key. Key used for remote UE and relay UE communication.
  • the prose function/PKMF returns a key response message to the relay UE and includes therein the generated key for remote UE and relay UE communication.
  • the remote UE and the relay UE generate a session key based on the key of the communication, and establish a communication connection between the remote UE and the relay UE.
  • the remote UE also generates Kasme using the obtained RAND and AUTN, and uses Kasme as a root key to generate a key for remote UE and relay UE communication.
  • the relay UE when the remote UE has been attached and registered to the prose function, if the relay UE and the remote UE belong to the same prose function/PKMF, the above steps are still performed, if the relay UE and the remote UE belong to different prose functions, the relay After the prose function to which the UE belongs receives the key request message, the prose function of the relay UE sends a key request to the prose function of the remote UE, where the identifier of the remote UE is included, so that the remote UE's prose function initiates authentication of the remote UE. The process generates a communication key between the remote UE and the relay UE, and feeds back to the relay UE through the prose function of the relay UE. The authentication process is consistent with the execution process of the prose function to which the relay UE belongs.
  • the foregoing key request message and the key response message are only a specific implementation manner of the message, and other messages may also be used.
  • FIG. 10 is a schematic diagram of a terminal, including a processor, a memory, a transmitter, and a receiver.
  • the processor, memory, transmitter, and receiver communicate over the bus.
  • the memory is used to store the application and the data generated during the running of the application.
  • the processor is configured to run an application in the memory to implement steps of the first terminal and/or the second terminal in addition to the transmitting and receiving steps in FIG. 2-9, for example, to implement discovery of the second terminal or according to the The step in which RAND generates a response value RES.
  • the transmitter is configured to implement the steps of transmitting by the first terminal and/or the second terminal in FIGS. 2-9 under the control of the processor.
  • the receiver is configured to implement the steps of receiving the first terminal and/or the second terminal in Figures 2-9 under the control of the processor.
  • FIG. 11 is a network device, including a processor, a memory, a transmitter, and a receiver, according to an embodiment of the present application.
  • the processor, memory, transmitter, and receiver communicate over the bus.
  • the network device may be any one of MME, prose function/PKMF shown in FIGS. 2-9.
  • the memory is used to store the application and the data generated during the running of the application.
  • the processor is configured to run an application in the memory to implement steps in addition to the transmitting and receiving steps in any of the network devices of FIGS. 2-9.
  • the transmitter is configured to implement the step of transmitting by any one of the network devices of FIG. 2-9 under the control of the processor.
  • the receiver is configured to implement the step of receiving any one of the network devices of FIG. 2-9 under the control of the processor.
  • the terminal shown in FIG. 10 and the network device shown in FIG. 11 can implement direct authentication of the network device to the terminal accessing the network through the relay device by interaction.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请实施例提供了一种认证方法,通过第一终端、作为中继设备的第二终端以及网络设备之间的交互,使得网络能够直接认证以第二终端作为中继设备通信的第一终端,从而提高安全性。

Description

一种认证方法及终端、网络设备 技术领域
本申请涉及通信领域,尤其涉及一种认证方法及终端、网络设备。
背景技术
随着可穿戴设备的普及,可穿戴设备直接连接到网络,成为一种发展趋势。可穿戴设备以其它终端,例如手机作为中继终端接入网络,可以节省可穿戴设备的电量,并且还可以提高可穿戴设备的数据传输效率。
目前,在可穿戴设备通过其它终端作为中继终端接入网络的过程中,缺少运营商网络对于可穿戴设备的直接认证过程。
申请内容
本申请提供了一种认证方法及终端、网络设备,目的在于解决在可穿戴设备以终端作为中继接入网络的情况下,如何实现运营商网络对可穿戴设备直接认证,以提高安全性的问题。
为了实现上述目的,本申请提供了以下技术方案:
本申请的第一方面提供了一种认证方法,包括:第一终端发现第二终端,所述第二终端为中继终端。所述第一终端向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括所述第一终端的标识。所述第一终端接收所述第二终端发送的直接安全模式命令消息,所述直接安全模式命令消息中包括随机数RAND,所述RAND由所述第二终端从所述第二终端归属的移动性管理实体获得。所述第一终端依据所述RAND生成响应值RES。所述第一终端向所述第二终端发送直接安全模式完成消息,所述直接安全模式完成消息中包括所述RES,以使得所述第二终端向所述第二终端归属的移动性管理实体发送所述RES,由所述第二终端归属的移动性管理实体认证所述第一终端。可以看出,第一终端通过与第二终端的交互,能够使得第二终端归属的移动性管理实体认证所述第一终端。从而实现了网络设备直接认证通过中继设备接入的第一终端,能够提高安全性。
本申请的第二方面提供了一种终端,所述终端为第一终端,包括:处理器、发送器和接收器。处理器用于发现第二终端,所述第二终端为中继终端。发送器用于向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括所述第一终端的标识。接收器用于接收所述第二终端发送的直接安全模式命令消息,所述直接安全模式命令消息中包括随机数RAND,所述RAND由所述第二终端从所述第二终端归属的移动性管理实体获得。所述处理器还用于依据所述RAND生成响应值RES。所述发送器还用于向所述第二终端发送直接安全模式完成消息,所述直接安全模式完成消息中包括所述RES,以使得所述第二终端向所述第二终端归属的发送所述RES,由所述第二终端归属的认证所述第一终端。
在一个实现方式中,在所述第一终端向所述第二终端发送直接安全模式完成消息之后,还包括:所述第一终端通过所述第二终端,向所述第一终端归属的移动性管理实体发送附着请求,所述附着请求中包括所述RAND,所述RAND用于指示所述第二终端归属的移动性管理实体所述第一终端使用所述RAND对应的认证向量中的密钥作为根密钥进行通信。在remote UE附着网络的过程中,可以利用在建立近距离通信链路过程中获得的认证向量,确定remote UE和MME之间的根密钥Kasme,而无需执行现有技术中remote UE和MME之间的AKA过程以认证和协商生成根密钥。
在一个实现方式中,在所述第一终端向所述第二终端发送直接安全模式完成消息之后,还包括:所述第一终端通过所述第二终端,向所述第二终端归属的移动性管理实体发送附着请求,所述附着请求中包括所述RAND和所述RES,所述RES用于所述第二终端归属的移动性管理实体认证所述第一终端,所述RAND用于指示所述第二终端归属的移动性管理实体在所述第一终端认证通过的情况下,所述第一终端使用所述RAND对应的认证向量中的密钥作为根密钥进行通信。在remote UE附着网络的过程中,可以利用在建立近距离通信链路过程中获得的认证向量,确定remote UE和MME之间的根密钥Kasme,而无需执行现有技术中remote UE和MME之间的AKA过程以认证和协商生成根密钥。
在一个实现方式中,所述直接安全模式命令消息中还包括:接入安全管理实体密钥AUTN。所述方法还包括:所述第一终端依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。可见,除了认证第一终端外,还可以生成第一终端和所述第二终端通信的根密钥。
本申请的第三方面提供了一种认证方法,包括:第二终端接收第一终端发送的直接通信请求消息,所述直接通信请求消息中包括所述第一终端的标识。所述第二终端向所述第二终端归属的移动性管理实体发送所述第一终端的标识。所述第二终端接收所述第二终端归属的移动性管理实体发送的随机数RAND,所述RAND由所述第二终端归属的移动性管理实体依据所述第一终端的标识获取。所述第二终端向所述第一终端发送直接安全模式命令消息,所述直接安全模式命令消息中包括所述RAND。所述第二终端接收所述第一终端发送的直接安全模式完成消息,所述直接安全模式完成消息中包括响应值RES,所述RES由所述第一终端依据所述RAND生成。所述第二终端向所述第二终端归属的移动性管理实体发送所述RES,以使所述第二终端归属的移动性管理实体认证所述第一终端。可见,作为中继设备的第二终端,通过与第一终端以及第二终端归属的移动性管理实体的交互,能够实现网络设备直接认证通过中继设备接入的第一终端,能够提高安全性。
本申请的第四方面提供了一种终端,所述终端为第二终端,包括接收器和发送器。接收器用于接收第一终端发送的直接通信请求消息,所述直接通信请求消息中包括所述第一终端的标识。发送器用于向所述第二终端归属的移动性管理实体发送所述第一终端的标识。所述接收器还用于接收所述第二终端归属的移动性管理实体发送的随机 数RAND,所述RAND由所述第二终端归属的移动性管理实体依据所述第一终端的标识获取。所述发送器还用于向所述第一终端发送直接安全模式命令消息,所述直接安全模式命令消息中包括所述RAND。所述接收器还用于接收所述第一终端发送的直接安全模式完成消息,所述直接安全模式完成消息中包括响应值RES,所述RES由所述第一终端依据所述RAND生成。所述发送器还用于向所述第二终端归属的移动性管理实体发送所述RES,以使所述第二终端归属的移动性管理实体认证所述第一终端。
在一个实现方式中,在所述第二终端向所述第一终端发送直接安全模式命令消息之前,还包括:所述第二终端接收所述第二终端归属的移动性管理实体发送的AUTN和第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。所述直接安全模式命令消息中还包括:所述AUTN,以使得所述第一终端依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
本申请的第五方面提供了一种认证方法,包括:第二终端归属的移动性管理实体接收所述第二终端发送的第一终端的标识。所述第二终端归属的移动性管理实体依据所述第一终端的标识,获取所述第一终端的认证向量,所述第一终端的认证向量包括随机数RAND和期望响应值XRES。所述第二终端归属的移动性管理实体向所述第二终端发送所述RAND,以使得所述第二终端将所述RAND发送至所述第一终端;所述RAND用于所述第一终端生成响应值RES。所述第二终端归属的移动性管理实体接收所述第一终端通过所述第二终端发送的所述RES。所述第二终端归属的移动性管理实体比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证。可见,第二终端归属的移动性管理实体可以直接认证以第二终端作为中继设备接入的第一终端,从而提高安全性。
本申请的第六方面提供了一种移动性管理实体,所述移动性管理实体为第二终端归属的移动性管理实体,包括:接收器、处理器和发送器。接收器用于接收所述第二终端发送的第一终端的标识。处理器用于依据所述第一终端的标识,获取所述第一终端的认证向量,所述第一终端的认证向量包括随机数RAND和期望响应值XRES。发送器用于向所述第二终端发送所述RAND,以使得所述第二终端将所述RAND发送至所述第一终端;所述RAND用于所述第一终端生成响应值RES。所述接收器还用于接收所述第一终端通过所述第二终端发送的所述RES。所述处理器还用于比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证。
在一个实现方式中,在所述第二终端归属的移动性管理实体接收所述第一终端通过所述第二终端发送的所述RES之前,还包括:所述第二终端归属的移动性管理实体依据所述认证向量生成第一密钥并向所述第二终端发送所述第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
在一个实现方式中,所述认证向量还包括第二密钥。所述第二终端归属的移动性管理实体依据所述第一终端的标识,获取所述第一终端的认证向量和第一密钥包括:所述第二终端归属的移动性管理实体根据所述第一终端的标识向所述第一终端的归属 签约用户服务器HSS请求获取所述第一终端的认证向量;所述第二终端归属的移动性管理实体基于所述第二密钥生成所述第一密钥。
在一个实现方式中,所述移动性管理实体依据所述第一终端的标识,获取所述第一终端的认证向量和第一密钥包括:所述第二终端归属的移动性管理实体依据所述第一终端的标识确定所述第一终端归属的移动性管理实体。所述第二终端归属的移动性管理实体向所述第一终端归属的移动性管理实体发送第一消息,第一消息用于请求获取与所述第一终端的近距离通信的安全信息及所述第一密钥。所述第二终端归属的移动性管理实体接收所述第一终端归属的移动性管理实体发送的第二消息,所述第二消息中包括所述认证向量和所述第一密钥,所述第一密钥由所述第一终端归属的移动性管理实体生成;或所述第二消息中包括所述认证向量,所述认证向量还包括第二密钥,所述第二终端归属的移动性管理实体依据所述第二密钥生成所述第一密钥。
在一个实现方式中,所述第一终端的认证向量还包括第二密钥。在所述第二终端归属的移动性管理实体比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证之后,还包括:所述第二终端归属的移动性管理实体接收所述第一终端的附着请求,所述附着请求中包括所述RAND,所述第二终端归属的移动性管理实体依据所述RAND,确定所述第一终端通信的根密钥为所述RAND对应的认证向量中的所述第二密钥。
在一个实现方式中,所述第一终端的认证向量还包括第二密钥和期望的响应值XRES。在所述第二终端归属的移动性管理实体比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证之后,还包括:所述第二终端归属的移动性管理实体接收所述第一终端的附着请求,所述附着请求中包括所述RAND和所述RES。所述第二终端归属的移动性管理实体根据所述RAND确定所述第一终端的认证向量。所述第二终端归属的移动性管理实体比较所述RES与所述第一终端的认证向量中的所述XRES是否相同,如果相同,所述第二终端归属的移动性管理实体将所述第二密钥作为所述第一终端通信的根密钥。
在一个实现方式中,所述认证向量还包括:AUTN。所述方法还包括:所述第二终端归属的移动性管理实体将所述AUTN发送给所述第二终端,以使得所述第二终端将所述AUTN发送给所述第一终端,由所述第一终端依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
本申请的第七方面提供了一种认证方法,包括:第一终端发现第二终端,所述第二终端为中继终端。所述第一终端向所述第二终端发送第一消息,所述第一消息用于请求获取所述第一终端的认证向量中的随机数RAND,所述第一消息中包括所述第一终端的标识。所述第一终端接收所述第二终端发送的第二消息,所述第二消息中包括所述第一终端的认证向量中的所述RAND;所述认证向量由所述第二终端从所述第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF获得。所述第一终端向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括响应 值RES和所述RAND,所述RES由所述第一终端根据所述RAND生成,以使得所述第二终端将所述RES和所述RAND发送至移动性管理实体,由所述移动性管理实体认证所述第一终端。
本申请的第八方面提供了一种终端,所述终端为第一终端,包括:处理器、发送器和接收器。处理器用于发现第二终端,所述第二终端为中继终端。发送器用于向所述第二终端发送第一消息,所述第一消息用于请求获取所述第一终端的认证向量中的随机数RAND,所述第一消息中包括所述第一终端的标识。接收器用于接收所述第二终端发送的第二消息,所述第二消息中包括所述第一终端的认证向量中的所述RAND;所述认证向量由所述第二终端从所述第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF获得。所述发送器还用于向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括响应值RES和所述RAND,所述RES由所述第一终端根据所述RAND生成,以使得所述第二终端将所述RES和所述RAND发送至移动性管理实体,由所述移动性管理实体认证所述第一终端。
在一个实现方式中,所述第一消息为绑定请求消息,所述绑定请求消息中包括获取所述第一终端的认证向量中的随机数RAND的指示信息。所述第二消息为绑定确认消息。
在一个实现方式中,所述第二消息中还包括:所述认证向量中的AUTN。在所述第一终端向所述第二终端发送直接通信请求消息后,所述方法还包括:所述第一终端根据所述RAND和所述AUTN生成第二密钥,并依据所述第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
本申请的第九方面提供了一种认证方法,包括:第二终端接收第一终端发送的第一消息,所述第一消息用于请求获取所述第一终端的认证向量中的随机数RAND,所述第一消息中包括所述第一终端的标识。所述第二终端从所述第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF获得所述第一终端的认证向量,所述认证向量包括随机数RAND。所述第二终端向所述第一终端发送第二消息,所述第二消息中包括第一终端的所述认证向量中的所述RAND。所述第二终端接收所述第一终端发送的直接通信请求消息,所述直接通信请求消息中包括响应值RES和所述RAND,所述RES由所述第一终端根据所述RAND生成。所述第二终端将所述RES和所述RAND发送至移动性管理实体,以使得所述移动性管理实体认证所述第一终端。
本申请的第十方面提供了一种终端,所述终端为第二终端,包括:接收器、处理器和发送器。接收器用于接收第一终端发送的第一消息,所述第一消息用于请求获取所述第一终端的认证向量中的随机数RAND,所述第一消息中包括所述第一终端的标识。处理器用于从所述第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF获得所述第一终端的认证向量,所述认证向量包括随机数RAND。发送器用于向所述第一终端发送第二消息,所述第二消息中包括第一终端的所述认证向量中的所述RAND。所述接收器还用于接收所述第一终端发送的直接通信请求消息,所述直接通信请求消息中包括响应值RES和所述RAND,所述RES由所述第一终端根据所述RAND 生成。所述发送器还用于,将所述RES和所述RAND发送至移动性管理实体,以使得所述移动性管理实体认证所述第一终端。
在一个实现方式中,所述第二终端将所述RES和所述RAND发送至移动性管理实体,以使得所述移动性管理实体认证所述第一终端之后,还包括:在所述第一终端认证通过后,所述第二终端接收所述移动性管理实体发送的第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
在一个实现方式中,所述认证向量还包括AUTN,以使得所述第一终端基于所述RAND和所述AUTN生成第二密钥,并基于第二密钥生成第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
本申请的第十一方面提供了一种认证方法,包括:第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF接收所述第二终端发送的第一终端认证向量获取请求,所述认证向量获取请求中包括所述第一终端的标识。所述第二终端归属的prose function或PKMF获取所述第一终端的认证向量,所述认证向量包括随机数RAND。所述第二终端归属的prose function或PKMF将所述认证向量中的所述RAND发送至所述第二终端,以使得所述第二终端将所述认证向量中的所述RAND发送至所述第一终端。
本申请的第十二方面提供了一种接近业务功能实体prose function或接近密钥管理功能实体PKMF,所述prose function或PKMF为第二终端归属的prose function或PKMF,包括:接收器、处理器和发送器。接收器用于接收所述第二终端发送的第一终端认证向量获取请求,所述认证向量获取请求中包括所述第一终端的标识。处理器用于获取所述第一终端的认证向量,所述认证向量包括随机数RAND。发送器用于将所述认证向量中的所述RAND发送至所述第二终端,以使得所述第二终端将所述认证向量中的所述RAND发送至所述第一终端。
第一个实现方式中,所述第二终端归属的prose function或PKMF获取所述第一终端的认证向量包括:所述第二终端归属的prose function或PKMF依据所述认证向量获取请求,从归属签约用户服务器HSS获取所述第一终端的认证向量。或者,所述第二终端归属的prose function或PKMF依据所述第一终端的标识确定所述第一终端归属的prose function,所述第二终端归属的prose function或PKMF向所述第一终端归属的prose function发送第一消息,所述第一消息用于请求所述第一终端的认证向量,并使得所述第一终端归属的prose function从HSS获取所述第一终端的认证向量,所述第二终端归属的prose function或PKMF接收所述第一终端归属的prose function发送的第二消息,所述第二消息中包括所述第一终端的认证向量。
第一个实现方式中,在所述第二终端归属的prose function或PKMF获取所述第一终端的认证向量后,还包括:所述第二终端归属的prose function或PKMF将所述第一终端的认证向量发送到所述第二终端归属的移动性管理实体。或者,所述第二终端归属的prose function或PKMF将所述认证向量发送到归属签约用户服务器HSS,以使得所述HSS将所述第一终端的认证向量发送到所述第二终端归属的移动性管理实体。
第一个实现方式中,所述认证向量还包括AUTN。所述方法还包括:所述第二终端归属的prose function或PKMF将所述AUTN发送至所述第二终端,以使得所述第二终端将所述AUTN发送至所述第一终端。
本申请的第十三方面提供了一种认证方法,包括:第二终端归属的移动性管理实体接收所述第二终端发送的认证请求消息,所述认证请求消息中包括所述第一终端的标识、所述第一终端的随机数RAND和响应值RES,所述RES由所述第一终端依据所述RAND生成,所述第一终端的标识、所述RAND和所述RES由所述第一终端发给所述第二终端。所述第二终端归属的移动性管理实体获取所述第一终端的所述RAND对应的认证向量中的XRES。所述第二终端归属的移动性管理实体通过比较所述RES与所述XRES,认证所述第一终端。
本申请的第十四方面提供了一种移动性管理实体,所述移动性管理实体为所述第二终端归属的移动性管理实体,包括:接收器和处理器。接收器用于接收所述第二终端发送的认证请求消息,所述认证请求消息中包括所述第一终端的标识、所述第一终端的随机数RAND和响应值RES,所述RES由所述第一终端依据所述RAND生成,所述第一终端的标识、所述RAND和所述RES由所述第一终端发给所述第二终端。处理器用于获取所述第一终端的所述RAND对应的认证向量中的XRES,并通过比较所述RES与所述XRES,认证所述第一终端。
在一个实现方式中,所述第二终端归属的移动性管理实体获取所述RAND对应的认证向量中的XRES包括:所述移动性管理实体从本地获取所述RAND对应的认证向量中的XRES。或者,从归属签约用户服务器HSS获取所述RAND对应的认证向量中的XRES;或者,从所述第一终端归属的移动性管理实体获取所述RAND对应的认证向量中的XRES。
在一个实现方式中,所述RAND对应的认证向量还包括第二密钥。在所述第二终端归属的移动性管理实体通过比较所述RES与所述XRES,认证所述第一终端之后,还包括:所述第二终端归属的移动性管理实体认证所述第一终端通过后,所述第二终端归属的移动性管理实体基于所获取的认证向量中的第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥,所述第二终端归属的移动性管理实体将所述第一密钥发送至所述第二终端。
本申请的第十五方面提供了一种认证方法,包括:第一终端发现第二终端,所述第二终端为中继终端。所述第一终端向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括时间信息以及完整性保护信息,所述时间信息是所述第一终端发送所述直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端使用第一密钥至少对所述时间信息进行完整性保护得到,以使得所述第二终端将所述时间信息及所述完整性保护信息发送至Prose function或PKMF,由所述prose function或PKMF根据所述时间信息及所述完整性保护信息认证所述第一终端。
本申请的第十六方面提供了一种终端,所述第一终端为第一终端,包括:处理器和发送器。处理器用于发现第二终端,所述第二终端为中继终端。发送器用于向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括时间信息以及完整性 保护信息,所述时间信息是所述第一终端发送所述直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端使用第一密钥至少对所述时间信息进行完整性保护得到,以使得所述第二终端将所述时间信息及所述完整性保护信息发送至Prose function或PKMF,由所述prose function或PKMF根据所述时间信息及所述完整性保护信息认证所述第一终端。
在一个实现方式中,所述第一密钥为:所述第一终端用于中继通信的根密钥。所述直接通信请求消息中还包括:所述第一终端用于中继通信的根密钥的标识。
在一个实现方式中,所述第一密钥为:所述第一终端以通用引导架构GBA方式建立的第三密钥,所述第三密钥用于保证所述第一终端和应用服务器之间的通信安全。所述直接通信请求消息中还包括:所述第三密钥的标识。
在一个实现方式中,所述第一密钥为:所述第一终端使用所述时间信息以及所述第一终端中的SIM卡中保存的密钥生成的密钥。
在一个实现方式中,所述第一终端向所述第二终端发送直接通信请求消息之后还包括:所述第一终端使用所述第一密钥生成第二密钥,所述第二密钥为用于所述第一终端与所述第二终端之间的通信。
本申请的第十七方面提供了一种认证方法,包括:第二终端接收第一终端发送的直接通信请求消息,所述直接通信请求消息中包括时间信息以及所述第一终端生成的完整性保护信息,所述时间信息是所述第一终端发送所述直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端至少对所述时间信息进行完整性保护得到。所述第二终端向prose function或PKMF发送第一消息,所述第一消息中包括所述第一终端的标识、所述直接通信请求消息中的所述时间信息以及所述完整性保护信息,以使得所述prose function或PKMF根据所述时间信息及所述完整性保护信息认证所述第一终端。
本申请的第十八方面提供了一种终端,所述终端为第二终端,包括:接收器和发送器。接收器用于接收第一终端发送的直接通信请求消息,所述直接通信请求消息中包括时间信息以及所述第一终端生成的完整性保护信息,所述时间信息是所述第一终端发送所述直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端至少对所述时间信息进行完整性保护得到。发送器用于向prose function或PKMF发送第一消息,所述第一消息中包括所述第一终端的标识、所述直接通信请求消息中的所述时间信息以及所述完整性保护信息,以使得所述prose function或PKMF根据所述时间信息及所述完整性保护信息认证所述第一终端。
在一个实现方式中,所述第二终端向prose function或PKMF发送第一消息包括:在所述第二终端判断接收到所述直接通信请求消息的时间信息与所述直接通信请求消息中的时间信息的差值在预设的范围内的情况下,向所述prose function或PKMF发送所述第一消息。
在一个实现方式中,在所述第二终端向prose function或PKMF发送第一消息之后,还包括:所述第二终端接收所述prose function或PKMF发送的第一消息的响应 消息,所述第一消息的响应消息中包括第二密钥,所述第二密钥由所述Prose function或PKMF对所述第一终端认证通过后,使用所述第一密钥生成,所述第二密钥用于所述第一终端与所述第二终端之间的通信。
本申请的第十九方面提供了一种认证方法,包括:prose function或PKMF接收所述第二终端发送的第一消息,所述第一消息中包括第一终端的标识、时间信息和完整性保护信息,所述时间信息为所述第一终端向所述第二终端发送直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端使用第一密钥至少对所述时间信息进行完整性保护得到,并通过所述直接通信请求消息发送至所述第二终端。所述prose function或PKMF获取所述第一密钥,并使用所述第一密钥验证所述完整性保护信息,以认证所述第一终端。
本申请的第二十方面提供了一种prose function或PKMF,包括:接收器和处理器。接收器用于接收所述第二终端发送的第一消息,所述第一消息中包括第一终端的标识、时间信息和完整性保护信息,所述时间信息为所述第一终端向所述第二终端发送直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端使用第一密钥至少对所述时间信息进行完整性保护得到,并通过所述直接通信请求消息发送至所述第二终端。处理器用于获取所述第一密钥,并使用所述第一密钥验证所述完整性保护信息,认证所述第一终端。
在一个实现方式中,所述第一消息中还包括所述第一密钥的标识。所述prose function或PKMF获取所述第一密钥包括:所述prose function或PKMF依据所述第一密钥的标识获取所述第一密钥。
在一个实现方式中,所述第一密钥为:所述第一终端进行中继通信的根密钥;或者,所述第一终端以通用引导架构GBA方式建立的用于保证所述与应用服务器之间的通信安全的密钥。
在一个实现方式中,所述prose function或PKMF获取所述第一密钥包括:所述prose function或PKMF向HSS发送所述第一终端的标识和所述时间信息。所述prose function或PKMF接收所述HSS发送的所述第一密钥,所述第一密钥由所述HSS使用所述时间信息以及所述第一终端中的SIM卡中保存的密钥生成。
在一个实现方式中,所述prose function或PKMF获取所述第一密钥,使用所述第一密钥验证所述完整性保护信息之前还包括:所述prose function或PKMF判断接收到所述第一消息的时间信息与所述第一消息中包含的时间信息的差值在预设的范围内。
在一个实现方式中,在所述认证所述第一终端后,还包括:如果所述prose function或PKMF认证所述第一终端合法,所述prose function或PKMF使用所述第一密钥生成第二密钥,所述第二密钥用于所述第一终端与所述第二终端之间的通信。所述prose function或PKMF向所述第二终端发送第一消息的响应消息,所述第一消息的响应消息中包括所述第二密钥。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为第一终端以第二终端作为中继终端接入网络的基本架构图;
图2为本申请实施例公开的一种通过认证方法的流程图;
图3为本申请实施例公开的又一种认证方法的流程图;
图4为本申请实施例公开的又一种认证方法的流程图;
图5为本申请实施例公开的又一种认证方法的流程图;
图6为本申请实施例公开的又一种认证方法的流程图;
图7为本申请实施例公开的又一种认证方法的流程图;
图8为本申请实施例公开的又一种认证方法的流程图;
图9为本申请实施例公开的又一种认证方法的流程图;
图10为本申请实施例公开的一种终端的结构示意图;
图11为本申请实施例公开的一种网络设备的结构示意图。
具体实施方式
图1为第一终端以第二终端作为中继终端接入网络的基本架构,第一终端可以为增强的远程终端,第二终端可以为增强的中继终端,为方便说明,以下称第一终端为remote UE,第二终端为relay UE。图1中:
第一终端可以为可穿戴设备,例如智能手表、智能手环或者智能眼镜等。第一终端可以包括LTE以及5G场景下的终端。
第二终端可以包括LTE以及5G场景下的终端,例如智能手机。
移动管理实体(Mobile ManagementEntity)、归属签约用户服务器(Home Subscriber Server)为核心网设备,移动性管理实体也可以指5G核心网负责移动性管理的设备,归属签约用户服务器也可以是5G中负责存储签约数据和计算认证信息的核心网设备,本文在实施例中以4G网络中的移动性管理实体MME、及4G网络中的归属签约用户服务器HSS为例进行介绍。
基站为接入网设备,可以包括LTE以及5G场景下的基站。
通常,核心网设备和接入网设备均由运营商部署。
Prose function/PKMF是运营商实现prose(proximity service:接近业务)的服务器,本文中的Prose function/PKMF是指prose function或PKMF,或者prose function与PKMF合设的功能实体。
图2为本申请实施例公开的一种通过中继终端接入网络的方法,包括以下步骤:
S201:remote UE和relay UE相互发现。
S202:remote UE向relay UE发送直接通信请求direct communication request 消息,在direct communication request消息中包括remote UE的标识。
可选的,remote UE的标识可以为remote UE的国际移动用户识别码(International Mobile Subscriber Identification Number,IMSI),remote UE的标识也可以使用其它形式。
S203:在收到direct communication request消息后,relay UE向relay UE归属的MME发送remote UE的标识。
具体的,relay UE可以发送认证请求authentication request消息,authentication request消息中包括remote UE的标识,relay UE也可以发送业务请求,业务请求消息中包括remote UE的标识,或relay UE发送位置更新请求消息,位置更新请求消息中包括remote UE的标识,或向relay UE的MME发送密钥请求消息,该消息用于MME对remote UE进行认证,本发明并不限定实现该消息的具体类型。
S204:relay UE归属的MME依据remote UE的标识从HSS获取remote UE的认证向量AV(可选项)。
可选的,如果remote UE的标识为remote UE的IMSI,则relay UE归属的MME直接依据remote UE的IMSI从HSS获取remote UE的认证向量,如果remote UE的标识为其他形式,则relay UE归属的MME依据remote UE的标识确定remote UE的IMSI,并根据remote UE的IMSI从HSS获取remote UE的认证向量。
可选的,relay UE的MME可以向HSS发送认证数据请求authentication data request消息,并接收HSS发送的认证数据响应authentication data response消息,authentication data response消息携带认证向量AV。authentication data request消息和authentication data response消息均携带remote UE的IMSI。
认证向量包括接入安全管理实体密钥(access security management entity,Kasme)、随机数RAND、期望的响应值(expected response,XRES)和认证令牌(Authentication token,AUTN)。
或者,在本步骤中relay UE归属的MME根据remote UE的标识信息获得remote UE NAS(非接入层Non Access Stratum)安全上下文中的Kasme。
S205:relay UE归属的MME依据获得的Kasme生成用于remote UE和relay UE之间近距离通信的根密钥(以下简称近距离通信的根密钥)。
根据Kasme生成近距离通信的根密钥的具体方法可以参见现有技术,这里不再赘述。S205为可选步骤。
S206:relay UE归属的MME将生成的近距离通信的根密钥、RAND以及AUTN发给relay UE。
在该步骤中,relay UE归属的MME可以向relay UE发送认证响应authentication response消息,认证响应消息中包括近距离通信的根密钥、RAND以及AUTN,还可以包含remote UE的标识。若relay UE归属的MME已获得remote UE的Kasme,则不需要传递RAND和AUTN信息。
可选的,在S203中,relay UE可以发送其它的非接入层(Non-access Stratum, NAS)消息给relay UE归属的MME,而非authentication request消息,则在本步骤中,relay UE可以发送认证请求消息,认证请求消息中包括近距离通信的根密钥、RAND以及AUTN,还可以包含remote UE的标识,用于发起对remote UE的认证,同时分发remote UE和relay UE之间的近距离通信根密钥。也就是说,S203和S206发送的消息不是对应的请求和响应消息。
S207:relay UE向remote UE发送直接安全模式命令(direct security mode command,direct SMC)消息,direct SMC消息中包括RAND和AUTN。
可选的,可使用完整性保护密钥对direct SMC消息进行完整性保护。
具体的,完整性保护密钥的获取方法为:relay UE基于获得的近距离通信的根密钥,生成用于近距离通信的会话密钥,并基于会话密钥生成近距离通信的加密和完整性保护密钥。
可选的,direct SMC消息中还可以包括其它参数,本申请不一一列举。
可选的,relay UE也可以通过其它消息(其它消息也可以进行完整性保护)向remote UE发送RAND和AUTN(也可能包括其它参数),例如通过直接密钥更新过程中的直接更新密钥请求direct rekey request或直接通信链路保活过程中的直接通信保活请求direct communication keepalive request消息。
S208:remote UE使用与步骤207相同的方式生成用于近距离通信加密和完整性保护的密钥。
可选的,remote UE在接收到RAND和AUTN的情况下,还可以依据接收到的RAND及AUTN生成Kasme,并使用与S205相同的方式,生成用于remote UE和relay UE之间近距离通信的根密钥。具体的,remote UE执行AKA过程,将remote UE中USIM中的密钥K、RAND及AUTN共同作为生成Kasme的依据。进而按照步骤207的方式使用近距离通信的根密钥生成近距离通信加密和完整性保护的密钥。
或者,remote UE基于已保存的Kasme,使用与S205相同的方式,生成用于remote UE和relay UE之间近距离通信的根密钥,按照步骤207的方式使用近距离通信的根密钥生成近距离通信加密和完整性保护的密钥。
S209:remote UE向relay UE发送直接安全模式完成(direct security mode complete)消息,直接安全模式完成消息使用S208中生成的近距离通信加密和完整性保护密钥进行加密和完整性保护。其中,加密为可选步骤,也可以只进行完整性保护。
S210:relay UE利用S207中生成的近距离通信的加密和完整性保护密钥,认证直接安全模式完成消息的加密和完整性保护,以此认证remote UE。
S211:如果认证成功,relay UE向remote UE发送直接通信接受direct communication accept消息,并保存用于近距离通信的密钥,否则,relay UE向remote UE发送直接通信拒绝direct communication reject消息,并删除用于近距离通信的密钥。
在以上步骤中,remote UE与relay UE之间的消息,可以通过两者之间的近距离通信的控制面消息接口实现。
S212:relay UE将认证结果发给relay UE归属的MME。
可选的,relay UE可以向relay UE归属的MME发送与步骤206中的authentication response消息对应的认证确认authorization acknowledge消息,或认证请求对应的认证响应消息,认证确认消息或认证响应消息中携带认证结果。
S213:如果认证结果指示认证成功,relay UE归属的MME保存remote UE的标识,表示允许remote UE通过该relay UE接入网络。Relay UE归属的MME还可以保存所获取的remote UE的认证向量,当然,在认证成功的前提下也可以删除获得的认证向量,此处不做限制。如果认证结果指示认证失败,relay UE归属的MME删除remote UE的标识及获得的remote UE的认证向量。
至此,完成对于remote UE的认证,在认证remote UE前或认证remote UE后,relay UE归属的MME还应该对remote UE通过relay UE接入网络进行鉴权,鉴权通过后分配近距离通信的密钥,可见,,在上述过程中,建立了remote UE和relay UE之间的近距离通信链路。
本实施例中,若remote UE未附着网络,在建立了和relay UE的之间近距离通信链路后,remote UE可以发起对网络的附着请求,在remote UE附着网络的过程中,可以利用在建立近距离通信链路过程中获得的认证向量,确定remote UE和MME之间的根密钥Kasme,而无需执行现有技术中remote UE和MME之间的AKA过程以认证和协商生成根密钥。
本实施例中,remote UE附着网络的过程如下:
S214:remote UE向relay UE发送附着请求消息,附着请求消息中包括remote UE的标识和RAND。
可选的,该附着请求消息中还包括响应值(response RES),RES由在步骤207中获得的RAND、生成,生成RES是现有技术,本申请不再赘述。
S215:relay UE将附着请求消息发给relay UE归属的MME。
因为remote UE未附着过网络,relay UE归属的基站在选择MME的过程中,可以获知remote UE是通过该relay UE接入网络的,而将附着请求消息通过S1接口发送到relay UE归属的MME。由于remote UE未附着网络,可以将relay UE归属的MME作为remote UE的MME。
Relay UE归属的基站获知remote UE通过relay UE接入网络的方式可以是:在步骤213后,relay UE归属的MME可以将remote UE和relay UE的标识发送到relay UE当前附着的基站,以使得remote UE通过relay UE向网络发送信令时,用所获得的标识认证允许remote UE通过relay UE接入网络;也可以通过底层协议栈标识获知remote UE是通过relay UE接入网络,或者在步骤214中包含relay UE的S-临时移动签约标识(S-Temporary Mobile Subscriber Identity,S-TMSI),
S216:在relay UE归属的MME接收到附着请求消息后,relay UE归属的MME确定接收到的RAND对应的认证向量,确定RAND对应的认证向量中的Kasme为remote UE 的根密钥。其中,RAND对应的认证向量是指包括相同的RAND的认证向量。
若附着请求消息中还包含RES,则MME将RES和RAND对应的认证向量中的XRES进行比较,如果相同,则表示remote UE通过认证,relay UE的MME确定RAND对应的认证向量中的Kasme为remote UE的根密钥。若不同则表示认证remote UE失败,终止该过程。
在S216之后,可以执行网络附着过程的其它步骤,例如,relay UE的MME向relay UE发送附着确认(XRES和RES相同的情况下)或者失败(XRES和RES不相同的情况下)消息。详情可以参见现有技术,这里不再赘述。
从图2可以看出,本实施例中,在建立近距离通信链路的过程中,MME生成用于近距离通信的密钥,并完成对relay UE的认证,能够提高remote UE以relay UE作为终端接入网络的安全性。并且,MME在认证过程中获取的Kasme可以作为后续remote UE接入网络后的根密钥。
图3为本申请实施例公开的又一种通过中继终端接入网络的方法,与图2所示的方法的区别在于,relay UE归属的MME而通过比较remote UE反馈的RES与remote UE的认证向量AV中的XRES是否相同来认证remote UE。
图3中,使用以下步骤,替换图2中的S204-S213:
S204:relay UE归属的MME依据remote UE的标识从HSS获取remote UE的认证向量AV。
可选的,如果remote UE的标识为remote UE的IMSI,则relay UE归属的MME直接依据remote UE的IMSI从HSS获取remote UE的认证向量,如果remote UE的标识为其他形式,则relay UE归属的MME依据remote UE的标识确定remote UE的IMSI,并根据remote UE的IMSI从HSS获取remote UE的认证向量。
可选的,relay UE的MME可以向HSS发送认证数据请求authentication data request消息,并接收HSS发送的认证数据响应authentication data response消息,authentication data response消息携带认证向量AV。authentication data request消息和authentication data response消息均携带remote UE的IMSI。
认证向量包括Kasme、随机数RAND、期望响应值XRES和认证令牌(Authentication token,AUTN)。
S205:relay UE归属的MME依据认证向量中的Kasme生成用于remote UE和relay UE之间近距离通信的根密钥(以下简称近距离通信的根密钥)。
根据Kasme生成近距离通信的根密钥的具体方法可以参见现有技术,这里不再赘述。S205为可选步骤。
S206:relay UE归属的MME将生成的近距离通信的根密钥(可选项)、RAND发给relay UE。
在该步骤中,relay UE归属的MME可以向relay UE发送认证响应authentication response消息,认证响应消息中包括近距离通信的根密钥、RAND,还可以包含remote  UE的标识。
可选的,在S203中,relay UE可以发送其它的非接入层(Non-access Stratum,NAS)消息给relay UE归属的MME,而非authentication request消息。在本步骤中,relay UE可以发送认证请求消息,认证请求消息中包括近距离通信的根密钥、RAND,还可以包含remote UE的标识,用于发起对remote UE的认证,同时分发remote UE和relay UE之间的近距离通信根密钥。也就是说,S203和S206发送的消息不是对应的请求和响应消息。
可选的,relay UE归属的MME在该步骤中,可以将AUTN也一并发给relay UE。
S207:relay UE向remote UE发送直接安全模式命令(direct security mode command,direct SMC)消息,direct SMC消息中包括RAND。
可选的,可使用完整性保护密钥对direct SMC消息进行完整性保护。
具体的,完整性保护密钥的获取方法为:relay UE基于获得的近距离通信的根密钥,生成用于近距离通信的会话密钥,并基于会话密钥生成近距离通信的加密和完整性保护密钥。
可选的,direct SMC消息中还可以包括AUTN和/或其它参数,本申请不一一列举。
可选的,relay UE也可以通过其它消息(其它消息也可以进行完整性保护)向remote UE发送RAND(也可能包括AUTN和/或其它参数),例如通过直接密钥更新过程中的直接更新密钥请求direct rekey request或直接通信链路保活过程中的直接通信保活请求direct communication keepalive request消息。
S208:remote UE依据RAND生成RES。
可选的,remote UE在接收到AUTN的情况下,还可以依据RAND和AUTN生成Kasme,并使用与S205相同的方式,生成用于remote UE和relay UE之间近距离通信的根密钥。
S209:remote UE向relay UE返回直接安全模式完成消息,直接安全模式完成消息中包括RES和RAND。
S210:relay UE将RES和RAND发给relay UE归属的MME。
可选的,relay UE可以向relay UE归属的MME发送与步骤206中authentication response对应的认证确认authorization acknowledge消息,或认证请求对应的认证响应消息,认证确认消息或认证响应消息中携带RES和RAND。
S211:relay UE归属的MME确定与接收到的RAND对应的认证向量,并比较RES与认证向量中的XRES是否相同,如果相同,则remote UE认证通过,在认证之前或之后,relay UE归属的MME还需要鉴权remote UE可以通过relay UE接入网络,若鉴权通过则relay UE归属的MME保存remote UE的标识,表示允许remote UE通过该relay UE接入网络。Relay UE归属的MME还可以保存所获取的remote UE的认证向量,当然,在认证成功的前提下也可以删除获得的认证向量,此处不做限制;如果不相同,则remote UE认证失败,relay UE归属的MME删除remote UE的标识及获得的remote UE的认证向量。
图3中的其它步骤与图2相同,详情可见图3,这里不再赘述。
图3中,relay UE归属的MME不依赖relay UE对remote UE的认证结果,而对remote UE进行认证,能够进一步提高通信的安全性。
图2或图3所示的中获得认证向量对remote UE的认证方法,适用于remote UE未附着网络,也可以适用于remote UE已附着网络的场景。
在remote UE已附着网络的场景下,与图2或图3的区别在于,remote UE已附着网络,因此要实现对remote UE的认证,还需要relay UE归属的MME与remote UE归属的MME之间进行交互获得remote UE的认证向量,即由remote UE归属的MME获取认证向量,并将认证向量发给relay UE归属的MME。
具体的,relay UE归属的MME依据remote UE的标识,确认remote UE归属的MME,并向remote UE归属的MME发送第一消息,第一消息用于请求获取与所述第一终端的近距离通信的安全信息及所述第一密钥。具体的,第一消息可以为认证请求消息,其中包括remote UE的标识。remote UE归属的MME收到第一消息后,从HSS获取remote UE的认证向量AV,并依据认证向量中的Kasme生成用于remote UE和relay UE之间近距离通信的根密钥。remote UE归属的MME向relay UE归属的MME发送第二消息,第二消息中包括所生成的近距离通信的根密钥和认证向量中的RAND。可选的,还可以包括认证向量中的AUTN。具体的,第二消息可以为认证响应消息。
在进行完图2或图3所示的对remote UE的认证后,relay UE归属的MME将认证结果发给remote UE归属的MME。如果认证成功,remote UE归属的MME保存remote UE的标识,表示允许remote UE通过该relay UE接入网络,还可以保存所获取的remote UE的认证向量,当然,在认证成功的前提下也可以删除获得的认证向量,此处不做限制;如果认证结果指示认证失败,remote UE的MME删除remote UE的标识及获得的remote UE的认证向量。
在remote UE已附着网络的场景下,与图2所示的过程对应的具体过程如图4所示,与图3所示的过程对应的具体过程如图5所示。
图6为本申请实施例公开的又一种认证方法,与上述方法的区别在于,从relay UE归属的接近业务功能实体prose function或接近密钥管理功能实体(prose key management function,PKMF)获得remote UE的认证向量(为了便于说明,以下将prose function或PKMF记为prose function/PKMF)。具体的,包括以下步骤:
S601:remote UE和relay UE相互发现。
S602:remote UE向relay UE发送第一消息,第一消息用于请求获取remote UE的认证向量中的随机数RAND,第一消息中包括remote UE的标识。
具体的,第一消息可以为绑定请求消息,绑定请求消息中包括获取remote UE的认证向量中的RAND的指示信息,本发明不限制指示信息的具体形式以及第一消息实现形式。
S603:relay UE向relay UE归属的prose function/PKMF发送remote UE认证向量获取请求。remote UE认证向量获取请求中包括remote UE的标识。
在具体实现上,认证向量获取请求消息还可以通过relay UE与prose function/PKMF间发送的其它消息中携带获取认证向量指示信息来实现,例如在建立信任关系请求中包含获取认证向量指示信息实现,本发明不限制指示信息的具体形式以及认证向量获取请求实现形式。
S604:relay UE归属的prose function/PKMF获取remote UE的认证向量。
其中,remote UE的认证向量中包括Kasme、随机数RAND、期望响应值XRES和AUTN。
具体的,relay UE归属的prose function/PKMF从HSS获取remote UE的认证向量。
可选的,relay UE归属的prose function/PKMF还可以直接将认证向量发给relay UE归属的MME,或者,将认证向量发给HSS,由HSS将认证向量发给relay UE归属的MME。
S605:relay UE归属的prose function/PKMF将remote UE的认证向量中的RAND发给relay UE。可选的,还可以将认证向量中的AUTN一并发给relay UE。
Relay UE归属的prose function通过步骤603中的请求响应消息包含RAND和AUTN(若一并发送),发送至relay UE。
S606:relay UE向remote UE发送第二消息,第二消息中包括RAND,可选的,还可以包括AUTN。
具体的,第二消息为第一消息的响应消息,第二消息可以为绑定确认消息。
S607:remote UE依据RAND生成RES,可选的,还可以依据RAND和AUTN生成Kasme。
S608:remote UE向relay UE发送direct communication request消息,direct communication request消息中包括响应值RES和RAND。
S609:relay UE向relay UE归属的MME发送认证请求消息,认证请求消息中包括remote UE的标识、RES和RAND。
其中认证请求消息也可以通过其它消息来实现,例如,relay UE也可以发送业务请求,业务请求消息中包括remote UE的标识、RES和RAND,或relay UE发送位置更新请求消息,位置更新请求消息中包括remote UE的标识、RES和RAND,或向relay UE的MME发送密钥请求消息,密钥请求消息中包括remote UE的标识、RES和RAND,该消息用于MME对remote UE进行认证,本发明并不限定实现该消息的具体类型。
S610:relay UE归属的MME获取RAND对应的remote UE的认证向量中的XRES,并比较XRES和RES,如果两者相同,认证成功,否则,认证失败。
具体的,relay UE归属的MME获取RAND对应的认证向量,进一步比较认证向量中的XRES与接收到的RES,relay UE归属的MME可以从本地获取RAND对应的认证向量;或者,从归属签约用户服务器HSS获取RAND对应的认证向量。具体的,当步骤S604中,relay UE归属的prose function/PKMF将获得的认证向量发给relay UE归属的MME或通过HSS发给relay UE归属的MME,则relay UE归属的MME可以从本地获取RAND 对应的认证向量。
在认证remote UE前或认证remote UE后,relay UE归属的MME还应该对remote UE通过relay UE接入网络进行鉴权。
如果认证鉴权成功,relay UE归属的MME保存remote UE的标识,表示允许remote UE通过该relay UE接入网络。Relay UE归属的MME还可以保存所获取的remote UE的认证向量,当然,在认证鉴权成功的前提下也可以删除获得的认证向量,此处不做限制。如果认证失败,relay UE归属的MME删除remote UE的标识及获得的remote UE的认证向量。
在认证remote UE前或认证remote UE后,relay UE归属的MME还应该对remote UE通过relay UE接入网络进行鉴权。
如果认证成功、鉴权通过,relay UE归属的MME可以依据获取的remote UE的认证向量的Kasme生成用于remote UE和relay UE近距离通信的根密钥。
S611:relay UE归属的MME向relay UE返回步骤S609中认证请求消息的响应消息。
若认证成功,在S611的认证请求消息的响应消息中包含relay UE归属的MME生成的用于remote UE和relay UE近距离通信的根密钥。
S612:relay UE向remote UE发送direct SMC消息,direct SMC消息用于relay UE与remote UE之间安全协商生成会话密钥。
Remote UE收到该消息后基于步骤S607中生成的Kasme,并使用Kasme生成用于remote UE和relay UE近距离通信的根密钥,基于近距离通信的根密钥与relay UE进行会话密钥协商
S613:remote UE向relay UE返回直接安全模式完成消息。
步骤S612和步骤S613中具体的会话密钥协商过程可以参见现有技术,这里不再赘述。
S614:当remote UE与relay UE之间的通信连接建立成功后,relay UE可以向remote UE返回直接通信接受(direct communication accept)消息。
在完成认证后,还可以包括remote UE附着网络的过程,如图2中S214-S216,这里不再赘述。
在remote UE已附着并注册到prose function/PKMF的情况下,S604的具体实现方式为:
若remote UE与relay UE归属于相同的prose function/PKMF则按上述方案执行,若remote UE归属的prose function/PKMF与relay UE归属的prose function/PKMF不同:
relay UE归属的prose function/PKMF依据remote UE的标识确定remote UE归属的prose function/PKMF,并向remote UE归属的prose function/PKMF发送用于请求remote UE的认证向量的消息,remote UE归属的prose function/PKMF从HSS获取remote UE的认证向量,并向relay UE归属的prose function/PKMF发送包括remote  UE的认证向量的消息。
步骤S604中,remote UE归属的prose function/PKMF将获得的认证向量发给remote UE归属的MME或通过HSS发给remote UE归属的MME,则remote UE归属的MME可以从本地获取RAND对应的认证向量。
S610的具体实现方式为:
1)relay UE归属的MME从remote UE归属的MME获取RAND对应的认证向量中的XRES,执行RES与XRES的比较,进一步的,可以由remote UE归属的MME根据认证向量中的Kasme生成近距离通信的根密钥,返回给relay UE归属的MME,也可以由relay UE归属的MME在从remote UE归属的MME获取认证向量中的Kasme后生成近距离通信的根密钥。
2)relay UE归属的MME将remote UE通过relay UE发送来的RES发送给remote UE归属的MME,由remote UE归属的MME获得认证向量中的XRES,比较RES和XRES对remote UE进行鉴权,并基于对应认证向量中的Kasme生成近距离通信的根密钥,进一步将认证结果、以及生成的近距离通信的根密钥(若认证通过后生成)返回给relay UE归属的MME。
图7为本申请实施例公开的又一种认证方法,与上述方法的区别在于,网络实体prose function/PKMF建立remote UE和relay UE之间近距离通信时,由prose function/PKMF基于时间信息认证remote UE。具体包括以下步骤:
S701:remote UE和relay UE相互发现。
S702:remote UE向relay UE发送direct communication request消息,direct communication request消息中包括时间信息以及完整性保护信息MIC。
其中,时间信息是remote UE发送direct communication request消息的时间信息。例如,时间信息的格式可以为以秒为单位的时间编码后的二进制形式或其中的N比特信息。完整性保护信息由remote UE使用第一密钥至少对时间信息进行完整性保护得到。具体实现时,Direct communication request中包括的时间信息可以与生成MIC信息的时间信息相同形式,也可以只是生成MIC的时间信息中的部分比特位(如低N比特),反之,生成MIC的时间信息也可以是Direct communication request中包括的时间信息编码后的部分比特位(如低N比特),本发明不做限定。
可选的,所述第一密钥的几种具体形式为:
1、remote UE用于近距离通信的根密钥,在此情况下,direct communication request消息中还包括remote UE用于近距离通信的根密钥的标识。
2、remote UE以通用引导架构(Generic Bootstrapping Architecture,GBA)方式建立的密钥,该密钥的该密钥用于保证所述第一终端和应用服务器之间的通信安全。在此情况下,direct communication request消息中还包括与该密钥关联的标识,通过该标识可以获得该密钥。remote UE可能已经预先建立该密钥,如果没有预先建立且有建立该密钥的条件则remote UE在S702之前,要建立该密钥。
3、remote UE使用时间信息以及remote UE中的SIM卡中保存的密钥K生成的密钥IK’。可选的,remote UE可以先查找或建立上述两种形式的第一密钥,在没有找到或成功建立的情况下,使用IK’。
可选的,时间信息可以替换为UE中保存并维护的计数器值,并基于计数器值生成MIC信息,在direct communication request中包含计数器值和基于计数器值生成的MIC信息,当direct communication request发送成功后,计数器值加1。
S703:Relay UE收到direct communication request消息后,比较接收到direct communication request消息的时间信息与direct communication request消息中的时间信息差值是否在允许的范围内,如果在允许的范围内,向Relay UE归属的prose function/PKMF发送密钥请求消息。
其中,密钥请求消息中包括remote UE的标识、direct communication request消息中的时间信息以及完整性保护信息MIC。可选的,在第一密钥为上述1或2的情况下,密钥请求消息中还可以包括第一密钥的标识。
比较接收到direct communication request消息的时间信息与direct communication request消息中的时间信息差值是否在允许的范围内为可选步骤,也可以不进行比较而直接向Relay UE归属的prose function/PKMF发送密钥请求消息(如由prose function/PKMF验证或采用计数器值方式生成MIC时则不需要验证),或采用通过其它验证时间同步的方法,本文不对此展开。
S704:Relay UE归属的prose function/PKMF接收密钥请求消息后,获取第一密钥,并使用第一密钥验证完整性保护信息,从而认证remote UE。
Relay UE归属的prose function/PKMF获取第一密钥的具体实现方式为:
1、依据密钥请求消息中第一密钥的标识,获取第一密钥(第一密钥为上述1或2的情况)。
2、Relay UE归属的prose function/PKMF向HSS/Auc发送remote UE的标识和接收到的时间信息。HSS/Auc获得remote UE的密钥K,依据收到的时间信息及K,使用与remote UE相同的方式生成IK’的对称密钥(与IK’统称为第一密钥IK’)。HSS/Auc向Relay UE归属的prose function/PKMF返回IK’。
可选的,也可以由HSS/Auc认证remote UE,即上述方案2也可以被替换为:Relay UE归属的prose function或PKMF接收密钥请求消息后,向HSS/Auc发送remote UE的标识、接收到的时间信息和完整性保护信息,HSS/Auc获得remote UE的密钥K,使用收到的时间信息及K生成IK’,HSS/Auc使用与UE侧相同的方法生成IK’,使用IK’验证完整性保护信息,从而认证remote UE,并将认证结果反馈给Relay UE归属的prose function/PKMF。
本步骤中验证完整性保护信息指的是prose function/PKMF使用第一密钥对至少包含时间信息或计数器值的信息计算得出MIC’,并将计算得出的MIC’与接收的MIC值比较,若相同则验证通过,否则验证失败,本文中prose function/PKMF为了验证MIC信息需要获得并使用与remote UE发送direct communication request时所生成 MIC时使用的相同形式的时间信息或使用的计数器值计算MIC’,具体实现方法本文不限定。
可选的,Prose function/PKMF在验证完整性保护信息之前,可以验证接收到的时间信息与自身接收到密钥请求消息的时间的差值在允许范围内,或验证接收到的计数器值信息大于Prose function/PKMF中保存维护的计数器值。
可选的,Relay UE归属的prose function/PKMF还可以鉴权允许remote UE通过relay UE接入网络,其中鉴权过程可以在上述认证步骤之前或之后执行。
S705:如果认证remote UE合法,且对remote UE鉴权通过,Relay UE归属的prose function/PKMF使用第一密钥生成第二密钥,并向Relay UE发送密钥响应消息,密钥响应消息中包括第二密钥,第二密钥用于remote UE与Relay UE之间的通信。
S706:remote UE和relay UE基于第二密钥生成会话密钥,建立remote UE和relay UE之间的通信连接。
其中,remote UE同样使用第一密钥生成第二密钥,第二密钥用于remote UE与Relay UE之间的通信。
在上述步骤中,当remote UE已经附着并注册到prose function/PKMF,若relay UE与remote UE归属相同的prose function/PKMF,与上述流程一致。若relay UE与remote UE归属于不同的prose function/PKMF,relay UE归属的prose function/PKMF收到密钥请求消息后,relay UE归属的prose function/PKMF向remote UE的prose function/PKMF发送密钥请求,其中包含获得的时间信息和完整性保护信息,以使得remote UE的prose function/PKMF通过验证MIC认证remote UE,并生成remote UE和relay UE之间的通信密钥,通过relay UE的prose function/PKMF反馈给relay UE。
可选的,上述密钥请求消息和密钥响应消息仅为消息的一种具体实现方式,也可以使用其它消息。
图8为本申请实施例公开的又一种认证方法,与上述方法的区别在于,MME建立remote UE和relay UE之间的近距离通信的情况下,由MME基于时间信息认证remote UE。具体包括以下步骤:
S801:remote UE和relay UE相互发现。
S802:remote UE向relay UE发送direct communication request消息,direct communication request消息中包括时间信息以及完整性保护信息MIC。
其中,时间信息是remote UE发送direct communication request消息的时间信息。例如,时间信息的格式可以为以秒为单位的时间编码后的二进制形式或其中的N比特信息。完整性保护信息由remote UE使用第一密钥至少对时间信息进行完整性保护得到。具体实现时,Direct communication request中包括的时间信息可以与生成MIC信息的时间信息相同形式,也可以只是生成MIC的时间信息中的部分比特位(如低N比特),反之,生成MIC的时间信息也可以是Direct communication request中包括的时间信息编码后的部分比特位(如低N比特),本发明不做限定。
可选的,所述第一密钥的几种具体形式为:
1、remote UE中NAS安全上下文中的Kasme。
2、remote UE使用时间信息以及remote UE中的SIM卡中保存的密钥K生成的密钥IK’。可选的,remote UE可以先查找或建立上述形式的第一密钥,在没有找到或成功建立的情况下,使用IK’。
可选的,时间信息可以替换为UE中保存并维护的计数器值,并基于计数器值生成MIC信息,在direct communication request中包含计数器值和基于计数器值生成的MIC信息,当direct communication request发送成功后,计数器值加1。
S803:Relay UE收到direct communication request消息后,比较接收到direct communication request消息的时间信息与direct communication request消息中的时间信息差值是否在允许的范围内,如果在允许的范围内,向Relay UE归属的MME发送密钥请求消息。
其中,密钥请求消息中包括remote UE的标识、direct communication request消息中的时间信息以及完整性保护信息MIC。可选的,在第一密钥为上述1的情况下,密钥请求消息中还可以包括第一密钥的标识。
比较接收到direct communication request消息的时间信息与direct communication request消息中的时间信息差值是否在允许的范围内为可选步骤,也可以不进行比较而直接向Relay UE归属的MME发送密钥请求消息(如由prose function/PKMF验证或采用计数器值方式生成MIC时则不需要验证),或采用通过其它验证时间同步的方法,本文不对此展开。
S804:Relay UE归属的MME接收密钥请求消息后,获取第一密钥,并使用第一密钥验证完整性保护信息,从而认证remote UE。
Relay UE归属的MME获取第一密钥的具体实现方式为:
1、依据密钥请求消息中第一密钥的标识,获取第一密钥(第一密钥为上述1的情况)。
2、Relay UE归属的MME向HSS/Auc发送remote UE的标识和接收的时间信息。HSS/Auc获得remote UE的密钥K,依据收到的时间信息及K,使用与remote UE相同的方式生成IK’的对称密钥(与IK’统称为第一密钥IK’)。HS/Auc S向Relay UE归属的MME返回IK’。
可选的,也可以由HSS/Auc认证remote UE,即上述方案2也可以被替换为:Relay UE归属的MME接收密钥请求消息后,向HSS/Auc发送remote UE的标识、接收到的时间信息和完整性保护信息,HSS/Auc获得remote UE的密钥K,使用收到的时间信息及K生成IK’,HSS/Auc使用与UE侧相同的方法生成IK’,并使用IK’验证完整性保护信息,从而认证remote UE,并将认证结果反馈给Relay UE归属的MME。
本步骤中验证完整性保护信息指的是MME使用第一密钥对至少包含时间或计数器值信息的信息计算得出MIC’,并将计算得出的MIC’与接收的MIC值比较,若相同则验证通过,否则验证失败,本文中MME为了验证MIC信息需要获得与remote UE发送 direct communication request时所生成MIC时使用的相同形式的时间信息或使用的计数器值计算MIC’,具体实现方法本文不限定。
可选的,Relay UE归属的MME在验证完整性保护信息之前,可以验证接收到的时间信息与自身接收到密钥请求消息的时间的差值在允许范围内,或验证接收到的计数器值信息大于Prose function/PKMF中保存维护的计数器值。
可选的,Relay UE归属的MME还可以鉴权允许remote UE通过relay UE接入网络,其中鉴权过程可以在上述认证步骤之前或之后执行。
S805:如果认证所述第一终端合法,且对remote UE鉴权通过,Relay UE归属的MME使用第一密钥生成第二密钥,并向Relay UE发送密钥响应消息,密钥响应消息中包括第二密钥,第二密钥用于remote UE与Relay UE之间的通信。
S806:remote UE和relay UE基于第二密钥生成会话密钥,建立remote UE和relay UE之间的通信连接。
其中,remote UE同样使用第一密钥生成第二密钥,第二密钥用于remote UE与Relay UE之间的通信。
在上述步骤中,若remote UE已经附着到网络,则remote UE已在网络建立上下文,若relay UE与remote UE归属相同的MME,与上述流程一致。当relay UE与remote UE归属于不同的MME时,relay UE归属的MME收到密钥请求消息后,relay UE归属的MME向remote UE归属的MME发送密钥请求,其中包含获得的时间信息和完整性保护信息,以使得remote UE归属的MME通过验证MIC认证remote UE,并生成remote UE和relay UE之间的通信密钥,通过relay UE的MME反馈给relay UE。
可选的,上述密钥请求消息和密钥响应消息仅为消息的一种具体实现方式,也可以使用其它消息。
图9为本申请实施例公开的又一种认证方法,与上述方法的区别在于,在用prose function/PKMF建立remote UE和relay UE近距离通信的情况下,由prose function/PKMF基于认证向量认证remote UE。具体包括以下步骤:
S901:remote UE和relay UE相互发现。
S902:remote UE向relay UE发送direct communication request消息,direct communication request消息中包括remote UE的标识和relay UE的标识。
S903:relay UE收到direct communication request消息后,向prose function或PKMF发送密钥请求消息,密钥请求消息中包括接收到的remote UE的标识和relay UE的标识。
S904:prose function/PKMF收到密钥请求消息后,获得remote UE的IMSI,发起对remote UE的认证过程,并向HSS发送认证数据请求消息,其中认证数据请求中包括remote UE的IMSI。
S905:HSS向prose function/PKMF返回remote UE的认证向量。
S906:prose function/PKMF向relay UE发送需要认证请求消息,其中包括remote UE的标识,从HSS获得的remote UE的认证向量中的RAND和AUTN,其中AUTN是可选 项。
S907:Relay UE收到需要认证请求消息,并解析出其中包括remote UE的标识,则触发relay UE向remote UE发送直接认证请求,其中包含relay UE接收的RAND,可选的,还可以包括AUTN。
S908:Remote UE收到直接认证请求消息后,若其中包括AUTN,则relay UE首先基于UE的SIM卡中包含的密钥K验证AUTN,以验证网络的合法性。Remote UE使用RAND和密钥K生成RES。
S909:Remote UE返回直接认证响应消息,其中包含remote UE生成的RES以及remote UE的标识。
S910:Relay UE返回需要认证响应消息,其中包括接收到的RES和remote UE的标识。
S911:prose function/PKMF比较RES和已获取的认证向量中的XRES,若相同表示认证通过,否则认证失败。
在prose function/PKMF对remote UE认证之前或认证之后,prose function/PKMF还需要鉴权允许remote UE通过relay UE接入网络。
S912:若remote UE认证通过,且鉴权通过,prose function/PKMF生成用于remote UE和relay UE通信的密钥,其中prose function可以使用认证remote UE认证向量中的密钥Kasme作为根密钥生成用于remote UE和relay UE通信的密钥。
prose function/PKMF向relay UE返回密钥响应消息,并在其中包括所生成的用于remote UE和relay UE通信的密钥。
S913:remote UE和relay UE基于通信的密钥生成会话密钥,建立remote UE和relay UE之间的通信连接。
其中,remote UE也使用获得的RAND和AUTN生成Kasme,并使用Kasme作为根密钥生成用于remote UE和relay UE通信的密钥。
在上述步骤中,当remote UE已经附着并注册到prose function,若relay UE和remote UE属于相同的prose function/PKMF,则仍按上述步骤,若relay UE与remote UE归属于不同的prose function,relay UE归属的prose function收到密钥请求消息后,relay UE归属的prose function向remote UE的prose function发送密钥请求,其中包含remote UE的标识,以使得remote UE的prose function发起对remote UE的认证过程,并生成remote UE和relay UE之间的通信密钥,通过relay UE的prose function反馈给relay UE。认证过程与relay UE归属的prose function执行过程一致。
可选的,上述密钥请求消息和密钥响应消息仅为消息的一种具体实现方式,也可以使用其它消息。
图10为本申请实施例公开的一种终端,包括处理器、存储器、发送器和接收器。处理器、存储器、发送器和接收器通过总线通信。
其中,存储器用于存储应用程序以及应用程序运行过程中产生的数据。
处理器用于运行存储器中的应用程序,以实现图2-图9中第一终端和/或第二终端除发送和接收步骤之外的步骤,例如,用于实现发现第二终端或者依据所述RAND生成响应值RES的步骤。
发送器用于在处理器的控制下实现图2-图9中第一终端和/或第二终端发送的步骤。
接收器用于在处理器的控制下实现图2-图9中第一终端和/或第二终端接收的步骤。
图11为本申请实施例公开的一种网络设备,包括处理器、存储器、发送器和接收器。处理器、存储器、发送器和接收器通过总线通信。
网络设备可以为图2-图9所示的MME、prose function/PKMF的任意一种。
其中,存储器用于存储应用程序以及应用程序运行过程中产生的数据。
处理器用于运行存储器中的应用程序,以实现图2-图9中任意一种网络设备中除发送和接收步骤之外的步骤。
发送器用于在处理器的控制下实现图2-图9中任意一种网络设备发送的步骤。
接收器用于在处理器的控制下实现图2-图9中任意一种网络设备接收的步骤。
图10所示的终端与图11所示的网络设备,可以通过交互实现网络设备对于通过中继设备接入网络的终端的直接认证。

Claims (80)

  1. 一种认证方法,其特征在于,包括:
    第一终端发现第二终端,所述第二终端为中继终端;
    所述第一终端向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括所述第一终端的标识;
    所述第一终端接收所述第二终端发送的直接安全模式命令消息,所述直接安全模式命令消息中包括随机数RAND,所述RAND由所述第二终端从所述第二终端归属的移动性管理实体获得;
    所述第一终端依据所述RAND生成响应值RES;
    所述第一终端向所述第二终端发送直接安全模式完成消息,所述直接安全模式完成消息中包括所述RES,以使得所述第二终端向所述第二终端归属的移动性管理实体发送所述RES,由所述第二终端归属的移动性管理实体认证所述第一终端。
  2. 根据权利要求1所述的方法,其特征在于,在所述第一终端向所述第二终端发送直接安全模式完成消息之后,还包括:
    所述第一终端通过所述第二终端,向所述第一终端归属的移动性管理实体发送附着请求,所述附着请求中包括所述RAND,所述RAND用于指示所述第二终端归属的移动性管理实体所述第一终端使用所述RAND对应的认证向量中的密钥作为根密钥进行通信。
  3. 根据权利要求1所述的方法,其特征在于,在所述第一终端向所述第二终端发送直接安全模式完成消息之后,还包括:
    所述第一终端通过所述第二终端,向所述第二终端归属的移动性管理实体发送附着请求,所述附着请求中包括所述RAND和所述RES,所述RES用于所述第二终端归属的移动性管理实体认证所述第一终端,所述RAND用于指示所述第二终端归属的移动性管理实体在所述第一终端认证通过的情况下,所述第一终端使用所述RAND对应的认证向量中的密钥作为根密钥进行通信。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述直接安全模式命令消息中还包括:
    接入安全管理实体密钥AUTN;
    所述方法还包括:
    所述第一终端依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  5. 一种认证方法,其特征在于,包括:
    第二终端接收第一终端发送的直接通信请求消息,所述直接通信请求消息中包括所述第一终端的标识;
    所述第二终端向所述第二终端归属的移动性管理实体发送所述第一终端的标识;
    所述第二终端接收所述第二终端归属的移动性管理实体发送的随机数RAND,所述 RAND由所述第二终端归属的移动性管理实体依据所述第一终端的标识获取;
    所述第二终端向所述第一终端发送直接安全模式命令消息,所述直接安全模式命令消息中包括所述RAND;
    所述第二终端接收所述第一终端发送的直接安全模式完成消息,所述直接安全模式完成消息中包括响应值RES,所述RES由所述第一终端依据所述RAND生成;
    所述第二终端向所述第二终端归属的移动性管理实体发送所述RES,以使所述第二终端归属的移动性管理实体认证所述第一终端。
  6. 根据权利要求5所述的方法,其特征在于,在所述第二终端向所述第一终端发送直接安全模式命令消息之前,还包括:
    所述第二终端接收所述第二终端归属的移动性管理实体发送的AUTN和第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥;
    所述直接安全模式命令消息中还包括:
    所述AUTN,以使得所述第一终端依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  7. 一种认证方法,其特征在于,包括:
    第二终端归属的移动性管理实体接收所述第二终端发送的第一终端的标识;
    所述第二终端归属的移动性管理实体依据所述第一终端的标识,获取所述第一终端的认证向量,所述第一终端的认证向量包括随机数RAND和期望的响应值XRES;
    所述第二终端归属的移动性管理实体向所述第二终端发送所述RAND,以使得所述第二终端将所述RAND发送至所述第一终端;所述RAND用于所述第一终端生成响应值RES;
    所述第二终端归属的移动性管理实体接收所述第一终端通过所述第二终端发送的所述RES;
    所述第二终端归属的移动性管理实体比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证。
  8. 根据权利要求7所述的方法,其特征在于,在所述第二终端归属的移动性管理实体接收所述第一终端通过所述第二终端发送的所述RES之前,还包括:
    所述第二终端归属的移动性管理实体依据所述认证向量生成第一密钥并向所述第二终端发送所述第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  9. 根据权利要求7或8所述的方法,其特征在于,所述认证向量还包括第二密钥;
    所述第二终端归属的移动性管理实体依据所述第一终端的标识,获取所述第一终端的认证向量和第一密钥包括:
    所述第二终端归属的移动性管理实体根据所述第一终端的标识向所述第一终端的归属签约用户服务器HSS请求获取所述第一终端的认证向量;
    所述第二终端归属的移动性管理实体基于所述第二密钥生成所述第一密钥。
  10. 根据权利要求7或8所述的方法,其特征在于,所述移动性管理实体依据所述第一终端的标识,获取所述第一终端的认证向量和第一密钥包括:
    所述第二终端归属的移动性管理实体依据所述第一终端的标识确定所述第一终端归属的移动性管理实体;
    所述第二终端归属的移动性管理实体向所述第一终端归属的移动性管理实体发送第一消息,第一消息用于请求获取与所述第一终端的近距离通信的安全信息及所述第一密钥;
    所述第二终端归属的移动性管理实体接收所述第一终端归属的移动性管理实体发送的第二消息,所述第二消息中包括所述认证向量和所述第一密钥,所述第一密钥由所述第一终端归属的移动性管理实体生成;或所述第二消息中包括所述认证向量,所述认证向量还包括第二密钥,所述第二终端归属的移动性管理实体依据所述第二密钥生成所述第一密钥。
  11. 根据权利要求7-9任一项所述的方法,其特征在于,所述第一终端的认证向量还包括第二密钥;
    在所述第二终端归属的移动性管理实体比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证之后,还包括:
    所述第二终端归属的移动性管理实体接收所述第一终端的附着请求,所述附着请求中包括所述RAND,所述第二终端归属的移动性管理实体依据所述RAND,确定所述第一终端通信的根密钥为所述RAND对应的认证向量中的所述第二密钥。
  12. 根据权利要求7-9任一项所述的方法,其特征在于,所述第一终端的认证向量还包括第二密钥和期望的响应值XRES;
    在所述第二终端归属的移动性管理实体比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证之后,还包括:
    所述第二终端归属的移动性管理实体接收所述第一终端的附着请求,所述附着请求中包括所述RAND和所述RES;
    所述第二终端归属的移动性管理实体根据所述RAND确定所述第一终端的认证向量;
    所述第二终端归属的移动性管理实体比较所述RES与所述第一终端的认证向量中的所述XRES是否相同,如果相同,所述第二终端归属的移动性管理实体将所述第二密钥作为所述第一终端通信的根密钥。
  13. 根据权利要求7-12所述的方法,其特征在于,所述认证向量还包括:
    AUTN;
    所述方法还包括:
    所述第二终端归属的移动性管理实体将所述AUTN发送给所述第二终端,以使得所述第二终端将所述AUTN发送给所述第一终端,由所述第一终端依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  14. 一种认证方法,其特征在于,包括:
    第一终端发现第二终端,所述第二终端为中继终端;
    所述第一终端向所述第二终端发送第一消息,所述第一消息用于请求获取所述第一终端的认证向量中的随机数RAND,所述第一消息中包括所述第一终端的标识;
    所述第一终端接收所述第二终端发送的第二消息,所述第二消息中包括所述第一终端的认证向量中的所述RAND;所述认证向量由所述第二终端从所述第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF获得;
    所述第一终端向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括响应值RES和所述RAND,所述RES由所述第一终端根据所述RAND生成,以使得所述第二终端将所述RES和所述RAND发送至移动性管理实体,由所述移动性管理实体认证所述第一终端。
  15. 根据权利要求14所述的方法,其特征在于,所述第一消息为绑定请求消息,所述绑定请求消息中包括获取所述第一终端的认证向量中的随机数RAND的指示信息;
    所述第二消息为绑定确认消息。
  16. 根据权利要求14或15所述的方法,其特征在于,所述第二消息中还包括:
    所述认证向量中的AUTN;
    在所述第一终端向所述第二终端发送直接通信请求消息后,所述方法还包括:
    所述第一终端根据所述RAND和所述AUTN生成第二密钥,并依据所述第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  17. 一种认证方法,其特征在于,包括:
    第二终端接收第一终端发送的第一消息,所述第一消息用于请求获取所述第一终端的认证向量中的随机数RAND,所述第一消息中包括所述第一终端的标识;
    所述第二终端从所述第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF获得所述第一终端的认证向量,所述认证向量包括随机数RAND;
    所述第二终端向所述第一终端发送第二消息,所述第二消息中包括第一终端的所述认证向量中的所述RAND;
    所述第二终端接收所述第一终端发送的直接通信请求消息,所述直接通信请求消息中包括响应值RES和所述RAND,所述RES由所述第一终端根据所述RAND生成;
    所述第二终端将所述RES和所述RAND发送至移动性管理实体,以使得所述移动性管理实体认证所述第一终端。
  18. 根据权利要求17所述的方法,其特征在于,所述第二终端将所述RES和所述RAND发送至移动性管理实体,以使得所述移动性管理实体认证所述第一终端之后,还包括:
    在所述第一终端认证通过后,所述第二终端接收所述移动性管理实体发送的第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  19. 根据权利要求17或18所述的方法,其特征在于,所述认证向量还包括AUTN,以使得所述第一终端基于所述RAND和所述AUTN生成第二密钥,并基于第二密钥生成 第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  20. 一种认证方法,其特征在于,包括:
    第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF接收所述第二终端发送的第一终端认证向量获取请求,所述认证向量获取请求中包括所述第一终端的标识;
    所述第二终端归属的prose function或PKMF获取所述第一终端的认证向量,所述认证向量包括随机数RAND;
    所述第二终端归属的prose function或PKMF将所述认证向量中的所述RAND发送至所述第二终端,以使得所述第二终端将所述认证向量中的所述RAND发送至所述第一终端。
  21. 根据权利要求20所述的方法,其特征在于,所述第二终端归属的prose function或PKMF获取所述第一终端的认证向量包括:
    所述第二终端归属的prose function或PKMF依据所述认证向量获取请求,从归属签约用户服务器HSS获取所述第一终端的认证向量;
    或者,
    所述第二终端归属的prose function或PKMF依据所述第一终端的标识确定所述第一终端归属的prose function;
    所述第二终端归属的prose function或PKMF向所述第一终端归属的prose function发送第一消息,所述第一消息用于请求所述第一终端的认证向量,并使得所述第一终端归属的prose function从HSS获取所述第一终端的认证向量;
    所述第二终端归属的prose function或PKMF接收所述第一终端归属的prose function发送的第二消息,所述第二消息中包括所述第一终端的认证向量。
  22. 根据权利要求20或21所述的方法,其特征在于,在所述第二终端归属的prose function或PKMF获取所述第一终端的认证向量后,还包括:
    所述第二终端归属的prose function或PKMF将所述第一终端的认证向量发送到所述第二终端归属的移动性管理实体;或者,
    所述第二终端归属的prose function或PKMF将所述认证向量发送到归属签约用户服务器HSS,以使得所述HSS将所述第一终端的认证向量发送到所述第二终端归属的移动性管理实体。
  23. 根据权利要求20-22任一项所述的方法,其特征在于,所述认证向量还包括AUTN;
    所述方法还包括:
    所述第二终端归属的prose function或PKMF将所述AUTN发送至所述第二终端,以使得所述第二终端将所述AUTN发送至所述第一终端。
  24. 一种认证方法,其特征在于,包括:
    第二终端归属的移动性管理实体接收所述第二终端发送的认证请求消息,所述认 证请求消息中包括所述第一终端的标识、所述第一终端的随机数RAND和响应值RES,所述RES由所述第一终端依据所述RAND生成,所述第一终端的标识、所述RAND和所述RES由所述第一终端发给所述第二终端;
    所述第二终端归属的移动性管理实体获取所述第一终端的所述RAND对应的认证向量中的XRES;
    所述第二终端归属的移动性管理实体通过比较所述RES与所述XRES,认证所述第一终端。
  25. 根据权利要求24所述的方法,其特征在于,所述第二终端归属的移动性管理实体获取所述RAND对应的认证向量中的XRES包括:
    所述移动性管理实体从本地获取所述RAND对应的认证向量中的XRES;或者,从归属签约用户服务器HSS获取所述RAND对应的认证向量中的XRES;或者,从所述第一终端归属的移动性管理实体获取所述RAND对应的认证向量中的XRES。
  26. 根据权利要求24或25所述的方法,其特征在于,所述RAND对应的认证向量还包括第二密钥;
    在所述第二终端归属的移动性管理实体通过比较所述RES与所述XRES,认证所述第一终端之后,还包括:
    所述第二终端归属的移动性管理实体认证所述第一终端通过后,所述第二终端归属的移动性管理实体基于所获取的认证向量中的第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥,所述第二终端归属的移动性管理实体将所述第一密钥发送至所述第二终端。
  27. 一种认证方法,其特征在于,包括:
    第一终端发现第二终端,所述第二终端为中继终端;
    所述第一终端向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括时间信息以及完整性保护信息,所述时间信息是所述第一终端发送所述直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端使用第一密钥至少对所述时间信息进行完整性保护得到,以使得所述第二终端将所述时间信息及所述完整性保护信息发送至Prose function或PKMF,由所述prose function或PKMF根据所述时间信息及所述完整性保护信息认证所述第一终端。
  28. 根据权利要求27所述的方法,其特征在于,所述第一密钥为:
    所述第一终端用于中继通信的根密钥;
    所述直接通信请求消息中还包括:所述第一终端用于中继通信的根密钥的标识。
  29. 根据权利要求27所述的方法,其特征在于,所述第一密钥为:
    所述第一终端以通用引导架构GBA方式建立的第三密钥,所述第三密钥用于保证所述第一终端和应用服务器之间的通信安全;
    所述直接通信请求消息中还包括:所述第三密钥的标识。
  30. 根据权利要求27所述的方法,其特征在于,所述第一密钥为:
    所述第一终端使用所述时间信息以及所述第一终端中的SIM卡中保存的密钥生成 的密钥。
  31. 根据权利要求27-30的任意一项所述的方法,所述第一终端向所述第二终端发送直接通信请求消息之后还包括:
    所述第一终端使用所述第一密钥生成第二密钥,所述第二密钥为用于所述第一终端与所述第二终端之间的通信。
  32. 一种认证方法,其特征在于,包括:
    第二终端接收第一终端发送的直接通信请求消息,所述直接通信请求消息中包括时间信息以及所述第一终端生成的完整性保护信息,所述时间信息是所述第一终端发送所述直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端至少对所述时间信息进行完整性保护得到;
    所述第二终端向prose function或PKMF发送第一消息,所述第一消息中包括所述第一终端的标识、所述直接通信请求消息中的所述时间信息以及所述完整性保护信息,以使得所述prose function或PKMF根据所述时间信息及所述完整性保护信息认证所述第一终端。
  33. 根据权利要求32所述的方法,其特征在于,所述第二终端向prose function或PKMF发送第一消息包括:
    在所述第二终端判断接收到所述直接通信请求消息的时间信息与所述直接通信请求消息中的时间信息的差值在预设的范围内的情况下,向所述prose function或PKMF发送所述第一消息。
  34. 根据权利要求32所述的方法,其特征在于,在所述第二终端向prose function或PKMF发送第一消息之后,还包括:
    所述第二终端接收所述prose function或PKMF发送的第一消息的响应消息,所述第一消息的响应消息中包括第二密钥,所述第二密钥由所述Prose function或PKMF对所述第一终端认证通过后,使用所述第一密钥生成,所述第二密钥用于所述第一终端与所述第二终端之间的通信。
  35. 一种认证方法,其特征在于,包括:
    prose function或PKMF接收所述第二终端发送的第一消息,所述第一消息中包括第一终端的标识、时间信息和完整性保护信息,所述时间信息为所述第一终端向所述第二终端发送直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端使用第一密钥至少对所述时间信息进行完整性保护得到,并通过所述直接通信请求消息发送至所述第二终端;
    所述prose function或PKMF获取所述第一密钥,并使用所述第一密钥验证所述完整性保护信息,以认证所述第一终端。
  36. 根据权利要求35所述的方法,其特征在于,所述第一消息中还包括所述第一密钥的标识;
    所述prose function或PKMF获取所述第一密钥包括:所述prose function或PKMF依据所述第一密钥的标识获取所述第一密钥。
  37. 根据权利要求36所述的方法,其特征在于,所述第一密钥为:
    所述第一终端进行中继通信的根密钥;或者,所述第一终端以通用引导架构GBA方式建立的用于保证所述与应用服务器之间的通信安全的密钥。
  38. 根据权利要求35所述的方法,其特征在于,所述prose function或PKMF获取所述第一密钥包括:
    所述prose function或PKMF向HSS发送所述第一终端的标识和所述时间信息;
    所述prose function或PKMF接收所述HSS发送的所述第一密钥,所述第一密钥由所述HSS使用所述时间信息以及所述第一终端中的SIM卡中保存的密钥生成。
  39. 根据权利要求35-38任一项所述的方法,其特征在于,所述prose function或PKMF获取所述第一密钥,使用所述第一密钥验证所述完整性保护信息之前还包括:
    所述prose function或PKMF判断接收到所述第一消息的时间信息与所述第一消息中包含的时间信息的差值在预设的范围内。
  40. 根据权利要求35-38任一项所述的方法,其特征在于,在所述认证所述第一终端后,还包括:
    如果所述prose function或PKMF认证所述第一终端合法,所述prose function或PKMF使用所述第一密钥生成第二密钥,所述第二密钥用于所述第一终端与所述第二终端之间的通信;
    所述prose function或PKMF向所述第二终端发送第一消息的响应消息,所述第一消息的响应消息中包括所述第二密钥。
  41. 一种终端,其特征在于,所述终端为第一终端,包括:
    处理器,用于发现第二终端,所述第二终端为中继终端;
    发送器,用于向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括所述第一终端的标识;
    接收器,用于接收所述第二终端发送的直接安全模式命令消息,所述直接安全模式命令消息中包括随机数RAND,所述RAND由所述第二终端从所述第二终端归属的移动性管理实体获得;
    所述处理器还用于,依据所述RAND生成响应值RES;
    所述发送器还用于,向所述第二终端发送直接安全模式完成消息,所述直接安全模式完成消息中包括所述RES,以使得所述第二终端向所述第二终端归属的发送所述RES,由所述第二终端归属的认证所述第一终端。
  42. 根据权利要求41所述的终端,其特征在于,所述发送器还用于:
    在向所述第二终端发送直接安全模式完成消息之后,通过所述第二终端,向所述第一终端归属的移动性管理实体发送附着请求,所述附着请求中包括所述RAND,所述RAND用于指示所述第二终端归属的所述第一终端使用所述RAND对应的认证向量中的密钥作为根密钥进行通信。
  43. 根据权利要求41所述的终端,其特征在于,所述发送器还用于:
    在向所述第二终端发送直接安全模式完成消息之后,通过所述第二终端,向所述 第二终端归属的移动性管理实体发送附着请求,所述附着请求中包括所述RAND和所述RES,所述RES用于所述第二终端归属的移动性管理实体认证所述第一终端,所述RAND用于指示所述第二终端归属的移动性管理实体在所述第一终端认证通过的情况下,所述第一终端使用所述RAND对应的认证向量中的密钥作为根密钥进行通信。
  44. 根据权利要求41-43任一项所述的终端,其特征在于,所述直接安全模式命令消息中还包括:接入安全管理实体密钥AUTN;
    所述处理器还用于,依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  45. 一种终端,其特征在于,所述终端为第二终端,包括:
    接收器,用于接收第一终端发送的直接通信请求消息,所述直接通信请求消息中包括所述第一终端的标识;
    发送器,用于向所述第二终端归属的移动性管理实体发送所述第一终端的标识;
    所述接收器还用于,接收所述第二终端归属的移动性管理实体发送的随机数RAND,所述RAND由所述第二终端归属的移动性管理实体依据所述第一终端的标识获取;
    所述发送器还用于,向所述第一终端发送直接安全模式命令消息,所述直接安全模式命令消息中包括所述RAND;
    所述接收器还用于,接收所述第一终端发送的直接安全模式完成消息,所述直接安全模式完成消息中包括响应值RES,所述RES由所述第一终端依据所述RAND生成;
    所述发送器还用于,向所述第二终端归属的移动性管理实体发送所述RES,以使所述第二终端归属的移动性管理实体认证所述第一终端。
  46. 根据权利要求45所述的终端,其特征在于,所述接收器还用于:
    在向所述第一终端发送直接安全模式命令消息之前,接收所述第二终端归属的移动性管理实体发送的AUTN和第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥;
    所述直接安全模式命令消息中还包括:
    所述AUTN,以使得所述第一终端依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  47. 一种移动性管理实体,其特征在于,所述移动性管理实体为第二终端归属的移动性管理实体,包括:
    接收器,用于接收所述第二终端发送的第一终端的标识;
    处理器,用于依据所述第一终端的标识,获取所述第一终端的认证向量,所述第一终端的认证向量包括随机数RAND和期望响应值XRES;
    发送器,用于向所述第二终端发送所述RAND,以使得所述第二终端将所述RAND发送至所述第一终端;所述RAND用于所述第一终端生成响应值RES;
    所述接收器还用于,接收所述第一终端通过所述第二终端发送的所述RES;
    所述处理器还用于,比较所述RES与所述XRES,若所述RES与所述XRES相同,则 确定所述第一终端通过认证。
  48. 根据权利要求47所述的移动性管理实体,其特征在于,所述处理器还用于:
    在所述接收器接收所述第一终端通过所述第二终端发送的所述RES之前,依据所述认证向量生成第一密钥并向所述第二终端发送所述第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  49. 根据权利要求47或48所述的移动性管理实体,其特征在于,所述认证向量还包括第二密钥;
    所述处理器用于依据所述第一终端的标识,获取所述第一终端的认证向量和第一密钥包括:
    所述处理器具体用于,根据所述第一终端的标识通过所述发送器向所述第一终端的归属签约用户服务器HSS请求获取所述第一终端的认证向量;并基于所述第二密钥生成所述第一密钥。
  50. 根据权利要求47或48所述的移动性管理实体,其特征在于,所述处理器用于依据所述第一终端的标识,获取所述第一终端的认证向量和第一密钥包括:
    所述处理器具体用于,依据所述第一终端的标识确定所述第一终端归属的移动性管理实体,通过所述发送器向所述第一终端归属的移动性管理实体发送第一消息,第一消息用于请求获取与所述第一终端的近距离通信的安全信息及所述第一密钥;通过所述接收器接收所述第一终端归属的移动性管理实体发送的第二消息,所述第二消息中包括所述认证向量和所述第一密钥,所述第一密钥由所述第一终端归属的移动性管理实体生成;或所述第二消息中包括所述认证向量,所述认证向量还包括第二密钥,所述处理器依据所述第二密钥生成所述第一密钥。
  51. 根据权利要求47-49任一项所述的移动性管理实体,其特征在于,所述第一终端的认证向量还包括第二密钥;
    所述处理器还用于,在比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证之后,通过所述接收器接收所述第一终端的附着请求,所述附着请求中包括所述RAND,并依据所述RAND,确定所述第一终端通信的根密钥为所述RAND对应的认证向量中的所述第二密钥。
  52. 根据权利要求47-49任一项所述的移动性管理实体,其特征在于,所述第一终端的认证向量还包括第二密钥和期望的响应值XRES;
    所述处理器还用于,在比较所述RES与所述XRES,若所述RES与所述XRES相同,则确定所述第一终端通过认证之后,通过所述接收器接收所述第一终端的附着请求,所述附着请求中包括所述RAND和所述RES;根据所述RAND确定所述第一终端的认证向量;比较所述RES与所述第一终端的认证向量中的所述XRES是否相同,如果相同,所述第二终端归属的移动性管理实体将所述第二密钥作为所述第一终端通信的根密钥。
  53. 根据权利要求47-52任一项所述的移动性管理实体,其特征在于,所述认证向量还包括:AUTN;
    所述发送器还用于:将所述AUTN发送给所述第二终端,以使得所述第二终端将所 述AUTN发送给所述第一终端,由所述第一终端依据所述RAND和所述AUTN生成第二密钥,并基于所述第二密钥生成第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  54. 一种终端,其特征在于,所述终端为第一终端,包括:
    处理器,用于发现第二终端,所述第二终端为中继终端;
    发送器,用于向所述第二终端发送第一消息,所述第一消息用于请求获取所述第一终端的认证向量中的随机数RAND,所述第一消息中包括所述第一终端的标识;
    接收器,用于接收所述第二终端发送的第二消息,所述第二消息中包括所述第一终端的认证向量中的所述RAND;所述认证向量由所述第二终端从所述第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF获得;
    所述发送器还用于,向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括响应值RES和所述RAND,所述RES由所述第一终端根据所述RAND生成,以使得所述第二终端将所述RES和所述RAND发送至移动性管理实体,由所述移动性管理实体认证所述第一终端。
  55. 根据权利要求54所述的终端,其特征在于,所述第一消息为绑定请求消息,所述绑定请求消息中包括获取所述第一终端的认证向量中的随机数RAND的指示信息;
    所述第二消息为绑定确认消息。
  56. 根据权利要求54或55所述的终端,其特征在于,其特征在于,所述第二消息中还包括:
    所述认证向量中的AUTN;
    所述处理器还用于:
    在所述发送器向所述第二终端发送直接通信请求消息后,根据所述RAND和所述AUTN生成第二密钥,并依据所述第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  57. 一种终端,其特征在于,所述终端为第二终端,包括:
    接收器,用于接收第一终端发送的第一消息,所述第一消息用于请求获取所述第一终端的认证向量中的随机数RAND,所述第一消息中包括所述第一终端的标识;
    处理器,用于从所述第二终端归属的接近业务功能实体prose function或接近密钥管理功能实体PKMF获得所述第一终端的认证向量,所述认证向量包括随机数RAND;
    发送器,用于向所述第一终端发送第二消息,所述第二消息中包括第一终端的所述认证向量中的所述RAND;
    所述接收器还用于,接收所述第一终端发送的直接通信请求消息,所述直接通信请求消息中包括响应值RES和所述RAND,所述RES由所述第一终端根据所述RAND生成;
    所述发送器还用于,将所述RES和所述RAND发送至移动性管理实体,以使得所述移动性管理实体认证所述第一终端。
  58. 根据权利要求57所述的终端,其特征在于,所述接收器还用于:
    在所述发送器将所述RES和所述RAND发送至移动性管理实体,以使得所述移动性 管理实体认证所述第一终端之后,接收所述移动性管理实体发送的第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  59. 根据权利要求57或58所述的终端,其特征在于,所述认证向量还包括AUTN,以使得所述第一终端基于所述RAND和所述AUTN生成第二密钥,并基于第二密钥生成第三密钥,所述第三密钥为所述第一密钥的对称密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥。
  60. 一种接近业务功能实体prose function或接近密钥管理功能实体PKMF,其特征在于,所述prose function或PKMF为第二终端归属的prose function或PKMF,包括:
    接收器,用于接收所述第二终端发送的第一终端认证向量获取请求,所述认证向量获取请求中包括所述第一终端的标识;
    处理器,用于获取所述第一终端的认证向量,所述认证向量包括随机数RAND;
    发送器,用于将所述认证向量中的所述RAND发送至所述第二终端,以使得所述第二终端将所述认证向量中的所述RAND发送至所述第一终端。
  61. 根据权利要求60所述的prose function或PKMF,其特征在于,所述处理器用于获取所述第一终端的认证向量包括:
    所述处理器具体用于,依据所述认证向量获取请求,从归属签约用户服务器HSS获取所述第一终端的认证向量;或者,依据所述第一终端的标识确定所述第一终端归属的prose function;通过所述发送器向所述第一终端归属的prose function发送第一消息,所述第一消息用于请求所述第一终端的认证向量,并使得所述第一终端归属的prose function从HSS获取所述第一终端的认证向量;通过所述接收器接收所述第一终端归属的prose function发送的第二消息,所述第二消息中包括所述第一终端的认证向量。
  62. 根据权利要求60或61所述的prose function或PKMF,其特征在于,所述发送器还用于:
    在所述处理器获取所述第一终端的认证向量后,将所述第一终端的认证向量发送到所述第二终端归属的移动性管理实体;或者,将所述认证向量发送到归属签约用户服务器HSS,以使得所述HSS将所述第一终端的认证向量发送到所述第二终端归属的移动性管理实体。
  63. 根据权利要求60-62任一项所述的prose function或PKMF,其特征在于,所述认证向量还包括AUTN;
    所述发送器还用于:将所述AUTN发送至所述第二终端,以使得所述第二终端将所述AUTN发送至所述第一终端。
  64. 一种移动性管理实体,其特征在于,所述移动性管理实体为所述第二终端归属的移动性管理实体,包括:
    接收器,用于接收所述第二终端发送的认证请求消息,所述认证请求消息中包括所述第一终端的标识、所述第一终端的随机数RAND和响应值RES,所述RES由所述第 一终端依据所述RAND生成,所述第一终端的标识、所述RAND和所述RES由所述第一终端发给所述第二终端;
    处理器,用于获取所述第一终端的所述RAND对应的认证向量中的XRES,并通过比较所述RES与所述XRES,认证所述第一终端。
  65. 根据权利要求64所述的移动性管理实体,其特征在于,所述处理器用于获取所述RAND对应的认证向量中的XRES包括:
    所述处理器具体用于,从本地获取所述RAND对应的认证向量中的XRES;或者,从归属签约用户服务器HSS获取所述RAND对应的认证向量中的XRES;或者,从所述第一终端归属的移动性管理实体获取所述RAND对应的认证向量中的XRES。
  66. 根据权利要求64所述的移动性管理实体,其特征在于,所述RAND对应的认证向量还包括第二密钥;
    所述处理器还用于:
    在通过比较所述RES与所述XRES,认证所述第一终端之后,认证所述第一终端通过后,基于所获取的认证向量中的第二密钥生成第一密钥,所述第一密钥为所述第一终端和所述第二终端通信的根密钥,所述第二终端归属的移动性管理实体将所述第一密钥发送至所述第二终端。
  67. 一种终端,其特征在于,所述第一终端为第一终端,包括:
    处理器,用于发现第二终端,所述第二终端为中继终端;
    发送器,用于向所述第二终端发送直接通信请求消息,所述直接通信请求消息中包括时间信息以及完整性保护信息,所述时间信息是所述第一终端发送所述直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端使用第一密钥至少对所述时间信息进行完整性保护得到,以使得所述第二终端将所述时间信息及所述完整性保护信息发送至Prose function或PKMF,由所述prose function或PKMF根据所述时间信息及所述完整性保护信息认证所述第一终端。
  68. 根据权利要求67所述的终端,其特征在于,所述第一密钥为:
    所述第一终端用于中继通信的根密钥;
    所述直接通信请求消息中还包括:所述第一终端用于中继通信的根密钥的标识。
  69. 根据权利要求67所述的终端,其特征在于,所述第一密钥为:
    所述处理器以通用引导架构GBA方式建立的第三密钥,所述第三密钥用于保证所述第一终端和应用服务器之间的通信安全;
    所述直接通信请求消息中还包括:所述第三密钥的标识。
  70. 根据权利要求67所述的终端,其特征在于,所述第一密钥为:
    所述处理器使用所述时间信息以及所述第一终端中的SIM卡中保存的密钥生成的密钥。
  71. 根据权利要求67-70任一项所述的终端,其特征在于,所述处理器还用于:
    在所述发送器向所述第二终端发送直接通信请求消息之后,使用所述第一密钥生成第二密钥,所述第二密钥为用于所述第一终端与所述第二终端之间的通信。
  72. 一种终端,其特征在于,所述终端为第二终端,包括:
    接收器,用于接收第一终端发送的直接通信请求消息,所述直接通信请求消息中包括时间信息以及所述第一终端生成的完整性保护信息,所述时间信息是所述第一终端发送所述直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端至少对所述时间信息进行完整性保护得到;
    发送器,用于向prose function或PKMF发送第一消息,所述第一消息中包括所述第一终端的标识、所述直接通信请求消息中的所述时间信息以及所述完整性保护信息,以使得所述prose function或PKMF根据所述时间信息及所述完整性保护信息认证所述第一终端。
  73. 根据权利要求72所述的终端,其特征在于,所述发送器用于向prose function或PKMF发送第一消息包括:
    在判断接收到所述直接通信请求消息的时间信息与所述直接通信请求消息中的时间信息的差值在预设的范围内的情况下,向所述prose function或PKMF发送所述第一消息。
  74. 根据权利要求72所述的终端,其特征在于,所述接收器还用于:
    在所述发送器向prose function或PKMF发送第一消息之后,接收所述prose function或PKMF发送的第一消息的响应消息,所述第一消息的响应消息中包括第二密钥,所述第二密钥由所述Prose function或PKMF对所述第一终端认证通过后,使用所述第一密钥生成,所述第二密钥用于所述第一终端与所述第二终端之间的通信。
  75. 一种prose function或PKMF,其特征在于,包括:
    接收器,用于接收所述第二终端发送的第一消息,所述第一消息中包括第一终端的标识、时间信息和完整性保护信息,所述时间信息为所述第一终端向所述第二终端发送直接通信请求消息的时间信息,所述完整性保护信息由所述第一终端使用第一密钥至少对所述时间信息进行完整性保护得到,并通过所述直接通信请求消息发送至所述第二终端;
    处理器,用于获取所述第一密钥,并使用所述第一密钥验证所述完整性保护信息,认证所述第一终端。
  76. 根据权利要求75所述的prose function或PKMF,其特征在于,所述第一消息中还包括所述第一密钥的标识;
    所述处理器用于获取所述第一密钥包括:所述处理器具体用于,依据所述第一密钥的标识获取所述第一密钥。
  77. 根据权利要求76所述的prose function或PKMF,其特征在于,所述第一密钥为:
    所述第一终端进行中继通信的根密钥;或者,所述第一终端以通用引导架构GBA方式建立的用于保证所述与应用服务器之间的通信安全的密钥。
  78. 根据权利要求75所述的prose function或PKMF,其特征在于,所述处理器用于获取所述第一密钥包括:
    所述处理器具体用于,向HSS发送所述第一终端的标识和所述时间信息;接收所述HSS发送的所述第一密钥,所述第一密钥由所述HSS使用所述时间信息以及所述第一终端中的SIM卡中保存的密钥生成。
  79. 根据权利要求75-78任一项所述的prose function或PKMF,其特征在于,所述处理器还用于:
    在获取所述第一密钥,使用所述第一密钥验证所述完整性保护信息之前,判断接收到所述第一消息的时间信息与所述第一消息中包含的时间信息的差值在预设的范围内。
  80. 根据权利要求75-78任一项所述的prose function或PKMF,其特征在于,所述处理器还用于:
    在认证所述第一终端后,如果认证所述第一终端合法,使用所述第一密钥生成第二密钥,所述第二密钥用于所述第一终端与所述第二终端之间的通信;向所述第二终端发送第一消息的响应消息,所述第一消息的响应消息中包括所述第二密钥。
PCT/CN2017/091136 2017-06-30 2017-06-30 一种认证方法及终端、网络设备 WO2019000405A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/091136 WO2019000405A1 (zh) 2017-06-30 2017-06-30 一种认证方法及终端、网络设备
CN201780092233.0A CN110809892B (zh) 2017-06-30 2017-06-30 一种认证方法及终端、网络设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/091136 WO2019000405A1 (zh) 2017-06-30 2017-06-30 一种认证方法及终端、网络设备

Publications (1)

Publication Number Publication Date
WO2019000405A1 true WO2019000405A1 (zh) 2019-01-03

Family

ID=64740804

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/091136 WO2019000405A1 (zh) 2017-06-30 2017-06-30 一种认证方法及终端、网络设备

Country Status (2)

Country Link
CN (1) CN110809892B (zh)
WO (1) WO2019000405A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113163399A (zh) * 2020-01-07 2021-07-23 阿里巴巴集团控股有限公司 一种终端与服务器的通信方法和装置
CN113382454A (zh) * 2020-02-24 2021-09-10 华为技术有限公司 一种通信方法与装置
WO2022236543A1 (en) * 2021-05-10 2022-11-17 Zte Corporation Systems and methods for authorization of proximity based services
WO2023212904A1 (zh) * 2022-05-06 2023-11-09 Oppo广东移动通信有限公司 中继通信的方法及设备
CN113163399B (zh) * 2020-01-07 2024-06-11 阿里巴巴集团控股有限公司 一种终端与服务器的通信方法和装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024065549A1 (zh) * 2022-09-29 2024-04-04 北京小米移动软件有限公司 直连通信密钥生成方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102083064A (zh) * 2009-11-26 2011-06-01 大唐移动通信设备有限公司 用于增强密钥推衍算法灵活性的方法和系统
US20120331298A1 (en) * 2010-03-11 2012-12-27 Huawei Technologies Co., Ltd. Security authentication method, apparatus, and system
CN104754575A (zh) * 2013-12-31 2015-07-01 华为技术有限公司 一种终端认证的方法、装置及系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594555B (zh) * 2011-01-17 2015-04-29 华为技术有限公司 数据的安全保护方法、网络侧实体和通信终端
US9654981B2 (en) * 2011-07-11 2017-05-16 Blackberry Limited Data integrity for proximity-based communication
US9591430B2 (en) * 2013-09-16 2017-03-07 Blackberry Limited Temporary identifiers and expiration values for discoverable user equipments (UEs)
CN104918246A (zh) * 2014-03-12 2015-09-16 中兴通讯股份有限公司 一种鉴权认证方法和系统、ProSe功能实体以及UE
US10462660B2 (en) * 2014-05-12 2019-10-29 Nokia Technologies Oy Method, network element, user equipment and system for securing device-to-device communication in a wireless network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102083064A (zh) * 2009-11-26 2011-06-01 大唐移动通信设备有限公司 用于增强密钥推衍算法灵活性的方法和系统
US20120331298A1 (en) * 2010-03-11 2012-12-27 Huawei Technologies Co., Ltd. Security authentication method, apparatus, and system
CN104754575A (zh) * 2013-12-31 2015-07-01 华为技术有限公司 一种终端认证的方法、装置及系统

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113163399A (zh) * 2020-01-07 2021-07-23 阿里巴巴集团控股有限公司 一种终端与服务器的通信方法和装置
CN113163399B (zh) * 2020-01-07 2024-06-11 阿里巴巴集团控股有限公司 一种终端与服务器的通信方法和装置
CN113382454A (zh) * 2020-02-24 2021-09-10 华为技术有限公司 一种通信方法与装置
CN113382454B (zh) * 2020-02-24 2023-11-17 华为技术有限公司 一种通信方法与装置
WO2022236543A1 (en) * 2021-05-10 2022-11-17 Zte Corporation Systems and methods for authorization of proximity based services
WO2023212904A1 (zh) * 2022-05-06 2023-11-09 Oppo广东移动通信有限公司 中继通信的方法及设备

Also Published As

Publication number Publication date
CN110809892A (zh) 2020-02-18
CN110809892B (zh) 2021-12-14

Similar Documents

Publication Publication Date Title
US10849191B2 (en) Unified authentication for heterogeneous networks
US10003965B2 (en) Subscriber profile transfer method, subscriber profile transfer system, and user equipment
US7773973B2 (en) Method for authentication between a mobile station and a network
KR102033465B1 (ko) 통신 디바이스와 네트워크 디바이스 사이의 통신에서의 보안 설비
US11496320B2 (en) Registration method and apparatus based on service-based architecture
US9467432B2 (en) Method and device for generating local interface key
US10959092B2 (en) Method and system for pairing wireless mobile device with IoT device
JP6632713B2 (ja) 直接通信キーの確立のための方法および装置
CN108259164B (zh) 一种物联网设备的身份认证方法及设备
WO2019019736A1 (zh) 安全实现方法、相关装置以及系统
US10588015B2 (en) Terminal authenticating method, apparatus, and system
WO2019000405A1 (zh) 一种认证方法及终端、网络设备
JP2019522945A (ja) 秘密識別子を使用するユーザ機器に関連した動作
BR112021003460A2 (pt) dispositivo sem identidade de assinante, dispositivo de identidade do assinante, método para uso em um dispositivo sem identidade de assinante, método para uso em um dispositivo com identidade de assinante e produto de programa de computador
BR112021003448A2 (pt) dispositivo sem identidade de assinante, dispositivo de identidade do assinante, método para uso em um dispositivo sem identidade de assinante, método para uso em um dispositivo com identidade de assinante e produto de programa de computador transferível por download
US11177951B2 (en) Method for provisioning a first communication device by using a second communication device
KR101683286B1 (ko) 이동통신망을 이용한 싱크 인증 시스템 및 방법
KR101431214B1 (ko) 머신 타입 통신에서의 네트워크와의 상호 인증 방법 및 시스템, 키 분배 방법 및 시스템, 및 uicc와 디바이스 쌍 인증 방법 및 시스템
CN106304061B (zh) 一种故障弱化状态下的用户鉴权方法
US20220256349A1 (en) Provision of Application Level Identity
CN112788598A (zh) 一种保护认证流程中参数的方法及装置
EP4203392A1 (en) Authentication support for an electronic device to connect to a telecommunications network
TWI656771B (zh) Bluetooth communication method, device and device thereof
CN101160985A (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: 17915724

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: 17915724

Country of ref document: EP

Kind code of ref document: A1