WO2015139622A1 - 密钥协商方法、用户设备和近距离通信控制网元 - Google Patents

密钥协商方法、用户设备和近距离通信控制网元 Download PDF

Info

Publication number
WO2015139622A1
WO2015139622A1 PCT/CN2015/074416 CN2015074416W WO2015139622A1 WO 2015139622 A1 WO2015139622 A1 WO 2015139622A1 CN 2015074416 W CN2015074416 W CN 2015074416W WO 2015139622 A1 WO2015139622 A1 WO 2015139622A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
network element
control network
short
range communication
Prior art date
Application number
PCT/CN2015/074416
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 华为技术有限公司
Publication of WO2015139622A1 publication Critical patent/WO2015139622A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/043Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
    • H04W12/0431Key distribution or pre-distribution; Key agreement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless
    • H04L2209/805Lightweight hardware, e.g. radio-frequency identification [RFID] or sensor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a key negotiation method, a user equipment, and a short-range communication control network element.
  • the Proximity Service (ProSe) technology is mainly used to establish a secure communication channel between two close-range end-to-end data transmission user equipments (UEs), so that data can be exchanged securely.
  • UEs data transmission user equipments
  • FIG. 1 including a UE, an Evolved Packet Core (EPC), a ProSe Function, and an evolved universal land-based radio access network. (E-UTRAN).
  • EPC Evolved Packet Core
  • E-UTRAN evolved universal land-based radio access network.
  • the UE and the short-range communication control network element communicate with each other through the PC3 interface. Through the PC3 interface, the short-range communication control network element can transmit configuration information and signaling to the UE.
  • security protection is secure symmetric key negotiation between the UE and the short-range communication control network element.
  • GBA General Bootstrapping Architecture
  • PSK TLS Pre-Shared Key based Transport Layer Security
  • the GBA technology needs to support the support of the Bootstrapping Server Function (BSF)
  • BSF Bootstrapping Server Function
  • a new network element BSF needs to be introduced to complete the authentication; and the near-field communication control network element is required to establish a Interface to communicate with the BSF. Therefore, it has a certain influence on the architecture of ProSe.
  • the embodiment of the present invention provides a key negotiation method, a user equipment, and a short-range communication control network element, and implements key agreement between the UE and the short-range communication control network element without changing the architecture of the existing ProSe. .
  • an embodiment of the present invention provides a key negotiation method, including:
  • the short-range communication control network element receives the registration request information sent by the user equipment
  • the negotiation key is a key used for interaction between the user equipment and the proximity control network element.
  • the security context request information includes a first key negotiation parameter generated by the short-range communication control network element or acquired by the registration request information, where the response is based on the security context.
  • the information determines that the negotiation key is specifically:
  • the short-range communication control network element obtains, by the security context response information, a negotiation key generated by the control network element according to the first key negotiation parameter and the stored shared key; the shared key is Control the key shared between the network element and the user equipment; or
  • the short-range communication control network element obtains, by the security context response information, a basic key generated by the control network element according to the first key negotiation parameter and the stored shared key;
  • the short-range communication control network element performs key derivation function calculation according to the basic key and the stored second key negotiation parameter to obtain a negotiation key.
  • the security context response information includes a first key negotiation parameter generated by the control network element and/or a shared key stored by the control network element, where The security context response information determines that the negotiation key is specifically:
  • the short-range communication control network element generates the negotiation key according to the first key negotiation parameter and the shared key carried in the security context response information; wherein the shared key is a control network element and a user a key shared between devices; or
  • the short-range communication control network element generates the negotiation key according to the first key negotiation parameter carried in the registration request information and the shared key.
  • the security context response information includes a first key negotiation parameter generated by the control network element and/or a basic key generated by the control network element, according to the security
  • the context response information determines that the negotiation key is specifically:
  • the short-range communication control network element performs key derivation function calculation according to the basic key and the stored second key negotiation parameter to obtain a negotiation key.
  • the registration response information includes obtaining the security context response information The first key negotiation parameter or the first key negotiation parameter generated by the short-range communication control network element.
  • an embodiment of the present invention provides a key negotiation method, including:
  • the user equipment sends registration request information to the short-range communication control network element;
  • the negotiation key is a key used for interaction between the user equipment and the proximity control network element.
  • the method before the user equipment sends the registration request information to the short-range communication control network element, the method further includes:
  • the user equipment generates a first key negotiation parameter, so that the user equipment carries the first key negotiation parameter in the registration request information sent to the short-range communication control network element.
  • the generating the negotiation key according to the registration response information is specifically:
  • the shared key is a key shared between the control network element and the user equipment.
  • the registration response information includes a first key negotiation parameter
  • the generating the negotiation key according to the registration response information is specifically:
  • the shared key is a key shared between the control network element and the user equipment;
  • a negotiation key is generated according to the basic key and the stored second key negotiation parameter.
  • an embodiment of the present invention provides a key negotiation method, including:
  • the control network element receives the security context request information sent by the short-range communication control network element
  • the method before the sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • the security context response information carries a first key negotiation parameter.
  • the method before the sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • the method before the sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • the security context response information includes a shared key stored by the control network element; wherein the shared key is shared between the control network element and the user equipment. Key.
  • the method before the sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • an embodiment of the present invention provides a key negotiation method, including:
  • the short-range communication control network element receives the registration request information sent by the user equipment
  • the control network element Receiving, by the control network element, authentication data response information sent according to the authentication data request information, where the authentication data response information includes: a random number RAND, an AUTN parameter, a desired user response XRES, an encryption key CK, and integrity. Key IK;
  • the authentication request information includes RAND and AUTN obtained by the authentication data response information
  • the authentication response information includes a user response RES generated by the user equipment according to the authentication request information;
  • the registration request information includes a security algorithm list of the user equipment, and before the sending the registration response information to the user equipment, the method further includes:
  • the short-range communication control network element performs algorithm selection according to the security algorithm list of the user equipment and the security algorithm list of the short-range communication control network element stored by the short-range communication control network element, and obtains the selected security algorithm.
  • the registration response information includes the selected security algorithm.
  • the registration request information includes a security algorithm list of the user equipment, where the short-range communication control network element stores a security algorithm list of the short-range communication control network element, and receives the security algorithm list.
  • the method further includes:
  • the short-range communication control network element performs algorithm selection according to the security algorithm list of the short-range communication control network element and the security algorithm list of the user equipment, and obtains the selected security algorithm.
  • the registration response information includes a first key negotiation parameter
  • the user equipment is Before sending the registration response information
  • the method further includes:
  • the short-range communication control network element generates a first key negotiation parameter.
  • the method further includes:
  • the short-range communication control network element performs a key derivation function calculation according to the first key negotiation parameter and the CK and IK to obtain a negotiation key.
  • the method further includes:
  • the short-range communication control network element performs a key derivation function calculation according to the CK, IK, and a second key negotiation parameter stored in the short-range communication control network element to obtain a negotiation key.
  • an embodiment of the present invention provides a key negotiation method, including:
  • the user equipment sends registration request information to the short-range communication control network element;
  • the authentication request information includes RAND and AUTN obtained by the short-range communication control network element by the control network element;
  • the CK, IK, and RES are calculated according to the authentication request information
  • the short-range communication control network element performs authentication on the user equipment according to the authentication response information;
  • the authentication response information includes the RES;
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes a list and a security algorithm list of the short-range communication control network element according to the user equipment.
  • the selected security algorithm is selected by performing algorithm selection on a list of security algorithms of the short-range communication network element stored in the near-field communication control network element.
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes a security algorithm list of the short-range communication control network element, and the method further includes:
  • the registration response information includes a first secret generated by the short-range communication control network element Key negotiation parameters
  • the method further includes:
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameter and the CK and IK to obtain a negotiation key.
  • the method further includes:
  • the user equipment performs a key derivation function calculation according to the CK, IK, and a second key negotiation parameter stored in the user equipment, to obtain a negotiation key.
  • an embodiment of the present invention provides a short-range communication control network element, including:
  • a receiving unit configured to receive registration request information sent by the user equipment
  • a sending unit configured to send security context request information to the control network element
  • the receiving unit is further configured to: receive security context response information that is sent by the control network element according to the security context request information;
  • a processing unit configured to determine a negotiation key according to the security context response information
  • the sending unit is further configured to send the registration response information to the user equipment, where the user equipment generates a negotiation key according to the registration response information; the negotiation key is used for the user equipment and the proximity control network. The key to the interaction between the meta.
  • the security context request information includes a first key negotiation parameter that is generated by the processing unit or acquired by the registration request information, and the processing unit is specifically configured to:
  • the parameter performs a key derivation function calculation to obtain a negotiation key.
  • the security context response information includes a first key negotiation parameter generated by the control network element and/or a shared key stored by the control network element, where the processing unit is specifically used. to:
  • the shared secret Generating the negotiation key; wherein the shared key is a key shared between the control network element and the user equipment; or
  • the security context response information includes a first key negotiation parameter generated by the control network element and/or a basic key generated by the control network element, where the processing unit is specifically used. to:
  • the registration response information includes the a first key negotiation parameter or the first key negotiation parameter generated by the processing unit.
  • the embodiment of the present invention provides a user equipment, including:
  • a sending unit configured to send registration request information to the short-range communication control network element
  • a receiving unit configured to receive registration response information sent by the short-range communication control network element
  • a processing unit configured to generate a negotiation key according to the registration response information; the negotiation key is a key used for interaction between the user equipment and the proximity control network element.
  • the processing unit is further configured to generate a first key negotiation parameter, so that the user equipment carries the first key agreement in the registration request information sent to the short-range communication control network element. parameter.
  • the processing unit is specifically configured to: according to the first key negotiation parameter and the user equipment
  • the stored shared key generates a negotiation key; the shared key is a key shared between the control network element and the user equipment.
  • the registration response information includes a first key negotiation parameter
  • the processing unit is specifically configured to:
  • the shared key is a key shared between the control network element and the user equipment;
  • an embodiment of the present invention provides a control network element, including:
  • a receiving unit configured to receive security context request information sent by the short-range communication control network element
  • a sending unit configured to send security context response information to the short-range communication control network element according to the security context request information.
  • control network element further includes:
  • the processing unit is configured to generate a first key negotiation parameter, and generate security context response information according to the security context request information; the security context response information carries the first key negotiation parameter.
  • control network element further includes:
  • a processing unit configured to generate a basic key according to the stored shared key and a first key negotiation parameter generated by the processing unit or acquired by the security context request information, where the shared key is a control network element a key shared with the user equipment; generating security context response information according to the security context request information, where the security context response information includes a basic key.
  • control network element further includes:
  • a processing unit configured to generate security context response information according to the security context request information, where the security context response information includes a shared key stored by the control network element, where the shared key is a control network element and a user The key shared between devices.
  • control network element further includes:
  • a processing unit configured to generate a negotiation key according to the stored shared key and the first key negotiation parameter generated by the processing unit, where the shared key is a secret shared between the control network element and the user equipment Key;
  • a key negotiation parameter For the shared key according to the storage and the first obtained by the security context request information A key negotiation parameter generates a negotiation key; and the response information is generated according to the security context request information, where the security context response information includes a negotiation key.
  • a ninth aspect, the embodiment of the present invention provides a short-range communication control network element, including:
  • a receiving unit configured to receive registration request information sent by the user equipment
  • a sending unit configured to send, according to the registration request information, authentication data request information to a control network element
  • the receiving unit is further configured to receive authentication data response information that is sent by the control network element according to the authentication data request information, where the authentication data response information includes: a random number RAND, an AUTN parameter, and a desired user response XRES , encryption key CK, integrity key IK;
  • a storage unit configured to store the CK, IK, and XRES;
  • the sending unit is further configured to: send the authentication request information to the user equipment; the authentication request information includes RAND and AUTN obtained by the authentication data response information;
  • the receiving unit is further configured to: receive the authentication response information sent by the user equipment; the authentication response information includes a user response RES generated by the user equipment according to the authentication request information;
  • An authentication unit configured to authenticate the user equipment according to the authentication response information
  • the sending unit is further configured to send registration response information to the user equipment, where the user and the device complete the short-range communication control network element according to the received registration response information and the CK, IK, and the Key negotiation between user devices.
  • the registration request information includes a security algorithm list of the user equipment, where the short-range communication control network element further includes:
  • the processing unit is configured to perform algorithm selection according to the security algorithm list of the user equipment and the security algorithm list of the short-range communication control network element stored by the short-range communication control network element, to obtain the selected security algorithm.
  • the registration response information includes the selected security algorithm.
  • the registration request information includes the user equipment The full algorithm list
  • the short-range communication control network element stores a security algorithm list of the short-range communication control network element
  • the short-range communication control network element further includes:
  • a processing unit configured to perform algorithm selection according to the security algorithm list of the short-range communication control network element and the security algorithm list of the user equipment, to obtain a selected security algorithm.
  • the registration response information includes a first key negotiation parameter
  • the short-range communication control The network element also includes:
  • a generating unit configured to generate a first key negotiation parameter.
  • the processing unit is further configured to:
  • the processing unit is further configured to:
  • the tenth aspect of the present invention provides a user equipment, including:
  • a sending unit configured to send registration request information to the short-range communication control network element
  • a receiving unit configured to receive the authentication request information sent by the short-range communication control network element;
  • the authentication request information includes RAND and AUTN obtained by the short-range communication control network element by the control network element;
  • a verification unit for verifying the correctness of the AUTN by using RAND
  • a processing unit configured to: when the AUTN is verified to be correct, calculate CK, IK, and RES according to the authentication request information;
  • the sending unit is further configured to: send the authentication response information to the short-range communication control network element, where the short-range communication control network element authenticates the user equipment according to the authentication response information;
  • the RES is included in the authentication response information;
  • the receiving unit is further configured to receive the registration response information sent by the short-range communication control network element, to complete the short-range communication control network element and the user according to the registration response information and the CK, IK Key negotiation between devices.
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes a list and a security algorithm list of the short-range communication control network element according to the user equipment.
  • the list of security algorithms of the short-range communication network elements stored in the near-field communication control network element is performed, and the selected security algorithm is selected by algorithm selection.
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes a security algorithm list of a short-range communication control network element;
  • the processing unit is further configured to: perform a algorithm selection according to the security algorithm list of the short-range communication control network element and the security algorithm list of the user equipment, and obtain the selected security algorithm.
  • the registration response information includes a first secret generated by the short-range communication control network element Key negotiation parameters
  • the processing unit is further configured to:
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameter and the CK and IK to obtain a negotiation key.
  • the processing unit is further configured to:
  • the user equipment performs a key derivation function calculation according to the CK, IK, and a second key negotiation parameter stored in the user equipment, to obtain a negotiation key.
  • an embodiment of the present invention provides a key negotiation method, including:
  • the short-range communication control network element receives the registration request information sent by the user equipment
  • the authentication data response information includes: a derivation encryption key CK', a derivation integrity key IK'; Or, the basic key K1;
  • the registration request information includes a security algorithm list of the user equipment, and before the sending the registration response information to the user equipment, the method further includes:
  • the short-range communication control network element performs algorithm selection according to the security algorithm list of the user equipment and the security algorithm list of the short-range communication control network element stored by the short-range communication control network element, and obtains the selected security algorithm.
  • the registration response information includes the selected security algorithm.
  • the registration request information includes a security algorithm list of the user equipment, where the short-range communication control network element stores a security algorithm list of the short-range communication control network element, and receives the security algorithm list.
  • the method further includes:
  • the short-range communication control network element performs algorithm selection according to the security algorithm list of the short-range communication control network element and the security algorithm list of the user equipment, and obtains the selected security algorithm.
  • the method further includes:
  • the short-range communication control network element performs a key derivation function calculation according to the key negotiation parameter and the CK', IK' to obtain a negotiation key, or
  • the short-range communication control network element performs a key derivation function calculation according to the key negotiation parameter and the K1 Calculate, get the negotiation key.
  • the registration response information further includes the key negotiation parameter.
  • the embodiment of the present invention further provides a key negotiation method, including:
  • the user equipment sends registration request information to the short-range communication control network element;
  • the authentication request information includes an authentication token AUTN parameter;
  • the AUTN includes an authentication management domain AMF;
  • the HSS calculates CK', IK' or K1, and the X value ranges from any of 0 to 7.
  • the registration request information includes a security algorithm list of the user equipment
  • the registration response information includes And selecting, by the short-range communication control network element, the selected security algorithm according to the security algorithm list of the user equipment and the security algorithm list of the short-range communication network element stored in the short-range communication control network element.
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes The short-range communication control network element security algorithm list, the method further includes:
  • Performing a security algorithm list of the network element according to the short-range communication control and security calculation of the user equipment The method list is selected by the algorithm, and the selected security algorithm is obtained.
  • the registration response information includes a first key negotiation parameter
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameter and the CK', IK' to obtain a negotiation key, or
  • the key derivation function is calculated according to the first key negotiation parameter and the K1 to obtain a negotiation key.
  • the method further includes:
  • the user equipment performs a key derivation function calculation according to the stored second key negotiation parameter and the CK', IK' to obtain a negotiation key, or
  • the embodiment of the present invention further provides a key negotiation method, including:
  • the user equipment sends registration request information to the short-range communication control network element;
  • the derivation encryption key CK', the derivation integrity key IK', or the base key K1 is calculated based on the CK, IK, and ID parameters.
  • the authentication request information includes an AUTN parameter; and the AUTN includes an authentication management domain AMF parameter;
  • the user equipment calculates CK', IK' or K1,
  • the X value ranges from any of 0 to 7.
  • the registration request information includes a security algorithm list of the user equipment
  • the registration response information includes And selecting, by the short-range communication control network element, the selected security algorithm according to the security algorithm list of the user equipment and the security algorithm list of the short-range communication network element stored in the short-range communication control network element.
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes The short-range communication control network element security algorithm list, the method further includes:
  • the registration response information includes a first key negotiation parameter
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameter and the CK', IK' to obtain a negotiation key, or
  • the method further includes:
  • the user equipment performs a key derivation function calculation according to the stored second key negotiation parameter and the CK', IK' to obtain a negotiation key, or
  • the embodiment of the present invention further provides a key negotiation method, including:
  • the HSS receives the authentication data request information sent by the short-range communication control network element; the authentication data request information includes an ID parameter, or the ID parameter is stored in the HSS;
  • the authentication vector includes: encryption Key CK, integrity key IK;
  • the authentication data response information including the CK', IK', or the K1.
  • the authentication vector includes an AUTN parameter, where the AUTN includes an authentication management domain AMF parameter, and the HSS sets an Xth bit position of the AMF parameter, where the X value range It is any value from 0 to 7.
  • the embodiment of the present invention further provides a short-range communication control network element, including:
  • a receiving unit configured to receive registration request information sent by the user equipment
  • a sending unit configured to send, according to the registration request information, authentication data request information to the HSS;
  • the receiving unit is further configured to receive the authentication data response information that is sent by the HSS according to the authentication data request information, where the authentication data response information includes: a derivation encryption key CK', a derivation integrity key IK'; or, the basic key K1;
  • the sending unit is further configured to: send the authentication request information to the user equipment;
  • the receiving unit is further configured to: receive the authentication response information sent by the user equipment, where the authentication response information includes the user equipment according to the a user response RES generated by the authentication request information;
  • An authentication unit configured to authenticate the user equipment according to the authentication response information
  • the sending unit is further configured to send the registration response information to the user equipment, where the user equipment completes the basis between the short-range communication control network element and the user equipment according to the received registration response information.
  • the registration request information includes a security algorithm list of the user equipment, where the short-range communication control network element further includes:
  • a processing unit configured to perform algorithm selection according to a security algorithm list of the user equipment and a security algorithm list of the short-range communication control network element stored by the short-range communication control network element, and obtain the selected Security algorithm.
  • the registration response information includes the selected security algorithm.
  • the registration request information includes a security algorithm list of the user equipment, where the short-range communication control network element stores a security algorithm list of a short-range communication control network element, where the The distance communication control network element further includes:
  • a processing unit configured to perform algorithm selection according to the security algorithm list of the short-range communication control network element and the security algorithm list of the user equipment, to obtain a selected security algorithm.
  • the processing unit is further configured to perform key derivation according to the key negotiation parameter and the CK′, IK′ Function calculation, get the negotiation key, or,
  • the key derivation function is calculated according to the key negotiation parameter and the K1 to obtain a negotiation key.
  • the registration response information further includes a key negotiation parameter.
  • the embodiment of the present invention further provides a user equipment, including:
  • a sending unit configured to send registration request information to the short-range communication control network element
  • a receiving unit configured to receive the authentication request information sent by the short-range communication control network element; the processing unit, configured to calculate, according to the authentication request information, an encryption key CK and an integrity key IK; and according to the CK, IK and ID parameter calculation derivation encryption key CK', derivation integrity key IK', or basic key K1;
  • the sending unit is further configured to send the authentication response information to the short-range communication control network element;
  • the receiving unit is further configured to receive registration response information sent by the short-range communication control network element.
  • the authentication request information includes an authentication token AUTN parameter;
  • the AUTN includes an authentication management domain AMF;
  • the user equipment further includes a verification unit, configured to determine whether the Xth bit of the AMF is set, When set, the HSS calculates CK', IK' or K1, which takes a value ranging from any of 0 to 7.
  • the registration request information includes a security algorithm list of the user equipment
  • the registration response information includes And selecting, by the short-range communication control network element, the selected security algorithm according to the security algorithm list of the user equipment and the security algorithm list of the short-range communication network element stored in the short-range communication control network element.
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes The short-range communication controls a list of security algorithms of the network element, and the processing unit is further configured to:
  • the registration response information includes a first key negotiation parameter
  • the processing unit is further configured to:
  • the key derivation function is calculated according to the first key negotiation parameter and the K1 to obtain a negotiation key.
  • the processing unit is further configured to:
  • the embodiment of the present invention further provides a user equipment, including:
  • a sending unit configured to send registration request information to the short-range communication control network element
  • a receiving unit configured to receive authentication request information sent by the short-range communication control network element
  • a processing unit configured to calculate an encryption key CK and an integrity key IK according to the authentication request information
  • the sending unit is further configured to send the authentication response information to the short-range communication control network element;
  • the receiving unit is further configured to receive registration response information sent by the short-range communication control network element;
  • the processing unit is further configured to calculate a derivation encryption key CK', a derivation integrity key IK', or a basic key K1 according to the CK, IK, and ID parameters.
  • the authentication request information includes an authentication token AUTN parameter;
  • the AUTN includes an authentication management domain AMF;
  • the user equipment further includes a verification unit, configured to determine whether the Xth bit of the AMF is set, and when set, the HSS calculates CK', IK' or K1, and the X ranges from 0 to 7. Any value in .
  • the registration request information includes a security algorithm list of the user equipment
  • the registration response information includes And selecting, by the short-range communication control network element, the selected security algorithm according to the security algorithm list of the user equipment and the security algorithm list of the short-range communication network element stored in the short-range communication control network element.
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes The short-range communication controls a list of security algorithms of the network element, and the processing unit is further configured to:
  • the registration response information includes a first key negotiation parameter; the processing unit is further configured to:
  • the processing unit is further configured to:
  • an embodiment of the present invention provides a home subscriber server HSS, including:
  • a receiving unit configured to receive authentication data request information sent by the short-range communication control network element;
  • the authentication data request information includes an ID parameter, or the ID parameter is stored in the HSS;
  • a processing unit configured to calculate an authentication vector according to the authentication data request information; the authentication vector includes: an encryption key CK, an integrity key IK;
  • the processing unit is further configured to calculate a derivation encryption key CK', a derivation integrity key IK', or a basic key K1 according to the CK, IK, and ID parameters;
  • a sending unit configured to send the authentication data response information to the short-range communication control network element; the authentication data response information includes the CK', IK', or the K1.
  • the authentication vector includes an AUTN parameter, where the AUTN includes an authentication management domain AMF parameter, and the processing unit is further configured to: use the Xth bit of the AMF parameter. Position bit, the X value ranges from any of 0 to 7.
  • the key negotiation method, user equipment, and short-range communication control provided by the embodiments of the present invention are applied.
  • the network element provides a complete solution for key negotiation between the UE and the short-range communication control network element.
  • the UE and the short-range communication control network element are implemented. Key negotiation.
  • FIG. 1 is a structural diagram of a ProSe system provided by the present invention.
  • FIG. 2 is a flowchart of a key negotiation method according to Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of a key negotiation method according to Embodiment 2 of the present invention.
  • FIG. 5 is a signaling diagram of a first key negotiation method according to Embodiment 4 of the present invention.
  • FIG. 6 is a signaling diagram of a second key negotiation method according to Embodiment 5 of the present invention.
  • FIG. 7 is a signaling diagram of a third key negotiation method according to Embodiment 6 of the present invention.
  • FIG. 8 is a signaling diagram of a fourth key agreement method according to Embodiment 7 of the present invention.
  • FIG. 9 is a signaling diagram of a fifth key agreement method according to Embodiment 8 of the present invention.
  • FIG. 10 is a signaling diagram of a sixth key agreement method according to Embodiment 9 of the present invention.
  • FIG. 11 is a signaling diagram of a seventh key agreement method according to Embodiment 10 of the present invention.
  • FIG. 12 is a signaling diagram of an eighth key negotiation method according to Embodiment 11 of the present invention.
  • FIG. 13 is a signaling diagram of a ninth key agreement method according to Embodiment 12 of the present invention.
  • FIG. 14 is a flowchart of a key negotiation method according to Embodiment 13 of the present invention.
  • FIG. 16 is a signaling diagram of a tenth key agreement method according to Embodiment 15 of the present invention.
  • FIG. 17 is a signaling diagram of an eleventh key agreement method according to Embodiment 16 of the present invention.
  • Embodiment 19 is a signaling diagram of a thirteenth type of key agreement method according to Embodiment 18 of the present invention.
  • FIG. 21 is a signaling diagram of a fifteenth key agreement method according to Embodiment 20 of the present invention.
  • FIG. 23 is a signaling diagram of a seventeenth key agreement method according to Embodiment 22 of the present invention.
  • FIG. 26 is a flowchart of a key negotiation method according to Embodiment 25 of the present invention.
  • FIG. 27 is a flowchart of a key negotiation method according to Embodiment 26 of the present invention.
  • FIG. 30 is a signaling diagram of a twenty-first key agreement method according to Embodiment 29 of the present invention.
  • Figure 31 is a signaling diagram of a twenty-second key agreement method according to Embodiment 30 of the present invention.
  • FIG. 34 is a schematic structural diagram of a short-range communication control network element according to Embodiment 33 of the present invention.
  • FIG. 35 is a schematic structural diagram of a user equipment according to Embodiment 34 of the present invention.
  • FIG. 36 is a schematic structural diagram of a control network element according to Embodiment 35 of the present invention.
  • FIG. 37 is a schematic structural diagram of a short-range communication control network element according to a thirty-sixth embodiment of the present invention.
  • FIG. 38 is a schematic structural diagram of a user equipment according to Embodiment 37 of the present invention.
  • Embodiment 39 is a schematic structural diagram of a short-range communication control network element according to Embodiment 38 of the present invention.
  • FIG. 40 is a schematic structural diagram of a user equipment according to Embodiment 39 of the present invention.
  • FIG. 41 is a schematic structural diagram of a control network element according to Embodiment 40 of the present invention.
  • the key negotiation method of the embodiment of the present invention is applied to the ProSe system shown in FIG. 1 , as shown in FIG. 1 , including a UE, an Evolved Packet Core (EPC), and a short-range communication control network element.
  • ProSe Function ProSe Function
  • E-UTRAN evolved universal land-based radio access network
  • the UE and the short-range communication control network element communicate with each other through the PC3 interface. Through the PC3 interface, the short-range communication control network element can transmit configuration information and signaling to the UE.
  • FIG. 2 is a flowchart of a key negotiation method according to the first embodiment of the present invention.
  • the implementation entity is a ProSe system.
  • Medium-area communication control network element (ProSe Function).
  • the embodiment specifically includes the following steps:
  • Step 201 The short-range communication control network element receives registration request information sent by a user equipment (UE).
  • UE user equipment
  • the registration request information may include an identifier (UE ID) of the UE, such as an IMSI, and may further include other identification information or key negotiation parameters and the like.
  • UE ID identifier
  • IMSI IMSI
  • Step 202 Send security context request information to the control network element.
  • the security context request information includes an identifier of the UE, and is used to request the security parameter related to the UE from the control network element.
  • Step 203 Receive security context response information that is sent by the control network element according to the security context request information.
  • the security context response information is used to send the UE-related security parameters to the short-range communication control network element.
  • Step 204 Determine a negotiation key according to the security context response information.
  • the security context response information is Determining the negotiation key can be specifically as follows:
  • the short-range communication control network element obtains, by the security context response information, a negotiation key generated by the control network element according to the first key negotiation parameter and the stored shared key; the shared key is Controls the key shared between the NE and the user device.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • the security context request information includes a first key negotiation parameter generated by the short-range communication control network element or acquired by the registration request information
  • the response according to the security context can be specifically as follows:
  • the short-range communication control network element obtains, by the security context response information, a basic key generated by the control network element according to the first key negotiation parameter and the stored shared key;
  • the short-range communication control network element performs key derivation function calculation according to the basic key and the stored second key negotiation parameter to obtain a negotiation key.
  • the security context response information includes the first key negotiation parameter generated by the control network element and/or the shared key stored by the control network element
  • the security context is The response information determines that the negotiation key can be specifically:
  • the short-range communication control network element generates the negotiation key according to the first key negotiation parameter and the shared key carried in the security context response information; wherein the shared key is a control network element and a user The key shared between devices.
  • the security context response information includes the first key negotiation parameter generated by the control network element and/or the shared key stored by the control network element
  • the security according to the security
  • the context response information determines that the negotiation key can be specifically:
  • the short-range communication control network element generates the negotiation key according to the first key negotiation parameter carried in the registration request information and the shared key.
  • the security context response information includes the first key negotiation parameter generated by the control network element and/or the basic key generated by the control network element
  • the security according to the security
  • the context response information determines that the negotiation key is specifically:
  • the short-range communication control network element performs key derivation function calculation according to the basic key and the stored second key negotiation parameter to obtain a negotiation key.
  • Step 205 Send registration response information to the user equipment, where the user equipment generates a negotiation key according to the registration response information; the negotiation key is used for interaction between the user equipment and the short-distance control network element. Key.
  • the registration response information includes the first key negotiation parameter obtained from the security context response information, or the first key negotiation parameter generated by the short-range communication control network element.
  • the short-range communication control network element may further perform integrity protection on the registration response information by using the negotiation key.
  • the verification code can be used to verify the verification code.
  • a complete solution is provided for key negotiation between the UE and the short-range communication control network element, and the UE and the UE are implemented without changing the architecture of the existing ProSe.
  • the proximity communication controls key negotiation between network elements.
  • FIG. 3 is a flowchart of a key negotiation method according to the second embodiment of the present invention.
  • the body is a UE in the ProSe system.
  • the embodiment specifically includes the following steps:
  • Step 301 The user equipment sends registration request information to the short-range communication control network element.
  • the registration request information may include an identifier (UE ID) of the UE, such as an IMSI, and may further include other identification information or key negotiation parameters and the like.
  • UE ID identifier
  • IMSI IMSI
  • Step 302 The user equipment receives registration response information sent by the short-range communication control network element.
  • the first key negotiation parameter may be included in the registration response information.
  • Step 303 Generate a negotiation key according to the registration response information, where the negotiation key is a key used for interaction between the user equipment and the proximity control network element.
  • the user equipment before the user equipment sends the registration request information to the short-range communication control network element, the user equipment generates a first key negotiation parameter, so that the user equipment sends the information to the near-field communication control network element.
  • the registration request information carries the first key negotiation parameter.
  • the generating the negotiation key according to the registration response information is: the user equipment generates a negotiation key according to the first key negotiation parameter and the shared key stored in the user equipment; the shared key is a control network element and a user equipment. The key shared between.
  • the user equipment when the registration response information includes the first key agreement parameter, the user equipment generates a negotiation key according to the first key negotiation parameter and the stored shared key.
  • the user equipment when the registration response information includes the first key agreement parameter, the user equipment generates a basic key according to the first key negotiation parameter and the stored shared key; And generating a negotiation key with the second key negotiation parameter stored by the user equipment.
  • a complete solution is provided for key negotiation between the UE and the short-range communication control network element, and the UE and the UE are implemented without changing the architecture of the existing ProSe.
  • the proximity communication controls key negotiation between network elements.
  • the key negotiation method provided in the third embodiment of the present invention is described in detail below with reference to FIG. 4, which is shown in FIG. A flowchart of a key negotiation method is provided in Embodiment 3 of the present invention.
  • the implementation entity is a control network element, and the control network element is in an EPC of the ProSe system.
  • the embodiment specifically includes the following steps:
  • Step 401 The control network element receives the security context request information sent by the short-range communication control network element.
  • Step 402 Send security context response information to the short-range communication control network element according to the security context request information.
  • the method before sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • security context response information includes a first key negotiation parameter.
  • the method before sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • the method before sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • the security context response information includes a shared key stored by the control network element; wherein the shared key is shared between the control network element and the user equipment. Key.
  • the method before sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • the method before sending the security context response information to the short-range communication control network element according to the security context request information, the method further includes:
  • a complete solution is provided for key negotiation between the UE and the short-range communication control network element, and the UE and the UE are implemented without changing the architecture of the existing ProSe.
  • the proximity communication controls key negotiation between network elements.
  • the process of the key agreement method is described by the short-range communication control network element, the user equipment, and the control network element, respectively.
  • the UE and the control in the ProSe system are combined.
  • the network element and the short-range communication control network element respectively describe the specific implementation process of the key negotiation method in detail.
  • the control network element has previously performed with the UE through the authentication and key agreement (AKA) of the fourth generation mobile communication network.
  • AKA authentication and key agreement
  • the shared key (SharedKey) between the control network element and the UE is stored in the control network element and the UE.
  • FIG. 5 is a signaling diagram of a first key negotiation method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 501 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include an identity (UE ID) of the UE, such as an IMSI.
  • UE ID an identity of the UE, such as an IMSI.
  • Step 502 the short-range communication control network element generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 503 The short-range communication control network element sends security context request information to the control network element.
  • the security context request information includes the UE ID and p1.
  • Step 504 the control network element generates a negotiation key Kp according to the security context request information
  • the control network element has been authenticated by the AKA in advance, and the shared network element between the control network element and the UE is stored in the control network element.
  • the control network element obtains p1 from the security context request information, and performs key derivation function calculation according to p1 and SharedKey. Specifically as follows:
  • KDF() is a key derivation function; in addition, it is not limited to KDF functions, and other safe functions can also be used for Kp derivation, such as secure NMAC functions.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • Step 505 The control network element sends security context response information to the short-range communication control network element.
  • the security context response information includes a negotiation key Kp.
  • Step 506 The short-range communication control network element sends registration response information to the UE.
  • the registration response information includes a first key negotiation parameter p1.
  • Step 507 the short-range communication control network element obtains the negotiation key Kp from the security context response information
  • step 507 may be performed before step 506 or may be performed in parallel with step 506.
  • Step 508 The UE generates a negotiation key Kp according to the received registration response information.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE obtains p1 from the registration response information, performs key derivation function calculation according to p1 and SharedKey, and obtains the negotiation key Kp.
  • the specific calculation formula is the same as Equation 1.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • the registration response information sent by the short-range communication control network element to the UE may further include a check code.
  • the check code is a check code generated according to Kp and registration response information.
  • the verification code can be verified using Kp and the received registration response information.
  • FIG. 6 is a signaling diagram of a second key negotiation method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 601 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include a UE ID, and may be, for example, an IMSI.
  • Step 602 the short-range communication control network element generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 603 The short-range communication control network element sends security context request information to the control network element.
  • the UE ID is included in the security context request information.
  • Step 604 The control network element sends security context response information to the short-range communication control network element according to the security context request information.
  • the control network element Before performing the key negotiation method in this embodiment, the control network element has been previously associated with the UE.
  • the authentication is performed by the AKA, and the shared key between the control network element and the UE is stored in the control network element.
  • the control network element carries the SharedKey in the security context response information and sends the message to the near-field communication control network element.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • Step 605 the proximity control network element generates a negotiation key Kp according to the security context response information
  • the short-distance control network element obtains the SharedKey from the security context request information, and performs key derivation function calculation according to the p1 and the SharedKey generated in step 602. Specifically, it is as in Formula 1.
  • Step 606 The short-range communication control network element sends registration response information to the UE.
  • the registration response information includes a first key negotiation parameter p1.
  • step 606 may be performed before step 605, or may be performed in parallel with step 605.
  • Step 607 The UE generates a negotiation key Kp according to the received registration response information.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE obtains p1 from the registration response information, performs key derivation function calculation according to p1 and SharedKey, and obtains the negotiation key Kp.
  • the specific calculation formula is the same as Equation 1.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • the registration response information sent by the short-range communication control network element to the UE may further include a check code.
  • the check code is a check code generated according to Kp and registration response information. After the negotiation key Kp is generated in step 607, the verification code can be verified using Kp and the received registration response information.
  • FIG. 7 is a signaling diagram of a third method for key agreement according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 701 the UE generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 702 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include a UE ID and a P1, where the UE ID may be an IMSI.
  • Step 703 The short-range communication control network element sends security context request information to the control network element.
  • the security context request information includes the UE ID and p1.
  • Step 704 the control network element generates a negotiation key Kp according to the security context request information.
  • the control network element has been authenticated by the AKA in advance, and the shared network element between the control network element and the UE is stored in the control network element.
  • the control network element obtains p1 from the security context request information, and performs key derivation function calculation according to p1 and SharedKey. Specifically, the foregoing formula 1 is not described herein.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • Step 705 The control network element sends security context response information to the short-range communication control network element.
  • the security context response information includes a negotiation key Kp.
  • Step 706 The short-range communication control network element sends registration response information to the UE.
  • Step 707 the short-range communication control network element obtains the negotiation key Kp from the security context response information
  • step 707 may be performed before step 706, or may be performed in parallel with step 706.
  • Step 708 The UE generates a negotiation key Kp according to the received registration response information.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE performs key derivation function calculation according to p1 and SharedKey generated in step 701, thereby obtaining a negotiation key Kp.
  • the specific calculation formula is the same as Equation 1.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may further protect the registration response information by using Kp for confidentiality and/or integrity.
  • the short-range communication control network element performs the confidentiality and/or integrity processing on the registration response information sent to the UE by using the Kp, and then in step 708, the UE uses the Kp after generating the negotiation key Kp. Perform the corresponding decryption and/or verification operations.
  • FIG. 8 is a signaling diagram of a fourth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 801 the UE generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 802 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include a UE ID and a P1, where the UE ID may be an IMSI.
  • Step 803 The short-range communication control network element sends security context request information to the control network element.
  • the UE ID is included in the security context request information.
  • Step 804 The control network element sends security context response information to the short-range communication control network element according to the security context request information.
  • the control network element has been authenticated by the AKA in advance, and the shared network element between the control network element and the UE is stored in the control network element.
  • the control network element carries the SharedKey in the security context response information and sends the message to the near-field communication control network element.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • Step 805 the proximity control network element generates a negotiation key Kp according to the security context response information
  • the short-distance control network element obtains the SharedKey from the security context request information, and performs a key derivation function calculation according to the shared key and the p1 obtained in the registration request information. Specifically, it is as in Formula 1.
  • Step 806 The short-range communication control network element sends registration response information to the UE.
  • step 806 may be performed before step 805, or may be performed in parallel with step 805.
  • Step 807 The UE generates a negotiation key Kp according to the received registration response information.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE obtains p1 from the registration response information, performs key derivation function calculation according to p1 and SharedKey, and obtains the negotiation key Kp.
  • the specific calculation formula is the same as Equation 1.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may further protect the registration response information by using Kp for confidentiality and/or integrity.
  • the short-range communication control network element performs the confidentiality and/or integrity processing on the registration response information sent to the UE by using the Kp.
  • the UE uses the Kp after generating the negotiation key Kp. Perform the corresponding decryption and/or verification operations.
  • FIG. 9 is a signaling diagram of a fifth key negotiation method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 901 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include a UE ID, and may be, for example, an IMSI.
  • Step 902 The short-range communication control network element sends security context request information to the control network element.
  • the UE ID is included in the security context request information.
  • Step 903 the control network element generates a first key agreement parameter p1 according to the security context request information
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 904 the control network element generates a negotiation key Kp
  • the control network element has been authenticated by the AKA in advance, and the shared network element between the control network element and the UE is stored in the control network element.
  • the control network element performs a key derivation function calculation according to the p1 and the SharedKey generated in the previous step. Specifically, the foregoing formula 1 is not described herein.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • Step 905 The control network element sends security context response information to the short-range communication control network element.
  • the security context response information includes negotiation keys Kp and p1.
  • Step 906 The short-range communication control network element sends registration response information to the UE.
  • the registration response information includes a first key negotiation parameter p1.
  • Step 907 the short-range communication control network element obtains the negotiation key Kp from the security context response information
  • step 907 can be performed before step 906, or can be performed in parallel with step 906.
  • Step 908 The UE generates a negotiation key Kp according to the received registration response information.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE obtains p1 from the registration response information, performs key derivation function calculation according to p1 and SharedKey, and obtains the negotiation key Kp.
  • the specific calculation formula is the same as Equation 1.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • the registration response information sent by the short-range communication control network element to the UE may further include a check code.
  • the check code is a check code generated according to Kp and registration response information. After the negotiation key Kp is generated in step 908, the check code can be verified using Kp and the received registration response information.
  • FIG. 10 is a signaling diagram of a sixth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 1001 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include a UE ID, and may be, for example, an IMSI.
  • Step 1002 The short-range communication control network element sends security context request information to the control network element.
  • the UE ID is included in the security context request information.
  • Step 1003 The control network element generates a first key negotiation parameter p1 according to the security context request information.
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 1004 The control network element sends security context response information to the short-range communication control network element.
  • the security context response information includes shared keys SharedKey and p1.
  • the control network element Before performing the key negotiation method of the embodiment, the control network element has been authenticated by the AKA in advance with the UE, and the shared network element between the control network element and the UE is stored in the control network element.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey It can be specifically Kasme, NAS Key, or NH.
  • the Sharedkey can be specifically CK, IK, Kasme or K.
  • Step 1005 the proximity control network element generates a negotiation key Kp according to the security context response information
  • the short-distance control network element obtains the SharedKey and the p1 from the security context request information, and performs the key derivation function calculation according to the SharedKey and the p1. Specifically, it is as in Formula 1.
  • Step 1006 The short-range communication control network element sends registration response information to the UE.
  • the registration response information includes a first key negotiation parameter p1.
  • step 1006 may be performed before step 1005, or may be performed in parallel with step 1005.
  • Step 1007 The UE generates a negotiation key Kp according to the received registration response information.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE obtains p1 from the registration response information, performs key derivation function calculation according to p1 and SharedKey, and obtains the negotiation key Kp.
  • the specific calculation formula is the same as Equation 1.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • the registration response information sent by the short-range communication control network element to the UE may further include a check code.
  • the check code is a check code generated according to Kp and registration response information. After the negotiation key Kp is generated in step 1007, the verification code can be verified using Kp and the received registration response information.
  • the key negotiation methods provided in the above fourth embodiment to the ninth embodiment are all obtained by one key derivation to obtain the negotiation key Kp.
  • the following tenth to twelfth embodiments provide the negotiation key Kp after the second derivation. Key negotiation method.
  • FIG. 11 is a signaling diagram of a seventh key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 1101 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include an identity (UE ID) of the UE, such as an IMSI.
  • UE ID an identity of the UE, such as an IMSI.
  • Step 1102 the short-range communication control network element generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 1103 The short-range communication control network element sends security context request information to the control network element.
  • the security context request information includes the UE ID and p1.
  • Step 1104 the control network element generates a basic key K1 according to the security context request information
  • the control network element has been authenticated by the AKA in advance, and the shared network element between the control network element and the UE is stored in the control network element.
  • the control network element obtains p1 from the security context request information, and performs the first key derivation function calculation according to p1 and SharedKey. Specifically as follows:
  • KDF() is a key derivation function; in addition, it is not limited to KDF functions, and other safe functions can also be used for Kp derivation, such as secure NMAC functions.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • Step 1105 The control network element sends security context response information to the short-range communication control network element.
  • the basic context K1 is included in the security context response information.
  • Step 1106 the proximity control network element generates a negotiation key Kp according to the security context response information
  • the short-distance control network element obtains K1 from the security context request information, and performs key derivation function calculation according to the second key derivation functions p2 and K1 stored in the close-range control network element. Specifically as follows:
  • KDF() is a key derivation function; in addition, not limited to KDF functions, other secure functions can also be used for Kp derivation, such as a secure NMAC function; the second key derivation function p2 can be a UE ID. , one or more of the Near Field Communication Control Network Element ID, Algorithm ID, and ProSe App ID.
  • Step 1107 The short-range communication control network element sends registration response information to the UE.
  • the registration response information includes a first key negotiation parameter p1.
  • step 1107 may be performed before step 1106, or may be performed in parallel with step 1106.
  • Step 1108 The UE generates a basic key K1 according to the received registration response information.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE obtains p1 from the registration response information, performs the first key derivation function calculation according to p1 and the SharedKey, and obtains the basic key K1, and the specific calculation formula is the same as the above formula 2.
  • Step 1109 The UE generates a negotiation key Kp according to the basic key K1.
  • the second key derivation function p2 is also stored in the UE, and the second key derivation function calculation is performed by using p2 and K1, thereby obtaining the negotiation key Kp.
  • the specific calculation formula is the same as Equation 3.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • the registration response information sent by the short-range communication control network element to the UE may further include a check code.
  • the check code is a check code generated according to Kp and registration response information. After the negotiation key Kp is generated in step 1109, the check code can be verified using Kp and the received registration response information.
  • FIG. 12 is a signaling diagram of an eighth key negotiation method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 1201 the UE generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 1202 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include a UE ID and a P1, where the UE ID may be an IMSI.
  • Step 1203 The short-range communication control network element sends security context request information to the control network element.
  • the security context request information includes the UE ID and p1 obtained by the short-range communication control network element from the registration request information.
  • Step 1204 the control network element generates a basic key K1 according to the security context request information
  • the control network element has been authenticated by the AKA in advance, and the shared network element between the control network element and the UE is stored in the control network element.
  • the control network element obtains p1 from the security context request information, and performs the first key derivation function calculation according to p1 and SharedKey. Specifically, it is as in the above formula 2.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • Step 1205 The control network element sends security context response information to the short-range communication control network element.
  • the basic context K1 is included in the security context response information.
  • Step 1206 the proximity control network element generates a negotiation key Kp according to the security context response information
  • the short-distance control network element obtains K1 from the security context request information, and performs key derivation function calculation according to the second key derivation functions p2 and K1 stored in the close-range control network element. Specifically, it is as in the above formula 3.
  • the second key derivation function p2 may be one or any of a UE ID, a short-range communication control network element ID, an algorithm ID, and a ProSe App ID.
  • Step 1207 The short-range communication control network element sends registration response information to the UE.
  • the registration response information includes a first key negotiation parameter p1.
  • step 1207 may be performed before step 1206, or may be performed in parallel with step 1206.
  • step 1208 the UE generates a basic key K1.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE performs the first key derivation function calculation according to the p1 and the SharedKey generated in the step 1201 to obtain the basic key K1, and the specific calculation formula is the same as the foregoing formula 2.
  • Step 1209 the UE generates a negotiation key Kp according to the basic key K1.
  • the second key derivation function p2 is also stored in the UE, and the second key derivation function calculation is performed by using p2 and K1, thereby obtaining the negotiation key Kp.
  • the specific calculation formula is the same as the above formula 3.
  • steps 1208 and 1209 may be performed before or after any of the steps after step 1201, or in parallel with any of the steps.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may further protect the registration response information by using Kp for confidentiality and/or integrity. If the proximity communication control network element performs confidentiality and/or integrity protection on the registration response information sent to the UE in step 1207, after generating the negotiation key Kp in step 1209, the UE may use Kp to perform corresponding Decryption and/or verification operations.
  • FIG. 13 is a signaling diagram of a ninth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 1301 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include a UE ID, and may be, for example, an IMSI.
  • Step 1302 The short-range communication control network element sends security context request information to the control network element.
  • the UE ID is included in the security context request information.
  • Step 1303 the control network element generates a first key agreement parameter p1 according to the security context request information
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE.
  • the first key negotiation parameter p1 may specifically include a counter value, a time, a serial number, a random number, or Any one or more of the fresh parameters may also include other forms of parameters.
  • Step 1304 the control network element generates a basic key K1 according to the security context request information
  • the control network element has been authenticated by the AKA in advance, and the shared network element between the control network element and the UE is stored in the control network element.
  • the control network element performs the first key derivation function calculation according to the generated p1 and SharedKey. Specifically, it is as in the above formula 2.
  • the control network element may be specifically a Mobility Management Entity (MME) or a Home Subscriber Server (HSS).
  • MME Mobility Management Entity
  • HSS Home Subscriber Server
  • the SharedKey can be specifically Kasme, NAS Key, or NH.
  • the control network element is the HSS, the Sharedkey can be specifically CK, IK, Kasme, or K.
  • Step 1305 The control network element sends security context response information to the short-range communication control network element.
  • the security context response information includes a basic key K1 and a first key negotiation parameter p1.
  • Step 1306 the proximity control network element generates a negotiation key Kp according to the security context response information
  • the short-distance control network element obtains K1 from the security context request information, and performs key derivation function calculation according to the second key derivation functions p2 and K1 stored in the close-range control network element. Specifically, it is as in the above formula 3.
  • the second key derivation function p2 may be one or any of a UE ID, a short-range communication control network element ID, an algorithm ID, and a ProSe App ID.
  • Step 1307 The short-range communication control network element sends registration response information to the UE.
  • the registration response information includes a first key negotiation parameter p1.
  • step 1307 may be performed before step 1306 or may be performed in parallel with step 1306.
  • Step 1308 The UE generates a basic key K1 according to the received registration response information.
  • the SharedKey between the control network element and the UE is pre-stored in the UE.
  • the UE obtains the p1 from the registration response information, and performs the first key derivation function calculation according to the p1 and the SharedKey to obtain the basic key K1.
  • the specific calculation formula is the same as the foregoing formula 2.
  • Step 1309 the UE generates a negotiation key Kp according to the basic key K1.
  • the second key derivation function p2 is also stored in the UE, and the second key derivation function calculation is performed by using p2 and K1, thereby obtaining the negotiation key Kp.
  • the specific calculation formula is the same as the above formula 3.
  • the UE and the short-range communication control network element share the negotiation key Kp.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • the registration response information sent by the short-range communication control network element to the UE may further include a check code.
  • the check code is a check code generated according to Kp and registration response information. After the negotiation key Kp is generated in step 1309, the check code can be verified using Kp and the received registration response information.
  • FIG. 14 is a flowchart of a key negotiation method according to the thirteenth embodiment of the present invention.
  • Prox Function Control Network Element ProSe Function
  • the embodiment specifically includes the following steps:
  • Step 1401 The short-range communication control network element receives the registration request information sent by the user equipment.
  • the registration request information may include an identity (UE ID) of the UE, such as an IMSI.
  • UE ID an identity of the UE, such as an IMSI.
  • Step 1402 Send authentication data request information to the control network element according to the registration request information.
  • control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: ProSe UE ID, close proximity
  • the message controls one or more of the network element ID, the ProSe App ID, the PLMN ID, the ProSe App Code, the EPC ProSe Subscriber ID, the Application Layer User ID, and the Application ID.
  • Step 1403 Receive authentication data response information sent by the control network element according to the authentication data request information, where the authentication data response information includes: a random number RAND, an AUTN parameter, a desired user response XRES, and an encryption key CK. Integrity key IK;
  • Step 1404 storing the CK, IK, and XRES;
  • Step 1405 sending authentication request information to the user equipment;
  • the authentication request information includes RAND and AUTN obtained by the authentication data response information;
  • Step 1406 Receive authentication response information sent by the user equipment; the authentication response information includes a user response RES generated by the user equipment according to the authentication request information;
  • Step 1407 Perform authentication on the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 1408 Send registration response information to the user equipment, where the user and the device complete the connection between the short-range communication control network element and the user equipment according to the received registration response information and the CK, IK. Key negotiation.
  • the registration request information includes a security algorithm list of the user equipment, and before the sending the registration response information to the user equipment in step 1408, the method further includes:
  • the short-range communication control network element performs algorithm selection according to a security algorithm list of the user equipment and a security algorithm list of the short-range communication control network element stored by the short-range communication control network element, Select the security algorithm.
  • the registration response information includes the selected security algorithm.
  • the registration request information includes a security algorithm list of the user equipment, where the short-range communication control network element stores a security algorithm list of the short-range communication control network element, and the user equipment is received in step 1401.
  • the method further includes:
  • the short-range communication control network element performs algorithm selection according to the security algorithm list of the short-range communication control network element and the security algorithm list of the user equipment, and obtains the selected security algorithm.
  • the registration response information includes a first key negotiation parameter
  • the method further includes: before sending the registration response information to the user equipment, the method further includes:
  • the short-range communication control network element generates a first key negotiation parameter
  • the short-range communication control network element performs a key derivation function calculation according to the first key negotiation parameter and the CK and IK to obtain a negotiation key.
  • the short-range communication control network element performs a key derivation function calculation according to the CK, IK, and a second key negotiation parameter stored in the short-range communication control network element, to obtain a negotiation key.
  • a complete solution is provided for key negotiation between the UE and the short-range communication control network element, and the UE and the UE are implemented without changing the architecture of the existing ProSe.
  • the proximity communication controls key negotiation between network elements.
  • FIG. 15 is a flowchart of a key negotiation method according to Embodiment 14 of the present invention.
  • the embodiment specifically includes the following steps:
  • Step 1501 The user equipment sends registration request information to the short-range communication control network element.
  • the registration request information may include an identity (UE ID) of the UE, such as an IMSI.
  • UE ID an identity of the UE, such as an IMSI.
  • Step 1502 Receive authentication request information sent by the short-range communication control network element, where the authentication request information includes RAND and the short-range communication control network element acquired by the control network element.
  • the authentication request information includes RAND and the short-range communication control network element acquired by the control network element.
  • AUTN AUTN
  • Step 1503 verifying the correctness of the AUTN by using RAND
  • the UE verifies the correctness of the AUT according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 1504 when verifying that the AUTN is correct, calculating CK, IK, and RES according to the authentication request information;
  • Step 1505 Send the authentication response information to the short-range communication control network element, where the short-range communication control network element performs authentication on the user equipment according to the authentication response information; the authentication response information includes the RES;
  • Step 1506 Receive registration response information sent by the short-range communication control network element, to complete the confidentiality between the near-field communication control network element and the user equipment according to the registration response information and the CK, IK Key negotiation.
  • the registration request information includes a security algorithm list of the user equipment, where the registration response information includes a list of security algorithms of the short-range communication control network element according to the user equipment, and the short-range communication control network.
  • the security algorithm list of the short-range communication network element stored in the element is selected by the algorithm to obtain the selected security algorithm.
  • the registration request information includes a security algorithm list of the user equipment
  • the registration response information includes a security algorithm list of the short-range communication control network element
  • the method further includes:
  • Performing a security algorithm list of the network element according to the short-range communication control and security calculation of the user equipment The method list is selected by the algorithm, and the selected security algorithm is obtained.
  • the registration response information includes a first key negotiation parameter generated by the short-range communication control network element, and the method further includes:
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameter and the CK and IK to obtain a negotiation key.
  • the method further includes:
  • the user equipment performs a key derivation function calculation according to the CK, IK, and a second key negotiation parameter stored in the user equipment, to obtain a negotiation key.
  • a complete solution is provided for key negotiation between the UE and the short-range communication control network element, and the UE and the UE are implemented without changing the architecture of the existing ProSe.
  • the proximity communication controls key negotiation between network elements.
  • the process of the key agreement method is described by the short-range communication control network element and the user equipment as the execution subject respectively, and in the following fifteenth to twenty-third embodiments, combined with the ProSe system
  • the UE, the control network element, and the short-range communication control network element respectively describe the specific implementation process of the key negotiation method in detail.
  • FIG. 16 is a signaling diagram of a tenth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 1601 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include an identity (UE ID) of the UE, such as an IMSI.
  • UE ID an identity of the UE, such as an IMSI.
  • Step 1602 The short-range communication control network element sends the authentication data request information to the control network element, where the authentication data request information includes the UE ID.
  • the control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: ProSe UE ID, close range One or more of the communication control network element ID, ProSe App ID, PLMN ID, ProSe App Code, EPC ProSe SubscriberID, Application Layer User ID, Application ID.
  • ID parameter ProSe UE ID
  • close range One or more of the communication control network element ID, ProSe App ID, PLMN ID, ProSe App Code, EPC ProSe SubscriberID, Application Layer User ID, Application ID.
  • Step 1603 The short-range communication control network element receives the authentication data response information AV returned by the control network element according to the authentication data request information, and specifically includes RAND, AUTN, XRES, CK, and IK, or the AV includes RAND, AUTN, XRES, and K1.
  • K1 KDF (Kasme, ID parameter) according to the Kasme and ID parameters, where Kasme is one of the LTE AV parameters; at this time, the authentication data response information AV specifically includes RAND, AUTN, XRES, K1.
  • step 1604 the short-range communication network element stores the received XRES, CK, and IK, or XRES, K1.
  • Step 1605 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 1606 The UE verifies the correctness of the AUTN according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 1607 after the verification is passed, the user equipment calculates CK, IK, and RES according to RAND and AUTN, or the user equipment calculates K1 and RES according to RAND and AUTN;
  • CK' and IK' are respectively taken as Above CK, IK; or
  • Step 1608 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • Step 1609 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 1610 The short-range communication control network element sends registration response information to the user equipment, where the user equipment completes the close-range communication control network element and the user equipment according to the received registration response information and CK, IK or K1. Key negotiation.
  • FIG. 17 is a signaling diagram of an eleventh key negotiation method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 1701 The UE sends registration request information to the short-range communication control network element.
  • the registration request information may include an identity (UE ID) of the UE, such as an IMSI.
  • UE ID an identity of the UE, such as an IMSI.
  • Step 1702 The short-range communication control network element sends the authentication data request information to the control network element, where the authentication data request information includes the UE ID.
  • the control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • an ID parameter a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • the short-range communication control network element receives the authentication data response information AV returned by the control network element according to the authentication data request information, which specifically includes RAND, AUTN, XRES, CK and IK, or AV includes RAND, AUTN, XRES, K1;
  • K1 KDF (Kasme, ID parameter) according to the Kasme and ID parameters, where Kasme is one of the LTE AV parameters; at this time, the authentication data response information AV specifically includes RAND, AUTN, XRES, K1.
  • Step 1704 the short-range communication network element stores the received XRES, CK, and IK, or XRES, K1.
  • Step 1705 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 1706 The UE verifies the correctness of the AUTN according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 1707 after the verification is passed, the user equipment calculates CK, IK, and RES according to RAND and AUTN, or the user equipment calculates K1 and RES according to RAND and AUTN;
  • Step 1708 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • Step 1709 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 1710 the short-range communication control network element generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE; the first key negotiation parameter p1 may be specifically a fresh parameter.
  • Step 1711 The short-range communication control network element sends registration response information to the user equipment, where the user equipment completes key agreement between the short-range communication control network element and the user equipment according to the received registration response information.
  • the registration response information includes a first key negotiation parameter p1 generated by the short-range communication control network element.
  • Step 1712 the short-range communication control network element generates a negotiation key Kp
  • the short-range communication control network element performs key derivation function calculation according to the first key negotiation parameters p1 and IK, CK. Specifically as follows:
  • KDF() is a key derivation function; in addition, not limited to KDF functions, other secure functions can also be used for Kp derivation, such as a secure NMAC function; or
  • Step 1713 the user equipment generates a negotiation key Kp according to the received registration response information
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameters p1 and IK, CK or K1 obtained by the registration response information. Specifically, the calculation method in the above step 1712.
  • FIG. 18 is a signaling diagram of a twelfth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Steps 1801 to 1810 are the same as the steps of step 1601 to step 1610 in the foregoing fifteenth embodiment, and are not described herein again.
  • the method further includes:
  • Step 1811 The short-range communication control network element performs a key derivation function calculation according to the stored second key derivation functions p2 and CK, IK. Specifically as follows:
  • Kp KDF(CK
  • KDF() is a key derivation function; in addition, not limited to KDF functions, other secure functions can also be used for Kp derivation, such as a secure NMAC function; the second key derivation function p2 is specifically a user equipment. ID information shared with the near field communication control network element.
  • Step 1812 the user equipment generates a negotiation key Kp according to the received registration response information
  • the user equipment After receiving the registration response information, the user equipment performs a key derivation function calculation according to the stored second key derivation functions p2 and CK, IK. Specifically, it is as in the above formula 6.
  • FIG. 19 is a signaling diagram of a thirteenth key negotiation method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 1901 The UE sends registration request information to the short-range communication control network element.
  • the registration request information includes an identifier (UE ID) of the UE, such as an IMSI, and includes a list of security algorithms of the UE.
  • the UE's security algorithm list includes all security algorithms supported by the UE.
  • Step 1902 The short-range communication control network element sends the authentication data request information to the control network element, where the authentication data request information includes the UE ID.
  • the control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • an ID parameter a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 1903 The short-range communication control network element receives the authentication data response information AV returned by the control network element according to the authentication data request information, which specifically includes RAND, AUTN, XRES, CK, and IK; or the AV includes RAND, AUTN, XRES, K1.
  • the authentication data request information which specifically includes RAND, AUTN, XRES, CK, and IK; or the AV includes RAND, AUTN, XRES, K1.
  • K1 KDF (Kasme, ID parameter) according to the Kasme and ID parameters, where Kasme is one of the LTE AV parameters; at this time, the authentication data response information AV specifically includes RAND, AUTN, XRES, K1.
  • the short-range communication network element stores the received XRES, CK, and IK; or XRES, K1.
  • Step 1905 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 1906 The UE verifies the correctness of the AUTN according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 1907 after the verification is passed, the user equipment calculates CK, IK, and RES according to RAND and AUTN, or the user equipment calculates K1 and RES according to RAND and AUTN;
  • Step 1908 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • Step 1909 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 1910 The short-range communication control network element performs algorithm selection according to the stored security algorithm list of the short-range communication network element and the security algorithm list of the UE acquired in the foregoing step 1901.
  • the algorithm may be configured to: according to the priority order in the security algorithm list of the short-range communication network element, sequentially match the security algorithm in the security algorithm list of the short-range communication control network element with the algorithm in the security algorithm list of the UE, A matching security algorithm is the selected algorithm.
  • Step 1911 The short-range communication control network element sends registration response information to the user equipment, where the registration response information includes the selected security algorithm determined by the short-range communication control network element.
  • step 1910 can be performed before or after any step between step 1901 to step 1911, or in parallel with any of steps 1902 to 1909.
  • the short-range communication control network element can also use IK to perform integrity on the registration response information. protection.
  • FIG. 20 is a signaling diagram of a fourteenth key negotiation method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 2001 the UE sends registration request information to the short-range communication control network element.
  • the registration request information includes an identifier (UE ID) of the UE, such as an IMSI, and includes a list of security algorithms of the UE.
  • the UE's security algorithm list includes all security algorithms supported by the UE.
  • Step 2002 The short-range communication control network element sends the authentication data request information to the control network element, where the authentication data request information includes the UE ID.
  • the control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • an ID parameter a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 2003 The short-range communication control network element receives the authentication data response information AV returned by the control network element according to the authentication data request information, which specifically includes RAND, AUTN, XRES, CK, and IK; or the AV includes RAND, AUTN, XRES, K1.
  • the authentication data request information which specifically includes RAND, AUTN, XRES, CK, and IK; or the AV includes RAND, AUTN, XRES, K1.
  • the HSS generates K1 according to the Kasme and ID parameters, where Kasme is one of the LTE AV parameters; at this time, the authentication data response information AV specifically includes RAND, AUTN, XRES, K1.
  • step 2004 the short-range communication network element stores the received XRES, CK, and IK.
  • Step 2005 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 2006 The UE verifies the correctness of the AUTN according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 2008 the user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • Step 2009 the short-range communication control network element authenticates the user equipment according to the authentication response information
  • the short-range communication control network element authenticates the user equipment.
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE; the first key negotiation parameter p1 may be specifically a fresh parameter.
  • the short-range communication control network element performs key derivation function calculation according to the first key negotiation parameters p1 and IK, CK. Specifically as follows:
  • KDF() is a key derivation function; in addition, not limited to KDF functions, other secure functions can also be used for Kp derivation, such as a secure NMAC function; or
  • step 2012 the short-range communication control network element performs algorithm selection according to the security algorithm list of the stored short-range communication network element and the security algorithm list of the UE acquired in the foregoing step 2001.
  • the algorithm may be configured to: according to the priority order in the security algorithm list of the short-range communication network element, sequentially match the security algorithm in the security algorithm list of the short-range communication control network element with the algorithm in the security algorithm list of the UE, A matching security algorithm is the selected algorithm.
  • the step 2012 may be performed before or after any step between step 2001 and step 2011, or in parallel with any step of step 2002 to step 2011.
  • the short-range communication control network element sends the registration response information to the user equipment, where the registration response information includes the selected security algorithm determined by the short-range communication control network element, and the first key negotiation parameter p1.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • Step 2014 the user equipment generates a negotiation key Kp according to the received registration response information
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameters p1 and IK, CK or K1 obtained by the registration response information.
  • the calculation method in the above step 2011 is as follows.
  • FIG. 21 is a signaling diagram of a fifteenth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 2101 The UE sends registration request information to the short-range communication control network element.
  • the registration request information includes an identifier (UE ID) of the UE, such as an IMSI, and includes a list of security algorithms of the UE.
  • the UE's security algorithm list includes all security algorithms supported by the UE.
  • Step 2102 The short-range communication control network element sends the authentication data request information to the control network element, where the authentication data request information includes the UE ID.
  • the control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • an ID parameter a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 2103 the short-range communication control network element receives the authentication data response information AV returned by the control network element according to the authentication data request information, which specifically includes RAND, AUTN, XRES, CK, and IK;
  • the short-range communication network element stores the received XRES, CK, and IK.
  • Step 2105 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 2106 The UE verifies the correctness of the AUTN according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 2107 after the verification is passed, the user equipment calculates CK, IK, and RES according to RAND and AUTN;
  • Step 2108 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • Step 2109 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 2110 the short-range communication control network element generates a negotiation key Kp
  • the short-range communication control network element performs key derivation function calculation according to the stored second key negotiation parameters p2 and IK, CK. Specifically as follows:
  • Kp KDF(CK
  • KDF() is a key derivation function; in addition, it is not limited to KDF functions, and other safe functions can also be used for Kp derivation, such as secure NMAC functions.
  • the second key derivation function p2 is ID information shared between the UE and the short-range communication control network element.
  • Step 2111 The short-range communication control network element performs algorithm selection according to the security algorithm list of the stored short-range communication network element and the security algorithm list of the UE acquired in the foregoing step 2101.
  • the algorithm may be configured to: according to the priority order in the security algorithm list of the short-range communication network element, sequentially match the security algorithm in the security algorithm list of the short-range communication control network element with the algorithm in the security algorithm list of the UE, A matching security algorithm is the selected algorithm.
  • the step 2111 may be performed before or after any step between the steps 2101 and 2110, or in parallel with any of the steps 2101 to 2110.
  • Step 2112 The short-range communication control network element sends registration response information to the user equipment, where the registration response information includes the selected security algorithm determined by the short-range communication control network element.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • Step 2113 the user equipment generates a negotiation key Kp according to the received registration response information
  • the user equipment performs key derivation function calculation according to the stored second key negotiation parameters p2 and IK, CK. Specifically, it is as in the above formula 6.
  • FIG. 22 is a signaling diagram of a sixteenth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 2201 The UE sends registration request information to the short-range communication control network element.
  • the registration request information includes an identifier (UE ID) of the UE, such as an IMSI, and includes a list of security algorithms of the UE.
  • the UE's security algorithm list includes all security algorithms supported by the UE.
  • Step 2202 The short-range communication control network element sends the authentication data request information to the control network element, where the authentication data request information includes the UE ID.
  • the control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • an ID parameter a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 2203 the short-range communication control network element receives the authentication data response information AV returned by the control network element according to the authentication data request information, which specifically includes RAND, AUTN, XRES, CK and IK;
  • the short-range communication network element stores the received XRES, CK, and IK.
  • Step 2205 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 2206 The UE verifies the correctness of the AUTN according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 2207 after the verification is passed, the user equipment calculates CK, IK, and RES according to RAND and AUTN;
  • Step 2208 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • Step 2209 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 2210 The short-range communication control network element sends registration response information to the user equipment, where the registration response information includes a security algorithm list of the short-range communication control network element.
  • Step 2211 The user equipment performs algorithm selection according to the stored security algorithm list of the UE and the security algorithm list of the short-range communication control network element acquired in the foregoing step 2210.
  • the algorithm selection may be based on the priority in the security algorithm list of the short-range communication network element.
  • the security algorithm in the security algorithm list of the short-range communication control network element is matched with the algorithm in the security algorithm list of the UE, and the first matching security algorithm is the selected algorithm.
  • Step 2212 The short-range communication control network element performs algorithm selection according to the security algorithm list of the stored short-range communication network element and the security algorithm list of the UE acquired in the foregoing step 2201.
  • the encryption algorithm in the security algorithm list of the short-range communication control network element is matched with the encryption algorithm in the security algorithm list of the UE, the first one.
  • the matching security algorithm is the selected encryption algorithm. The same method is used for the selection of the integrity algorithm.
  • FIG. 23 is a signaling diagram of a seventeenth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 2301 The UE sends registration request information to the short-range communication control network element.
  • the registration request information includes an identifier (UE ID) of the UE, such as an IMSI, and includes a list of security algorithms of the UE.
  • the UE's security algorithm list includes all security algorithms supported by the UE.
  • Step 2302 The short-range communication control network element sends the authentication data request information to the control network element, where the authentication data request information includes the UE ID.
  • the control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • an ID parameter a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 2303 the short-range communication control network element receives the authentication data response information AV returned by the control network element according to the authentication data request information, which specifically includes RAND, AUTN, XRES, CK and IK;
  • the short-range communication network element stores the received XRES, CK, and IK.
  • Step 2305 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 2306 the UE verifies the correctness of the AUTN according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 2307 after the verification is passed, the user equipment calculates CK, IK, and RES according to RAND and AUTN;
  • Step 2308 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • Step 2309 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 2310 the short-range communication control network element generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the short-range communication control network element and the UE
  • the parameter of the row key negotiation; the first key negotiation parameter p1 may be specifically a Fresh Parameter.
  • Step 2311 the short-range communication control network element generates a negotiation key Kp
  • the short-range communication control network element performs key derivation function calculation according to the first key negotiation parameters p1 and IK, CK. Specifically as follows:
  • KDF() is a key derivation function; in addition, it is not limited to KDF functions, and other safe functions can also be used for Kp derivation, such as secure NMAC functions.
  • Step 2312 The short-range communication control network element performs algorithm selection according to the security algorithm list of the stored short-range communication network element and the security algorithm list of the UE acquired in the foregoing step 2301.
  • the algorithm may be configured to: according to the priority order in the security algorithm list of the short-range communication network element, sequentially match the security algorithm in the security algorithm list of the short-range communication control network element with the algorithm in the security algorithm list of the UE, A matching security algorithm is the selected algorithm.
  • Step 2313 The short-range communication control network element sends the registration response information to the user equipment, where the registration response information includes the selected security algorithm determined by the short-range communication control network element, and the first key negotiation parameter p1.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • Step 2314 the user equipment generates a negotiation key Kp according to the received registration response information
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameters p1 and IK, CK obtained by the registration response information. Specifically, it is as in the above formula 4.
  • Step 2315 The user equipment performs an algorithm selection according to the stored security algorithm list of the UE and the security algorithm list of the short-range communication control network element acquired in the foregoing step 2313.
  • the encryption algorithm in the security algorithm list of the short-range communication control network element is matched with the encryption algorithm in the security algorithm list of the UE, the first one.
  • the matching security algorithm is the selected encryption algorithm. Correct The same method is used for the selection of the integrity algorithm. If there is no matching encryption algorithm or integrity algorithm, a default algorithm is determined as the security algorithm.
  • FIG. 24 is a signaling diagram of an eighteenth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 2401 The UE sends registration request information to the short-range communication control network element.
  • the registration request information includes an identifier (UE ID) of the UE, such as an IMSI, and includes a list of security algorithms of the UE.
  • the UE's security algorithm list includes all security algorithms supported by the UE.
  • Step 2402 The short-range communication control network element sends the authentication data request information to the control network element, where the authentication data request information includes the UE ID.
  • the control network element may be specifically a Home Subscriber Server (HSS).
  • HSS Home Subscriber Server
  • the authentication data request information may further include an ID parameter: a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • an ID parameter a ProSe UE ID, a Proximal Communication Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 2403 the short-range communication control network element receives the authentication data response information AV returned by the control network element according to the authentication data request information, which specifically includes RAND, AUTN, XRES, CK and IK;
  • the short-range communication network element stores the received XRES, CK, and IK.
  • Step 2405 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the short-distance communication control network element from the authentication data response information. RAND and AUTN obtained in .
  • Step 2406 The UE verifies the correctness of the AUTN according to the received RAND and the key parameters stored in the UE.
  • the key parameter may be specifically K.
  • Step 2407 after the verification is passed, the user equipment calculates CK, IK, and RES according to RAND and AUTN;
  • Step 2408 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • Step 2409 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 2410 the short-range communication control network element generates a negotiation key Kp
  • the short-range communication control network element performs key derivation function calculation according to the stored second key negotiation parameters p2 and IK, CK. Specifically as follows:
  • Kp KDF(CK
  • KDF() is a key derivation function; in addition, it is not limited to KDF functions, and other safe functions can also be used for Kp derivation, such as secure NMAC functions.
  • the second key derivation function p2 is specifically ID information shared between the user equipment and the short-range communication control network element.
  • Step 2411 The security algorithm of the short-range communication control network element according to the stored short-range communication network element The list is algorithmically selected with the list of security algorithms of the UE obtained in the aforementioned step 2401.
  • the algorithm may be configured to: according to the priority order in the security algorithm list of the short-range communication network element, sequentially match the security algorithm in the security algorithm list of the short-range communication control network element with the algorithm in the security algorithm list of the UE, A matching security algorithm is the selected algorithm.
  • Step 2412 The short-range communication control network element sends registration response information to the user equipment, where the registration response information includes the selected security algorithm determined by the short-range communication control network element.
  • the short-range communication control network element may also use Kp to perform integrity protection on the registration response information.
  • Step 2413 the user equipment generates a negotiation key Kp according to the received registration response information
  • the user equipment performs key derivation function calculation according to the stored first key negotiation parameters p2 and IK, CK. Specifically, it is as in the above formula 6.
  • Step 2414 The user equipment performs algorithm selection according to the stored security algorithm list of the UE and the security algorithm list of the short-range communication control network element acquired in the foregoing step 2412.
  • the encryption algorithm in the security algorithm list of the short-range communication control network element is matched with the encryption algorithm in the security algorithm list of the UE, the first one.
  • the matching security algorithm is the selected encryption algorithm.
  • the same method is used for the selection of the integrity algorithm. If there is no matching encryption algorithm or integrity algorithm, a default algorithm is determined as the security algorithm.
  • FIG. 26 is a flowchart of a key negotiation method according to Embodiment 24 of the present invention, which is implemented in the embodiment of the present invention.
  • the main body is a ProSe Function network in the ProSe system.
  • the embodiment specifically includes the following steps:
  • Step 2501 The short-range communication control network element receives the request information sent by the user equipment.
  • the request message may be a registration request message, or may be other types of requests.
  • the request information includes an identity (UE ID) of the UE, such as an IMSI.
  • Step 2502 Send authentication data request information to a Home Subscriber Server (HSS) according to the request information.
  • HSS Home Subscriber Server
  • the authentication data request information includes a user equipment ID and an ID parameter; the ID parameter may include: ProSe UE ID, Proximal Communication Control Network Element ID, ProSe App ID, PLMN ID, ProSe App Code, EPC ProSe Subscriber ID , Application Layer User ID, one or more of the Application ID.
  • the ID parameter may include: ProSe UE ID, Proximal Communication Control Network Element ID, ProSe App ID, PLMN ID, ProSe App Code, EPC ProSe Subscriber ID , Application Layer User ID, one or more of the Application ID.
  • Step 2503 Receive authentication data response information sent by the HSS according to the authentication data request information.
  • the authentication data response information includes: a random number RAND, an AUTN parameter, a desired user response XRES, a derivation encryption key CK′, and a derivation integrity key IK′, or the authentication data response information AV includes: a random number RAND, AUTN parameters, expected user response XRES and base key K1;
  • the HSS calculates the authentication data request information according to an Key Agreement Protocol (AKA) algorithm, and obtains a random number RAND, an AUTN parameter, a desired user response XRES, an encryption key CK, and an integrity key IK.
  • AKA Key Agreement Protocol
  • the authentication token includes an Authentication Management Field (AMF) parameter
  • the Xth bit of the AMF parameter is a flag for further deriving CK, IK
  • the X bit is any one of the 8 bits that are free in the AMF parameter, 0 ⁇ X ⁇ 7.
  • the HSS sets the value of the Xth bit to 1 as the identification information for further derivation.
  • CK' and IK' are then sent to the near field communication control network element.
  • Step 2504 sending authentication request information to the user equipment.
  • the authentication request information includes RAND and AUTN obtained by the authentication data response information
  • Step 2505 Receive authentication response information sent by the user equipment.
  • the authentication response information includes a user response RES generated by the user equipment according to the authentication request information; after receiving the authentication request information, the user equipment verifies whether the Xth bit of the AMF in the AUTN is set. Bit; if the Xth bit is set, the authentication response information is generated. If the Xth bit is not set, the UE will interrupt the authentication process. For example, the method of determining whether it is set may be to determine whether the Xth bit is 1.
  • Step 2506 Perform authentication on the user equipment according to the authentication response information.
  • the short-range communication control network element authenticates the user equipment.
  • Step 2507 Send response information to the user equipment, where the user equipment completes, according to the received response information, the CK according to the derivation encryption key between the short-range communication control network element and the user equipment. ', derivation integrity key IK'; or key negotiation by the basic key K1.
  • the response information may be registration response information, or other types of response information, including a first key negotiation parameter, where the authentication data response information is a quintuple, to the user equipment.
  • the method further includes:
  • the first key negotiation parameter p1 is carried in the response information.
  • the short-range communication control network element After transmitting the response information, the short-range communication control network element performs a key derivation function calculation based on the first key agreement parameters p1 and CK', IK' to obtain a negotiation key Kp:
  • Kp KDF(CK'
  • the short-range communication control network element performs key derivation function calculation according to the CK′, IK′ and the stored second key negotiation parameter p2. , get the negotiation key Kp:
  • Kp KDF(CK'
  • the response information includes a first key negotiation parameter.
  • the method further includes: before sending the response information to the user equipment, the method further includes:
  • the first key negotiation parameter p1 is carried in the response information.
  • the short-range communication control network element After transmitting the response information, the short-range communication control network element performs a key derivation function calculation according to the first key negotiation parameters p1 and K1 to obtain a negotiation key Kp:
  • Kp KDF (K1, p1).
  • the key derivation function is calculated according to K1 and the stored second key negotiation parameter p2, and the negotiation key Kp is obtained:
  • Kp KDF (K1, p2).
  • the method further includes: storing the authentication data response information before sending the authentication request information to the user equipment;
  • the authentication data response information includes: a random number RAND, an AUTN parameter, a desired user response XRES, a derivation encryption key CK', and a derivation integrity key IK', the CK', IK', and XRES are stored. ;
  • the authentication data response information AV includes a random number RAND, an AUTN parameter, a desired user response XRES, and a base key K1, K1 and XRES are stored.
  • the derivation of CK', IK' may be performed after verifying the authentication response information; or after transmitting the registration response information.
  • the key negotiation method provided by the embodiment of the present invention provides a complete solution for key negotiation between the UE and the short-range communication control network element, without changing the basis of the existing ProSe architecture. Basically, key negotiation between the UE and the short-range communication control network element is implemented.
  • FIG. 26 is a flowchart of a key negotiation method according to the twenty-fifth embodiment of the present invention, which is implemented in the embodiment of the present invention.
  • the subject is a UE in the ProSe system.
  • the embodiment specifically includes the following steps:
  • Step 2601 The user equipment sends request information to the short-range communication control network element.
  • the request information may be registration request information, or other types of request information, including an identity identifier (UE ID) of the UE, such as an IMSI.
  • UE ID identity identifier
  • IMSI identity identifier
  • Step 2602 receiving the authentication request information AV sent by the short-range communication control network element
  • the authentication request information AV includes RAND and AUTN obtained by the HSS by the HSS;
  • the AUTN includes an Authentication Management Field (AMF) parameter, where the Xth bit of the AMF parameter is a flag for further deriving CK, IK; wherein the Xth bit is in the AMF parameter.
  • AMF Authentication Management Field
  • the HSS sets the value of the Xth bit to 1 as the further deduced identification information; the CK, IK is the encryption key and the integrity key calculated by the Key Agreement Protocol AKA algorithm.
  • Step 2603 calculating an encryption key CK and an integrity key IK according to the authentication request information
  • Step 2604 calculating a derivation encryption key CK', a derivation integrity key IK', or a basic key K1 according to the CK, IK and ID parameters;
  • the AUTN may be a quad or a quintuple; the ID parameter is pre-stored in the UE, and the UE performs a key derivation function calculation according to the CK, IK, and the ID parameter.
  • the UE obtains the derivation encryption key CK' and the derivation integrity key IK' according to the CK, IK, and ID parameters;
  • the user equipment generates authentication response information, wherein the authentication response information includes a RES. or
  • the UE calculates K1 based on the CK, IK, and ID parameters.
  • Step 2605 Send authentication response information to the short-range communication control network element.
  • the specific authentication response information is used by the short-range communication control network element to authenticate the user equipment according to the authentication response information; the authentication response information includes the RES; the short-range communication control network element pair is authenticated by the authentication The RES obtained in the information is matched with the XRES stored in the short-range communication control network element. When the two are the same, the short-range communication control network element authenticates the user equipment.
  • Step 2606 Receive response information sent by the short-range communication control network element, to complete key negotiation between the short-range communication control network element and the user equipment according to the response information.
  • the response information may be registration response information, or other types of response information, where the response information further includes a first key negotiation parameter p1 generated by the short-range communication control network element.
  • the user equipment performs a key derivation function calculation according to the CK', IK' and the first key negotiation parameter p1 to obtain a negotiation key:
  • Kp KDF(CK'
  • the user equipment stores a second key negotiation parameter p2, and the user equipment performs a key derivation function calculation according to the CK′, IK′ and the stored second key negotiation parameter p2 to obtain a negotiation key Kp. :
  • Kp KDF(CK'
  • the response information includes a first key negotiation parameter
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameters p1 and K1 to obtain a negotiation key Kp:
  • Kp KDF (K1, p1).
  • the user equipment performs a key derivation function calculation according to K1 and the stored second key negotiation parameter p2, to obtain a negotiation key Kp:
  • Kp KDF (K1, p2).
  • the method may further include: verifying the correctness of the authentication request information;
  • the user equipment verifies whether the Xth bit of the AMF in the AUTN is set, for example, determines whether the Xth bit of the AMF in the AUTN is 1.
  • the UE interrupts the authentication process.
  • the RES, CK, and IK are calculated according to the authentication request information, and the key derivation function is calculated according to the CK, IK, and the ID parameter, and the derivation encryption key CK' is obtained.
  • the user equipment generates authentication response information, wherein the authentication response information includes a RES.
  • the above-mentioned CK', IK' derivation may be performed after calculating CK and IK; or may be performed after receiving the registration response message.
  • a complete solution is provided for key negotiation between the UE and the short-range communication control network element, and the UE and the UE are implemented without changing the architecture of the existing ProSe.
  • the proximity communication controls key negotiation between network elements.
  • FIG. 27 is a flowchart of a key negotiation method according to the twenty-sixth embodiment of the present invention, which is implemented in the embodiment of the present invention.
  • the subject is the HSS in the ProSe system.
  • the embodiment specifically includes the following steps:
  • Step 2701 The HSS receives the authentication data request information sent by the short-range communication control network element.
  • the authentication data request information includes an ID parameter, or the HSS stores ID parameter.
  • Step 2702 calculating an authentication vector according to the authentication data request information; the authentication vector includes: an encryption key CK, an integrity key IK;
  • the HSS calculates the encryption key CK and the integrity key IK through the key agreement protocol AKA algorithm; in addition, RAND, AUTN, XRES;
  • the AUT parameter is included in the AUTN, where the Xth bit of the AMF parameter is a flag bit for further deriving CK, IK; wherein the Xth bit is any one of the 8 bits that are free in the AMF parameter. , 0 ⁇ X ⁇ 7.
  • the HSS sets the value of the Xth bit to 1 as the identification information for further derivation.
  • Step 2703 completing calculation of the derivation encryption key CK', the derivation integrity key IK', or the basic key K1 according to the CK, IK, and ID parameters;
  • Step 2704 Send the authentication data response information to the short-range communication control network element, where the authentication data response information includes the CK', IK', or the K1.
  • the authentication data response information is used to implement key negotiation between the UE and the short-range communication control network element.
  • the network element, the user equipment, and the user equipment are respectively controlled by the short-range communication.
  • the HSS describes the process of the key agreement method for the execution subject.
  • the key negotiation method is respectively combined with the UE, the HSS, and the short-range communication control network element in the ProSe system. The specific implementation process is described in detail.
  • FIG. 28 is a signaling diagram of a nineteenth key negotiation method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 2801 The UE sends request information to the short-range communication control network element.
  • the registration request information includes an identity (UE ID) of the UE, such as an IMSI.
  • Step 2802 the short-range communication control network element sends the authentication data request information to the HSS, where the authentication data request information includes the UE ID and the ID parameter.
  • the ID parameter may specifically include one or any of a ProSe UE ID, a Proximity Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 2803 the HSS calculates, according to the ID parameter, the authentication data response information by using a key agreement protocol AKA algorithm;
  • the authentication data response information includes: a random number RAND, an AUTN parameter, a desired user response XRES, and a derivation encryption key.
  • CK' and the derivation integrity key IK' are examples of the derivation integrity key.
  • the AUTN includes an Authentication Management Field (AMF) parameter, and the Xth bit of the AMF parameter is a flag for further deriving CK, IK; wherein the Xth bit is 8 idle in the AMF parameter. Any one of the bits, 0 ⁇ X ⁇ 7.
  • the HSS sets the value of the Xth bit to 1 as the further deduced identification information; the CK, IK is the encryption key and the integrity key calculated by the Key Agreement Protocol AKA algorithm.
  • Step 2804 the short-range communication control network element receives the authentication data response information AV returned by the HSS according to the authentication data request information, where the AV specifically includes RAND, AUTN, XRES, CK' and IK'.
  • the short-range communication network element stores the received XRES, CK', and IK'.
  • Step 2806 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 2807 the UE performs verification according to the received AUTN, and calculates CK', IK', and RES to generate authentication response information when the verification passes;
  • the user equipment verifies whether the Xth bit of the AMF in the AUTN is set; for example, it is verified whether the Xth bit of the AMF in the AUTN is 1. If the Xth bit is 1, the UE calculates RES, CK, and IK based on the authentication request information, and further calculates CK', IK' according to the ID parameter in the same manner as the HSS.
  • Step 2808 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • Step 2809 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element matches the RES obtained in the authentication response information and the XRES stored in the short-range communication control network element. When the two are the same, the short-range communication control network element authenticates the user equipment.
  • Step 2810 The short-range communication control network element sends response information to the user equipment, where the user equipment completes key agreement between the short-range communication control network element and the user equipment according to the received response information.
  • the registration response information is sent to the user equipment, where the user equipment completes the derivation encryption key between the short-range communication control network element and the user equipment according to the received registration response information.
  • the user equipment completes the derivation encryption key between the short-range communication control network element and the user equipment according to the received registration response information.
  • the user equipment may perform CK', IK' based on CK and IK after the calculation of CK and IK; or after receiving the registration response information.
  • FIG. 29 is a signaling diagram of a twentieth key agreement method according to an embodiment of the present invention. This embodiment specifically includes the following steps:
  • Step 2901 The UE sends request information to the short-range communication control network element.
  • the registration request information includes an identity (UE ID) of the UE, such as an IMSI.
  • the short-range communication control network element sends the authentication data request information to the HSS, where the authentication data request information includes the UE ID and the ID parameter.
  • the HSS may be specifically a Home Subscriber Server (HSS).
  • the ID parameter may specifically include one or any of a ProSe UE ID, a Proximity Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 2903 The HSS calculates, according to the ID parameter, the authentication data response information by using a key agreement protocol AKA algorithm.
  • the authentication data response information includes: a random number RAND, an AUTN parameter, a desired user response XRES, and a basic key K1.
  • the AUTN includes an Authentication Management Field (AMF) parameter, and the Xth bit of the AMF parameter is a flag for further deriving CK, IK; wherein the Xth bit is 8 idle in the AMF parameter. Any one of the bits, 0 ⁇ X ⁇ 7.
  • the HSS sets the value of the Xth bit to 1 as the further deduced identification information; the CK, IK is the encryption key and the integrity key calculated by the Key Agreement Protocol AKA algorithm.
  • the authentication data response information AV specifically includes RAND, AUTN, XRES, and K1.
  • Step 2904 The short-range communication control network element receives the authentication data response information AV returned by the HSS according to the authentication data request information, where the AV specifically includes RAND, AUTN, XRES, K1.
  • step 2905 the short-range communication network element stores the received XRES, K1.
  • Step 2906 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 2907 the UE performs verification according to the received AUTN, and calculates K1 and RES to generate authentication response information when the verification passes;
  • the user equipment verifies whether the Xth bit of the AMF in the AUTN is set; for example, it is verified whether the Xth bit of the AMF in the AUTN is 1. If the Xth bit is 1, the UE calculates RES, CK, and IK according to the authentication request information, and further calculates K1 according to the ID parameter in the same manner as the HSS.
  • Step 2908 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • Step 2909 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element matches the RES obtained in the authentication response information and the XRES stored in the short-range communication control network element. When the two are the same, the short-range communication control network element authenticates the user equipment.
  • Step 2910 The short-range communication control network element sends response information to the user equipment, where the user equipment completes key agreement between the short-range communication control network element and the user equipment according to the received response information.
  • the user equipment's derivation of K1 may be performed after calculating CK and IK; or may be performed after receiving the registration response information.
  • FIG. 30 is a flowchart of a twenty-first key agreement method according to an embodiment of the present invention. Signaling diagram. This embodiment specifically includes the following steps:
  • Step 3001 The UE sends request information to the short-range communication control network element.
  • the registration request information includes an identity (UE ID) of the UE, such as an IMSI.
  • Step 3002 The short-range communication control network element sends the authentication data request information to the HSS, where the authentication data request information includes the UE ID and the ID parameter.
  • the ID parameter may specifically include one or any of a ProSe UE ID, a Proximity Control Network Element ID, a ProSe App ID, a PLMN ID, a ProSe App Code, an EPC ProSe SubscriberID, an Application Layer User ID, and an Application ID.
  • Step 3003 The HSS calculates, according to the ID parameter, the authentication data response information by using a key agreement protocol AKA algorithm.
  • the authentication data response information includes: a random number RAND, an AUTN parameter, a desired user response XRES, and a derivation encryption key. CK' and the derivation integrity key IK'.
  • the AUTN includes an Authentication Management Field (AMF) parameter, and the Xth bit of the AMF parameter is a flag for further deriving CK, IK; wherein the Xth bit is 8 idle in the AMF parameter. Any one of the bits, 0 ⁇ X ⁇ 7.
  • the HSS sets the value of the Xth bit to 1 as the further deduced identification information; the CK, IK is the encryption key and the integrity key calculated by the Key Agreement Protocol AKA algorithm.
  • the authentication vector may be a key derivation function calculated according to the CK, IK, and ID parameters, and the derived derivation encryption key CK′ and the derivation integrity key IK′; the HSS completes CK′ according to CK and IK.
  • IK' calculation: Key KDF(CK
  • Step 3004 The short-range communication control network element receives the authentication data response information AV returned by the HSS according to the authentication data request information, where the AV specifically includes RAND, AUTN, XRES, CK', and IK'.
  • step 3005 the short-range communication network element stores the received XRES, CK', and IK'.
  • Step 3006 The short-range communication control network element sends the authentication request information to the user equipment.
  • the authentication request information includes the RAND and the AUTN obtained by the short-range communication control network element from the authentication data response information.
  • Step 3007 The UE performs verification according to the received AUTN, and calculates CK', IK', and RES to generate authentication response information when the verification passes;
  • the user equipment verifies whether the Xth bit of the AMF in the AUTN is set; for example, it is verified whether the Xth bit of the AMF in the AUTN is 1. If the Xth bit is 1, the UE calculates RES, CK, and IK based on the authentication request information, and further calculates CK', IK' according to the ID parameter in the same manner as the HSS.
  • Step 3008 The user equipment sends the authentication response information to the short-range communication control network element.
  • the authentication response information includes the RES.
  • Step 3009 The short-range communication control network element authenticates the user equipment according to the authentication response information.
  • the short-range communication control network element matches the RES obtained in the authentication response information and the XRES stored in the short-range communication control network element. When the two are the same, the short-range communication control network element authenticates the user equipment.
  • Step 3010 the short-range communication control network element generates a first key negotiation parameter p1;
  • the first key negotiation parameter p1 is used to complete the key negotiation of the short-range communication control network element and the UE, and the first key negotiation parameter p1 may be specifically a fresh parameter.
  • Step 3011 The short-range communication control network element sends response information to the user equipment.
  • the response information carries the first key negotiation parameter p1.
  • Step 3012 the short-range communication control network element generates a negotiation key Kp
  • the short-range communication control network element performs key derivation function calculation based on the first key agreement parameters p1 and IK', CK'. Specifically as follows:
  • Step 3013 the user equipment generates a negotiation key Kp according to the received response information
  • the user equipment performs a key derivation function calculation according to the first key negotiation parameters p1 and IK', CK' obtained from the response information. Specifically, the calculation method in the above step 3012.

Landscapes

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

Abstract

本发明实施例公开了一种密钥协商方法、用户设备和近距离通信控制网元。所述方法包括:近距离通信控制网元接收用户设备发送的注册请求信息;根据所述注册请求信息向控制网元发送安全上下文请求信息;接收控制网元根据所述安全上下文请求信息发送的安全上下文响应信息;根据所述安全上下文响应信息确定协商密钥;向所述用户设备发送注册响应信息,用以所述用户设备根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。本发明实施例提供的密钥协商方法、用户设备和近距离通信控制网元,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。

Description

密钥协商方法、用户设备和近距离通信控制网元 技术领域
本发明涉及通信技术领域,尤其涉及一种密钥协商方法、用户设备和近距离通信控制网元。
背景技术
近距离通信业务(Proximity Service,ProSe)技术主要应用于在两个近距离端到端数据传输的用户设备(UE)之间建立安全的通信通道,使得数据能够进行安全的交换。在现有的ProSe系统架构中,如图1所示,包括UE、演进的分组核心(Evolved Packet Core,EPC)、近距离通信控制网元(ProSe Function)和演进的通用陆基无线接入网(E-UTRAN)。UE与近距离通信控制网元之间通过PC3接口进行相互通信。通过PC3接口,近距离通信控制网元可以向UE传递配置信息和信令。
但是,在交互过程中可能存在安全威胁,例如通信的内容可被攻击者窃听、篡改等,因此需要一定的安全机制进行保护。而安全保护的前提为UE与近距离通信控制网元之间安全的对称密钥协商。目前通常采用基于通用引导架构(General Bootstrapping Architecture,GBA)和安全传输层协议(Pre-Shared Key based Transport Layer Security,PSK TLS)技术的相互认证。
但是由于GBA技术需要引导服务器网元(Bootstrapping Server Function,BSF)的支持,因此若ProSe中引入GBA技术,则需要引入一个新的网元BSF来完成认证;并且要求近距离通信控制网元建立一个与BSF通信的接口。因此对于ProSe的架构有一定的影响。
发明内容
本发明实施例提供了一种密钥协商方法、用户设备和近距离通信控制网元,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
第一方面,本发明实施例提供了一种密钥协商方法,包括:
近距离通信控制网元接收用户设备发送的注册请求信息;
根据所述注册请求信息向控制网元发送安全上下文请求信息;
接收控制网元根据所述安全上下文请求信息发送的安全上下文响应信息;
根据所述安全上下文响应信息确定协商密钥;
向所述用户设备发送注册响应信息,用以所述用户设备根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。
在第一种可能的实现方式中,所述安全上下文请求信息包括所述近距离通信控制网元生成的或由注册请求信息中获取的第一密钥协商参数,所述根据所述安全上下文响应信息确定协商密钥具体为:
所述近距离通信控制网元由所述安全上下文响应信息中,获取所述控制网元根据所述第一密钥协商参数和存储的共享密钥生成的协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥;或者
所述近距离通信控制网元由所述安全上下文响应信息中,获取所述控制网元根据所述第一密钥协商参数和存储的共享密钥生成的基本密钥;
所述近距离通信控制网元根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
在第二种可能的实现方式中,所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元存储的共享密钥,所述根据所 述安全上下文响应信息确定协商密钥具体为:
所述近距离通信控制网元根据所述安全上下文响应信息中携带的第一密钥协商参数和所述共享密钥生成所述协商密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;或者
所述近距离通信控制网元根据所述注册请求信息中携带的第一密钥协商参数和所述共享密钥生成所述协商密钥。
在第三种可能的实现方式中,所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元生成的基本密钥,所述根据所述安全上下文响应信息确定协商密钥具体为:
所述近距离通信控制网元根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
结合第一方面或第一方面的第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中,所述注册响应信息包括从所述安全上下文响应信息中获取的所述第一密钥协商参数,或者所述近距离通信控制网元生成的所述第一密钥协商参数。
第二方面,本发明实施例提供了一种密钥协商方法,包括:
用户设备向近距离通信控制网元发送注册请求信息;
用户设备接收所述近距离通信控制网元发送的注册响应信息;
根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。
在第一种可能的实现方式中,在所述用户设备向近距离通信控制网元发送注册请求信息之前,所述方法还包括:
所述用户设备生成第一密钥协商参数,以使用户设备在向近距离通信控制网元发送的注册请求信息中携带第一密钥协商参数。
结合第二方面或第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述根据所述注册响应信息生成协商密钥具体为:
根据所述第一密钥协商参数和存储的共享密钥生成协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥。
在第三种可能的实现方式中,所述注册响应信息包括第一密钥协商参数,所述根据所述注册响应信息生成协商密钥具体为:
根据所述第一密钥协商参数和存储的共享密钥生成协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥;或者
根据所述第一密钥协商参数和存储的共享密钥生成基本密钥;
根据所述基本密钥和存储的第二密钥协商参数生成协商密钥。
第三方面,本发明实施例提供了一种密钥协商方法,包括:
控制网元接收近距离通信控制网元发送的安全上下文请求信息;
根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息。
在第一种可能的实现方式中,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,所述方法还包括:
生成第一密钥协商参数;
根据所述安全上下文请求信息生成安全上下文响应信息;所述安全上下文响应信息中携带第一密钥协商参数。
在第二种可能的实现方式中,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,所述方法还包括:
根据存储的共享密钥和所述控制网元生成的或由所述安全上下文请求信息中获取的第一密钥协商参数生成基本密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;
根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括基本密钥。
在第三种可能的实现方式中,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,所述方法还包括:
根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括所述控制网元存储的共享密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥。
在第四种可能的实现方式中,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,所述方法还包括:
根据所述存储的共享密钥和所述控制网元生成的第一密钥协商参数生成协商密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;或者
根据所述存储的共享密钥和由所述安全上下文请求信息中获取的第一密钥协商参数生成协商密钥;
根据所述安全上下文请求信息生成响应信息,所述安全上下文响应信息中包括协商密钥。
第四方面,本发明实施例提供了一种密钥协商方法,包括:
近距离通信控制网元接收用户设备发送的注册请求信息;
根据所述注册请求信息向控制网元发送认证数据请求信息;
接收所述控制网元根据所述认证数据请求信息发送的认证数据响应信息;其中,所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES、加密密钥CK、完整性密钥IK;
对所述CK、IK和XRES进行存储;
向所述用户设备发送认证请求信息;所述认证请求信息包括由所述认证数据响应信息中获取的RAND和AUTN;
接收所述用户设备发送的认证响应信息;所述认证响应信息中包括所述用户设备根据所述认证请求信息生成的用户响应RES;
根据所述认证响应信息对所述用户设备进行认证;
向所述用户设备发送注册响应信息,用以所述用户和设备根据接收到的注册响应信息和所述CK、IK完成所述近距离通信控制网元与所述用户设备之 间的密钥协商。
在第一种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,在向所述用户设备发送注册响应信息之前,所述方法还包括:
所述近距离通信控制网元根据用户设备的安全算法列表和所述近距离通信控制网元存储的近距离通信控制网元的安全算法列表进行算法选择,得到选择出的安全算法。
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,所述注册响应信息包括所述选择出的安全算法。
在第三种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元中存储有近距离通信控制网元的安全算法列表,在收到所述用户设备发送的所述注册请求信息之后,所述方法还包括:
所述近距离通信控制网元根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到选择出的安全算法。
结合第四方面或第四方面的第二种或第三种可能的实现方式,在第四种可能的实现方式中,所述注册响应信息包括第一密钥协商参数,在向所述用户设备发送注册响应信息之前,所述方法还包括:
近距离通信控制网元生成第一密钥协商参数。
结合第四方面或第四方面的第四种可能的实现方式,在第五种可能的实现方式中,所述方法还包括:
近距离通信控制网元根据所述第一密钥协商参数和所述CK、IK进行密钥推衍函数计算,得到协商密钥。
结合第四方面或第四方面的第二种或第三种可能的实现方式,在第六种可能的实现方式中,所述方法还包括:
近距离通信控制网元根据所述CK、IK和存储在所述近距离通信控制网元中的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
第五方面,本发明实施例提供了一种密钥协商方法,包括:
用户设备向近距离通信控制网元发送注册请求信息;
接收所述近距离通信控制网元发送的认证请求信息;所述认证请求信息包括所述近距离通信控制网元由所述控制网元获取的RAND和AUTN;
利用RAND验证AUTN的正确性;
当验证所述AUTN正确时,根据所述认证请求信息计算得到CK、IK、RES;
向近距离通信控制网元发送认证响应信息,用以所述近距离通信控制网元根据所述认证响应信息对用户设备进行认证;所述认证响应信息中包括所述RES;
接收所述近距离通信控制网元发送的注册响应信息,用以根据所述注册响应信息和所述CK、IK完成所述近距离通信控制网元与所述用户设备之间的密钥协商。
在第一种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
在第二种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述方法还包括:
根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
结合第五方面或第五方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述注册响应信息包括所述近距离通信控制网元生成的第一密钥协商参数,所述方法还包括:
用户设备根据所述第一密钥协商参数和所述CK、IK进行密钥推衍函数计算,得到协商密钥。
结合第五方面或第五方面的第一种或第二种可能的实现方式,在第四种可能的实现方式中,所述方法还包括:
用户设备根据所述CK、IK和存储在所述用户设备中的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
第六方面,本发明实施例提供了一种近距离通信控制网元,包括:
接收单元,用于接收用户设备发送的注册请求信息;
发送单元,用于向控制网元发送安全上下文请求信息;
所述接收单元还用于,接收控制网元根据所述安全上下文请求信息发送的安全上下文响应信息;
处理单元,用于根据所述安全上下文响应信息确定协商密钥;
所述发送单元还用于,向所述用户设备发送注册响应信息,用以所述用户设备根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。
在第一种可能的实现方式中,所述安全上下文请求信息包括所述处理单元生成的或由所述注册请求信息中获取的第一密钥协商参数,所述处理单元具体用于:
由所述安全上下文响应信息中,获取所述控制网元根据所述第一密钥协商参数和存储的共享密钥生成的协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥;或者
由所述安全上下文响应信息中,获取所述控制网元根据所述第一密钥协商参数和存储的共享密钥生成的基本密钥;根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
在第二种可能的实现方式中,所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元存储的共享密钥,所述处理单元具体用于:
根据所述安全上下文响应信息中携带的第一密钥协商参数和所述共享密 钥生成所述协商密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;或者
根据所述注册请求信息中携带的第一密钥协商参数和所述共享密钥生成所述协商密钥。
在第三种可能的实现方式中,所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元生成的基本密钥,所述处理单元具体用于:
根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
结合第六方面或第六方面的第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中,所述注册响应信息包括由所述接收单元获取的所述第一密钥协商参数,或者所述处理单元生成的所述第一密钥协商参数。
第七方面,本发明实施例提供了用户设备,包括:
发送单元,用于向近距离通信控制网元发送注册请求信息;
接收单元,用于接收所述近距离通信控制网元发送的注册响应信息;
处理单元,用于根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。
在第一种可能的实现方式中,所述处理单元还用于,生成第一密钥协商参数,以使用户设备在向近距离通信控制网元发送的注册请求信息中携带第一密钥协商参数。
结合第七方面或第七方面的第一种可能的实现方式,在第二种可能的实现方式中,所述处理单元具体用于,根据所述第一密钥协商参数和所述用户设备内存储的共享密钥生成协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥。
在第三种可能的实现方式中,所述注册响应信息包括第一密钥协商参数,所述处理单元具体用于,
根据所述第一密钥协商参数和所述用户设备内存储的共享密钥生成协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥;或者
根据所述第一密钥协商参数和用户设备内存储的共享密钥生成基本密钥;根据所述基本密钥和存储的第二密钥协商参数生成协商密钥。
第八方面,本发明实施例提供了一种控制网元,包括:
接收单元,用于接收近距离通信控制网元发送的安全上下文请求信息;
发送单元,用于根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息。
在第一种可能的实现方式中,所述控制网元还包括:
处理单元,用于生成第一密钥协商参数;根据所述安全上下文请求信息生成安全上下文响应信息;所述安全上下文响应信息中携带第一密钥协商参数。
在第二种可能的实现方式中,所述控制网元还包括:
处理单元,用于根据存储的共享密钥和所述处理单元生成的或由所述安全上下文请求信息获取的第一密钥协商参数生成基本密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括基本密钥。
在第三种可能的实现方式中,所述控制网元还包括:
处理单元,用于根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括所述控制网元存储的共享密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥。
在第四种可能的实现方式中,所述控制网元还包括:
处理单元,用于根据所述存储的共享密钥和所述处理单元生成的第一密钥协商参数生成协商密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;或者
用于根据所述存储的共享密钥和由所述安全上下文请求信息中获取的第 一密钥协商参数生成协商密钥;根据所述安全上下文请求信息生成响应信息,所述安全上下文响应信息中包括协商密钥。
第九方面,本发明实施例提供了一种近距离通信控制网元,包括:
接收单元,用于接收用户设备发送的注册请求信息;
发送单元,用于根据所述注册请求信息向控制网元发送认证数据请求信息;
所述接收单元还用于,接收所述控制网元根据所述认证数据请求信息发送的认证数据响应信息;其中,所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES、加密密钥CK、完整性密钥IK;
存储单元,用于对所述CK、IK和XRES进行存储;
所述发送单元还用于,向所述用户设备发送认证请求信息;所述认证请求信息包括由所述认证数据响应信息中获取的RAND和AUTN;
所述接收单元还用于,接收所述用户设备发送的认证响应信息;所述认证响应信息中包括所述用户设备根据所述认证请求信息生成的用户响应RES;
认证单元,用于根据所述认证响应信息对所述用户设备进行认证;
所述发送单元还用于,向所述用户设备发送注册响应信息,用以所述用户和设备根据接收到的注册响应信息和所述CK、IK完成所述近距离通信控制网元与所述用户设备之间的密钥协商。
在第一种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元还包括:
处理单元,用于根据用户设备的安全算法列表和所述近距离通信控制网元存储的近距离通信控制网元的安全算法列表进行算法选择,得到选择出的安全算法。
结合第九方面或第九方面的第一种可能的实现方式,在第二种可能的实现方式中,所述注册响应信息包括所述选择出的安全算法。
在第三种可能的实现方式中,所述注册请求信息包括所述用户设备的安 全算法列表,所述近距离通信控制网元中存储有近距离通信控制网元的安全算法列表,所述近距离通信控制网元还包括:
处理单元,用于根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到选择出的安全算法。
结合第九方面或第九方面的第二种或第三种可能的实现方式,在第四种可能的实现方式中,所述注册响应信息包括第一密钥协商参数,所述近距离通信控制网元还包括:
生成单元,用于生成第一密钥协商参数。
结合第九方面或第九方面的第四种可能的实现方式,在第五种可能的实现方式中,所述处理单元还用于:
根据所述第一密钥协商参数和所述CK、IK进行密钥推衍函数计算,得到协商密钥。
结合第九方面或第九方面的第二种或第三种可能的实现方式,在第六种可能的实现方式中,所述处理单元还用于:
根据所述CK、IK和存储在所述近距离通信控制网元中的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
第十方面,本发明实施例提供了一种用户设备,包括:
发送单元,用于向近距离通信控制网元发送注册请求信息;
接收单元,用于接收所述近距离通信控制网元发送的认证请求信息;所述认证请求信息包括所述近距离通信控制网元由所述控制网元获取的RAND和AUTN;
验证单元,用于利用RAND验证AUTN的正确性;
处理单元,用于当验证所述AUTN正确时,根据所述认证请求信息计算得到CK、IK、RES;
所述发送单元还用于,向近距离通信控制网元发送认证响应信息,用以所述近距离通信控制网元根据所述认证响应信息对用户设备进行认证;所述 认证响应信息中包括所述RES;
所述接收单元还用于,接收所述近距离通信控制网元发送的注册响应信息,用以根据所述注册响应信息和所述CK、IK完成所述近距离通信控制网元与所述用户设备之间的密钥协商。
在第一种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表,进行算法选择得到的选择出的安全算法。
在第二种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表;
所述处理单元还用于:根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
结合第十方面或第十方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述注册响应信息包括所述近距离通信控制网元生成的第一密钥协商参数,所述处理单元还用于:
用户设备根据所述第一密钥协商参数和所述CK、IK进行密钥推衍函数计算,得到协商密钥。
结合第十方面或第十方面的第一种或第二种可能的实现方式,在第四种可能的实现方式中,所述处理单元还用于:
用户设备根据所述CK、IK和存储在所述用户设备中的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
第十一方面,本发明实施例提供了一种密钥协商方法,包括:
近距离通信控制网元接收用户设备发送的注册请求信息;
根据所述注册请求信息向归属用户服务器HSS发送认证数据请求信息;
接收所述HSS根据所述认证数据请求信息发送的认证数据响应信息;其中,所述认证数据响应信息包括:推衍加密密钥CK’、推衍完整性密钥IK’; 或者,基本密钥K1;
向所述用户设备发送认证请求信息;
接收所述用户设备发送的认证响应信息;
根据所述认证响应信息对所述用户设备进行认证;
向所述用户设备发送注册响应信息,用以所述用户设备根据接收到的注册响应信息完成所述近距离通信控制网元与所述用户设备之间的根据所述推衍加密密钥CK’、推衍完整性密钥IK’的协商;或者,完成基本密钥K1的密钥协商。
在第一种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,在向所述用户设备发送注册响应信息之前,所述方法还包括:
所述近距离通信控制网元根据用户设备的安全算法列表和所述近距离通信控制网元存储的近距离通信控制网元的安全算法列表进行算法选择,得到选择出的安全算法。
结合第一种可能的实现方式,在第二种可能的实现方式中,所述注册响应信息包括所述选择出的安全算法。
在第三种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元中存储有近距离通信控制网元的安全算法列表,在收到所述用户设备发送的所述注册请求信息之后,所述方法还包括:
所述近距离通信控制网元根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到选择出的安全算法。
结合第一方面、第一方面的第二种、第三种可能的实现方式,在第四种可能的实现方式中,所述方法还包括:
近距离通信控制网元根据密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
近距离通信控制网元根据密钥协商参数和所述K1进行密钥推衍函数计 算,得到协商密钥。
在第五种可能的实现方式中,所述注册响应信息还包括所述密钥协商参数。
在第十二方面,本发明实施例还提供了一种密钥协商方法,包括:
用户设备向近距离通信控制网元发送注册请求信息;
接收所述近距离通信控制网元发送的认证请求信息;
根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;
根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
向近距离通信控制网元发送认证响应信息;
接收所述近距离通信控制网元发送的注册响应信息。
在第一种可能的实现方式中,所述认证请求信息包含鉴权令牌AUTN参数;所述AUTN中包括认证管理域AMF;
根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1,之前还包括:
判断AMF的第X比特位是否被置位,当置位时,所述HSS计算CK’,IK’或K1,所述X取值范围为0至7中的任意值。
结合第十二方面或第十二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
结合第十二方面或第十二方面的第一种可能的实现方式,在第三种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述方法还包括:
根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算 法列表进行算法选择,得到的选择出的安全算法。
结合第十二方面或第十二方面的第一种、第二种、第三种可能的实现方式,在第四种可能的实现方式中,所述注册响应信息包含第一密钥协商参数,
用户设备根据所述第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
结合第十二方面或第十二方面的第一种、第二种、第三种可能的实现方式,在第五种可能的实现方式中,所述方法还包括:
用户设备根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
在第十三方面,本发明实施例还提供了一种密钥协商方法,包括:
用户设备向近距离通信控制网元发送注册请求信息;
接收所述近距离通信控制网元发送的认证请求信息;
根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;
向近距离通信控制网元发送认证响应信息;
接收所述近距离通信控制网元发送的注册响应信息;
根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1。
在第一种可能的实现方式中,所述认证请求信息包含AUTN参数;所述AUTN中包括认证管理域AMF参数;
根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1,之前还包括:
判断AMF参数的第X比特位被置位,所述用户设备计算CK’,IK’或K1, 所述X取值范围为0至7中的任意值。
结合第十三方面或第十三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
结合第十三方面或第十三方面的第一种可能的实现方式,在第三种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述方法还包括:
根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
结合第十三方面或第十三方面的第一种、第二种、第三种可能的实现方式,在第四种可能的实现方式中,所述注册响应信息包含第一密钥协商参数;
用户设备根据所述第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据所述第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。结合第十三方面或第十三方面的第一种、第二种、第三种可能的实现方式,在第五种可能的实现方式中,所述方法还包括:
用户设备根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
在第十四方面,本发明实施例还提供了一种密钥协商方法,包括:
HSS接收近距离通信控制网元发送的认证数据请求信息;所述认证数据请求信息包括ID参数,或者所述HSS中存储有ID参数;
根据所述认证数据请求信息计算出认证向量;所述认证向量包括:加密 密钥CK、完整性密钥IK;
根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
向近距离通信控制网元发送认证数据响应信息;所述认证数据响应信息包括所述CK’、IK’,或,所述K1。
在第一种可能的实现方式中,所述认证向量包括AUTN参数,所述AUTN中包括认证管理域AMF参数,所述HSS将所述AMF参数的第X比特位置位,所述X取值范围为0至7中的任意值。
在第十五方面,本发明实施例还提供了一种近距离通信控制网元包括:
接收单元,用于接收用户设备发送的注册请求信息;
发送单元,用于根据所述注册请求信息向HSS发送认证数据请求信息;
所述接收单元还用于,接收所述HSS根据所述认证数据请求信息发送的认证数据响应信息;其中,所述认证数据响应信息包括:推衍加密密钥CK’、推衍完整性密钥IK’;或者,基本密钥K1;
所述发送单元还用于,向所述用户设备发送认证请求信息;所述接收单元还用于,接收所述用户设备发送的认证响应信息;所述认证响应信息中包括所述用户设备根据所述认证请求信息生成的用户响应RES;
认证单元,用于根据所述认证响应信息对所述用户设备进行认证;
所述发送单元还用于,向所述用户设备发送注册响应信息,用以所述用户设备根据接收到的注册响应信息完成所述近距离通信控制网元与所述用户设备之间的根据所述推衍加密密钥CK’、推衍完整性密钥IK’的协商;或者,完成基本密钥K1的协商。
在第一种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元还包括:
处理单元,用于根据用户设备的安全算法列表和所述近距离通信控制网元存储的近距离通信控制网元的安全算法列表进行算法选择,得到选择出的 安全算法。
结合第十五方面的第一种可能的实现方式,在第二种可能的实现方式中,所述注册响应信息包括所述选择出的安全算法。
在第三种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元中存储有近距离通信控制网元的安全算法列表,所述近距离通信控制网元还包括:
处理单元,用于根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到选择出的安全算法。
结合第十五方面的第三种可能的实现方式,在第四种可能的实现方式中,所述处理单元还用于,根据密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
结合第十五方面的第四种可能的实现方式,在第五种可能的实现方式中,所述注册响应信息还包括密钥协商参数。
在第十六方面,本发明实施例还提供了一种用户设备包括:
发送单元,用于向近距离通信控制网元发送注册请求信息;
接收单元,用于接收所述近距离通信控制网元发送的认证请求信息;处理单元,用于根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;并根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
所述发送单元还用于,向近距离通信控制网元发送认证响应信息;
所述接收单元还用于,接收所述近距离通信控制网元发送的注册响应信息。
在第一种可能的实现方式中,所述认证请求信息包含鉴权令牌AUTN参数;所述AUTN中包括认证管理域AMF;
所述用户设备还包括验证单元,用于判断AMF的第X比特位是否被置位, 当置位时,所述HSS计算CK’,IK’或K1,所述X取值范围为0至7中的任意值。
结合第十六方面或第十六方面的第一种可能的实现方式,在第二种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
结合第十六方面或第十六方面的第一种可能的实现方式,在第三种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述处理单元还用于:
根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
结合第十六方面或第十六方面的第一种、第二种、第三种可能的实现方式,在第四种可能的实现方式中,所述注册响应信息包含第一密钥协商参数,所述处理单元还用于:
根据所述第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
结合第十六方面或第十六方面的第一种、第二种、第三种可能的实现方式,在第五种可能的实现方式中,所述处理单元还用于:
根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
在第十七方面,本发明实施例还提供了一种用户设备,包括:
发送单元,用于向近距离通信控制网元发送注册请求信息;
接收单元,用于接收所述近距离通信控制网元发送的认证请求信息;
处理单元,用于根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;
所述发送单元还用于,向近距离通信控制网元发送认证响应信息;
所述接收单元还用于,接收所述近距离通信控制网元发送的注册响应信息;
所述处理单元还用于,根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1。
在第一种可能的实现方式中,所述认证请求信息包含鉴权令牌AUTN参数;所述AUTN中包括认证管理域AMF;
所述用户设备还包括验证单元,用于判断AMF的第X比特位是否被置位,当置位时,所述HSS计算CK’,IK’或K1,所述X取值范围为0至7中的任意值。
结合第十七方面或第十七方面的第一种可能的实现方式,在第二种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
结合第十七方面或第十七方面的第一种可能的实现方式,在第三种可能的实现方式中,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述处理单元还用于:
根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
结合第十七方面或第十七方面的第一种、第二种、第三种可能的实现方式,在第四种可能的实现方式中,
所述注册响应信息包含第一密钥协商参数;所述处理单元还用于:
根据所述第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据所述第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
结合第十七方面或第十七方面的第一种、第二种、第三种可能的实现方式,在第五种可能的实现方式中,所述处理单元还用于:
根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
在第十八方面,本发明实施例提供了一种归属用户服务器HSS,包括:
接收单元,用于接收近距离通信控制网元发送的认证数据请求信息;所述认证数据请求信息包括ID参数,或者所述HSS中存储有ID参数;
处理单元,用于根据所述认证数据请求信息计算出认证向量;所述认证向量包括:加密密钥CK、完整性密钥IK;
所述处理单元还用于,根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
发送单元,用于向近距离通信控制网元发送认证数据响应信息;所述认证数据响应信息包括所述CK’、IK’,或,所述K1。
在第一种可能的实现方式中,所述认证向量包括AUTN参数,其特征在于,所述AUTN中包括认证管理域AMF参数,所述处理单元还用于,将所述AMF参数的第X比特位置位,所述X取值范围为0至7中的任意值。
通过应用本发明实施例提供的密钥协商方法、用户设备和近距离通信控 制网元,为UE与近距离通信控制网元之间的密钥协商提供了完整的解决方案,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
附图说明
图1为本发明提供的ProSe系统架构图;
图2为本发明实施例一提供的一种密钥协商方法的流程图;
图3为本发明实施例二提供的一种密钥协商方法的流程图;
图4为本发明实施例三提供的一种密钥协商方法的流程图;
图5为本发明实施例四提供的第一种密钥协商方法的信令图;
图6为本发明实施例五提供的第二种密钥协商方法的信令图;
图7为本发明实施例六提供的第三种密钥协商方法的信令图;
图8为本发明实施例七提供的第四种密钥协商方法的信令图;
图9为本发明实施例八提供的第五种密钥协商方法的信令图;
图10为本发明实施例九提供的第六种密钥协商方法的信令图;
图11为本发明实施例十提供的第七种密钥协商方法的信令图;
图12为本发明实施例十一提供的第八种密钥协商方法的信令图;
图13为本发明实施例十二提供的第九种密钥协商方法的信令图;
图14为本发明实施例十三提供的一种密钥协商方法的流程图;
图15为本发明实施例十四提供的一种密钥协商方法的流程图;
图16为本发明实施例十五提供的第十种密钥协商方法的信令图;
图17为本发明实施例十六提供的第十一种密钥协商方法的信令图;
图18为本发明实施例十七提供的第十二种密钥协商方法的信令图;
图19为本发明实施例十八提供的第十三种密钥协商方法的信令图;
图20为本发明实施例十九提供的第十四种密钥协商方法的信令图;
图21为本发明实施例二十提供的第十五种密钥协商方法的信令图;
图22为本发明实施例二十一提供的第十六种密钥协商方法的信令图;
图23为本发明实施例二十二提供的第十七种密钥协商方法的信令图;
图24为本发明实施例二十三提供的第十八种密钥协商方法的信令图;
图25为本发明实施例二十四提供的一种密钥协商方法的流程图;
图26为本发明实施例二十五提供的一种密钥协商方法的流程图;
图27为本发明实施例二十六提供的一种密钥协商方法的流程图;
图28为本发明实施例二十七提供的第十九种密钥协商方法的信令图;
图29为本发明实施例二十八提供的第二十种密钥协商方法的信令图;
图30为本发明实施例二十九提供的第二十一密钥协商方法的信令图;
图31为本发明实施例三十提供的第二十二种密钥协商方法的信令图;
图32为本发明实施例三十一提供的第二十三种密钥协商方法的信令图;
图33为本发明实施例三十二提供的第二十四种密钥协商方法的信令图;
图34为本发明实施例三十三提供的一种近距离通信控制网元的结构示意图;
图35为本发明实施例三十四提供的一种用户设备的结构示意图;
图36为本发明实施例三十五提供的一种控制网元的结构示意图;
图37为本发明实施例三十六提供的一种近距离通信控制网元的结构示意图;
图38为本发明实施例三十七提供的一种用户设备的结构示意图;
图39为本发明实施例三十八提供的一种近距离通信控制网元的结构示意图;
图40为本发明实施例三十九提供的一种用户设备的结构示意图;
图41为本发明实施例四十提供的一种控制网元的结构示意图。
下面通过附图和实施例,对本发明实施例的技术方案做进一步的详细描述。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例的密钥协商方法,应用于如图1所示的ProSe系统中,如图1所示,包括UE、演进的分组核心(Evolved Packet Core,EPC)、近距离通信控制网元(ProSe Function)和演进的通用陆基无线接入网(E-UTRAN)。UE与近距离通信控制网元之间通过PC3接口进行相互通信。通过PC3接口,近距离通信控制网元可以向UE传递配置信息和信令。
实施例一
下面以图2为例详细说明本发明实施例一提供的密钥协商方法,图2为本发明实施例一提供的一种密钥协商方法流程图,在本发明实施例中实施主体为ProSe系统中的近距离通信控制网元(ProSe Function)。
如图2所示,该实施例具体包括以下步骤:
步骤201,近距离通信控制网元接收用户设备(UE)发送的注册请求信息;
具体的,注册请求信息中可以包括UE的身份标识(UE ID),如IMSI,此外还可以包括其他标识信息或密钥协商参数等等。
步骤202,向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包含UE的身份标识,用于向控制网元请求此UE相关的安全参数。
步骤203,接收控制网元根据所述安全上下文请求信息发送的安全上下文响应信息;
具体的,安全上下文响应信息用于向近距离通信控制网元发送UE相关的安全参数。
步骤204,根据所述安全上下文响应信息确定协商密钥;
在一个具体的例子中,当所述安全上下文请求信息包括所述近距离通信控制网元生成的或由注册请求信息中获取的第一密钥协商参数时,所述根据所述安全上下文响应信息确定协商密钥可以具体为:
所述近距离通信控制网元由所述安全上下文响应信息中,获取所述控制网元根据所述第一密钥协商参数和存储的共享密钥生成的协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥。
其中,控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
在另一个具体的例子中,当所述安全上下文请求信息包括所述近距离通信控制网元生成的或由注册请求信息中获取的第一密钥协商参数时,所述根据所述安全上下文响应信息确定协商密钥可以具体为:
所述近距离通信控制网元由所述安全上下文响应信息中,获取所述控制网元根据所述第一密钥协商参数和存储的共享密钥生成的基本密钥;
所述近距离通信控制网元根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
在一个具体的例子中,当所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元存储的共享密钥时,所述根据所述安全上下文响应信息确定协商密钥可以具体为:
所述近距离通信控制网元根据所述安全上下文响应信息中携带的第一密钥协商参数和所述共享密钥生成所述协商密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥。
在另一个具体的例子中,当所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元存储的共享密钥时,所述根据所述安全上下文响应信息确定协商密钥可以具体为:
所述近距离通信控制网元根据所述注册请求信息中携带的第一密钥协商参数和所述共享密钥生成所述协商密钥。
在又一个具体的例子中,当所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元生成的基本密钥时,所述根据所述安全上下文响应信息确定协商密钥具体为:
所述近距离通信控制网元根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
步骤205,向所述用户设备发送注册响应信息,用以所述用户设备根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。
具体的,所述注册响应信息包括从所述安全上下文响应信息中获取的所述第一密钥协商参数,或者所述近距离通信控制网元生成的所述第一密钥协商参数。
可选的,近距离通信控制网元还可以利用协商密钥对注册响应信息进行完整性保护。在用户设备生成协商密钥之后,可以利用协商密钥对校验码进行验证。
通过应用本发明实施例提供的密钥协商方法,为UE与近距离通信控制网元之间的密钥协商提供了完整的解决方案,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
实施例二
下面以图3为例详细说明本发明实施例二提供的密钥协商方法,图3为本发明实施例二提供的一种密钥协商方法流程图,在本发明实施例中实施主 体为ProSe系统中的UE。
如图3所示,该实施例具体包括以下步骤:
步骤301,用户设备向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE的身份标识(UE ID),如IMSI,此外还可以包括其他标识信息或密钥协商参数等等。
步骤302,用户设备接收所述近距离通信控制网元发送的注册响应信息;
具体的,注册响应信息中可以包括第一密钥协商参数。
步骤303,根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。
在一个具体的例子中,在所述用户设备向近距离通信控制网元发送注册请求信息之前,所述用户设备生成第一密钥协商参数,以使用户设备在向近距离通信控制网元发送的注册请求信息中携带第一密钥协商参数。
根据所述注册响应信息生成协商密钥具体为:用户设备根据所述第一密钥协商参数和用户设备内存储的共享密钥生成协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥。
在另一个具体的例子中,当注册响应信息包括第一密钥协商参数时,用户设备根据所述第一密钥协商参数和存储的共享密钥生成协商密钥。
在又一个具体的例子中,当注册响应信息包括第一密钥协商参数时,用户设备根据所述第一密钥协商参数和存储的共享密钥生成基本密钥;再根据所述基本密钥和用户设备存储的第二密钥协商参数生成协商密钥。
通过应用本发明实施例提供的密钥协商方法,为UE与近距离通信控制网元之间的密钥协商提供了完整的解决方案,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
实施例三
下面以图4为例详细说明本发明实施例三提供的密钥协商方法,图4为 本发明实施例三提供的一种密钥协商方法流程图,在本发明实施例中实施主体为控制网元,该控制网元处于ProSe系统的EPC中。
如图4所示,该实施例具体包括以下步骤:
步骤401,控制网元接收近距离通信控制网元发送的安全上下文请求信息;
步骤402,根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息。
可选的,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,还包括:
生成第一密钥协商参数;
根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括第一密钥协商参数。
可选的,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,还包括:
根据存储的共享密钥和所述控制网元生成的或由所述安全上下文请求信息中获取的第一密钥协商参数生成基本密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;
根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括基本密钥。
可选的,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,还包括:
根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括所述控制网元存储的共享密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥。
可选的,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,还包括:
根据所述存储的共享密钥和所述控制网元生成的第一密钥协商参数生成协商密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;
根据所述安全上下文请求信息生成响应信息,所述安全上下文响应信息中包括协商密钥。
可选的,在根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息之前,还包括:
根据所述存储的共享密钥和由所述安全上下文请求信息中获取的第一密钥协商参数生成协商密钥;
根据所述安全上下文请求信息生成响应信息,所述安全上下文响应信息中包括协商密钥。
通过应用本发明实施例提供的密钥协商方法,为UE与近距离通信控制网元之间的密钥协商提供了完整的解决方案,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
前述实施例中分别以近距离通信控制网元、用户设备和控制网元为执行主体说明了密钥协商方法的过程,在下述实施例四到实施例十二中,结合ProSe系统中的UE、控制网元和近距离通信控制网元,分别对密钥协商方法的具体实施过程进行详细的说明。需要说明的是,在执行下述各个实施例的密钥协商方法之前,控制网元已经预先与UE通过第四代移动通讯网络的认证与密钥协商协议(Authentication and Key Agreement,AKA)进行了认证,控制网元和UE内分别存储有控制网元与UE之间的共享密钥(SharedKey)。
实施例四
如图5所示,图5为本发明实施例提供的第一种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤501,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE的身份标识(UE ID),如IMSI。
步骤502,近距离通信控制网元生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤503,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了UE ID和p1。
步骤504,控制网元根据安全上下文请求信息生成协商密钥Kp;
具体的,在执行本实施例的密钥协商方法之前,控制网元已经预先与UE通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元由安全上下文请求信息中获取p1,根据p1和SharedKey进行密钥推衍函数计算。具体如下式:
Kp=KDF(SharedKey,p1)                      (式1)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数。
控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤505,控制网元向所述近距离通信控制网元发送安全上下文响应信息;
具体的,安全上下文响应信息中包括协商密钥Kp。
步骤506,近距离通信控制网元向UE发送注册响应信息;
具体的,注册响应信息中包括第一密钥协商参数p1。
步骤507,近距离通信控制网元由安全上下文响应信息中获取协商密钥Kp;
上述步骤507可以在步骤506之前执行,也可以与步骤506并行执行。
步骤508,UE根据接收到的注册响应信息生成协商密钥Kp。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE由注册响应信息中获取p1,根据p1和SharedKey进行密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同式1。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。具体的,在步骤506中,近距离通信控制网元向UE发送的注册响应信息中还可以包括校验码。所述校验码为根据Kp和注册响应信息生成的校验码。在步骤508中生成协商密钥Kp之后,可以利用Kp和接收到的注册响应信息对校验码进行验证。
实施例五
如图6所示,图6为本发明实施例提供的第二种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤601,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE ID,具体可以如IMSI。
步骤602,近距离通信控制网元生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤603,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了UE ID。
步骤604,控制网元根据安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息;
具体的,在执行本实施例的密钥协商方法之前,控制网元已经预先与UE 通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元在安全上下文响应信息中携带SharedKey发送给近距离通信控制网元。
控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤605,近距离控制网元根据安全上下文响应信息生成协商密钥Kp;
具体的,近距离控制网元由安全上下文请求信息中获取SharedKey,根据步骤602中生成的p1和SharedKey进行密钥推衍函数计算。具体如式1。
步骤606,近距离通信控制网元向UE发送注册响应信息;
具体的,注册响应信息中包括第一密钥协商参数p1。
上述步骤606可以在步骤605之前执行,也可以与步骤605并行执行。
步骤607,UE根据接收到的注册响应信息生成协商密钥Kp。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE由注册响应信息中获取p1,根据p1和SharedKey进行密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同式1。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。具体的,在步骤606中,近距离通信控制网元向UE发送的注册响应信息中还可以包括校验码。所述校验码为根据Kp和注册响应信息生成的校验码。在步骤607中生成协商密钥Kp之后,可以利用Kp和接收到的注册响应信息对校验码进行验证。
实施例六
如图7所示,图7为本发明实施例提供的第三种密钥协商方法的信令图。 该实施例具体包括以下步骤:
步骤701,UE生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤702,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE ID和p1,其中,UE ID可以是IMSI。
步骤703,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了UE ID和p1。
步骤704,控制网元根据安全上下文请求信息生成协商密钥Kp;
具体的,在执行本实施例的密钥协商方法之前,控制网元已经预先与UE通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元由安全上下文请求信息中获取p1,根据p1和SharedKey进行密钥推衍函数计算。具体同前述式1,此处不再赘述。
控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤705,控制网元向所述近距离通信控制网元发送安全上下文响应信息;
具体的,安全上下文响应信息中包括协商密钥Kp。
步骤706,近距离通信控制网元向UE发送注册响应信息;
步骤707,近距离通信控制网元由安全上下文响应信息中获取协商密钥Kp;
上述步骤707可以在步骤706之前执行,也可以与步骤706并行执行。
步骤708,UE根据接收到的注册响应信息生成协商密钥Kp。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE根据步骤701中生成的p1和SharedKey进行密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同式1。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行机密性和/或完整性保护。例如,在步骤706中,近距离通信控制网元利用Kp对向UE发送的注册响应信息进行了机密性和/或完整性处理,则在步骤708中UE在生成协商密钥Kp之后,利用Kp进行相应的解密和/或验证的操作。
实施例七
如图8所示,图8为本发明实施例提供的第四种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤801,UE生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤802,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE ID和p1,其中,UE ID可以是IMSI。
步骤803,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了UE ID。
步骤804,控制网元根据安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息;
具体的,在执行本实施例的密钥协商方法之前,控制网元已经预先与UE通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元在安全上下文响应信息中携带SharedKey发送给近距离通信控制网元。
控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤805,近距离控制网元根据安全上下文响应信息生成协商密钥Kp;
具体的,近距离控制网元由安全上下文请求信息中获取SharedKey,根据SharedKey和注册请求信息中获取的p1进行密钥推衍函数计算。具体如式1。
步骤806,近距离通信控制网元向UE发送注册响应信息;
上述步骤806可以在步骤805之前执行,也可以与步骤805并行执行。
步骤807,UE根据接收到的注册响应信息生成协商密钥Kp。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE由注册响应信息中获取p1,根据p1和SharedKey进行密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同式1。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行机密性和/或完整性保护。例如,在步骤806中,近距离通信控制网元利用Kp对向UE发送的注册响应信息进行了机密性和/或完整性处理,则在步骤807中UE在生成协商密钥Kp之后,利用Kp进行相应的解密和/或验证的操作。
实施例八
如图9所示,图9为本发明实施例提供的第五种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤901,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE ID,具体可以如IMSI。
步骤902,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了UE ID。
步骤903,控制网元根据安全上下文请求信息生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤904,控制网元生成协商密钥Kp;
具体的,在执行本实施例的密钥协商方法之前,控制网元已经预先与UE通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元根据前步生成的p1和SharedKey进行密钥推衍函数计算。具体同前述式1,此处不再赘述。
控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤905,控制网元向所述近距离通信控制网元发送安全上下文响应信息;
具体的,安全上下文响应信息中包括协商密钥Kp和p1。
步骤906,近距离通信控制网元向UE发送注册响应信息;
具体的,注册响应信息中包括第一密钥协商参数p1。
步骤907,近距离通信控制网元由安全上下文响应信息中获取协商密钥Kp;
上述步骤907可以在步骤906之前执行,也可以与步骤906并行执行。
步骤908,UE根据接收到的注册响应信息生成协商密钥Kp。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE由注册响应信息中获取p1,根据p1和SharedKey进行密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同式1。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。具体的,在步骤906中,近距离通信控制网元向UE发送的注册响应信息中还可以包括校验码。所述校验码为根据Kp和注册响应信息生成的校验码。在步骤908中生成协商密钥Kp之后,可以利用Kp和接收到的注册响应信息对校验码进行验证。
实施例九
如图10所示,图10为本发明实施例提供的第六种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤1001,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE ID,具体可以如IMSI。
步骤1002,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了UE ID。
步骤1003,控制网元根据安全上下文请求信息生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤1004,控制网元向所述近距离通信控制网元发送安全上下文响应信息;
具体的,安全上下文响应信息中包括共享密钥SharedKey和p1。
在执行本实施例的密钥协商方法之前,控制网元已经预先与UE通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey 可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤1005,近距离控制网元根据安全上下文响应信息生成协商密钥Kp;
具体的,近距离控制网元由安全上下文请求信息中获取SharedKey和p1,根据SharedKey和p1进行密钥推衍函数计算。具体如式1。
步骤1006,近距离通信控制网元向UE发送注册响应信息;
具体的,注册响应信息中包括第一密钥协商参数p1。
上述步骤1006可以在步骤1005之前执行,也可以与步骤1005并行执行。
步骤1007,UE根据接收到的注册响应信息生成协商密钥Kp。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE由注册响应信息中获取p1,根据p1和SharedKey进行密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同式1。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。具体的,在步骤1006中,近距离通信控制网元向UE发送的注册响应信息中还可以包括校验码。所述校验码为根据Kp和注册响应信息生成的校验码。在步骤1007中生成协商密钥Kp之后,可以利用Kp和接收到的注册响应信息对校验码进行验证。
以上实施例四至实施例九中提供的密钥协商方法都是经过一次密钥推衍获得协商密钥Kp的,下述实施例十至十二提供了经过二次推衍获得协商密钥Kp的密钥协商方法。
实施例十
如图11所示,图11为本发明实施例提供的第七种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤1101,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE的身份标识(UE ID),如IMSI。
步骤1102,近距离通信控制网元生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤1103,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了UE ID和p1。
步骤1104,控制网元根据安全上下文请求信息生成基本密钥K1;
具体的,在执行本实施例的密钥协商方法之前,控制网元已经预先与UE通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元由安全上下文请求信息中获取p1,根据p1和SharedKey进行第一次密钥推衍函数计算。具体如下式:
K1=KDF(SharedKey,p1)                               (式2)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数。
控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤1105,控制网元向所述近距离通信控制网元发送安全上下文响应信息;
具体的,安全上下文响应信息中包括基本密钥K1。
步骤1106,近距离控制网元根据安全上下文响应信息生成协商密钥Kp;
具体的,近距离控制网元由安全上下文请求信息中获取K1,根据近距离控制网元中存储的第二次密钥推衍函数p2和K1进行密钥推衍函数计算。具体如下式:
Kp=KDF(K1,p2)                        (式3)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数;第二密钥推衍函数p2可以为UE ID,近距离通信控制网元ID,算法ID,ProSe App ID中的一个或任意多个。
步骤1107,近距离通信控制网元向UE发送注册响应信息;
具体的,注册响应信息中包括第一密钥协商参数p1。
上述步骤1107可以在步骤1106之前执行,也可以与步骤1106并行执行。
步骤1108,UE根据接收到的注册响应信息生成基本密钥K1。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE由注册响应信息中获取p1,根据p1和SharedKey进行第一次密钥推衍函数计算,得到基本密钥K1,具体计算公式同上述式2。
步骤1109,UE根据基本密钥K1生成协商密钥Kp。
具体的,因为p2为ID参数,因此UE中同样存储有第二次密钥推衍函数p2,利用p2和K1进行第二次密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同式3。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。具体的,在步骤1107中,近距离通信控制网元向UE发送的注册响应信息中还可以包括校验码。所述校验码为根据Kp和注册响应信息生成的校验码。在步骤1109中生成协商密钥Kp之后,可以利用Kp和接收到的注册响应信息对校验码进行验证。
实施例十一
如图12所示,图12为本发明实施例提供的第八种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤1201,UE生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤1202,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE ID和p1,其中,UE ID可以是IMSI。
步骤1203,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了近距离通信控制网元由注册请求信息中获取的UE ID和p1。
步骤1204,控制网元根据安全上下文请求信息生成基本密钥K1;
具体的,在执行本实施例的密钥协商方法之前,控制网元已经预先与UE通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元由安全上下文请求信息中获取p1,根据p1和SharedKey进行第一次密钥推衍函数计算。具体如前述式2。
控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤1205,控制网元向所述近距离通信控制网元发送安全上下文响应信息;
具体的,安全上下文响应信息中包括基本密钥K1。
步骤1206,近距离控制网元根据安全上下文响应信息生成协商密钥Kp;
具体的,近距离控制网元由安全上下文请求信息中获取K1,根据近距离控制网元中存储的第二次密钥推衍函数p2和K1进行密钥推衍函数计算。具体如前述式3。第二密钥推衍函数p2可以为UE ID,近距离通信控制网元ID,算法ID,ProSe App ID中的一个或任意多个。
步骤1207,近距离通信控制网元向UE发送注册响应信息;
具体的,注册响应信息中包括第一密钥协商参数p1。
上述步骤1207可以在步骤1206之前执行,也可以与步骤1206并行执行。
步骤1208,UE生成基本密钥K1。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE根据在步骤1201中生成的p1和SharedKey进行第一次密钥推衍函数计算,得到基本密钥K1,具体计算公式同前述式2。
步骤1209,UE根据基本密钥K1生成协商密钥Kp。
具体的,因为p2为ID参数,因此UE中同样存储有第二次密钥推衍函数p2,利用p2和K1进行第二次密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同前述式3。
上步骤1208和步骤1209可以在步骤1201之后的任意步骤的前、后执行,或与任意步骤并行执行。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行机密性和/或完整性保护。如果在步骤1207中,近距离通信控制网元对向UE发送的注册响应信息进行了机密性和/或完整性保护,则在步骤1209中生成协商密钥Kp之后,UE可以利用Kp做相应的解密和/或验证的操作。
实施例十二
如图13所示,图13为本发明实施例提供的第九种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤1301,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE ID,具体可以如IMSI。
步骤1302,近距离通信控制网元向控制网元发送安全上下文请求信息;
具体的,安全上下文请求信息中包括了UE ID。
步骤1303,控制网元根据安全上下文请求信息生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体包括计数器值、时间、序列号、随机数或新鲜参数中的任意一个或多个,也可以包括其他形式的参数。
步骤1304,控制网元根据安全上下文请求信息生成基本密钥K1;
具体的,在执行本实施例的密钥协商方法之前,控制网元已经预先与UE通过AKA进行认证,控制网元内存储有控制网元与UE之间的SharedKey。控制网元根据生成的p1和SharedKey进行第一次密钥推衍函数计算。具体如前述式2。
控制网元可以具体为移动管理实体(Mobility Management Entity,MME)或者归属用户服务器(Home Subscriber Server,HSS)。当控制网元为MME时,SharedKey可以具体为Kasme,NAS Key,或者NH;当控制网元为HSS时,Sharedkey可以具体为CK,IK,Kasme或者K。
步骤1305,控制网元向所述近距离通信控制网元发送安全上下文响应信息;
具体的,安全上下文响应信息中包括基本密钥K1和第一密钥协商参数p1。
步骤1306,近距离控制网元根据安全上下文响应信息生成协商密钥Kp;
具体的,近距离控制网元由安全上下文请求信息中获取K1,根据近距离控制网元中存储的第二次密钥推衍函数p2和K1进行密钥推衍函数计算。具体如前述式3。第二密钥推衍函数p2可以为UE ID,近距离通信控制网元ID,算法ID,ProSe App ID中的一个或任意多个。
步骤1307,近距离通信控制网元向UE发送注册响应信息;
具体的,注册响应信息中包括第一密钥协商参数p1。
上述步骤1307可以在步骤1306之前执行,也可以与步骤1306并行执行。
步骤1308,UE根据接收到的注册响应信息生成基本密钥K1。
具体的,UE中预先存储有控制网元与UE之间的SharedKey。UE由注册响应信息中获取p1,根据p1和SharedKey进行第一次密钥推衍函数计算,得到基本密钥K1,具体计算公式同前述式2。
步骤1309,UE根据基本密钥K1生成协商密钥Kp。
具体的,因为p2为ID参数,因此UE中同样存储有第二次密钥推衍函数p2,利用p2和K1进行第二次密钥推衍函数计算,从而得到协商密钥Kp。具体计算公式同前述式3。
由此,实现了UE与近距离通信控制网元共享协商密钥Kp。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。具体的,在步骤1307中,近距离通信控制网元向UE发送的注册响应信息中还可以包括校验码。所述校验码为根据Kp和注册响应信息生成的校验码。在步骤1309中生成协商密钥Kp之后,可以利用Kp和接收到的注册响应信息对校验码进行验证。
实施例十三
下面以图14为例详细说明本发明实施例十三提供的密钥协商方法,图14为本发明实施例十三提供的一种密钥协商方法流程图,在本发明实施例中实施主体为ProSe系统中的近距离通信控制网元(ProSe Function)。
如图14所示,该实施例具体包括以下步骤:
步骤1401,近距离通信控制网元接收用户设备发送的注册请求信息;
具体的,注册请求信息中可以包括UE的身份标识(UE ID),如IMSI。
步骤1402,根据所述注册请求信息向控制网元发送认证数据请求信息;
具体的,控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
另外认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距离通 信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe Subscriber ID,Application Layer User ID,Application ID中的一个或任意多个。
步骤1403,接收所述控制网元根据所述认证数据请求信息发送的认证数据响应信息;其中,所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES、加密密钥CK、完整性密钥IK;
另外,如果在步骤1402中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元。
步骤1404,对所述CK、IK和XRES进行存储;
步骤1405,向所述用户设备发送认证请求信息;所述认证请求信息包括由所述认证数据响应信息中获取的RAND和AUTN;
步骤1406,接收所述用户设备发送的认证响应信息;所述认证响应信息中包括所述用户设备根据所述认证请求信息生成的用户响应RES;
步骤1407,根据所述认证响应信息对所述用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤1408,向所述用户设备发送注册响应信息,用以所述用户和设备根据接收到的注册响应信息和所述CK、IK完成所述近距离通信控制网元与所述用户设备之间的密钥协商。
可选的,所述注册请求信息包括所述用户设备的安全算法列表,在步骤1408向所述用户设备发送注册响应信息之前,所述方法还包括:
所述近距离通信控制网元根据用户设备的安全算法列表和所述近距离通信控制网元存储的近距离通信控制网元的安全算法列表进行算法选择,得到 选择出的安全算法。其中,所述注册响应信息包括所述选择出的安全算法。
可选的,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元中存储有近距离通信控制网元的安全算法列表,在步骤1401收到所述用户设备发送的所述注册请求信息之后,所述方法还包括:
所述近距离通信控制网元根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到选择出的安全算法。
可选的,所述注册响应信息包括第一密钥协商参数,在向所述用户设备发送注册响应信息之前,所述方法还包括:
近距离通信控制网元生成第一密钥协商参数;
近距离通信控制网元根据所述第一密钥协商参数和所述CK、IK进行密钥推衍函数计算,得到协商密钥。
可选的,近距离通信控制网元根据所述CK、IK和存储在所述近距离通信控制网元中的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
通过应用本发明实施例提供的密钥协商方法,为UE与近距离通信控制网元之间的密钥协商提供了完整的解决方案,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
实施例十四
下面以图15为例详细说明本发明实施例十四提供的密钥协商方法,图15为本发明实施例十四提供的一种密钥协商方法流程图,在本发明实施例中实施主体为ProSe系统中的UE。
如图15所示,该实施例具体包括以下步骤:
步骤1501,用户设备向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE的身份标识(UE ID),如IMSI。
步骤1502,接收所述近距离通信控制网元发送的认证请求信息;所述认证请求信息包括所述近距离通信控制网元由所述控制网元获取的RAND和 AUTN;
如果认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元。
步骤1503,利用RAND验证AUTN的正确性;
具体的,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;其中,密钥参数可以具体为K。
步骤1504,当验证所述AUTN正确时,根据所述认证请求信息计算得到CK、IK、RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK。
步骤1505,向近距离通信控制网元发送认证响应信息,用以所述近距离通信控制网元根据所述认证响应信息对用户设备进行认证;所述认证响应信息中包括所述RES;
步骤1506,接收所述近距离通信控制网元发送的注册响应信息,用以根据所述注册响应信息和所述CK、IK完成所述近距离通信控制网元与所述用户设备之间的密钥协商。
可选的,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
可选的,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述方法还包括:
根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算 法列表进行算法选择,得到的选择出的安全算法。
可选的,所述注册响应信息包括所述近距离通信控制网元生成的第一密钥协商参数,所述方法还包括:
用户设备根据所述第一密钥协商参数和所述CK、IK进行密钥推衍函数计算,得到协商密钥。
可选的,所述方法还包括:
用户设备根据所述CK、IK和存储在所述用户设备中的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
通过应用本发明实施例提供的密钥协商方法,为UE与近距离通信控制网元之间的密钥协商提供了完整的解决方案,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
前述实施例十三、十四中分别以近距离通信控制网元和用户设备为执行主体说明了密钥协商方法的过程,在下述实施例十五到实施例二十三中,结合ProSe系统中的UE、控制网元和近距离通信控制网元,分别对密钥协商方法的具体实施过程进行详细的说明。
实施例十五
如图16所示,图16为本发明实施例提供的第十种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤1601,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE的身份标识(UE ID),如IMSI。
步骤1602,近距离通信控制网元向控制网元发送认证数据请求信息,认证数据请求信息中包括UE ID。控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
可选的,认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距 离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤1603,近距离通信控制网元接收控制网元根据认证数据请求信息返回的认证数据响应信息AV,其中具体包括RAND,AUTN,XRES,CK和IK,或者AV包括RAND,AUTN,XRES,K1。
如果在步骤1602中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元;或者
HSS可以进一步根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。或者,HSS根据Kasme和ID参数生成K1=KDF(Kasme,ID参数),其中Kasme为LTE AV参数之一;此时认证数据响应信息AV具体包括RAND,AUTN,XRES,K1。
步骤1604,近距离通信网元对接收到的XRES,CK和IK,或者XRES,K1进行存储。
步骤1605,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤1606,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;
其中,密钥参数可以具体为K。
步骤1607,当验证通过后,用户设备根据RAND和AUTN计算得到CK、IK和RES,或者用户设备根据RAND和AUTN计算得到K1和RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完 成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK;或者
如果HSS根据CK,IK或Kasme生成K1,UE可以进一步根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。或者,UE根据Kasme和ID参数生成K1=KDF(Kasme,ID参数)。
步骤1608,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤1609,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤1610,近距离通信控制网元向用户设备发送注册响应信息,用以所述用户设备根据接收到的注册响应信息和CK、IK或K1完成近距离通信控制网元与用户设备之间的密钥协商。
实施例十六
如图17所示,图17为本发明实施例提供的第十一种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤1701,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中可以包括UE的身份标识(UE ID),如IMSI。
步骤1702,近距离通信控制网元向控制网元发送认证数据请求信息,认证数据请求信息中包括UE ID。控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
可选的,认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或 任意多个。
步骤1703,近距离通信控制网元接收控制网元根据认证数据请求信息返回的认证数据响应信息AV,其中具体包括RAND,AUTN,XRES,CK和IK,或者AV包括RAND,AUTN,XRES,K1;
如果在步骤1702中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元;或者
HSS可以进一步根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。或者,HSS根据Kasme和ID参数生成K1=KDF(Kasme,ID参数),其中Kasme为LTE AV参数之一;此时认证数据响应信息AV具体包括RAND,AUTN,XRES,K1。
步骤1704,近距离通信网元对接收到的XRES,CK和IK,或者XRES,K1进行存储。
步骤1705,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤1706,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;
其中,密钥参数可以具体为K。
步骤1707,当验证通过后,用户设备根据RAND和AUTN计算得到CK、IK和RES,或者用户设备根据RAND和AUTN计算得到K1和RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK;或者
如果HSS根据CK,IK或Kasme生成K1,UE可以进一步根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。或者,UE根据Kasme和ID参数生成K1=KDF(Kasme,ID参数)。
步骤1708,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤1709,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤1710,近距离通信控制网元生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体为新鲜参数(Fresh Parameter)。
步骤1711,近距离通信控制网元向用户设备发送注册响应信息,用以所述用户设备根据接收到的注册响应信息完成近距离通信控制网元与用户设备之间的密钥协商。
具体的,注册响应信息中包括近距离通信控制网元生成的第一密钥协商参数p1。
步骤1712,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据第一密钥协商参数p1和IK、CK进行密钥推衍函数计算。具体如下式:
Kp=KDF(CK||IK,p1)                      (式4)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数;或者
Kp=KDF(K1,p1)                          (式5)
步骤1713,用户设备根据接收到的注册响应信息生成协商密钥Kp;
具体的,用户设备根据由注册响应信息中获取的第一密钥协商参数p1和IK、CK或者K1进行密钥推衍函数计算。具体如上述步骤1712内计算方式。
实施例十七
如图18所示,图18为本发明实施例提供的第十二种密钥协商方法的信令图。该实施例具体包括以下步骤:
其中步骤1801至步骤1810与前述实施例十五中步骤1601至步骤1610的执行过程一样,此处不再赘述。
在步骤1810之后,还包括:
步骤1811,近距离通信控制网元根据存储的第二次密钥推衍函数p2和CK、IK进行密钥推衍函数计算。具体如下式:
Kp=KDF(CK||IK,p2)                    (式6)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数;第二密钥推衍函数p2具体为用户设备与近距离通信控制网元之间共享的ID信息。
步骤1812,用户设备根据接收到的注册响应信息生成协商密钥Kp;
具体的,用户设备在接收到注册响应信息之后,根据存储的第二次密钥推衍函数p2和CK、IK进行密钥推衍函数计算。具体如上述式6。
实施例十八
如图19所示,图19为本发明实施例提供的第十三种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤1901,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI,还包括UE的安全算法列表。UE的安全算法列表中包括了UE支持的全部安全算法。
步骤1902,近距离通信控制网元向控制网元发送认证数据请求信息,认证数据请求信息中包括UE ID。控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
可选的,认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤1903,近距离通信控制网元接收控制网元根据认证数据请求信息返回的认证数据响应信息AV,其中具体包括RAND,AUTN,XRES,CK和IK;或者AV包括RAND,AUTN,XRES,K1
如果在步骤1902中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元;或者
HSS可以进一步根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。或者,HSS根据Kasme和ID参数生成K1=KDF(Kasme,ID参数),其中Kasme为LTE AV参数之一;此时认证数据响应信息AV具体包括RAND,AUTN,XRES,K1。
步骤1904,近距离通信网元对接收到的XRES,CK和IK;或XRES,K1进行存储。
步骤1905,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤1906,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;
其中,密钥参数可以具体为K。
步骤1907,当验证通过后,用户设备根据RAND和AUTN计算得到CK、IK和RES,或者用户设备根据RAND和AUTN计算得到K1和RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK;或者
如果HSS根据CK,IK或Kasme生成K1,UE可以进一步根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。或者,UE根据Kasme和ID参数生成K1=KDF(Kasme,ID参数)。
步骤1908,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤1909,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤1910,近距离通信控制网元根据存储的近距离通信网元的安全算法列表,与在前述步骤1901中获取的UE的安全算法列表进行算法选择。
其中算法选择可以为,根据近距离通信网元的安全算法列表中的优先级顺序,依次对近距离通信控制网元的安全算法列表中安全算法与UE的安全算法列表中的算法进行匹配,第一个匹配成功的安全算法即为选择出的算法。
步骤1911,近距离通信控制网元向用户设备发送注册响应信息,其中注册响应信息中包括近距离通信控制网元确定的选择出的安全算法。
其中,步骤1910可以在步骤1901至步骤1911之间的任意步骤的前后执行,或与步骤1902至步骤1909任一步骤并行。
可选的,近距离通信控制网元还可以利用IK对注册响应信息进行完整性 保护。
实施例十九
如图20所示,图20为本发明实施例提供的第十四种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤2001,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI,还包括UE的安全算法列表。UE的安全算法列表中包括了UE支持的全部安全算法。
步骤2002,近距离通信控制网元向控制网元发送认证数据请求信息,认证数据请求信息中包括UE ID。控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
可选的,认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤2003,近距离通信控制网元接收控制网元根据认证数据请求信息返回的认证数据响应信息AV,其中具体包括RAND,AUTN,XRES,CK和IK;或者AV包括RAND,AUTN,XRES,K1。
如果在步骤2002中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元;或者
HSS可以进一步根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。或者,HSS根据Kasme和ID参数生成K1,其中Kasme为LTE AV参数之一;此时认证数据响应信息AV具体包括RAND,AUTN,XRES,K1。
步骤2004,近距离通信网元对接收到的XRES,CK和IK进行存储。
步骤2005,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤2006,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;
其中,密钥参数可以具体为K。
步骤2007,当验证通过后,用户设备根据RAND和AUTN计算得到CK、IK和RES,或者用户设备根据RAND和AUTN计算得到K1和RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK;或者
如果HSS根据CK,IK或Kasme生成K1,UE可以进一步根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。或者,UE根据Kasme和ID参数生成K1。
步骤2008,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤2009,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2010,近距离通信控制网元生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数;第一密钥协商参数p1可以具体为新鲜参数(Fresh Parameter)。
步骤2011,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据第一密钥协商参数p1和IK、CK进行密钥推衍函数计算。具体如下式:
Kp=KDF(CK||IK,p1)                    (式4)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数;或者
Kp=KDF(K1,p1)                          (式5)
步骤2012,近距离通信控制网元根据存储的近距离通信网元的安全算法列表,与在前述步骤2001中获取的UE的安全算法列表进行算法选择。
其中算法选择可以为,根据近距离通信网元的安全算法列表中的优先级顺序,依次对近距离通信控制网元的安全算法列表中安全算法与UE的安全算法列表中的算法进行匹配,第一个匹配成功的安全算法即为选择出的算法。
其中,步骤2012可以在步骤2001至步骤2011之间的任意步骤的前后执行,或与步骤2002至步骤2011任一步骤并行。
步骤2013,近距离通信控制网元向用户设备发送注册响应信息,其中注册响应信息中包括近距离通信控制网元确定的选择出安全算法,和第一密钥协商参数p1。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。
步骤2014,用户设备根据接收到的注册响应信息生成协商密钥Kp;
具体的,用户设备根据由注册响应信息中获取的第一密钥协商参数p1和IK、CK或者K1进行密钥推衍函数计算。具体如上述步骤2011内计算方式。
实施例二十
如图21所示,图21为本发明实施例提供的第十五种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤2101,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI,还包括UE的安全算法列表。UE的安全算法列表中包括了UE支持的全部安全算法。
步骤2102,近距离通信控制网元向控制网元发送认证数据请求信息,认证数据请求信息中包括UE ID。控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
可选的,认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤2103,近距离通信控制网元接收控制网元根据认证数据请求信息返回的认证数据响应信息AV,其中具体包括RAND,AUTN,XRES,CK和IK;
如果在步骤2102中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元。
步骤2104,近距离通信网元对接收到的XRES,CK和IK进行存储。
步骤2105,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤2106,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;
其中,密钥参数可以具体为K。
步骤2107,当验证通过后,用户设备根据RAND和AUTN计算得到CK、IK和RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK。
步骤2108,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤2109,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2110,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据存储的第二密钥协商参数p2和IK、CK进行密钥推衍函数计算。具体如下式:
Kp=KDF(CK||IK,p2)                      (式6)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数。第二密钥推衍函数p2为UE与近距离通信控制网元之间共享的ID信息。
步骤2111,近距离通信控制网元根据存储的近距离通信网元的安全算法列表,与在前述步骤2101中获取的UE的安全算法列表进行算法选择。
其中算法选择可以为,根据近距离通信网元的安全算法列表中的优先级顺序,依次对近距离通信控制网元的安全算法列表中安全算法与UE的安全算法列表中的算法进行匹配,第一个匹配成功的安全算法即为选择出的算法。
其中,步骤2111可以在步骤2101至步骤2110之间的任意步骤的前后执行,或与步骤2101至步骤2110任一步骤并行。
步骤2112,近距离通信控制网元向用户设备发送注册响应信息,其中注册响应信息中包括近距离通信控制网元确定的选择出的安全算法。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。
步骤2113,用户设备根据接收到的注册响应信息生成协商密钥Kp;
具体的,用户设备根据存储的第二密钥协商参数p2和IK、CK进行密钥推衍函数计算。具体如上述式6。
实施例二十一
如图22所示,图22为本发明实施例提供的第十六种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤2201,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI,还包括UE的安全算法列表。UE的安全算法列表中包括了UE支持的全部安全算法。
步骤2202,近距离通信控制网元向控制网元发送认证数据请求信息,认证数据请求信息中包括UE ID。控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
可选的,认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤2203,近距离通信控制网元接收控制网元根据认证数据请求信息返回的认证数据响应信息AV,其中具体包括RAND,AUTN,XRES,CK和IK;
如果在步骤2202中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元。
步骤2204,近距离通信网元对接收到的XRES,CK和IK进行存储。
步骤2205,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤2206,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;
其中,密钥参数可以具体为K。
步骤2207,当验证通过后,用户设备根据RAND和AUTN计算得到CK、IK和RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK。
步骤2208,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。
步骤2209,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2210,近距离通信控制网元向用户设备发送注册响应信息,其中注册响应信息中包括近距离通信控制网元的安全算法列表。
步骤2211,用户设备根据存储的UE的安全算法列表,与在前述步骤2210中获取的近距离通信控制网元的安全算法列表进行算法选择。
其中算法选择可以为,根据近距离通信网元的安全算法列表中的优先级 顺序,依次对近距离通信控制网元的安全算法列表中安全算法与UE的安全算法列表中的算法进行匹配,第一个匹配成功的安全算法即为选择出的算法。
步骤2212,近距离通信控制网元根据存储的近距离通信网元的安全算法列表,与在前述步骤2201中获取的UE的安全算法列表进行算法选择。
具体的,根据近距离通信网元的安全算法列表中的优先级顺序,依次对近距离通信控制网元的安全算法列表中加密算法与UE的安全算法列表中的加密算法进行匹配,第一个匹配成功的安全算法即为选择出的加密算法。对完整性算法的选择也采用相同的方法。
实施例二十二
如图23所示,图23为本发明实施例提供的第十七种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤2301,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI,还包括UE的安全算法列表。UE的安全算法列表中包括了UE支持的全部安全算法。
步骤2302,近距离通信控制网元向控制网元发送认证数据请求信息,认证数据请求信息中包括UE ID。控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
可选的,认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤2303,近距离通信控制网元接收控制网元根据认证数据请求信息返回的认证数据响应信息AV,其中具体包括RAND,AUTN,XRES,CK和IK;
如果在步骤2302中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算: Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元。
步骤2304,近距离通信网元对接收到的XRES,CK和IK进行存储。
步骤2305,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤2306,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;
其中,密钥参数可以具体为K。
步骤2307,当验证通过后,用户设备根据RAND和AUTN计算得到CK、IK和RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK。
步骤2308,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。
步骤2309,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2310,近距离通信控制网元生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进 行密钥协商的参数;第一密钥协商参数p1可以具体为新鲜参数(Fresh Parameter)。
步骤2311,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据第一密钥协商参数p1和IK、CK进行密钥推衍函数计算。具体如下式:
Kp=KDF(CK||IK,p1)                   (式4)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数。
步骤2312,近距离通信控制网元根据存储的近距离通信网元的安全算法列表,与在前述步骤2301中获取的UE的安全算法列表进行算法选择。
其中算法选择可以为,根据近距离通信网元的安全算法列表中的优先级顺序,依次对近距离通信控制网元的安全算法列表中安全算法与UE的安全算法列表中的算法进行匹配,第一个匹配成功的安全算法即为选择出的算法。
步骤2313,近距离通信控制网元向用户设备发送注册响应信息,其中注册响应信息中包括近距离通信控制网元确定的选择出的安全算法,以及第一密钥协商参数p1。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。
步骤2314,用户设备根据接收到的注册响应信息生成协商密钥Kp;
具体的,用户设备根据由注册响应信息中获取的第一密钥协商参数p1和IK、CK进行密钥推衍函数计算。具体如上述式4。
步骤2315,用户设备根据存储的UE的安全算法列表,与在前述步骤2313中获取的近距离通信控制网元的安全算法列表进行算法选择。
具体的,根据近距离通信网元的安全算法列表中的优先级顺序,依次对近距离通信控制网元的安全算法列表中加密算法与UE的安全算法列表中的加密算法进行匹配,第一个匹配成功的安全算法即为选择出的加密算法。对 完整性算法的选择也采用相同的方法。如果没有匹配成功的加密算法或完整性算法,则确定一个缺省算法作为安全算法。
实施例二十三
如图24所示,图24为本发明实施例提供的第十八种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤2401,UE向近距离通信控制网元发送注册请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI,还包括UE的安全算法列表。UE的安全算法列表中包括了UE支持的全部安全算法。
步骤2402,近距离通信控制网元向控制网元发送认证数据请求信息,认证数据请求信息中包括UE ID。控制网元可以具体为归属用户服务器(Home Subscriber Server,HSS)。
可选的,认证数据请求信息中可能还包括ID参数:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤2403,近距离通信控制网元接收控制网元根据认证数据请求信息返回的认证数据响应信息AV,其中具体包括RAND,AUTN,XRES,CK和IK;
如果在步骤2402中认证数据请求信息包含ID参数,或者HSS内配置了ID参数,HSS可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元。
步骤2404,近距离通信网元对接收到的XRES,CK和IK进行存储。
步骤2405,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息 中获取的RAND和AUTN。
步骤2406,UE根据接收到的RAND和UE内部存储的密钥参数,对AUTN的正确性进行验证;
其中,密钥参数可以具体为K。
步骤2407,当验证通过后,用户设备根据RAND和AUTN计算得到CK、IK和RES;
如果HSS根据ID参数生成了CK’和IK’,UE可以进一步根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为上述CK、IK。
步骤2408,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。
步骤2409,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2410,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据存储的第二密钥协商参数p2和IK、CK进行密钥推衍函数计算。具体如下式:
Kp=KDF(CK||IK,p2)                        (式6)
其中KDF()为密钥推衍函数;另外,不局限于KDF函数,其他安全的函数也可以用于Kp的推衍,如安全的NMAC函数。第二密钥推衍函数p2具体为用户设备与近距离通信控制网元之间共享的ID信息。
步骤2411,近距离通信控制网元根据存储的近距离通信网元的安全算法 列表,与在前述步骤2401中获取的UE的安全算法列表进行算法选择。
其中算法选择可以为,根据近距离通信网元的安全算法列表中的优先级顺序,依次对近距离通信控制网元的安全算法列表中安全算法与UE的安全算法列表中的算法进行匹配,第一个匹配成功的安全算法即为选择出的算法。
步骤2412,近距离通信控制网元向用户设备发送注册响应信息,其中注册响应信息中包括近距离通信控制网元确定的选择出的安全算法。
可选的,近距离通信控制网元还可以利用Kp对注册响应信息进行完整性保护。
步骤2413,用户设备根据接收到的注册响应信息生成协商密钥Kp;
具体的,用户设备根据存储的第一密钥协商参数p2和IK、CK进行密钥推衍函数计算。具体如上述式6。
步骤2414,用户设备根据存储的UE的安全算法列表,与在前述步骤2412中获取的近距离通信控制网元的安全算法列表进行算法选择。
具体的,根据近距离通信网元的安全算法列表中的优先级顺序,依次对近距离通信控制网元的安全算法列表中加密算法与UE的安全算法列表中的加密算法进行匹配,第一个匹配成功的安全算法即为选择出的加密算法。对完整性算法的选择也采用相同的方法。如果没有匹配成功的加密算法或完整性算法,则确定一个缺省算法作为安全算法。
实施例二十四
下面以图25为例详细说明本发明实施例二十四提供的密钥协商方法,图26为本发明实施例二十四提供的一种密钥协商方法流程图,在本发明实施例中实施主体为ProSe系统中的近距离通信控制网元(ProSe Function)。
如图25所示,该实施例具体包括以下步骤:
步骤2501,近距离通信控制网元接收用户设备发送的请求信息;
具体的,所述请求消息可以为注册请求消息,也可以为其他类型的请求 消息。请求信息中包括UE的身份标识(UE ID),如IMSI。
步骤2502,根据所述请求信息向归属用户服务器(Home Subscriber Server,HSS)发送认证数据请求信息;
具体的,所述认证数据请求信息中包括用户设备ID和ID参数;ID参数可以包括:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe Subscriber ID,Application Layer User ID,Application ID中的一个或任意多个。
步骤2503,接收所述HSS根据所述认证数据请求信息发送的认证数据响应信息;
其中,所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES、推衍加密密钥CK’和推衍完整性密钥IK’,或者认证数据响应信息AV包括:随机数RAND、AUTN参数、期望的用户响应XRES和基本密钥K1;
具体的,HSS根据密钥协商协议(AKA)算法对认证数据请求信息进行计算,得到随机数RAND、AUTN参数、期望的用户响应XRES、加密密钥CK和完整性密钥IK。
可选的,鉴权令牌(AUTN)中包括认证管理域(Authentication Management Field,AMF)参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。比如,HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息。
之后,
HSS进一步根据CK、IK和ID参数完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;或者,CK’为Key的后128比特,IK’为Key的前128比特。然后将CK’和IK’发送给近距离通信控制网元。
或者,HSS进一步根据CK、IK和ID参数完成K1的计算:K1=KDF(CK||IK,ID参数)。
步骤2504,向所述用户设备发送认证请求信息;
具体的,所述认证请求信息包括由所述认证数据响应信息中获取的RAND和AUTN;
步骤2505,接收所述用户设备发送的认证响应信息;
具体的,所述认证响应信息中包括所述用户设备根据所述认证请求信息生成的用户响应RES;用户设备在接收到认证请求信息后,会验证AUTN中AMF的第X个比特位是否被置位;若第X比特被置位,则生成认证响应信息,若第X比特没有被置位,UE会中断认证过程。例如:判断是否被置位的方法可以为判断第X比特是否为1。
步骤2506,根据所述认证响应信息对所述用户设备进行认证;
具体的,对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2507,向所述用户设备发送响应信息,用以所述用户设备根据接收到的响应信息完成所述近距离通信控制网元与所述用户设备之间的根据所述推衍加密密钥CK’、推衍完整性密钥IK’;或者,基本密钥K1进行的密钥协商。
可选的,所述响应信息可以为注册响应信息,也可以是其他类型的响应信息,包括第一密钥协商参数,在认证数据响应信息为五元组的情况下,在向所述用户设备发送响应信息之前,所述方法还包括:
生成第一密钥协商参数p1;
在所述响应信息中携带所述第一密钥协商参数p1。
在发送响应信息之后,近距离通信控制网元根据所述第一密钥协商参数p1和CK’、IK’进行密钥推衍函数计算,得到协商密钥Kp:
Kp=KDF(CK’||IK’,p1)。
可选的,在认证数据响应信息为五元组的情况下,所述近距离通信控制网元根据所述CK’、IK’和存储的第二密钥协商参数p2进行密钥推衍函数计算,得到协商密钥Kp:
Kp=KDF(CK’||IK’,p2)。
可选的,所述响应信息包括第一密钥协商参数,在认证数据响应信息为四元组的情况下,在向所述用户设备发送响应信息之前,所述方法还包括:
生成第一密钥协商参数p1;
在所述响应信息中携带所述第一密钥协商参数p1。
在发送响应信息之后,近距离通信控制网元根据所述第一密钥协商参数p1和K1进行密钥推衍函数计算,得到协商密钥Kp:
Kp=KDF(K1,p1)。
可选的,在认证数据响应信息为四元组的情况下,根据K1和存储的第二密钥协商参数p2进行密钥推衍函数计算,得到协商密钥Kp:
Kp=KDF(K1,p2)。
可选的,所述方法还包括:在向用户设备发送认证请求信息之前,对所述认证数据响应信息进行存储;
具体的,如果认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES、推衍加密密钥CK’和推衍完整性密钥IK’,对CK’、IK’和XRES进行存储;
如果认证数据响应信息AV包括:随机数RAND、AUTN参数、期望的用户响应XRES和基本密钥K1,对K1和XRES进行存储。
进一步可选的,CK’,IK’的推衍可以在验证完认证响应信息之后执行;也可以在发送注册响应信息之后执行。
通过应用本发明实施例提供的密钥协商方法,为UE与近距离通信控制网元之间的密钥协商提供了完整的解决方案,在不改变现有ProSe的架构的基 础上,实现UE与近距离通信控制网元之间的密钥协商。
实施例二十五
下面以图26为例详细说明本发明实施例二十五提供的密钥协商方法,图26为本发明实施例二十五提供的一种密钥协商方法流程图,在本发明实施例中实施主体为ProSe系统中的UE。
如图26所示,该实施例具体包括以下步骤:
步骤2601,用户设备向近距离通信控制网元发送请求信息;
具体的,请求信息可以为注册请求信息,也可以是其他类型的请求信息,其中包括UE的身份标识(UE ID),如IMSI。
步骤2602,接收所述近距离通信控制网元发送的认证请求信息AV;
具体的,所述认证请求信息AV包括所述近距离通信控制网元由所述HSS获取的RAND和AUTN;
可选的,AUTN中包括认证管理域(Authentication Management Field,AMF)参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。比如,HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息;所述CK,IK为通过密钥协商协议AKA算法计算得到的加密密钥和完整性密钥。
步骤2603,根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;
步骤2604,根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
具体的,AUTN可以为四元组或者五元组;ID参数预先存储在UE中,UE根据所述CK、IK和所述ID参数进行密钥推衍函数计算。
UE根据CK、IK和ID参数得到推衍加密密钥CK’、推衍完整性密钥IK’; 具体过程为,计算Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特,或者,CK’为Key的后128比特,IK’为Key的前128比特。用户设备生成认证响应信息,其中认证响应信息包括RES。或者
UE根据CK、IK和ID参数计算得到K1。
步骤2605,向近距离通信控制网元发送认证响应信息;
具体的所述认证响应信息用以所述近距离通信控制网元根据所述认证响应信息对用户设备进行认证;所述认证响应信息中包括所述RES;近距离通信控制网元对由认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2606,接收所述近距离通信控制网元发送的响应信息,用以根据所述响应信息完成所述近距离通信控制网元与所述用户设备之间的密钥协商。
可选的,所述响应信息可以为注册响应信息,也可以是其他类型的响应信息,响应信息中还包括近距离通信控制网元生成的第一密钥协商参数p1。用户设备根据所述CK’、IK’和所述第一密钥协商参数p1进行密钥推衍函数计算,得到协商密钥:
Kp=KDF(CK’||IK’,p1)。
可选的,用户设备中存储有第二密钥协商参数p2,用户设备根据所述CK’、IK’和存储的第二密钥协商参数p2进行密钥推衍函数计算,得到协商密钥Kp:
Kp=KDF(CK’||IK’,p2)。
可选的,响应信息包括第一密钥协商参数,用户设备根据所述第一密钥协商参数p1和K1进行密钥推衍函数计算,得到协商密钥Kp:
Kp=KDF(K1,p1)。
可选的,用户设备根据K1和存储的第二密钥协商参数p2进行密钥推衍函数计算,得到协商密钥Kp:
Kp=KDF(K1,p2)。
可选的,在步骤2603之前,该方法还可以包括:验证所述认证请求信息的正确性;
具体的,用户设备在接收到认证请求信息后,会验证AUTN中AMF的第X个比特位是否被置位,例如判定AUTN中AMF的第X个比特位是否为1。
如果第X个比特位不为1,UE中断认证过程。
如果第X个比特位为1,则根据认证请求信息计算得到RES、CK、IK,并根据所述CK、IK和所述ID参数进行密钥推衍函数计算,得到推衍加密密钥CK’、推衍完整性密钥IK’;具体过程为,计算Key=KDF(CK||IK,ID参数),其中CK’为Key的前128比特,IK’为Key的后128比特,或者,CK’为Key的后128比特,IK’为Key的前128比特。用户设备生成认证响应信息,其中认证响应信息包括RES。或者如果第X个比特位为1,则根据认证请求信息计算得到RES、CK、IK,并根据CK、IK和所述ID参数计算K1=KDF(CK||IK,ID参数)。
进一步可选的,上述CK’,IK’的推衍可以在计算完CK和IK之后执行;也可以在接收到注册响应消息之后执行。
通过应用本发明实施例提供的密钥协商方法,为UE与近距离通信控制网元之间的密钥协商提供了完整的解决方案,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
实施例二十六
下面以图27为例详细说明本发明实施例二十六提供的密钥协商方法,图27为本发明实施例二十六提供的一种密钥协商方法流程图,在本发明实施例中实施主体为ProSe系统中的HSS。
如图27所示,该实施例具体包括以下步骤:
步骤2701,HSS接收近距离通信控制网元发送的认证数据请求信息;
具体的,所述认证数据请求信息包括ID参数,或者所述HSS中存储有 ID参数。
步骤2702,根据所述认证数据请求信息计算出认证向量;所述认证向量包括:加密密钥CK、完整性密钥IK;
具体的,HSS通过密钥协商协议AKA算法计算得到加密密钥CK、完整性密钥IK;此外还包括RAND,AUTN,XRES;
可选的,AUTN中包括AMF参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。例如:HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息。
步骤2703,根据所述CK,IK和ID参数完成对推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1的计算;
具体的,HSS进一步根据CK、IK和ID参数完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;或者,CK’为Key的后128比特,IK’为Key的前128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元。
或者,HSS进一步根据CK、IK和ID参数完成K1的计算:K1=KDF(CK||IK,ID参数)。
步骤2704,向近距离通信控制网元发送所述认证数据响应信息,所述认证数据响应信息包括所述CK’、IK’,或,所述K1。
具体的,认证数据响应信息AV=(RAND,AUTN,XRES,CK’,IK’)或者AV=(RAND,AUTN,XRES,K1)。
该认证数据响应信息用于实现UE与近距离通信控制网元之间的密钥协商。
前述实施例二十四至二十六中分别以近距离通信控制网元、用户设备和 HSS为执行主体说明了密钥协商方法的过程,在下述实施例二十七到实施例三十二中,结合ProSe系统中的UE、HSS和近距离通信控制网元,分别对密钥协商方法的具体实施过程进行详细的说明。
实施例二十七
如图28所示,图28为本发明实施例提供的第十九种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤2801,UE向近距离通信控制网元发送请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI。
步骤2802,近距离通信控制网元向HSS发送认证数据请求信息,认证数据请求信息中包括UE ID和ID参数。
ID参数具体可以包括:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤2803,HSS根据所述ID参数,通过密钥协商协议AKA算法计算得到认证数据响应信息;所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES和推衍加密密钥CK’和推衍完整性密钥IK’。
AUTN中包括认证管理域(Authentication Management Field,AMF)参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。比如,HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息;所述CK,IK为通过密钥协商协议AKA算法计算得到的加密密钥和完整性密钥。
具体的,HSS根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;或者,CK’为Key的后128比特,IK’为Key的前128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元;此时, AV具体包括RAND,AUTN,XRES,CK’和IK’;
步骤2804,近距离通信控制网元接收HSS根据认证数据请求信息返回的认证数据响应信息AV,其中AV具体包括RAND,AUTN,XRES,CK’和IK’。
步骤2805,近距离通信网元对接收到的XRES,CK’和IK’进行存储。
步骤2806,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤2807,UE根据接收到的AUTN进行验证,当验证通过时计算CK’、IK’和RES生成认证响应信息;
具体的,用户设备在接收到认证请求信息后,会验证AUTN中AMF的第X个比特位是否被置位;例如:验证AUTN中AMF的第X个比特位是否为1。如果第X个比特位为1,则UE根据认证请求信息计算得到RES,CK和IK,并进一步根据ID参数,采用和HSS相同的方法计算得到CK’、IK’。
步骤2808,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤2809,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,近距离通信控制网元对认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2810,近距离通信控制网元向用户设备发送响应信息,用以所述用户设备根据接收到的响应信息完成近距离通信控制网元与用户设备之间的密钥协商。
具体的,向所述用户设备发送注册响应信息,用以所述用户设备根据接收到的注册响应信息完成所述近距离通信控制网元与所述用户设备之间的所述推衍加密密钥CK’、推衍完整性密钥IK’的协商;或者,完成基本密钥K1的协商。
进一步可选的:用户设备根据CK和IK对CK’,IK’的推衍可以在计算完CK和IK之后执行;也可以在接收到注册响应信息之后执行。
实施例二十八
如图29所示,图29为本发明实施例提供的第二十种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤2901,UE向近距离通信控制网元发送请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI。
步骤2902,近距离通信控制网元向HSS发送认证数据请求信息,认证数据请求信息中包括UE ID和ID参数。HSS可以具体为归属用户服务器(Home Subscriber Server,HSS)。
ID参数具体可以包括:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤2903,HSS根据所述ID参数,通过密钥协商协议AKA算法计算得到认证数据响应信息;所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES和基本密钥K1。
AUTN中包括认证管理域(Authentication Management Field,AMF)参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。比如,HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息;所述CK,IK为通过密钥协商协议AKA算法计算得到的加密密钥和完整性密钥。
具体的,认证向量可以为根据所述CK、IK和ID参数进行密钥推衍函数计算得到的基本密钥K1;HSS根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。此时认证数据响应信息AV具体包括RAND,AUTN,XRES,K1。
步骤2904,近距离通信控制网元接收HSS根据认证数据请求信息返回的认证数据响应信息AV,其中AV具体包括RAND,AUTN,XRES,K1。
步骤2905,近距离通信网元对接收到的XRES,K1进行存储。
步骤2906,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤2907,UE根据接收到的AUTN进行验证,当验证通过时计算K1和RES生成认证响应信息;
具体的,具体的,用户设备在接收到认证请求信息后,会验证AUTN中AMF的第X个比特位是否被置位;例如:验证AUTN中AMF的第X个比特位是否为1。如果第X个比特位为1,则UE根据认证请求信息计算得到RES,CK和IK,并进一步根据ID参数,采用和HSS相同的方法计算得到K1。
步骤2908,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤2909,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,近距离通信控制网元对认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤2910,近距离通信控制网元向用户设备发送响应信息,用以所述用户设备根据接收到的响应信息完成近距离通信控制网元与用户设备之间的密钥协商。
进一步可选的:用户设备对K1的推衍可以在计算完CK和IK之后执行;也可以在接收到注册响应信息之后执行。
实施例二十九
如图30所示,图30为本发明实施例提供的第二十一种密钥协商方法的 信令图。该实施例具体包括以下步骤:
步骤3001,UE向近距离通信控制网元发送请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI。
步骤3002,近距离通信控制网元向HSS发送认证数据请求信息,认证数据请求信息中包括UE ID和ID参数。
ID参数具体可以包括:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤3003,HSS根据所述ID参数,通过密钥协商协议AKA算法计算得到认证数据响应信息;所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES和推衍加密密钥CK’和推衍完整性密钥IK’。
AUTN中包括认证管理域(Authentication Management Field,AMF)参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。比如,HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息;所述CK,IK为通过密钥协商协议AKA算法计算得到的加密密钥和完整性密钥。
具体的,认证向量可以为根据CK、IK和ID参数进行密钥推衍函数计算,得到的推衍加密密钥CK’和推衍完整性密钥IK’;HSS根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;或者,CK’为Key的后128比特,IK’为Key的前128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元;此时,AV具体包括RAND,AUTN,XRES,CK’和IK’;
步骤3004,近距离通信控制网元接收HSS根据认证数据请求信息返回的认证数据响应信息AV,其中AV具体包括RAND,AUTN,XRES,CK’和IK’。
步骤3005,近距离通信网元对接收到的XRES,CK’和IK’进行存储。
步骤3006,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤3007,UE根据接收到的AUTN进行验证,当验证通过时计算CK’、IK’和RES生成认证响应信息;
具体的,用户设备在接收到认证请求信息后,会验证AUTN中AMF的第X个比特位是否被置位;例如:验证AUTN中AMF的第X个比特位是否为1。如果第X个比特位为1,则UE根据认证请求信息计算得到RES,CK和IK,并进一步根据ID参数,采用和HSS相同的方法计算得到CK’、IK’。
步骤3008,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤3009,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,近距离通信控制网元对认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤3010,近距离通信控制网元生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数,第一密钥协商参数p1可以具体为新鲜参数(Fresh Parameter)。
步骤3011,近距离通信控制网元向用户设备发送响应信息;
其中响应信息中携带了第一密钥协商参数p1。
步骤3012,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据第一密钥协商参数p1和IK’、CK’进行密钥推衍函数计算。具体如下式:
Kp=KDF(CK’||IK’,p1)
步骤3013,用户设备根据接收到的响应信息生成协商密钥Kp;
具体的,用户设备根据由响应信息中获取的第一密钥协商参数p1与IK’、CK’进行密钥推衍函数计算。具体如上述步骤3012内计算方式。
进一步可选的:用户设备根据CK和IK对CK’,IK’的推衍可以在计算完CK和IK之后执行;也可以在接收到注册响应信息之后执行。
进一步可选的,近距离通信网元对CK’,IK’的推衍可以在生成第一密钥协商参数p1之后执行;也可以在发送注册响应信息之后执行。
实施例三十
如图31所示,图31为本发明实施例提供的第二十二种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤3101,UE向近距离通信控制网元发送请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI。
步骤3102,近距离通信控制网元向HSS发送认证数据请求信息,认证数据请求信息中包括UE ID和ID参数。
ID参数具体可以包括:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤3103,HSS根据所述ID参数,通过密钥协商协议AKA算法计算得到认证数据响应信息;所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES和基本密钥K1。
AUTN中包括认证管理域(Authentication Management Field,AMF)参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。比如,HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息;所述CK,IK 为通过密钥协商协议AKA算法计算得到的加密密钥和完整性密钥。
具体的,认证向量可以为根据所述CK、IK和ID参数进行密钥推衍函数计算得到的基本密钥K1;HSS根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。此时认证数据响应信息AV具体包括RAND,AUTN,XRES,K1。
步骤3104,近距离通信控制网元接收HSS根据认证数据请求信息返回的认证数据响应信息AV,其中AV具体包括RAND,AUTN,XRES,K1。
步骤3105,近距离通信网元对接收到的者XRES,K1进行存储。
步骤3106,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤3107,UE根据接收到的AUTN进行验证,当验证通过时计算K1和RES生成认证响应信息;
具体的,用户设备在接收到认证请求信息后,会验证AUTN中AMF的第X个比特位是否被置位;例如:验证AUTN中AMF的第X个比特位是否为1。如果第X个比特位为1,则UE根据认证请求信息计算得到RES,CK和IK,并进一步根据ID参数,采用和HSS相同的方法计算得到K1。
步骤3108,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤3109,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,近距离通信控制网元对认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤3110,近距离通信控制网元生成第一密钥协商参数p1;
具体的,第一密钥协商参数p1为用于完成近距离通信控制网元与UE进行密钥协商的参数,第一密钥协商参数p1可以具体为新鲜参数(Fresh  Parameter)。
步骤3111,近距离通信控制网元向用户设备发送响应信息;
其中响应信息中携带了第一密钥协商参数p1。
步骤3112,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据第一密钥协商参数p1和K1进行密钥推衍函数计算。具体如下式:
Kp=KDF(K1,p1)
步骤3113,用户设备根据接收到的响应信息生成协商密钥Kp;
具体的,用户设备根据由响应信息中获取的第一密钥协商参数p1与K1进行密钥推衍函数计算。具体如上述步骤3112内计算方式。
进一步可选的:用户设备根据CK和IK对K1的推衍可以在计算完CK和IK之后执行;也可以在接收到注册响应信息之后执行。
进一步可选的,近距离通信网元对K1的推衍可以在生成p1之后执行;也可以在发送注册响应信息之后执行。
实施例三十一
如图32所示,图32为本发明实施例提供的第二十三种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤3201,UE向近距离通信控制网元发送请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI。
步骤3202,近距离通信控制网元向HSS发送认证数据请求信息,认证数据请求信息中包括UE ID和ID参数。
ID参数具体可以包括:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤3203,HSS根据所述ID参数,通过密钥协商协议AKA算法计算得到 认证数据响应信息;所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES和和推衍加密密钥CK’和推衍完整性密钥IK’。
AUTN中包括认证管理域(Authentication Management Field,AMF)参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。比如,HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息;所述CK,IK为通过密钥协商协议AKA算法计算得到的加密密钥和完整性密钥。
具体的,认证向量可以为根据CK、IK和ID参数进行密钥推衍函数计算,得到的推衍加密密钥CK’和推衍完整性密钥IK’;HSS根据CK和IK完成CK’和IK’的计算:Key=KDF(CK||IK,ID参数),其中Key为临时密钥,CK’为Key的前128比特,IK’为Key的后128比特;然后将CK’和IK’分别作为AV中的CK和IK发送给近距离通信控制网元;此时,AV具体包括RAND,AUTN,XRES,CK’和IK’;
步骤3204,近距离通信控制网元接收HSS根据认证数据请求信息返回的认证数据响应信息AV,其中AV具体包括RAND,AUTN,XRES,CK’和IK’。
步骤3205,近距离通信网元对接收到的XRES,CK’和IK’进行存储。
步骤3206,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤3207,UE根据接收到的AUTN进行验证,当验证通过时计算CK’、IK’和RES生成认证响应信息;
具体的,用户设备在接收到认证请求信息后,会验证AUTN中AMF的第X个比特位是否被置位;例如:验证AUTN中AMF的第X个比特位是否为1。如果第X个比特位为1,则UE根据认证请求信息计算得到RES,CK和IK,并进一步根据ID参数,采用和HSS相同的方法计算得到CK’、IK’。
步骤3208,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤3209,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,近距离通信控制网元对认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤3210,近距离通信控制网元向用户设备发送响应信息;
步骤3211,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据第一密钥协商参数p1和IK’、CK’进行密钥推衍函数计算。具体如下式:
Kp=KDF(CK’||IK’,p2)
其中,p2为近距离通信控制网元内存储的第二密钥协商参数,可以为ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID,UE ID,算法ID中的一个或任意多个。
步骤3212,用户设备根据接收到的响应信息生成协商密钥Kp;
具体的,用户设备根据由响应信息中获取的第二密钥协商参数p2与IK’、CK’进行密钥推衍函数计算。具体如上述步骤3211内计算方式。
进一步可选的:用户设备根据CK和IK对CK’,IK’的推衍可以在计算完CK和IK之后执行;也可以在接收到注册响应信息之后执行。
进一步可选的,近距离通信网元对CK’,IK’的推衍可以在验证完认证响应信息之后执行;也可以在发送注册响应信息之后执行。
实施例三十二
如图33所示,图33为本发明实施例提供的第二十四种密钥协商方法的信令图。该实施例具体包括以下步骤:
步骤3301,UE向近距离通信控制网元发送请求信息;
具体的,注册请求信息中包括UE的身份标识(UE ID),如IMSI。
步骤3302,近距离通信控制网元向HSS发送认证数据请求信息,认证数据请求信息中包括UE ID和ID参数。
ID参数具体可以包括:ProSe UE ID,近距离通信控制网元ID,ProSe App ID,PLMN ID,ProSe App Code,EPC ProSe SubscriberID,Application Layer User ID,Application ID中的一个或任意多个。
步骤3303,HSS根据所述ID参数,通过密钥协商协议AKA算法计算得到认证数据响应信息;所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES和基本密钥K1。
AUTN中包括认证管理域(Authentication Management Field,AMF)参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,第X比特为AMF参数中空闲的8个比特中的任意一个,0≤X≤7。比如,HSS将该第X比特位的值置为1,以此作为进一步推衍的标识信息;所述CK,IK为通过密钥协商协议AKA算法计算得到的加密密钥和完整性密钥。
具体的,认证向量可以为根据所述CK、IK和ID参数进行密钥推衍函数计算得到的基本密钥K1;HSS根据CK,IK和ID参数生成K1,K1=KDF(CK||IK,ID参数),K1为256比特。此时认证数据响应信息AV具体包括RAND,AUTN,XRES,K1。
步骤3304,近距离通信控制网元接收HSS根据认证数据请求信息返回的认证数据响应信息AV,其中AV具体包括RAND,AUTN,XRES,K1。
步骤3305,近距离通信网元对接收到的者XRES,K1进行存储。
步骤3306,近距离通信控制网元向用户设备发送认证请求信息;
其中,认证请求信息中包括了近距离通信控制网元从认证数据响应信息中获取的RAND和AUTN。
步骤3307,UE根据接收到的AUTN进行验证,当验证通过时计算K1和 RES生成认证响应信息;
具体的,用户设备在接收到认证请求信息后,会验证AUTN中AMF的第X个比特位是否被置位;例如:验证AUTN中AMF的第X个比特位是否为1。如果第X个比特位为1,则UE根据认证请求信息计算得到RES,CK和IK,并进一步根据ID参数,采用和HSS相同的方法计算得到K1。
步骤3308,用户设备向近距离通信控制网元发送认证响应信息;
其中,认证响应信息包括RES。
步骤3309,近距离通信控制网元根据认证响应信息对用户设备进行认证;
具体的,近距离通信控制网元对认证响应信息中获取的RES和近距离通信控制网元中存储的XRES进行匹配,当二者相同时,近距离通信控制网元通过对用户设备的认证。
步骤3310,近距离通信控制网元向用户设备发送响应信息;
步骤3311,近距离通信控制网元生成协商密钥Kp;
具体的,近距离通信控制网元根据存储的第二密钥协商参数p2和K1进行密钥推衍函数计算。具体如下式:
Kp=KDF(K1,p2)
其中,p2可以为UE ID,近距离通信控制网元ID,算法ID,ProSe App ID中的一个或任意多个。
步骤3312,用户设备根据接收到的响应信息生成协商密钥Kp;
具体的,用户设备接收响应信息,根据存储的第二密钥协商参数p2和K1进行密钥推衍函数计算。具体如上述步骤3311内计算方式。
进一步可选的:用户设备根据CK和IK对K1的推衍可以在计算完CK和IK之后执行;也可以在接收到注册响应信息之后执行。
进一步可选的,近距离通信网元对K1的推衍可以在验证完认证响应信息之后执行;也可以在发送注册响应信息之后执行。
实施例三十三
上述实施例一描述了以近距离通信控制网元为执行主体实现的密钥协商方法,相应地,本发明实施例三十三还提供了一种近距离通信控制网元,用以实现实施例一中的密钥协商方法,如图34所示,所述近距离通信控制网元包括:接收单元3401、发送单元3402和处理单元3403。
接收单元3401,用于接收用户设备发送的注册请求信息;
发送单元3402,用于根据所述注册请求信息向控制网元发送安全上下文请求信息;
所述接收单元3401还用于,接收控制网元根据所述安全上下文请求信息发送的安全上下文响应信息;
处理单元3403,用于根据所述安全上下文响应信息确定协商密钥;
所述发送单元3402还用于,向所述用户设备发送注册响应信息,用以所述用户设备根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。
所述注册响应信息包括由所述接收单元3401获取的所述第一密钥协商参数,或者所述处理单元3403生成的所述第一密钥协商参数。
可选的,所述安全上下文请求信息包括所述处理单元2503生成的或由所述注册请求信息中获取的第一密钥协商参数,所述处理单元2503具体用于:
由所述安全上下文响应信息中,获取所述控制网元根据所述第一密钥协商参数和存储的共享密钥生成的协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥;或者
由所述安全上下文响应信息中,获取所述控制网元根据所述第一密钥协商参数和存储的共享密钥生成的基本密钥;根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
可选的,所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元存储的共享密钥,所述处理单元2503具体用于:
根据所述安全上下文响应信息中携带的第一密钥协商参数和所述共享密钥生成所述协商密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;或者
根据所述注册请求信息中携带的第一密钥协商参数和所述共享密钥生成所述协商密钥。
可选的,所述安全上下文响应信息包括所述控制网元生成的第一密钥协商参数和/或所述控制网元生成的基本密钥,所述处理单元3403具体用于:
根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
通过应用本发明实施例提供的近距离通信控制网元,在不改变现有ProSe的架构的基础上,实现与UE之间的密钥协商。
实施例三十四
上述实施例二描述了以用户设备为执行主体实现的密钥协商方法,相应地,本发明实施例三十四还提供了一种用户设备,用以实现实施例二中的密钥协商方法,如图35所示,所述用户设备包括:接收单元3501、发送单元3502和处理单元3503。
发送单元352,用于向近距离通信控制网元发送注册请求信息;
接收单元3501,用于接收所述近距离通信控制网元发送的注册响应信息;
处理单元3503,用于根据所述注册响应信息生成协商密钥;所述协商密钥为用于用户设备与近距离控制网元之间的交互的密钥。
可选的,所述处理单元3503还用于,生成第一密钥协商参数,以使用户设备在向近距离通信控制网元发送的注册请求信息中携带第一密钥协商参 数。
进一步的,所述处理单元3503具体用于,根据所述第一密钥协商参数和所述用户设备内存储的共享密钥生成协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥。
可选的,所述注册响应信息包括第一密钥协商参数,所述处理单元3503具体用于,
根据所述第一密钥协商参数和所述用户设备内存储的共享密钥生成协商密钥;所述共享密钥为控制网元与用户设备之间共享的密钥;或者
根据所述第一密钥协商参数和用户设备内存储的共享密钥生成基本密钥;根据所述基本密钥和存储的第二密钥协商参数生成协商密钥。
通过应用本发明实施例提供的用户设备,在不改变现有ProSe的架构的基础上,实现与近距离通信控制网元之间的密钥协商。
实施例三十五
上述实施例三描述了以演进的分组核心中的控制网元为执行主体实现的密钥协商方法,相应地,本发明实施例三十五还提供了一种用户设备,用以实现实施例三中的密钥协商方法,如图36所示,所述控制网元包括:接收单元3601、发送单元3602和处理单元3603。
接收单元3601,用于接收近距离通信控制网元发送的安全上下文请求信息;
发送单元3602,用于根据所述安全上下文请求信息向近距离通信控制网元发送安全上下文响应信息。
可选的,所述处理单元3603用于生成第一密钥协商参数;根据所述安全上下文请求信息生成安全上下文响应信息;所述安全上下文响应信息中携带第一密钥协商参数。
可选的,所述处理单元3603用于根据存储的共享密钥和所述处理单元生 成的或由所述安全上下文请求信息获取的第一密钥协商参数生成基本密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括基本密钥。
可选的,所述处理单元3603用于根据所述安全上下文请求信息生成安全上下文响应信息,所述安全上下文响应信息中包括所述控制网元存储的共享密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥。
可选的,所述处理单元3603用于根据所述存储的共享密钥和所述处理单元3603生成的第一密钥协商参数生成协商密钥;其中,所述共享密钥为控制网元与用户设备之间共享的密钥;或者
所述处理单元3603用于根据所述存储的共享密钥和由所述安全上下文请求信息中获取的第一密钥协商参数生成协商密钥;根据所述安全上下文请求信息生成响应信息,所述安全上下文响应信息中包括协商密钥。
通过应用本发明实施例提供的控制网元,在不改变现有ProSe的架构的基础上,实现用户设备与近距离通信控制网元之间的密钥协商。
实施例三十六
上述实施例十三描述了以近距离通信控制网元为执行主体实现的密钥协商方法,相应地,本发明实施例三十六还提供了一种近距离通信控制网元,用以实现实施例十三中的密钥协商方法,如图37所示,所述近距离通信控制网元包括:接收单元3701、发送单元3702、存储单元3703、认证单元3704和处理单元3705。
接收单元3701,用于接收用户设备发送的注册请求信息;
发送单元3702,用于根据所述注册请求信息向控制网元发送认证数据请求信息;
所述接收单元3702还用于,接收所述控制网元根据所述认证数据请求信 息发送的认证数据响应信息;其中,所述认证数据响应信息包括:随机数RAND、AUTN参数、期望的用户响应XRES、加密密钥CK、完整性密钥IK;
存储单元3703,用于对所述CK、IK和XRES进行存储;
所述发送单元3702还用于,向所述用户设备发送认证请求信息;所述认证请求信息包括由所述认证数据响应信息中获取的RAND和AUTN;
所述接收单元3701还用于,接收所述用户设备发送的认证响应信息;所述认证响应信息中包括所述用户设备根据所述认证请求信息生成的用户响应RES;
认证单元3704,用于根据所述认证响应信息对所述用户设备进行认证;
所述发送单元3702还用于,向所述用户设备发送注册响应信息,用以所述用户和设备根据接收到的注册响应信息和所述CK、IK完成所述近距离通信控制网元与所述用户设备之间的密钥协商。
可选的,所述注册请求信息包括所述用户设备的安全算法列表,所述处理单元3705,用于根据用户设备的安全算法列表和所述近距离通信控制网元存储的近距离通信控制网元的安全算法列表进行算法选择,得到选择出的安全算法。其中,所述注册响应信息包括所述选择出的安全算法。
可选的,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元中存储有近距离通信控制网元的安全算法列表,所述处理单元3705,用于根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到选择出的安全算法。
进一步可选的,所述注册响应信息包括第一密钥协商参数,所述近距离通信控制网元还包括:生成单元3706,用于生成第一密钥协商参数。所述处理单元3705还用于:根据所述第一密钥协商参数和所述CK、IK进行密钥推衍函数计算,得到协商密钥。
进一步可选的,所述处理单元3705还用于:根据所述CK、IK和存储在所述近距离通信控制网元中的第二密钥协商参数进行密钥推衍函数计算,得 到协商密钥。
本发明实施例提供的近距离通信控制网元,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
实施例三十七
上述实施例十四描述了以用户设备为执行主体实现的密钥协商方法,相应地,本发明实施例三十七还提供了一种用户设备,用以实现实施例十四中的密钥协商方法,如图38所示,所述近距离通信控制网元包括:接收单元3801、发送单元3802、验证单元3803和处理单元3804。
发送单元3802,用于向近距离通信控制网元发送注册请求信息;
接收单元3801,用于接收所述近距离通信控制网元发送的认证请求信息;所述认证请求信息包括所述近距离通信控制网元由所述控制网元获取的RAND和AUTN;
验证单元3803,用于利用RAND验证AUTN的正确性;
处理单元3804,用于当验证所述AUTN正确时,根据所述认证请求信息计算得到CK、IK、RES;
所述发送单元3802还用于,向近距离通信控制网元发送认证响应信息,用以所述近距离通信控制网元根据所述认证响应信息对用户设备进行认证;所述认证响应信息中包括所述RES;
所述接收单元3801还用于,接收所述近距离通信控制网元发送的注册响应信息,用以根据所述注册响应信息和所述CK、IK完成所述近距离通信控制网元与所述用户设备之间的密钥协商。
可选的,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表,进行算法选择得到的选择出的安全算法。
可选的,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表;所述处理单元2904还用于:根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
进一步可选的,所述注册响应信息包括所述近距离通信控制网元生成的第一密钥协商参数,所述处理单元3804还用于:用户设备根据所述第一密钥协商参数和所述CK、IK进行密钥推衍函数计算,得到协商密钥。
进一步可选的,所述处理单元3804还用于:用户设备根据所述CK、IK和存储在所述用户设备中的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
本发明实施例提供的用户设备,在不改变现有ProSe的架构的基础上,实现UE与近距离通信控制网元之间的密钥协商。
实施例三十八
上述实施例二十四描述了以近距离通信控制网元为执行主体实现的密钥协商方法,相应地,本发明实施例三十八还提供了一种近距离通信控制网元,用以实现实施例二十四中的密钥协商方法,如图39所示,所述近距离通信控制网元包括:接收单元3901、发送单元3902和认证单元3904。
接收单元3901,用于接收用户设备发送的请求信息;
发送单元3902,用于根据所述请求信息向HSS发送认证数据请求信息;
所述接收单元3901还用于,接收所述HSS根据所述认证数据请求信息发送的认证数据响应信息;其中,所述认证数据响应信息包括:推衍加密密钥CK’、推衍完整性密钥IK’;或者,基本密钥K1;
所述发送单元3902还用于,向所述用户设备发送认证请求信息;
所述接收单元3901还用于,接收所述用户设备发送的认证响应信息;所述认证响应信息中包括所述用户设备根据所述认证请求信息生成的用户响应 RES;
认证单元3904,根据所述认证响应信息对所述用户设备进行认证;
所述发送单元3902还用于,向所述用户设备发送响应信息,用以所述用户设备根据所述响应信息完成所述近距离通信控制网元与所述用户设备之间的根据所述推衍加密密钥CK’、推衍完整性密钥IK’的协商;或者,完成基本密钥K1的密钥协商。
可选的,所述AUTN中包括认证管理域AMF参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,0≤X≤7。
进一步可选的,
所述处理单元还用于,根据密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
进一步可选的,所述注册响应信息还包括:密钥协商参数。
进一步可选的,在向所述用户设备发送响应信息之前,所述处理单元3903还用于:
生成第一密钥协商参数;
在所述响应信息中携带所述第一密钥协商参数。
进一步可选的,所述处理单元3903还用于:根据所述第一密钥协商参数和CK’、IK’进行密钥推衍函数计算,得到协商密钥。
进一步可选的,所述处理单元3903还用于:根据所述第一密钥协商参数和基本密钥进行密钥推衍函数计算,得到协商密钥。
进一步可选的,所述处理单元3903还用于,根据所述基本密钥和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
可选的,所述处理单元3903还用于,根据所述CK’、IK’和存储的第二密钥协商参数进行密钥推衍函数计算,得到协商密钥。
可选的,CK’,IK’的推衍可以在计算完CK和IK之后执行;也可以在接 收到注册响应消息之后执行。
通过应用本发明实施例提供的近距离通信控制网元,在不改变现有ProSe的架构的基础上,实现与UE之间的密钥协商。
实施例三十九
上述实施例二十五描述了以用户设备为执行主体实现的密钥协商方法,相应地,本发明实施例三十九还提供了一种用户设备,用以实现实施例二十五中的密钥协商方法,如图40所示,所述用户设备包括:接收单元4001、发送单元4002和处理单元4003。
发送单元4002,用户设备向近距离通信控制网元发送请求信息;所述请求信息包括用户ID;
接收单元4001,用于接收所述近距离通信控制网元发送的认证请求信息;
处理单元4003,用于根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;并根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
所述发送单元4001还用于,向近距离通信控制网元发送认证响应信息;
所述接收单元4002还用于,接收所述近距离通信控制网元发送的响应信息。
可选的,所述AUTN中包括认证管理域AMF参数,所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,0≤X≤7;
所述CK,IK为通过密钥协商协议AKA算法计算得到的加密密钥和完整性密钥;
所述用户设备还包括验证单元4004,用于判断AMF的第X比特位是否被置位,当置位时,所述HSS计算CK’,IK’或K1。
可选的,所述响应信息包括第一密钥协商参数,所述处理单元4003还用 于:
根据第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
可选的,所述处理单元4003还用于:
根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
可选的,CK’,IK’的推衍可以在计算完CK和IK之后执行;也可以在接收到注册响应消息之后执行。
通过应用本发明实施例提供的用户设备,在不改变现有ProSe的架构的基础上,实现与UE之间的密钥协商。
实施例四十
上述实施例二十六描述了以演进的分组核心中的控制网元为执行主体实现的密钥协商方法,相应地,本发明实施例四十还提供了一种HSS,用以实现实施例二十六中的密钥协商方法,如图41所示,所述HSS包括:接收单元4101、发送单元4102和处理单元4103。
接收单元4101,用于接收近距离通信控制网元发送的认证数据请求信息;所述认证数据请求信息包括ID参数,或者所述HSS中存储有ID参数;
处理单元4103,用于根据所述认证数据请求信息计算出认证向量;所述认证向量包括:加密密钥CK、完整性密钥IK;
所述处理单元4103还用于,用于根据所述认证数据请求信息计算出认证向量;所述认证向量包括:加密密钥CK、完整性密钥IK;
发送单元4102,用于向近距离通信控制网元发送所述认证数据响应信息,所述认证数据响应信息包括所述CK’、IK’,或,所述K1。
可选的,所述认证向量包括AUTN参数,其特征在于,所述AUTN中包括认证管理域AMF参数,所述处理单元还用于,将所述AMF参数的第X比特位置位。
进一步的,所述AUTN中包括认证管理域AMF参数;所述AMF参数的第X比特位为对CK,IK做进一步推衍的标志位;其中,0≤X≤7;所述处理单元还用于:
将所述第X比特位进行置位。
通过应用本发明实施例提供的HSS,在不改变现有ProSe的架构的基础上,实现与UE之间的密钥协商。
专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而 已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (40)

  1. 一种密钥协商方法,其特征在于,所述方法包括:
    近距离通信控制网元接收用户设备发送的注册请求信息;
    根据所述注册请求信息向归属用户服务器HSS发送认证数据请求信息;
    接收所述HSS根据所述认证数据请求信息发送的认证数据响应信息;其中,所述认证数据响应信息包括:推衍加密密钥CK’、推衍完整性密钥IK’;或者,基本密钥K1;向所述用户设备发送认证请求信息;
    接收所述用户设备发送的认证响应信息;
    根据所述认证响应信息对所述用户设备进行认证;
    向所述用户设备发送注册响应信息,用以所述用户设备根据接收到的注册响应信息完成所述近距离通信控制网元与所述用户设备之间的所述推衍加密密钥CK’、推衍完整性密钥IK’的协商;或者,完成基本密钥K1的协商。
  2. 根据权利要求1所述的方法,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,在向所述用户设备发送注册响应信息之前,所述方法还包括:
    所述近距离通信控制网元根据用户设备的安全算法列表和所述近距离通信控制网元存储的近距离通信控制网元的安全算法列表进行算法选择,得到选择出的安全算法。
  3. 根据权利要求2所述的方法,其特征在于,所述注册响应信息包括所述选择出的安全算法。
  4. 根据权利要求1所述的方法,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元中存储有近距离通信控制网元的安全算法列表,在收到所述用户设备发送的所述注册请求信息之后,所述方法还包括:
    所述近距离通信控制网元根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到选择出的安全算法。
  5. 根据权利要求1、3、4所述的方法,其特征在于,所述方法还包括:
    近距离通信控制网元根据密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    近距离通信控制网元根据密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  6. 根据权利要求5所述的方法,其特征在于,所述注册响应信息还包括所述密钥协商参数。
  7. 一种密钥协商方法,其特征在于,所述方法包括:
    用户设备向近距离通信控制网元发送注册请求信息;
    接收所述近距离通信控制网元发送的认证请求信息;
    根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;
    根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
    向近距离通信控制网元发送认证响应信息;
    接收所述近距离通信控制网元发送的注册响应信息。
  8. 根据权利要求7所述的方法,其特征在于,所述认证请求信息包含鉴权令牌AUTN参数;所述AUTN中包括认证管理域AMF;
    根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1,之前还包括:
    判断AMF的第X比特位是否被置位,当置位时,所述HSS计算CK’,IK’或K1,所述X取值范围为0至7中的任意值。
  9. 根据权利要求7或8所述的方法,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
  10. 根据权利要求7或8所述的方法,其特征在于,所述注册请求信息 包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述方法还包括:
    根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
  11. 根据权利要求7至10任一所述的方法,其特征在于,所述注册响应信息包含第一密钥协商参数,
    用户设备根据所述第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  12. 根据权利要求7-10任一权项所述的方法,其特征在于,所述方法还包括:
    用户设备根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  13. 一种密钥协商方法,其特征在于,所述方法包括:
    用户设备向近距离通信控制网元发送注册请求信息;
    接收所述近距离通信控制网元发送的认证请求信息;
    根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;
    向近距离通信控制网元发送认证响应信息;
    接收所述近距离通信控制网元发送的注册响应信息;
    根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1。
  14. 根据权利要求13所述的方法,其特征在于,所述认证请求信息包含AUTN参数;所述AUTN中包括认证管理域AMF参数;
    根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’, 或基本密钥K1,之前还包括:
    判断AMF的第X比特位是否被置位,当置位时,所述HSS计算CK’,IK’或K1,所述X取值范围为0至7中的任意值。
  15. 根据权利要求13或14所述的方法,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
  16. 根据权利要求13或14所述的方法,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述方法还包括:
    根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
  17. 根据权利要求14至16任一所述的方法,其特征在于,所述注册响应信息包含第一密钥协商参数;
    用户设备根据所述第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据所述第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  18. 根据权利要求13-16任一权项所述的方法,其特征在于,所述方法还包括:
    用户设备根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  19. 一种密钥协商方法,其特征在于,所述方法包括:
    HSS接收近距离通信控制网元发送的认证数据请求信息;所述认证数据请求信息包括ID参数,或者所述HSS中存储有ID参数;
    根据所述认证数据请求信息计算出认证向量;所述认证向量包括:加密密钥CK、完整性密钥IK;
    根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
    向近距离通信控制网元发送认证数据响应信息;所述认证数据响应信息包括所述CK’、IK’,或,所述K1。
  20. 根据权利要求19所述的方法,所述认证向量包括AUTN参数,其特征在于,
    所述AUTN中包括认证管理域AMF参数,所述HSS将所述AMF参数的第X比特位置位,所述X取值范围为0至7中的任意值。
  21. 一种近距离通信控制网元,其特征在于,所述近距离通信控制网元包括:
    接收单元,用于接收用户设备发送的注册请求信息;
    发送单元,用于根据所述注册请求信息向HSS发送认证数据请求信息;
    所述接收单元还用于,接收所述HSS根据所述认证数据请求信息发送的认证数据响应信息;其中,所述认证数据响应信息包括:推衍加密密钥CK’、推衍完整性密钥IK’;或者,基本密钥K1;
    所述发送单元还用于,向所述用户设备发送认证请求信息;
    所述接收单元还用于,接收所述用户设备发送的认证响应信息;所述认证响应信息中包括所述用户设备根据所述认证请求信息生成的用户响应RES;
    认证单元,用于根据所述认证响应信息对所述用户设备进行认证;
    所述发送单元还用于,向所述用户设备发送注册响应信息,用以所述用户设备根据接收到的注册响应信息完成所述近距离通信控制网元与所述用户设备之间的根据所述推衍加密密钥CK’、推衍完整性密钥IK’的协商;或者, 完成基本密钥K1的协商。
  22. 根据权利要求21所述的近距离通信控制网元,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元还包括:
    处理单元,用于根据用户设备的安全算法列表和所述近距离通信控制网元存储的近距离通信控制网元的安全算法列表进行算法选择,得到选择出的安全算法。
  23. 根据权利要求22所述的近距离通信控制网元,其特征在于,所述注册响应信息包括所述选择出的安全算法。
  24. 根据权利要求21所述的近距离通信控制网元,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述近距离通信控制网元中存储有近距离通信控制网元的安全算法列表,所述近距离通信控制网元还包括:
    处理单元,用于根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到选择出的安全算法。
  25. 根据权利要求24所述的近距离通信控制网元,其特征在于,
    所述处理单元还用于,根据密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  26. 根据权利要求25任一权项所述的近距离通信控制网元,其特征在于,
    所述注册响应信息还包括密钥协商参数。
  27. 一种用户设备,其特征在于,所述用户设备包括:
    发送单元,用于向近距离通信控制网元发送注册请求信息;
    接收单元,用于接收所述近距离通信控制网元发送的认证请求信息;处理单元,用于根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;并根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’, 或基本密钥K1;
    所述发送单元还用于,向近距离通信控制网元发送认证响应信息;
    所述接收单元还用于,接收所述近距离通信控制网元发送的注册响应信息。
  28. 根据权利要求27所述的用户设备,其特征在于,所述认证请求信息包含鉴权令牌AUTN参数;所述AUTN中包括认证管理域AMF;
    所述用户设备还包括验证单元,用于判断AMF的第X比特位是否被置位,当置位时,所述HSS计算CK’,IK’或K1,所述X取值范围为0至7中的任意值。
  29. 根据权利要求27或28所述的用户设备,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括:所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择,得到的选择出的安全算法。
  30. 根据权利要求27或28所述的用户设备,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通信控制网元的安全算法列表,所述处理单元还用于:
    根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
  31. 根据权利要求27-30任一所述的用户设备,其特征在于,所述注册响应信息包含第一密钥协商参数,所述处理单元还用于:
    根据所述第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  32. 根据权利要求27-30任一权项所述的用户设备,其特征在于,所述处理单元还用于:
    根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  33. 一种用户设备,其特征在于,所述用户设备包括:
    发送单元,用于向近距离通信控制网元发送注册请求信息;
    接收单元,用于接收所述近距离通信控制网元发送的认证请求信息;
    处理单元,用于根据所述认证请求信息计算得到加密密钥CK和完整性密钥IK;
    所述发送单元还用于,向近距离通信控制网元发送认证响应信息;
    所述接收单元还用于,接收所述近距离通信控制网元发送的注册响应信息;
    所述处理单元还用于,根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1。
  34. 根据权利要求33所述的用户设备,其特征在于,所述认证请求信息包含鉴权令牌AUTN参数;所述AUTN中包括认证管理域AMF;
    所述用户设备还包括验证单元,用于判断AMF的第X比特位是否被置位,当置位时,所述HSS计算CK’,IK’或K1,所述X取值范围为0至7中的任意值。
  35. 根据权利要求33或34所述的用户设备,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括所述近距离通信控制网元根据所述用户设备的安全算法列表和所述近距离通信控制网元内存储的近距离通信网元的安全算法列表进行算法选择得到的选择出的安全算法。
  36. 根据权利要求33或34所述的用户设备,其特征在于,所述注册请求信息包括所述用户设备的安全算法列表,所述注册响应信息包括近距离通 信控制网元的安全算法列表,所述处理单元还用于:
    根据所述近距离通信控制网元的安全算法列表和所述用户设备的安全算法列表进行算法选择,得到的选择出的安全算法。
  37. 根据权利要求34-36任一所述的用户设备,其特征在于,所述注册响应信息包含第一密钥协商参数;所述处理单元还用于:
    根据所述第一密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据所述第一密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  38. 根据权利要求33-36任一权项所述的用户设备,其特征在于,所述处理单元还用于:
    根据存储的第二密钥协商参数和所述CK’,IK’进行密钥推衍函数计算,得到协商密钥,或者,
    根据所述第二密钥协商参数和所述K1进行密钥推衍函数计算,得到协商密钥。
  39. 一种归属用户服务器HSS,其特征在于,所述HSS包括:
    接收单元,用于接收近距离通信控制网元发送的认证数据请求信息;所述认证数据请求信息包括ID参数,或者所述HSS中存储有ID参数;
    处理单元,用于根据所述认证数据请求信息计算出认证向量;所述认证向量包括:加密密钥CK、完整性密钥IK;
    所述处理单元还用于,根据所述CK,IK和ID参数计算推衍加密密钥CK’、推衍完整性密钥IK’,或基本密钥K1;
    发送单元,用于向近距离通信控制网元发送认证数据响应信息;所述认证数据响应信息包括所述CK’、IK’,或,所述K1。
  40. 根据权利要求39所述的HSS,其特征在于,所述认证向量包括AUTN参数,其特征在于,所述AUTN中包括认证管理域AMF参数,所述处理单元还 用于,将所述AMF参数的第X比特位置位,所述X取值范围为0至7中的任意值。
PCT/CN2015/074416 2014-03-21 2015-03-17 密钥协商方法、用户设备和近距离通信控制网元 WO2015139622A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201410109503.2 2014-03-21
CN201410109503 2014-03-21
CN201410182372.0 2014-04-30
CN201410182372.0A CN104935426B (zh) 2014-03-21 2014-04-30 密钥协商方法、用户设备和近距离通信控制网元

Publications (1)

Publication Number Publication Date
WO2015139622A1 true WO2015139622A1 (zh) 2015-09-24

Family

ID=54122406

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/074416 WO2015139622A1 (zh) 2014-03-21 2015-03-17 密钥协商方法、用户设备和近距离通信控制网元

Country Status (2)

Country Link
CN (1) CN104935426B (zh)
WO (1) WO2015139622A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106714153B (zh) * 2015-11-13 2022-06-10 华为技术有限公司 密钥分发、生成和接收方法以及相关装置
WO2017117775A1 (zh) * 2016-01-07 2017-07-13 华为技术有限公司 一种通信安全处理方法、系统及相关设备
US10588019B2 (en) * 2016-05-05 2020-03-10 Qualcomm Incorporated Secure signaling before performing an authentication and key agreement
CN109314860B (zh) * 2016-07-01 2023-11-03 华为技术有限公司 安全协商方法、安全功能实体、核心网网元及用户设备
CN110474875B (zh) * 2017-08-31 2020-10-16 华为技术有限公司 基于服务化架构的发现方法及装置
CN109560919B (zh) 2017-09-27 2021-02-09 华为技术有限公司 一种密钥衍生算法的协商方法及装置
CN111954208B (zh) 2017-11-17 2024-04-12 华为技术有限公司 一种安全通信方法和装置
CN110363899B (zh) * 2019-08-02 2021-06-15 华为技术有限公司 基于通信通道检测中继攻击的方法及设备
WO2022133949A1 (zh) * 2020-12-24 2022-06-30 华为技术有限公司 一种安全接入方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101167305A (zh) * 2005-04-04 2008-04-23 诺基亚公司 无线局域网的访问管理
CN103329589A (zh) * 2011-01-20 2013-09-25 Sk普兰尼特有限公司 发布用于在cpns环境中验证用户的验证密钥的系统和方法
WO2013142606A1 (en) * 2012-03-20 2013-09-26 Qualcomm Incorporated Network security configuration using short-range wireless communication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101167305A (zh) * 2005-04-04 2008-04-23 诺基亚公司 无线局域网的访问管理
CN103329589A (zh) * 2011-01-20 2013-09-25 Sk普兰尼特有限公司 发布用于在cpns环境中验证用户的验证密钥的系统和方法
WO2013142606A1 (en) * 2012-03-20 2013-09-26 Qualcomm Incorporated Network security configuration using short-range wireless communication

Also Published As

Publication number Publication date
CN104935426A (zh) 2015-09-23
CN104935426B (zh) 2018-11-30

Similar Documents

Publication Publication Date Title
WO2015139622A1 (zh) 密钥协商方法、用户设备和近距离通信控制网元
US20200162913A1 (en) Terminal authenticating method, apparatus, and system
US10931445B2 (en) Method and system for session key generation with diffie-hellman procedure
US11075752B2 (en) Network authentication method, and related device and system
KR101062781B1 (ko) 통신 시스템에서의 키 생성
JP5576529B2 (ja) セキュリティ保護されたセッション鍵生成
WO2018040758A1 (zh) 认证方法、认证装置和认证系统
US8694782B2 (en) Wireless authentication using beacon messages
RU2480925C2 (ru) Генерация криптографического ключа
CN101931955B (zh) 认证方法、装置及系统
JP5784776B2 (ja) 認証能力のセキュアなネゴシエーション
US8094821B2 (en) Key generation in a communication system
CN106888092B (zh) 信息处理方法及装置
JP6504630B2 (ja) Gprsシステム鍵強化方法、sgsnデバイス、ue、hlr/hss、およびgprsシステム
WO2009046400A1 (en) Techniques for secure channelization between uicc and a terminal
CN107820239A (zh) 信息处理方法及装置
CN103313242A (zh) 密钥的验证方法及装置
CN103096307A (zh) 密钥验证方法及装置
CN109561431B (zh) 基于多口令身份鉴别的wlan接入访问控制系统及方法
CN106992866A (zh) 一种基于nfc无证书认证的无线网络接入方法
US11223954B2 (en) Network authentication method, device, and system
TWI514189B (zh) 網路認證系統及其方法
CN115150110A (zh) 接入认证的方法、相关装置、设备以及可读存储介质
CN114760038A (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: 15764079

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

Country of ref document: EP

Kind code of ref document: A1