WO2015062488A1 - 一种安全上下文的提供、获取方法及设备 - Google Patents

一种安全上下文的提供、获取方法及设备 Download PDF

Info

Publication number
WO2015062488A1
WO2015062488A1 PCT/CN2014/089734 CN2014089734W WO2015062488A1 WO 2015062488 A1 WO2015062488 A1 WO 2015062488A1 CN 2014089734 W CN2014089734 W CN 2014089734W WO 2015062488 A1 WO2015062488 A1 WO 2015062488A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
core network
message
check value
identifier
Prior art date
Application number
PCT/CN2014/089734
Other languages
English (en)
French (fr)
Inventor
张丽佳
陈璟
许怡娴
张万强
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201480035973.7A priority Critical patent/CN105340319B/zh
Publication of WO2015062488A1 publication Critical patent/WO2015062488A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/02Processing of mobility data, e.g. registration information at HLR [Home Location Register] or VLR [Visitor Location Register]; Transfer of mobility data, e.g. between HLR, VLR or external networks
    • H04W8/08Mobility data transfer

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and device for providing and acquiring a security context.
  • the user equipment (UE) of the Release (R) 10 and the R10 has the capability of reporting a Low Access Priority Indicator (LAPI) to an evolved NodeB (eNB), such that the eNB
  • LAPI Low Access Priority Indicator
  • eNB evolved NodeB
  • the specific network may be selected for the UE according to the indication reported by the UE, thereby preventing the impact of the UE performing the specific service on the common network, for example, network congestion caused by a large number of low-priority UEs accessing the network.
  • the specific service for example, Machine Type Communication (MTC).
  • MTC Machine Type Communication
  • a specific network is a network that serves a specific service, such as a machine type communication network, which is dedicated to machine type communication. All machine type communication devices are connected to this network for communication, which can prevent the impact of machine type communication on the ordinary network. .
  • the network architecture of a particular network is the same as that of a normal network, except that the functionality of the network entity has changed.
  • the pre-R10 UEs that are widely used do not support this function.
  • the prior art proposes a network-side scheme, so that UEs before R10 can also choose to perform on a specific network. Communication. For example, the UE initiates an attach request or a location update request to the network side, and the mobility management entity (MME) requests subscription data from the Home Subscriber Server (HSS), and includes the UE in the subscription data.
  • MME mobility management entity
  • HSS Home Subscriber Server
  • the MME Upon indication of a particular network communication, the MME forwards a Non Access Stratum (NAS) message to a specific MME through the eNB, wherein the NAS message, such as an attach request or a location update request, the specific MME, which is the MME in a specific network.
  • NAS Non Access Stratum
  • the MME Before the MME obtains the subscription data from the HSS, a security association has been established between the UE and the MME, and the behavior of the network side reselecting the specific MME is unknown to the UE, and the specific MME A security context needs to be obtained from the MME to utilize the security context for secure communication with the UE. In addition, if the NAS message is integrity protected, it is necessary to consider how the specific MME performs integrity check on the rerouted NAS message.
  • TAU tracking area update
  • the MMEn sends a request message of the security context to the MME, where the request message includes a Globally Unique Temporary UE Identity (GUTI) allocated by the MME to the UE, that is, the old GUTI (GUTIo), and the request message further includes receiving from the UE.
  • GUI Globally Unique Temporary UE Identity
  • the MMEo retrieves the user data from the database according to GUTIo, verifies the integrity of the TAU request by using the retrieved security context, and sends the authentication data and the UE's International Mobile Subscriber Identification Number (IMSI). To the MMEn, wherein the authentication data contains a security context, and the MMEn saves the received security context.
  • IMSI International Mobile Subscriber Identification Number
  • the prior art cannot solve the problem of how the specific MME obtains the security context of the UE, and the specific MME cannot perform secure communication with the UE.
  • the present invention provides a security context providing and acquiring method and device, so that a core network device in a specific network can obtain a security context of a UE, so that a core network device in a specific network can perform secure communication with the UE.
  • a method for providing a security context provided by an embodiment of the present invention includes:
  • the first core network device sends a re-routing command to the access network device, where the re-routing command includes the NAS message and is used to determine the Describe the information of the second core network device;
  • the first core network device receives the context request sent by the second core network device, where the context request includes an identifier of the UE and a key set identifier, and the first core network device is configured according to the identifier of the UE and the key set identifier. Finding a corresponding security context and transmitting the security context to the second core network device.
  • the method before the first core network device sends a rerouting command to the access network device, the method further includes:
  • the first core network device reconfigures the received NAS message, and the NAS message included in the rerouting command is a reconstructed NAS message.
  • the first core network device reconfigures the received NAS message from the UE, including:
  • the first core network device replaces the key set identifier in the NAS message sent by the UE by using a key set identifier in the current security context; and/or,
  • the first core network device calculates an integrity protection check value according to the current security context, and uses the integrity protection check value as the message authentication code MAC cell IE in the NAS message sent by the UE.
  • the integrity protection check value is used as the message authentication code MAC cell IE in the NAS message sent by the UE, include:
  • the integrity protection check value is replaced with a message authentication code MAC in the NAS message sent by the UE.
  • the first core network device reconfigures the received NAS message from the UE, and further includes:
  • the first core network device replaces the identifier of the UE in the NAS message received from the UE by the identifier allocated by the first core network device for the UE.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the method further includes:
  • the first core network device uses the current security context to verify the integrity of the NAS message carried in the context request;
  • the step of the first core network device sending the security context to the second core network device is performed when the verification is successful.
  • the first core network device uses the security context currently shared with the UE to verify the integrity of the NAS message carried in the context request.
  • the first core network device verifies an integrity protection check value or a message authentication code MAC value in the NAS message carried in the context request; or
  • the first core network device verifies the integrity protection check value in the context request.
  • the rerouting command further includes:
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • a second aspect of the present invention provides a method for obtaining a security context, including:
  • the NAS message includes a first The identifier assigned by the core network device to the UE, and the second core network device determines the first core network device according to the identifier.
  • the specific message further includes the identifier information of the first core network device, and the second core network device determines the first core according to the identifier information of the first core network device Network equipment.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the security context of the UE acquired by the second core network device includes an encryption algorithm and an integrity protection algorithm used by the first core network device to protect the NAS message.
  • the method further includes:
  • the second core network device uses the new algorithm to derive a new NAS key, and sends a NAS security mode command message to the UE, where the identifier of the new algorithm is included;
  • the new algorithm includes an encryption algorithm and/or an integrity protection algorithm;
  • the second core network device receives the NAS security mode complete message fed back by the UE.
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • a method for receiving a rerouting command includes:
  • the access network device determines, according to the indication information, the second core network device, and the foregoing
  • the second core network device sends a specific message carrying the NAS message.
  • the specific message further includes:
  • a rerouting indication is used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • the identifier information of the first core network device where the second core network device determines the first core network device according to the identifier information of the first core network device.
  • the NAS message is a NAS message that is reconfigured by the first core network device to the received NAS message sent by the UE.
  • the rerouting command further includes:
  • the specific message further includes:
  • a fourth aspect of the present invention provides a device for providing a security context, including:
  • Receiving a NAS message unit configured to receive a non-access stratum NAS message sent by the user equipment UE;
  • a rerouting command unit configured to send a rerouting command to the access network device when the NAS message needs to be rerouted to the second core network device in the specific network, where the rerouting command includes the NAS message and Determining information of the second core network device;
  • a security context providing unit configured to receive a context request sent by the second core network device, where the context request includes an identifier of the UE and a key set identifier, and according to the identifier of the UE and the key set identifier, search for a corresponding a security context and the security context is sent to the second core network device.
  • the sending rerouting command unit is further configured to:
  • the received NAS message is reconstructed, and the NAS message included in the re-routing command is a reconstructed NAS message.
  • the integrity protection check value is calculated according to the current security context, and the integrity protection check value is used as the message authentication code MAC cell IE in the NAS message sent by the UE.
  • the sending rerouting command unit uses the integrity protection check value as a message in the NAS message sent by the UE.
  • the authentication code MAC cell IE it is specifically used to:
  • the integrity protection check value is replaced with a message authentication code MAC in the NAS message sent by the UE.
  • the sending rerouting command unit is further configured to:
  • the identifier assigned to the UE by the first core network device replaces the identity of the UE in the NAS message received from the UE.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the security context providing unit is further configured to:
  • the security context sends the security context to the second core network device.
  • the security context providing unit is configured to verify the integrity of the NAS message carried in the context request by using a security context currently shared with the UE When specifically used to:
  • the rerouting command further includes:
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • the device for obtaining a security context includes:
  • a specific message receiving unit configured to receive a specific message sent by the access network device, where the specific message includes a non-access stratum NAS message;
  • a context requesting unit configured to determine, according to the specific message, a first core network device, and send a context request to the first core network device, where the context request includes an identifier of the UE and a key set identifier;
  • a context obtaining unit configured to receive a context response sent by the first core network device, and obtain a security context, where the security context is determined by the first core network device according to the identifier of the UE and the key set identifier in the context request .
  • the NAS message includes an identifier that is allocated by the first core network device to the UE, and the second core network device determines the first core network device according to the identifier.
  • the specific message further includes the identifier information of the first core network device, and the second core network device determines the first core according to the identifier information of the first core network device Network equipment.
  • the key set identifier is included in the In the context request; or,
  • the key set identifier is included in a NAS message that is included in the context request.
  • the security context includes an encryption algorithm and an integrity protection algorithm used by the first core network device to protect the NAS message.
  • the context acquiring unit is further configured to:
  • a new algorithm is used to derive a new NAS key, and a NAS security mode command message is sent to the UE, which includes an identifier of the new algorithm; wherein the new algorithm includes an encryption algorithm and/or Or integrity protection algorithm;
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • the receiving processing device of the rerouting command provided by the embodiment of the present invention includes:
  • a rerouting command receiving unit configured to receive a rerouting command sent by the first core network device, where the non-access stratum NAS message and the indication information for determining the second core network device are included;
  • the specific message sending unit is configured to determine the second core network device according to the indication information, and send a specific message that carries the NAS message to the second core network device.
  • the specific message further includes:
  • a rerouting indication is used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • the identifier information of the first core network device where the second core network device determines the first core network device according to the identifier information of the first core network device.
  • the NAS message is a NAS message that is reconfigured by the first core network device to the received NAS message sent by the UE.
  • the rerouting command further includes:
  • the specific message further includes:
  • a seventh aspect of the present invention provides a device for providing a security context, where the device includes a processor and a transceiver, where
  • the transceiver When the processor determines that the NAS message needs to be rerouted to the second core network device in the specific network, the transceiver sends a re-routing command to the access network device, where the re-routing command includes the NAS message and is used to determine the Describe the information of the second core network device;
  • the transceiver Receiving, by the transceiver, a context request sent by the second core network device, where the context request includes an identifier of the UE and a key set identifier, and the processor searches for a corresponding security context according to the identifier of the UE and the key set identifier.
  • the transceiver sends the security context to the second core network device.
  • the processor before the transceiver sends a rerouting command to the access network device, the processor is further configured to reconfigure the received NAS message, where the rerouting command is The included NAS message is the reconstructed NAS message.
  • the integrity protection check value is calculated according to the current security context, and the integrity protection check value is used as the message authentication code MAC cell IE in the NAS message sent by the UE.
  • the processor uses the integrity protection check value as the message authentication code MAC cell IE in the NAS message sent by the UE, the processor is specifically configured to:
  • the integrity protection check value is replaced with a message authentication code MAC in the NAS message sent by the UE.
  • the processor when the processor reconstructs the received NAS message, the processor is further configured to:
  • the identifier assigned to the UE by the first core network device replaces the identity of the UE in the NAS message received from the UE.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the transceiver after the processor determines the current security context, the transceiver sends the security context to the second core network device, and the processor is further configured to:
  • the transceiver sends the security context to the second core network device.
  • a seventh possible implementation manner when the processor uses the security context currently shared by the UE to verify the integrity of the NAS message carried in the context request, specifically to:
  • the rerouting command further includes:
  • the context request further includes:
  • the rerouting indication is used to indicate NAS message It is rerouted to the second core network device.
  • An eighth aspect of the present invention provides a device for acquiring a security context, where the device includes a transceiver and a processor, where:
  • the transceiver receives a context response sent by the first core network device, and the processor obtains a security context, where the security context is determined by the first core network device according to the identifier of the UE and the key set identifier in the context request.
  • the NAS message includes an identifier that is allocated by the first core network device to the UE, and the second core network device determines the first core network device according to the identifier.
  • the specific message further includes the identifier information of the first core network device, and the second core network device determines the first core according to the identifier information of the first core network device Network equipment.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the security context includes an encryption algorithm and an integrity protection algorithm used by the first core network device to protect the NAS message.
  • the processor is further configured to: when a new algorithm needs to be selected, use a new The algorithm derives a new NAS key and sends a NAS security mode command message to the UE through the transceiver, including an identifier of the new algorithm; wherein the new algorithm includes an encryption algorithm and/or Integrity protection algorithm;
  • the transceiver receives the NAS security mode complete message fed back by the UE.
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • a ninth aspect a receiving processing device for a rerouting command according to an embodiment of the present invention, the device includes a transceiver and a processor, where:
  • the processor determines the second core network device according to the indication information, and sends a specific message carrying the NAS message to the second core network device by using the transceiver.
  • the specific message further includes:
  • a rerouting indication is used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • the identifier information of the first core network device where the second core network device determines the first core network device according to the identifier information of the first core network device.
  • the NAS message is a NAS message that is reconfigured by the first core network device to the received NAS message sent by the UE.
  • the rerouting command further includes:
  • the specific message further includes:
  • the invention receives the non-access stratum NAS message sent by the user equipment UE by using the first core network device;
  • the first core network device sends a re-routing command to the access network device, where the re-routing command includes the NAS message and is used to determine the
  • the second core network device receives the context request sent by the second core network device, where the context request includes the identifier of the UE and the key set identifier, and the first core network device is configured according to the The identifier of the UE and the key set identifier are searched for the corresponding security context, and the security context is sent to the second core network device. Thereby, the first core network device can be made to provide the security context of the UE to the second core network device in the specific network.
  • the second core network device receives the specific message sent by the access network device, where the specific message includes a non-access stratum NAS message; the second core network device determines the first core network device according to the specific message, and A core network device sends a context request, where the context request includes an identifier of the UE and a key set identifier; the second core network device receives a context response sent by the first core network device, and obtains a security context from the security context, where the security context is A core network device is determined according to the identifier of the UE and the key set identifier in the context request. Therefore, the second core network device in the specific network can obtain the security context of the UE provided by the first core network device, so that the core network device under the specific network can perform secure communication with the UE.
  • the method for providing a security context provided by the embodiment of the present invention includes:
  • the first core network device When it is determined that the NAS message needs to be rerouted to the second core network device in the specific network, the first core network device sends a re-routing command to the access network device, where the re-routing command includes the NAS message and is used to determine the Information about the second core network device.
  • the method further includes:
  • the first core network device receives the request message sent by the second core network device, where the request message includes the identifier of the UE, and the first core network device searches for the corresponding authentication data according to the identifier of the UE, and the The authentication data is sent to the second core network device.
  • the method before the first core network device sends the authentication data to the second core network device, the method further includes: a check value in the first core network device verification request message;
  • the first core network sends the authentication data to the second core network device, where the first core network device sends the authentication data to the second core network device.
  • the verification value in the first core network device verification request message includes:
  • the first core network device determines the corresponding security context by using the identifier of the UE and the key set identifier, and calculates a check value by using the security context, if If the calculated check value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the first core network device calculates a check value by using a hash function, and if the calculated check value is consistent with the check value in the request message, determining that the verification is successful; or
  • the first core network device searches for the locally saved check value. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the method before determining that the NAS message needs to be rerouted to the second core network device in the specific network, the method further includes: the first core network device adopting The authentication process between the UEs, or acquiring the security context of the UE from the third core network device;
  • the method further includes: the first core network device is the The UE allocates an identifier and determines a check value;
  • the rerouting command further includes: an identifier that is allocated by the first core network device to the UE, and the check value;
  • the re-routing command further includes: an identifier that is allocated by the first core network device to the UE, the check value, and a key set identifier of a security context of the UE.
  • the method before the first core network determines that the NAS message needs to be rerouted to the second core network device in the specific network, the method further includes:
  • the first core network device Sending, by the first core network device, a request message to the third core network device, where the request message includes the NAS message, and receiving a response message replied by the third core network device, where the UE is included Security context, a check value, and information for determining the second core network device; wherein the check value is determined by the third core network device;
  • the rerouting command further includes: the check value, or the check value and a key set identifier.
  • a method for obtaining a security context provided by an embodiment of the present invention includes:
  • the second core network device receives the response message sent by the first core network device, and obtains the authentication data of the UE, where the authentication data includes the security context of the UE, and the authentication data is the first core.
  • the network device is determined according to the identity of the UE.
  • the first MME or the third MME may be regarded as the first core network device.
  • the identifier of the UE is an identifier that is allocated by the first core network device to the UE;
  • the specific message further includes: a check value, or a check value and a key set identifier;
  • the request message further includes: a check value, or a check value and a key set identifier.
  • the specific message further includes: a rerouting indication, where the rerouting indication is used to indicate that the NAS message is rerouted to the second core network device. ;
  • the request message includes the NAS message, where the NAS message includes an identifier of the UE, and the request message further includes the rerouting indication.
  • the method for providing a security context provided by the embodiment of the present invention includes:
  • the third core network device sends a response message to the first core network device, including the security context of the UE and used for determining Information of the second core network device.
  • the method when it is determined that the NAS message needs to be rerouted to the second core network device in the specific network, the method further includes:
  • the third core network device determines a check value of the UE
  • the response message further includes: the check value, or the check value and a key set identifier corresponding to the security context of the UE.
  • the method further includes:
  • the third core network device finds corresponding authentication data according to the identifier of the UE, and sends a response message to the second core network device, where the authentication data of the UE is included.
  • the method before the third core network device sends the response message to the second core network device, the method further includes: The core network device verifies the check value in the request message;
  • the third core network device sends a response message to the second core network device, specifically: when the verification is successful, the third core network device sends a response message to the second core network device.
  • the third core network device is configured to verify the check value in the request message, and specifically includes:
  • the third core network device determines a corresponding security context by using the identifier of the UE and the key set identifier, and calculates a check value by using the security context. If the calculated check value is consistent with the check value in the request message, determining that the verification is successful; or,
  • the third core network device calculates a check value by using a hash function, and if the calculated check value is consistent with the check value in the request message, determining that the verification is successful; or
  • the third core network device searches for a locally saved check value. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the method further includes:
  • the third core network device determines, by using the rerouting indication, that the NAS message in the request message is rerouted to the second core network device;
  • the third core network device finds a corresponding security context according to the identifier and the key set identifier of the UE in the NAS message, and uses the security context to verify the integrity check code in the request message. When the verification succeeds, the third core The network device finds corresponding authentication data according to the identifier of the UE, and returns the authentication data to the second core network device.
  • the device for providing a security context provided by the embodiment of the present invention includes:
  • Receiving a NAS message unit configured to receive a non-access stratum NAS message sent by the user equipment UE;
  • a rerouting command unit configured to send a rerouting command to the access network device when the NAS message needs to be rerouted to the second core network device in the specific network, where the rerouting command includes the NAS message and Determining information of the second core network device.
  • the device further includes:
  • An authentication data providing unit configured to receive a request message sent by the second core network device, where the request message includes an identifier of the UE, and according to the identifier of the UE, search for corresponding authentication data, and the authentication is performed. Data is sent to the second core network device.
  • the authentication data providing unit is further configured to perform verification before sending the authentication data to the second core network device The check value in the request message;
  • the authentication data providing unit sends the authentication data to the second core network device, specifically: when the verification is successful, the authentication data is sent to the second core network device.
  • the authentication data providing unit verifies the check value in the request message, it is specifically used to:
  • the request message further includes a key set identifier, determining a corresponding security context by using the identifier of the UE and the key set identifier, and calculating a check value by using the security context, if the calculated school If the verification value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the locally saved check value is found. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the sending rerouting command unit is further configured to: before and after determining that the NAS message needs to be rerouted to the second core network device in the specific network The authentication process between the UEs, or acquiring the security context of the UE from the third core network device;
  • the sending rerouting command unit is further configured to: assign an identifier to the UE, And determine the check value;
  • the rerouting command further includes: an identifier that is sent by the sending rerouting command unit to the UE, and the check value;
  • the re-routing command further includes: an identifier that is sent by the sending re-routing command unit to the UE, the check value, and a key set identifier of a security context of the UE.
  • the sending rerouting command unit determines that the NAS message needs to be rerouted to a second core network device in a specific network, and is further configured to:
  • the rerouting command further includes: the check value, or the check value and a key set identifier.
  • the device for obtaining a security context provided by the embodiment of the present invention includes:
  • a specific message receiving unit configured to receive a specific message sent by the access network device, where the specific message includes a non-access stratum NAS message;
  • a requesting unit configured to determine a first core network device according to the specific message, and send a request message to the first core network device, where the request message includes an identifier of the UE;
  • An obtaining unit configured to receive a response message sent by the first core network device, and obtain, from the UE, the authentication data of the UE, where the authentication data includes a security context of the UE, where the authentication data is the first core
  • the network device is determined according to the identity of the UE.
  • the first MME or the third MME may be regarded as the first core network device.
  • the identifier of the UE is an identifier that is allocated by the first core network device to the UE;
  • the specific message further includes: a check value, or a check value and a key set identifier;
  • the request message further includes: a check value, or a check value and a key set identifier.
  • the specific message further includes: a rerouting indication, where the rerouting indication is used to indicate that the NAS message is rerouted to the second core network device ;
  • the request message includes the NAS message, where the NAS message includes an identifier of the UE, and the request message further includes the rerouting indication.
  • the device for providing a security context provided by the embodiment of the present invention includes:
  • a receiving requesting unit configured to receive a request message sent by the first core network device, where the non-access stratum NAS message of the user equipment UE is included;
  • a response unit configured to: when determining that the NAS message needs to be rerouted to a second core network device in a specific network, send a response message to the first core network device, where the security context of the UE is included and used for determining Information of the second core network device.
  • the responding unit is further configured to: when determining that the NAS message needs to be rerouted to a second core network device in a specific network,
  • the response message further includes: the check value, or the check value and a key set identifier corresponding to the security context of the UE.
  • the receiving requesting unit is further configured to: receive a request message sent by the second core network device, where NAS message, check value and key set identifier;
  • the response unit is further configured to: find corresponding authentication data according to the identifier of the UE, and send a response message to the second core network device, where the authentication data of the UE is included.
  • the responding unit is further configured to verify the request message before sending the response message to the second core network device Check value in
  • the response unit sends a response message to the second core network device, specifically: when the verification is successful, the response unit sends a response message to the second core network device.
  • the request message further includes a key set identifier, determining a corresponding security context by using the identifier of the UE and the key set identifier, and calculating a check value by using the security context, if the calculated school If the verification value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the locally saved check value is found. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the receiving requesting unit is further configured to:
  • a device for providing a security context including a transceiver and a processor, is provided by an embodiment of the present invention, where
  • the processor when determining that the NAS message needs to be rerouted to the second core network device in the specific network, sends a rerouting command to the access network device by using the transceiver, where the rerouting command includes the NAS message and is used to determine the location Information about the second core network device.
  • the transceiver is further configured to receive a request message sent by the second core network device, where the request message includes an identifier of the UE, where the processor further uses And searching for the corresponding authentication data according to the identifier of the UE, and sending the authentication data to the second core network device by using the transceiver.
  • the processor is further configured to:
  • the request message further includes a key set identifier, determining a corresponding security context by using the identifier of the UE and the key set identifier, and calculating a check value by using the security context, if the calculated school If the verification value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the locally saved check value is found. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the processor is further configured to: pass the UE with the UE before determining that the NAS message needs to be rerouted to the second core network device in the specific network.
  • the processor is further configured to: assign an identifier to the UE, And determine the check value;
  • the rerouting command further includes: an identifier allocated by the processor to the UE and the check value;
  • the re-routing command further includes: an identifier that is allocated by the processor to the UE, the check value, and a key set identifier of a security context of the UE.
  • the processor determines that the NAS message needs to be rerouted to a second core network device in a specific network, and is further configured to:
  • the core network device sends a request message, where the request message includes the NAS message, and receives, by the transceiver, a response message replied by the third core network device, where the security context, the check value, and the determining Information of the second core network device; wherein the check value is determined by the third core network device;
  • the rerouting command further includes: the check value, or the check value and a key set identifier.
  • the device for obtaining a security context includes: a transceiver and a processor, where
  • the processor obtains the authentication data of the UE, where the authentication data includes a security context of the UE, and the authentication data is the first core network device. Determined according to the identity of the UE.
  • the identifier of the UE is an identifier that is allocated by the first core network device to the UE;
  • the specific message further includes: a check value, or a check value and a key set identifier;
  • the request message further includes: a check value, or a check value and a key set identifier.
  • the specific message further includes: a rerouting indication, where the rerouting indication is used to indicate that the NAS message is rerouted to the second core network device ;
  • the request message includes the NAS message, where the NAS message includes an identifier of the UE, and the request message further includes the rerouting indication.
  • a device for providing a security context including: a transceiver and a processor, where
  • the transceiver When the processor determines that the NAS message needs to be rerouted to the second core network device in the specific network, the transceiver sends a response message to the first core network device, where the security context of the UE is included and used for determining Information of the second core network device.
  • the processor when determining that the NAS message needs to be rerouted to a second core network device in a specific network, the processor is further configured to:
  • the response message further includes: the check value, or the check value and a key set identifier corresponding to the security context of the UE.
  • the transceiver is further configured to receive a request message sent by the second core network device, where the NAS message, a check value, and a key set identifier are included;
  • the processor finds corresponding authentication data according to the identifier of the UE, and sends a response message to the second core network device by using the transceiver, where the authentication data of the UE is included.
  • the processor is further configured to verify the location before sending the response message to the second core network device by using the transceiver The check value in the request message;
  • the processor sends a response message to the second core network device by using the transceiver, where the processor sends a response message to the second core network device by using the transceiver.
  • the request message further includes a key set identifier, determining a corresponding security context by using the identifier of the UE and the key set identifier, and calculating a check value by using the security context, if the calculated school If the verification value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the locally saved check value is found. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the transceiver is further configured to receive a request message sent by the second core network device, where the NAS message and a rerouting indication are included, The routing indication is used to indicate that the NAS message is rerouted to the second core network device;
  • the processor is further configured to: determine, by using the rerouting indication, that the NAS message in the request message is rerouted to the second core network device; and find a corresponding security according to the identifier of the UE and the key set identifier in the NAS message. Context, and using the security context to verify the integrity check code in the request message. When the verification is successful, the corresponding authentication data is found according to the identifier of the UE, and the authentication data is returned to the second through the transceiver. Core network equipment.
  • the embodiment of the present invention receives the non-access stratum NAS sent by the user equipment UE by using the first core network device. a message; when it is determined that the NAS message needs to be rerouted to a second core network device in a specific network, the first core network device sends a re-routing command to the access network device, where the re-routing command includes a NAS message and is used for Determining information of the second core network device.
  • the first core network device determines that the NAS message needs to be rerouted to the second core network device in the specific network, the first core network device sends a re-routing command to the access network device.
  • the embodiment of the present invention receives, by using the second core network device, a specific message sent by the access network device, where the specific message includes a non-access stratum NAS message, and the second core network device determines the first core network device according to the specific message, and Sending a request message to the first core network device, where the request message includes an identifier of the UE, and the second core network device receives the response message sent by the first core network device, and obtains the authentication data of the UE, where the authentication is performed.
  • the data includes a security context of the UE, and the authentication data is determined by the first core network device according to the identifier of the UE. Therefore, the second core network device in the specific network can obtain the security context of the UE provided by the first core network device, so that the core network device under the specific network can perform secure communication with the UE.
  • the embodiment of the present invention receives, by the third core network device, a request message sent by the first core network device, where the non-access stratum NAS message of the user equipment UE is included; when determining that the NAS message needs to be rerouted to the second in the specific network, The third core network device sends a response message to the first core network device, where the third core network device includes a security context of the UE and information for determining the second core network device, so that the third core network When receiving the request message sent by the first core network device, when determining that the NAS message needs to be rerouted to the second core network device in the specific network, the device sends the response message to the first core network device.
  • the security context and information used to determine the second core network device are provided to a second core network device in a particular network.
  • FIG. 1 is a schematic diagram of a MME reselection process in the prior art
  • FIG. 2 is a schematic diagram of a process in which a MMEn requests a security context from a MMEo in a TAU process in the prior art
  • FIG. 3 is a schematic flowchart of a transmission process of a security context according to Embodiment 1 of the present invention
  • FIG. 4 is a schematic flowchart of a security context transmission process according to Embodiment 2 of the present invention.
  • FIG. 5 is a schematic flowchart of a security context transmission process according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic flowchart of a security context transmission processing process according to Embodiment 4 of the present invention.
  • FIG. 7 is a schematic flowchart of a security context transmission process according to Embodiment 5 of the present invention.
  • FIG. 8 is a schematic diagram of a method for calculating an integrity check value (Token value) according to an embodiment of the present invention
  • FIG. 9 is a schematic diagram of a second method for calculating a Token value according to an embodiment of the present invention.
  • FIG. 10 is a schematic flowchart diagram of a method for providing a security context according to an embodiment of the present invention.
  • FIG. 11 is a schematic flowchart diagram of a method for acquiring a security context according to an embodiment of the present disclosure
  • FIG. 12 is a schematic flowchart of a method for receiving a rerouting command according to an embodiment of the present disclosure
  • FIG. 13 is a schematic structural diagram of a security context providing apparatus according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of an apparatus for acquiring a security context according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic structural diagram of a receiving processing device for a rerouting command according to an embodiment of the present disclosure
  • FIG. 16 is a schematic flowchart of a security context transmission processing process according to Embodiment 6 of the present invention.
  • FIG. 17 is a schematic flowchart of a security context transmission process according to Embodiment 7 of the present invention.
  • FIG. 18 is a schematic flowchart of a transmission process of a security context according to Embodiment 8 of the present invention.
  • FIG. 19 is a schematic flowchart of a transmission process of a security context according to Embodiment 9 of the present invention.
  • FIG. 20 is a schematic flowchart diagram of another method for providing a security context according to an embodiment of the present invention.
  • FIG. 21 is a schematic flowchart diagram of another method for acquiring a security context according to an embodiment of the present disclosure.
  • FIG. 22 is a schematic flowchart diagram of a method for providing a third security context according to an embodiment of the present disclosure.
  • FIG. 23 is a schematic structural diagram of another security context providing apparatus according to an embodiment of the present invention.
  • FIG. 24 is a schematic structural diagram of another security context acquiring apparatus according to an embodiment of the present disclosure.
  • FIG. 25 is a schematic structural diagram of a third security context providing apparatus according to an embodiment of the present invention.
  • the embodiment of the present invention provides a security context providing and acquiring method and device, so that the MME in a specific network can obtain the security context of the UE, so that the MME and the UE in the specific network can perform secure communication.
  • the technical solution provided by the embodiment of the present invention can also perform integrity check on the rerouted NAS message.
  • the core network device in the present invention may be an MME or a device such as an SGSN.
  • the access network device in the present invention may be an eNB or a device such as a radio network controller (RNC).
  • the NAS message described in the present invention may be an attach request message, or may be a tracking area update request message or the like.
  • the core network device is the MME
  • the access network device is the eNB
  • the NAS message is an attach request message.
  • Embodiment 1 of the present invention is a diagrammatic representation of Embodiment 1 of the present invention.
  • This embodiment is directed to a scenario in which the NAS message is not protected by security (including integrity protection and confidentiality protection), for example, the UE is first attached to the network (that is, the first time accessing the network).
  • security including integrity protection and confidentiality protection
  • the UE is first attached to the network (that is, the first time accessing the network).
  • Figure 3 including the steps:
  • the UE first initiates an attach request (or a tracking area update request) to the first MME.
  • E-UTRAN Key Set Identifier in E-UTRAN (eKSI) in the Attach Request (or Tracking Area Update Request) are set to 1, That is, the UE has no security context available, and the attach request (or tracking area update request) is not secured.
  • the eKSI is used to identify different security contexts under the UE.
  • the eKSI is a key set identifier in a security context. Because the root keys in different security contexts are different, the key set may be identified by using a key set. To identify the security context.
  • the root key is Kasme.
  • the UE performs authentication and key agreement with the first MME, and establishes a NAS security association between the UE and the first MME.
  • This step establishes a security context shared between the UE and the first MME.
  • the first MME initiates an update location request to the HSS
  • the HSS queries the database, that is, looks up the subscription data of the UE, determines whether the UE is a UE that needs to perform a specific service (for example, MTC service), needs to access the UE to the corresponding specific network, and returns an update location confirmation, and the update location confirmation
  • a specific network which includes, for example, the type of service of the UE and the type information of the specific network to which it is accessed.
  • the first MME After receiving the information indication of using the specific network, the first MME re-structures the attach request (or the tracking area update request), that is, replaces the attach request with the eKSI currently associated with the security context shared by the UE. eKSI.
  • the eKSI associated with the security context is the key set identifier in the security context.
  • the first MME sends a re-routing command to the eNB, where the re-routing command includes a reconstructed attach request (or a reconstructed tracking area update request), and uses information of a specific network.
  • the information of the specific network is used, that is, information for determining the second MME.
  • the second MME that is, the MME in a specific network, that is, the specific MME described in the background art.
  • the eNB After receiving the rerouting command, the eNB selects a second MME of the specific network for the UE according to the information of using the specific network, and sends a specific message to the second MME, where the specific message includes the reconstructed attach request (or the reconstructed Tracking area update request), rerouting indication, and identification information of the first MME.
  • the identifier information of the first MME may be an MME ID, or may be a GUTI or the like.
  • the eNB selects a second MME of the specific network for the UE according to the information about using the specific network, and includes, for example:
  • the eNB passes the correspondence list of the pre-configured network type and the second MME identity, and The type information of the network determines the second MME of the corresponding specific network.
  • the second MME finds the first MME according to the identifier information of the first MME, and initiates a context request message to the first MME, where the IMSI, the eKSI, and the rerouting indication of the UE are included.
  • the first MME After receiving the context request message, the first MME obtains the IMSI, the eKSI, and the rerouting indication of the UE, and the first MME determines that the security context needs to be searched according to the rerouting indication, and further finds the corresponding security context according to the IMSI and the eKSI.
  • the UE is determined by the IMSI
  • the security context under the UE is determined by using the eKSI.
  • the first MME sends the security context shared by the UE with the first MME to the second MME by using a context response message, where the security context includes a root key (Kasme), an encryption algorithm (an algorithm for anti-listening), and Integrity protection algorithm (anti-tampering algorithm).
  • Kasme root key
  • Encrypted an algorithm for anti-listening
  • Integrity protection algorithm anti-tampering algorithm
  • the second MME needs to reselect an algorithm used when communicating with the UE, for example, if the algorithm in the security context of the algorithm selected by the second MME (including the encryption algorithm and/or the integrity protection algorithm) is different, the second MME utilizes The newly selected algorithm derives a new NAS key and sends a NAS security mode command message to the UE, which contains a new algorithm selected by the second MME.
  • the new algorithm selected by the second MME includes an encryption algorithm and/or an integrity protection algorithm.
  • the second MME uses the newly selected algorithm to derive a new NAS key, including: deriving a new NAS by using a newly selected encryption algorithm and/or an integrity protection algorithm identifier (ID) and a root key Kasme. Key.
  • ID integrity protection algorithm identifier
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • the MME needs to be used in step 305.
  • the allocated GUTI replaces the IMSI (or P-TMSI or GUTI) in the attach request (or the tracking area update request), so that the identification information of the first MME does not need to be carried in the step 307, and the IMTI is not carried in the step 308 but the GUTI.
  • the indications carried in the 307 and 309 context requests are optional and are not required to be carried. Instructions.
  • the context request carries the rerouting indication
  • the first MME learns that the attach request (or the tracking area update request) is rerouted to the second MME according to the rerouting indication in the context request.
  • the NAS security mode command procedure of steps 3011 and 3012 is optional, and is initiated only when the second MME selects a new integrity algorithm and/or encryption algorithm for the UE.
  • the 308 step context request may also carry the reconstructed attach request (or the reconstructed tracking area update request) without directly carrying the eKSI, and the first MME according to the IMSI and the reconstructed attach request (or the reconstructed trace)
  • the eKSI in the area update request acquires the security context, and the first MME does not need to perform integrity verification on the reconstructed attach request (or the reconstructed tracking area update request), and only needs to send the security context to the first according to the rerouting indication.
  • the second MME can be.
  • step 305 the attach request (or the tracking area update request) is not reconstructed, and then the subsequent step uses the attach request (or the tracking area update request) sent by the UE. Therefore, the 306-step re-routing command further includes an eKSI associated with the security context currently shared by the first MME with the UE. The eKSI is also included in the step 307 specific message.
  • the 308 step context request may also carry an attach request (or a tracking area update request).
  • Embodiment 2 of the present invention is a diagrammatic representation of Embodiment 2 of the present invention.
  • This embodiment is directed to a scenario in which the NAS message is not securely protected, for example, the UE is first attached to the network.
  • This embodiment increases the integrity protection of the attach request (or tracking area update request) and improves security.
  • the specific process is shown in Figure 4, including:
  • the UE first initiates an attach request (or a tracking area update request) to the first MME. ;
  • MAC Message Authentication Code
  • IE Message Authentication Code
  • the UE performs authentication and key negotiation with the network side, and establishes a NAS security association between the UE and the first MME.
  • This step establishes a security context shared between the UE and the first MME.
  • the first MME initiates an update location request to the HSS.
  • the HSS queries the database, that is, looks up the subscription data of the UE, and sees whether the UE is a UE that needs to perform a specific service (for example, an MTC service), whether the UE needs to access the corresponding specific network, and returns more.
  • the new location confirms that the update location confirmation message includes information using a specific network, for example, including the type of service of the UE and the type information of the specific network to which it accesses.
  • the first MME After receiving the information indication of using the specific network, the first MME reconstructs the originally received attach request message (or the tracking area update request), that is, the first MME calculates the token based on the security context currently shared with the UE ( Token) value, and the Token value is populated into the MAC IE of the attach request message, and the eKSI in the attach request is replaced with the eKSI associated with the current security context.
  • the Token value that is, the integrity protection check value.
  • the first MME sends a re-routing command to the eNB, where the command includes the reconstructed attach request (or the reconstructed tracking area update request), and uses information of the specific network.
  • the information of the specific network is used, that is, information for determining the second MME.
  • the second MME that is, the MME in a specific network, that is, the specific MME described in the background art.
  • the eNB After receiving the rerouting command, the eNB selects a second MME of the specific network for the UE according to the information of using the specific network, and sends a specific message to the second MME, where the specific message includes the reconstructed attach request (or the reconstructed Tracking area update request), rerouting indication, and identification information of the first MME.
  • the identifier information of the first MME may be an MME ID, or may be a GUTI or the like.
  • the eNB selects a second MME of the specific network for the UE according to the information about using the specific network, and includes, for example:
  • the eNB determines, according to the type information of the pre-configured network type and the second MME identity, the second MME of the specific network by using the type information of the specific network.
  • the second MME finds the first MME according to the identifier information of the first MME, and initiates a context request message to the first MME, where the IMSI of the UE, the reestablished attach request, and the rerouting indication are included.
  • the first MME finds a corresponding security context according to the IMSI and the eKSI, and uses the security context to verify the Token value in the attach request.
  • the first MME uses the security context to verify the Token value in the attach request, that is, the first MME calculates the Token value by using the security context, and compares with the Token value in the attach request, and the verification succeeds.
  • the first MME sends the security context shared by the UE with the first MME to the second MME by using a context response message, where the security context includes a root key (Kasme), and an encryption algorithm (for preventing The algorithm for monitoring) and the integrity protection algorithm (for tamper-proof algorithms).
  • Kasme root key
  • an encryption algorithm for preventing The algorithm for monitoring
  • the integrity protection algorithm for tamper-proof algorithms
  • the second MME needs to reselect an algorithm used when communicating with the UE, for example, if the algorithm in the security context of the algorithm selected by the second MME (including the encryption algorithm and/or the integrity protection algorithm) is different, the second MME utilizes The newly selected algorithm derives a new NAS key and sends a NAS security mode command message to the UE, which contains a new algorithm selected by the second MME.
  • the new algorithm selected by the second MME includes an encryption algorithm and/or an integrity protection algorithm.
  • the second MME uses the newly selected algorithm to derive a new NAS key, including: deriving a new NAS by using a newly selected encryption algorithm and/or an integrity protection algorithm identifier (ID) and a root key Kasme. Key.
  • ID integrity protection algorithm identifier
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • the MME needs to be used in step 405.
  • the allocated GUTI replaces the IMSI (or P-TMSI or GUTI) in the attach request (or the tracking area update request), so that the identification information of the first MME does not need to be carried in step 407, and the IMTI is not carried in step 408 but GUTI.
  • the rerouting indication carried in the 408 step and the 409 step context request is optional, and is not an indication that must be carried.
  • the first MME learns that the attach request (or the tracking area update request) is rerouted to the second MME according to the rerouting indication in the context request, and the first MME receives the attach request (or Track the zone update request) and verify the Token value.
  • the NAS security mode command procedure of steps 4011 and 4012 is optional, and is initiated only when the second MME selects a new integrity algorithm and/or encryption algorithm for the UE.
  • the attachment request (or tracking area update request) is not reconstructed, only calculation Token value, then the attachment request (or tracking area update request) sent by the UE is used in the subsequent steps. Therefore, the 406-step re-routing command further includes an eKSI and a calculated Token value associated with the security context currently shared by the first MME with the UE.
  • the step 407 further includes the eKSI and the calculated Token value in the specific message.
  • the context request also includes a Token value.
  • the first MME needs to verify the Token value in the security context.
  • Embodiment 3 of the present invention is a diagrammatic representation of Embodiment 3 of the present invention.
  • This embodiment is directed to a scenario in which the NAS message is securely protected and there is no available security context on the first MME.
  • the specific process is as shown in FIG. 5, and includes the following steps:
  • the UE initiates an attach request (or a tracking area update request) to the first MME, and the attach request (or the tracking area update request) is integrity protected;
  • the first MME searches for the third MME by using the GUTIo in the attach request (or the tracking area update request), thereby initiating a context request to the third MME;
  • the GUTIo is the old GUTI, that is, the GUTI allocated by the third MME to the UE.
  • the third MME verifies the integrity of the received attach request (or tracking area update request).
  • the third MME sends a context response to the first MME, which includes the security context.
  • the first MME initiates an update location request to the HSS
  • the HSS queries the database, that is, looks up the subscription data of the UE, and checks whether the UE is a UE that needs to perform a specific service (for example, an MTC service), whether the UE needs to access the corresponding specific network, and returns an update location confirmation, and the update location confirms.
  • the message includes information using a specific network, which includes, for example, the type of service of the UE and the type information of the specific network to which it is accessed.
  • the first MME After receiving the information indication of using the specific network, the first MME reconstructs the original received attach request (or tracking area update request) message, that is, if the first MME has allocated the GUTI to the UE, the first MME will The GUTIo in the attach request (or tracking area update request) message is replaced with the GUTI allocated by the first MME for the UE; if the first MME does not allocate the GUTI for the UE, the first The MME replaces the GUTIo in the Attach Request (or Tracking Area Update Request) message with the IMSI.
  • the first MME calculates a Token value based on a security context currently shared with the UE, and replaces the Token value with a MAC IE of the Attach Request (or Tracking Area Update Request) message;
  • the first MME sends a re-routing command to the eNB, where the command includes a reconstructed attach request (or a reconstructed tracking area update request) and information using a specific network.
  • the information of the specific network is used, that is, information for determining the second MME.
  • the second MME that is, the MME in a specific network, that is, the specific MME described in the background art.
  • the eNB After receiving the rerouting command, the eNB selects a second MME of the specific network for the UE according to the information of using the specific network, and sends a specific message to the second MME, where the specific message includes the reconstructed attach request (or the reconstructed Track area update requests) and reroute indications.
  • the eNB selects a second MME of the specific network for the UE according to the information about using the specific network, and includes, for example:
  • the eNB determines, according to the type information of the pre-configured network type and the second MME identity, the second MME of the specific network by using the type information of the specific network.
  • the second MME finds the first MME according to the GUTI in the reconstructed attach request (or the reconstructed tracking area update request), and initiates a context request message to the first MME, where the first MME allocates the GUTI allocated to the UE, Reconstructed attach request (or reconstructed tracking area update request) and rerouting indication.
  • the first MME learns, according to the rerouting indication, that the reconstructed attach request (or the reconstructed tracking area update request) is rerouted, and the first MME receives the reconstructed attach request (or the reconstructed tracking area update request). And find the corresponding security context according to GUTI (or IMSI) and eKSI, and use the security context to verify the Token value in the attach request (or tracking area update request).
  • GUTI or IMSI
  • eKSI eKSI
  • the first MME finds a corresponding security context according to the GUTI (or IMSI) and the eKSI, and includes: determining, by the first MME, the corresponding UE according to the GUTI (or IMSI), and determining a corresponding security context under the UE according to the eKSI.
  • the first MME uses the security context to verify the reconstructed attach request (or the reconstructed tracking area is more The Token value in the new request), that is, the first MME will use the security context to calculate the Token value, and compare it with the Token value in the reconstructed attach request (or the reconstructed tracking area update request), and the verification is successful.
  • the first MME sends the current security context of the UE to the second MME, where the security context includes a root key (Kasme), an encryption algorithm (an algorithm for anti-listening), and an integrity protection algorithm. (Algorithm for tamper resistance).
  • the second MME needs to reselect an algorithm used when communicating with the UE, for example, if the algorithm in the security context of the algorithm selected by the second MME (including the encryption algorithm and/or the integrity protection algorithm) is different, the second MME utilizes The newly selected algorithm derives a new NAS key and sends a NAS security mode command message to the UE, which contains a new algorithm selected by the second MME.
  • the new algorithm selected by the second MME includes an encryption algorithm and/or an integrity protection algorithm.
  • the second MME uses the newly selected algorithm to derive a new NAS key, including: deriving a new NAS by using a newly selected encryption algorithm and/or an integrity protection algorithm identifier (ID) and a root key Kasme. Key. This is a prior art and will not be described here.
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • the identification information of the first MME needs to be carried in the 609 step, so that the second MME can find the corresponding first MME to request the security context according to the identification information of the first MME.
  • the 5013 step and 5014 step NAS security mode command procedures are optional and are initiated only when the second MME selects a new integrity algorithm and/or encryption algorithm for the UE.
  • Embodiment 4 of the present invention is a diagrammatic representation of Embodiment 4 of the present invention.
  • This embodiment is directed to a scenario in which the NAS message is securely protected and there is no available security context on the first MME. For example, when the UE initiates an attach request or a tracking area update request, the specific process is as shown in FIG.
  • the UE initiates an attach request (or a tracking area update request) to the first MME, and the attach request (or tracking area update request) is integrity protected;
  • the first MME searches for the third MME by using the GUTIo in the attach request (or the tracking area update request), thereby initiating a context request to the third MME;
  • the GUTIo is the old GUTI, that is, the GUTI allocated by the third MME to the UE.
  • the third MME verifies the integrity of the received attach request (or tracking area update request).
  • the third MME sends a context response to the first MME, which includes the security context.
  • the first MME initiates an update location request to the HSS
  • the HSS queries the database, that is, looks up the subscription data of the UE, and checks whether the UE is a UE that needs to perform a specific service (for example, an MTC service), whether the UE needs to access the corresponding specific network, and returns an update location confirmation, and the update location confirms.
  • the message includes information using a specific network, which includes, for example, the type of service of the UE and the type information of the specific network to which it is accessed.
  • the first MME After receiving the information indication of using the specific network, the first MME sends a re-routing command to the eNB, where the command includes an attach request (or a tracking area update request), an identifier of the UE, and information using a specific network.
  • the command includes an attach request (or a tracking area update request), an identifier of the UE, and information using a specific network.
  • the information of the specific network is used, that is, information for determining the second MME.
  • the second MME that is, the MME in a specific network, that is, the specific MME described in the background art.
  • the identifier of the UE may be a GUTI allocated by the first MME for the UE, or may be an IMSI.
  • the re-routing command may further include an eKSI.
  • the eNB After receiving the rerouting command, the eNB selects a second MME of the specific network for the UE according to the information of using the specific network, and sends a specific message to the second MME, where the specific message includes an attach request (or a tracking area update request). The identity of the UE and the rerouting indication.
  • the eNB selects a second MME of the specific network for the UE according to the information about using the specific network, and includes, for example:
  • the eNB determines, according to the type information of the pre-configured network type and the second MME identity, the second MME of the specific network by using the type information of the specific network.
  • the identifier of the UE may be a GUTI allocated by the first MME for the UE, or may be an IMSI.
  • the specific message may further include the identifier information of the first MME, so that the second MME may find the corresponding first MME according to the identifier information of the first MME.
  • the specific message may further include an eKSI.
  • the second MME finds the first MME according to the GUTI in the specific message or the identifier information of the first MME, and initiates a context request message to the first MME, where the identifier of the UE, the attach request (or the tracking area update request), and the weight are included. Routing indication.
  • the identifier of the UE may be a GUTI allocated by the first MME for the UE, or may be an IMSI.
  • the specific message may further include an eKSI.
  • the first MME learns, according to the rerouting indication, that the attach request (or the tracking area update request) is rerouted, and the first MME receives the attach request (or tracking area update request), and finds according to GUTI (or IMSI) and eKSI. Corresponding security context, and use this security context to verify the attach request (or tracking area update request).
  • the first MME finds a corresponding security context according to the GUTI (or IMSI) and the eKSI, and includes: determining, by the first MME, the corresponding UE according to the GUTI (or IMSI), and determining a corresponding security context under the UE according to the eKSI.
  • the first MME uses the security context to verify the attach request (or the tracking area update request), that is, the first MME will use the security context to calculate the MAC value, and compare with the MAC value in the attach request (or tracking area update request). If they are consistent, the verification is successful.
  • the first MME sends the current security context of the UE to the second MME, where the security context includes a root key (Kasme), an encryption algorithm (an algorithm for anti-listening), and an integrity protection algorithm. (Algorithm for tamper resistance).
  • the second MME needs to reselect an algorithm used when communicating with the UE, for example, if the algorithm in the security context of the algorithm selected by the second MME (including the encryption algorithm and/or the integrity protection algorithm) is different, the second MME utilizes The newly selected algorithm derives a new NAS key and sends a NAS security mode command message to the UE, which contains a new algorithm selected by the second MME.
  • the new algorithm selected by the second MME includes an encryption algorithm and/or an integrity protection algorithm.
  • the second MME uses the newly selected algorithm to derive a new NAS key, including: deriving a new NAS by using a newly selected encryption algorithm and/or an integrity protection algorithm identifier (ID) and a root key Kasme. Key. This is a prior art and will not be described here.
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • the 6013 step and 6014 step NAS security mode command procedure is optional, and is initiated only when the second MME selects a new integrity algorithm and/or encryption algorithm for the UE.
  • Embodiment 5 of the present invention is a diagrammatic representation of Embodiment 5 of the present invention.
  • the specific process is as shown in FIG. 7, and includes the following steps:
  • the UE initiates an attach request (or a tracking area update request) to the first MME, where the attach request (or the tracking area update request) is integrity protected;
  • the first MME searches for the third MME by using the GUTIo in the attach request (or the tracking area update request), thereby initiating a context request to the third MME;
  • the GUTIo is the old GUTI, that is, the GUTI allocated by the third MME to the UE.
  • the third MME verifies the integrity of the received attach request (or tracking area update request).
  • the third MME sends a context response to the first MME, including the security context and information using the particular network.
  • the first MME After receiving the information indication of using the specific network, the first MME sends a rerouting life to the eNB.
  • the command includes an attach request (or tracking area update request) and information about using a particular network.
  • the information of the specific network is used, that is, information for determining the second MME.
  • the second MME that is, the MME in a specific network, that is, the specific MME described in the background art.
  • the eNB After receiving the rerouting command, the eNB selects a second MME of the specific network for the UE according to the information of using the specific network, and sends a specific message to the second MME, where the specific message includes an attach request (or a tracking area update request) and Rerouting indication.
  • the eNB selects a second MME of the specific network for the UE according to the information about using the specific network, and includes, for example:
  • the eNB determines, according to the type information of the pre-configured network type and the second MME identity, the second MME of the specific network by using the type information of the specific network.
  • the second MME finds the third MME according to the GUTI in the attach request (or the tracking area update request), and initiates a context request message including the GUTI, the attach request (or the tracking area update request), and the rerouting indication to the third MME. .
  • the third MME learns, according to the rerouting indication, that the attach request (or the tracking area update request) is rerouted, and the third MME receives the attach request (or tracking area update request), and finds a corresponding security context according to the GUTI and the eKSI. And use the security context to verify the attach request (or trace area update request).
  • the third MME finds a corresponding security context according to the GUTI and the eKSI, including: determining, by the third MME, the corresponding UE according to the GUTI, and determining a corresponding security context under the UE according to the eKSI.
  • the third MME uses the security context to verify the attach request (or the tracking area update request), that is, the third MME calculates the MAC value by using the security context, and compares with the MAC value in the attach request (or the tracking area update request). If they are consistent, the verification is successful.
  • the third MME sends the current security context of the UE to the second MME, where the security context includes a first key (Kasme) and an encryption algorithm (for anti-listening calculation) Method) and integrity protection algorithm (anti-tampering algorithm).
  • Kasme a first key
  • Encrypted for anti-listening calculation
  • integrity protection algorithm anti-tampering algorithm
  • the second MME needs to reselect an algorithm used when communicating with the UE, for example, if the algorithm in the security context of the algorithm selected by the second MME (including the encryption algorithm and/or the integrity protection algorithm) is different, the second MME utilizes The newly selected algorithm derives a new NAS key and sends a NAS security mode command message to the UE, which contains a new algorithm selected by the second MME.
  • the new algorithm selected by the second MME includes an encryption algorithm and/or an integrity protection algorithm.
  • the second MME uses the newly selected algorithm to derive a new NAS key, including: deriving a new NAS by using a newly selected encryption algorithm and/or an integrity protection algorithm identifier (ID) and a root key Kasme. Key. This is a prior art and will not be described here.
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • the third MME may be regarded as the first core network device.
  • the 7010 step and 7011 step NAS security mode command procedure is optional, and the procedure is initiated only when the second MME selects a new integrity algorithm and/or encryption algorithm for the UE.
  • the Token value is calculated by the EIA algorithm using the KEY, MESSAGE, COUNT, BEARER flag, and DIRECTION value.
  • the count (COUNT) value is a count value of the NAS message, and specifically uses a count value shared by the UE and the first MME;
  • the message (MESSAGE) is a NAS message
  • EIA is the integrity algorithm
  • the key (KEY) is set to KNASint
  • Bearer identifies all bits set to default values, such as 1;
  • the DIRECTION value bit is set to a default value, such as 1;
  • a method for obtaining a security context includes the following steps:
  • the first core network device receives a non-access stratum NAS message sent by the user equipment UE.
  • the first core network device sends a re-routing command to the access network device, where the re-routing command includes a NAS message and is used for Determining information of the second core network device;
  • the first core network device receives a context request sent by the second core network device, where the context request includes an identifier of the UE and a key set identifier, where the first core network device is configured according to the identifier and the key set of the UE. Identifying, searching for a corresponding security context, and sending the security context to the second core network device.
  • the method further includes:
  • the first core network device reconfigures the received NAS message, and the NAS message included in the rerouting command is a reconstructed NAS message.
  • the first core network device reconfigures the received NAS message from the UE, including:
  • the first core network device replaces the key set identifier in the NAS message sent by the UE by using a key set identifier in the current security context; and/or,
  • the first core network device calculates an integrity protection check value according to the current security context, and uses the integrity protection check value as the message authentication code MAC cell IE in the NAS message sent by the UE.
  • the integrity protection check value is used as the message authentication code MAC cell IE in the NAS message sent by the UE, including:
  • the integrity protection check value is replaced with a message authentication code MAC in the NAS message sent by the UE.
  • the first core network device reconfigures the received NAS message from the UE, and further includes:
  • the first core network device replaces the identifier of the UE in the NAS message received from the UE by the identifier allocated by the first core network device for the UE.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the method further includes:
  • the first core network device uses the current security context to verify the integrity of the NAS message carried in the context request;
  • the step of the first core network device sending the security context to the second core network device is performed when the verification is successful.
  • the first core network device verifies the integrity of the NAS message carried in the context request by using a security context currently shared with the UE, including:
  • the first core network device verifies an integrity protection check value or a message authentication code MAC value in the NAS message carried in the context request; or
  • the first core network device verifies the integrity protection check value in the context request
  • the rerouting command further includes:
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • an embodiment of the present invention provides The method of taking the security context, including:
  • the second core network device receives a specific message sent by the access network device, where the specific message includes a non-access stratum NAS message.
  • the second core network device determines, according to the specific message, the first core network device, and sends a context request to the first core network device, where the context request includes an identifier of the UE and a key set identifier.
  • the second core network device receives the context response sent by the first core network device, and obtains a security context, where the security context is determined by the first core network device according to the identifier of the UE and the key set identifier in the context request. of.
  • the NAS message includes an identifier allocated by the first core network device to the UE, and the second core network device determines the first core network device according to the identifier.
  • the specific message further includes identification information of the first core network device, and the second core network device determines the first core network device according to the identification information of the first core network device.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the security context of the UE acquired by the second core network device includes an encryption algorithm and an integrity protection algorithm used by the first core network device to protect the NAS message.
  • the method further includes:
  • the second core network device uses the new algorithm to derive a new NAS key, and sends a NAS security mode command message to the UE, where the identifier of the new algorithm is included;
  • the new algorithm includes an encryption algorithm and/or an integrity protection algorithm;
  • the second core network device receives the NAS security mode complete message fed back by the UE.
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • a method for receiving a rerouting command includes:
  • the access network device receives the rerouting command sent by the first core network device, where the non-access stratum NAS message and the indication information for determining the second core network device are included;
  • the access network device determines, according to the indication information, the second core network device, and sends a specific message carrying the NAS message to the second core network device.
  • the specific message further includes:
  • a rerouting indication is used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • the identifier information of the first core network device where the second core network device determines the first core network device according to the identifier information of the first core network device.
  • the NAS message is a NAS message that is reconstructed by the first core network device from the received NAS message sent by the UE.
  • the rerouting command further includes:
  • the specific message further includes:
  • an apparatus for providing a security context includes:
  • Receiving a NAS message unit 131 configured to receive a non-access stratum NAS message sent by the user equipment UE;
  • the rerouting command unit 132 is configured to: when determining that the NAS message needs to be rerouted to the second core network device in the specific network, send a rerouting command to the access network device, where the rerouting command includes the NAS message and Information for determining the second core network device;
  • a security context providing unit 133 configured to receive a context request sent by the second core network device, where the context request includes an identifier of the UE and a key set identifier, according to the identifier of the UE And a key set identifier, searching for a corresponding security context, and sending the security context to the second core network device.
  • the sending rerouting command unit is further configured to:
  • the received NAS message is reconstructed, and the NAS message included in the re-routing command is a reconstructed NAS message.
  • the sending rerouting command unit reconfigures the received NAS message from the UE, it is specifically used to:
  • the integrity protection check value is calculated according to the current security context, and the integrity protection check value is used as the message authentication code MAC cell IE in the NAS message sent by the UE.
  • the sending re-routing command unit uses the integrity protection check value as the message authentication code MAC cell IE in the NAS message sent by the UE, specifically:
  • the integrity protection check value is replaced with a message authentication code MAC in the NAS message sent by the UE.
  • the sending rerouting command unit is further configured to:
  • the identifier assigned to the UE by the first core network device replaces the identity of the UE in the NAS message received from the UE.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the security context providing unit is further configured to:
  • the security context sends the security context to the second core Heart network equipment.
  • the security context providing unit uses the security context currently shared by the UE to verify the integrity of the NAS message carried in the context request, specifically:
  • the rerouting command further includes:
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • the device shown in Figure 13 may be a core network device, such as an MME.
  • an apparatus for obtaining a security context includes:
  • the specific message receiving unit 141 is configured to receive a specific message sent by the access network device, where the specific message includes a non-access stratum NAS message;
  • the context requesting unit 142 is configured to determine, according to the specific message, a first core network device, and send a context request to the first core network device, where the context request includes an identifier of the UE and a key set identifier;
  • the context obtaining unit 143 is configured to receive a context response sent by the first core network device, and obtain a security context, where the security context is determined by the first core network device according to the identifier of the UE and the key set identifier in the context request. of.
  • the NAS message includes an identifier allocated by the first core network device to the UE, and the second core network device determines the first core network device according to the identifier.
  • the specific message further includes identification information of the first core network device, and the second core network device determines the first core network device according to the identification information of the first core network device.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message, and the NAS message is included in the context. begging.
  • the security context includes an encryption algorithm and an integrity protection algorithm used by the first core network device to protect the NAS message.
  • the context obtaining unit is further configured to:
  • a new algorithm is used to derive a new NAS key, and a NAS security mode command message is sent to the UE, which includes an identifier of the new algorithm; wherein the new algorithm includes an encryption algorithm and/or Or integrity protection algorithm;
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • the device shown in FIG. 14 may be a core network device, and the device may be the same core network device as the core network device shown in FIG. 13, such as an MME.
  • a receiving processing device for a rerouting command includes:
  • the rerouting command receiving unit 151 is configured to receive a rerouting command sent by the first core network device, where the non-access stratum NAS message and the indication information for determining the second core network device are included;
  • the specific message sending unit 152 is configured to determine the second core network device according to the indication information, and send a specific message that carries the NAS message to the second core network device.
  • the specific message further includes:
  • a rerouting indication is used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • the identifier information of the first core network device where the second core network device determines the first core network device according to the identifier information of the first core network device.
  • the NAS message is sent by the first core network device to the received UE.
  • the NAS message is reconstructed NAS message.
  • the rerouting command further includes:
  • the specific message further includes:
  • the device shown in FIG. 15 may be an access network device, such as an eNB.
  • a device for providing a security context where the device includes a processor and a transceiver, where
  • the transceiver When the processor determines that the NAS message needs to be rerouted to the second core network device in the specific network, the transceiver sends a re-routing command to the access network device, where the re-routing command includes the NAS message and is used to determine the Describe the information of the second core network device;
  • the transceiver Receiving, by the transceiver, a context request sent by the second core network device, where the context request includes an identifier of the UE and a key set identifier, and the processor searches for a corresponding security context according to the identifier of the UE and the key set identifier.
  • the transceiver sends the security context to the second core network device.
  • the transceiver is further configured to reconfigure the received NAS message before the retransmission command is sent to the access network device, where the NAS message included in the rerouting command is a reconstructed NAS message. .
  • the processor reconstructs the received NAS message, it is specifically used to:
  • the integrity protection check value is calculated according to the current security context, and the integrity protection check value is used as the message authentication code MAC cell IE in the NAS message sent by the UE.
  • the processor uses the integrity protection check value as the message authentication code MAC cell IE in the NAS message sent by the UE, specifically:
  • the integrity protection check value is replaced with a message authentication code MAC in the NAS message sent by the UE.
  • the processor reconstructs the received NAS message, it is further used to:
  • the identifier assigned to the UE by the first core network device replaces the identity of the UE in the NAS message received from the UE.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the transceiver sends the security context to the second core network device, and the processor is further configured to:
  • the transceiver sends the security context to the second core network device.
  • the processor uses the security context currently shared by the UE to verify the integrity of the NAS message carried in the context request, specifically:
  • the rerouting command further includes:
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • An apparatus for obtaining a security context where the apparatus includes a transceiver and a processor, where:
  • the transceiver receives a context response sent by the first core network device, and the processor obtains a security context, where the security context is determined by the first core network device according to the identifier of the UE and the key set identifier in the context request.
  • the NAS message includes an identifier allocated by the first core network device to the UE, and the second core network device determines the first core network device according to the identifier.
  • the specific message further includes identification information of the first core network device, and the second core network device determines the first core network device according to the identification information of the first core network device.
  • the key set identifier is included in the context request.
  • the key set identifier is included in a NAS message that is included in the context request.
  • the security context includes an encryption algorithm and an integrity protection algorithm used by the first core network device to protect the NAS message.
  • the processor is further configured to: when a new algorithm needs to be selected, use a new algorithm to derive a new NAS key, and send the NAS security to the UE through the transceiver.
  • a mode command message including an identification of a new algorithm; wherein the new algorithm includes an encryption algorithm and/or an integrity protection algorithm;
  • the transceiver receives the NAS security mode complete message fed back by the UE.
  • the context request further includes:
  • a rerouting indication and/or an integrity protection check value being used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • a receiving processing device for rerouting commands provided by an embodiment of the present invention, where the device includes a transceiver and a processor, where:
  • the processor determines the second core network device according to the indication information, and sends a specific message carrying the NAS message to the second core network device by using the transceiver.
  • the specific message further includes:
  • a rerouting indication is used to indicate that the NAS message is rerouted to the second core network device.
  • the specific message further includes:
  • the identifier information of the first core network device where the second core network device determines the first core network device according to the identifier information of the first core network device.
  • the NAS message is a NAS message that is reconstructed by the first core network device from the received NAS message sent by the UE.
  • the rerouting command further includes:
  • the specific message further includes:
  • the NAS message is reconstructed, so that the NAS message rerouted to the specific network can be integrity checked, and the core network device of the specific network can obtain the security context, thereby performing security with the UE. Communication.
  • Embodiment 6 of the present invention is a diagrammatic representation of Embodiment 6 of the present invention.
  • the sixth embodiment of the present invention is directed to a scenario in which an authentication process is performed on the UE and the MME, and a new security context is shared before the re-routing of the NAS message.
  • the specific process is as shown in FIG.
  • the UE initiates an attach request or a location update request to the first MME (new MME);
  • the first MME initiates an update location request to the HSS.
  • the HSS queries the database and returns an update location confirmation, the confirmation message containing information using a particular network.
  • the first MME After receiving the information of using the specific network, the first MME allocates a new GUTI value (may not be a new GUTI) to the UE, and calculates a Token value by using a new security context generated by the authentication.
  • a new GUTI value may not be a new GUTI
  • the first MME sends a rerouting command to the eNB, where the rerouting command includes an attach request or a location update request, a GUTI, an eKSI, a Token value, and information using a specific network, where the eKSI is a new security context generated after the authentication. Key set identifier.
  • the eNB After receiving the rerouting command, the eNB selects the MME of the specific network, that is, the second MME, according to the information of using the specific network, and sends a message to the second MME, where the message includes an attach request/location update request, GUTI, eKSI and Token values.
  • the second MME finds the first MME according to the GUTI, and initiates a request message to the first MME, where the request message may be an identity request message/context request message or an identity request message/context request message, where the request message includes an attach request. /Location update request, GUTI, eKSI, and Token values.
  • the first MME After receiving the request message, the first MME finds a corresponding security context according to the GUTI and the eKSI and uses the security context to verify the Token value in the request message.
  • the specific verification method is: the first MME calculates the Token value according to the security context, and then Compare with the Token value in the request message. If they are consistent, the verification is considered successful. If the verification is successful, the first MME finds the corresponding authentication data according to the GUTI.
  • the first MME sends the UE-related authentication data to the second MME, where the authentication data includes an authentication vector and a security context.
  • the second MME may re-select a new algorithm for the UE, derive a new NAS key according to the new algorithm, and send the NAS to the UE.
  • a security mode command message containing the selected new integrity algorithm identifier and the new encryption algorithm identifier.
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • the attach request/location update request may also be reconstructed, including replacing the IMSI/GUTI in the attach request/location update request with the allocated GUTI, with authentication
  • the attach request/location update request may also be reconstructed, including replacing/filling the MAC value in the attach request/location update request with the calculated Token. Therefore, the value of the Token is not required to be carried in the step S166, and the Token value is not required to be carried in the step S167. The Token value is not carried in the step S168, but the reconstructed attach request/location update request is carried.
  • the eKSI may not be carried in the steps S166, S167, and S168.
  • the Token value may be an integrity check code MAC calculated according to a security context (the NAS COUNT value may be all 0s or a preset value), or may be calculated by a hash function Hash.
  • the check value (the input parameter can be a message, or a message and a NAS layer integrity key, or a message, a NAS layer integrity key, and a NAS COUNT value), or a signature assigned by the first MME to the UE.
  • the above message may be an attach request/location update request, or an attach request/location update request and GUTI, or an attach request/location update request, GUTI and eKSI.
  • the first MME calculates the Token through the hash function Hash, and then compares it with the Token value in the identity request/context request message. If it is consistent, the verification is considered successful; or the first MME determines the Token value and the calculation in the identity request/context request message. / assigned / saved Token (signature or random number) comparison, if consistent, the verification is considered successful.
  • the first MME may identify that the attach request/location update request in the identity request/context request is rerouted (according to Token and GUTI, or according to Token, eKSI and GUTI), then the first MME may accept the attach request/location update request
  • the serial number in the serial number and use the all 0 NAS COUNT value or the preset NAS COUNT value to verify the integrity of the message, the serial number in the request/location update request will not be sent after the verification is passed. Assigned to the locally saved NAS COUNT, keeping the local NAS COUNT value unchanged.
  • step S168 when the request message is an identity request message/context request message, the GUTI, the eKSI, and the Token are included in the identity request/context request message.
  • the request message includes an identity request message/context request message
  • the GUTI, eKSI, and Token may also be sent to the first MME, ie, the second MME, in addition to the identity request/context request message, together with the identity request/context request message.
  • a MMME initiates a request message, which ultimately contains an identity request/context request message, GUTI, eKSI, and Token values.
  • An attach request/location update request is included in the identity request/context request.
  • Steps S1611 and S1612 The NAS security mode command procedure is optional. The process is initiated only when the second MME selects a new integrity algorithm and encryption algorithm for the UE.
  • the information using the specific network is used to indicate that the attach request needs to be rerouted to a specific network, and the information using the specific network may be the core network type.
  • Embodiment 7 of the present invention is a diagrammatic representation of Embodiment 7 of the present invention.
  • the New MME (the first MME) acquires the security context from the old MME (the third MME), and the subsequent specific MME (the second MME) requests the security Context from the New MME (the first MME).
  • the specific process includes the steps:
  • the UE initiates an attach request/location update request to the eNB.
  • the eNB forwards the attach request/location update request to the first MME.
  • the first MME does not have an available security context, and the first MME sends an identity request/context request to the third MME.
  • the first MME After receiving the information indication of using the specific network, the first MME allocates a new GUTI value to the UE, and calculates a Token value by using a new security context generated by the authentication.
  • the first MME sends a re-routing command to the eNB, where the command includes an attach request/location update request, a GUTI, a Token value, and information using a specific network, and the eKSI is an attach request/location.
  • the key set ID in the new request message includes an attach request/location update request, a GUTI, a Token value, and information using a specific network, and the eKSI is an attach request/location.
  • the eNB After receiving the rerouting command, the eNB selects a second MME of the specific network for the UE according to the information of using the specific network, and sends a message to the second MME, where the message includes an attach request/location update request, a GUTI, and a Token value.
  • the second MME finds the first MME according to the GUTI, and initiates a request message to the first MME, where the request message may be an identity request message/context request message or an identity request message/context request message, where the request message includes an attach request. /Location update request, GUTI and Token values.
  • the first MME After receiving the request message, the first MME finds a corresponding security context according to the GUTI and the eKSI and uses the security context to verify the Token value in the request message.
  • the specific verification method is: the first MME calculates the Token value according to the security context, and then Compare with the Token value in the request message. If they are consistent, the verification is considered successful. If the verification is successful, the first MME finds the corresponding authentication data according to the GUTI.
  • the first MME sends the UE-related authentication data to the second MME, where the authentication data includes an authentication vector and a security context.
  • the second MME may re-select a new algorithm for the UE, derive a new NAS key according to the new algorithm, and send the NAS to the UE.
  • a security mode command message containing the selected new integrity algorithm identifier and the new encryption algorithm identifier.
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • the attach request/location update request may also be reconstructed, including replacing the IMSI/GUTI in the attach request/location update request with the allocated GUTI, by using the authentication
  • the eKSI in the new security context generated later replaces the eKSI in the attach request/location update request, and replaces/fills the MAC value in the attach request/location update request with the calculated Token. Therefore, it is not necessary to carry the GUTI, eKSI and Token values in step S176, step S177 The GUTI, eKSI, and Token values do not need to be carried.
  • the GUTI, eKSI, and Token values do not need to be carried, but the reconstructed attach request/location update request is carried.
  • the attach request/location update request may also be reconstructed, including replacing/filling the MAC value in the attach request/location update request with the calculated Token. Therefore, the Token value does not need to be carried in step S176, and the Token value does not need to be carried in step S177. Instead of carrying the Token value in step S178, the reconstructed attach request/location update request is carried.
  • the KSI can be carried in steps S176, S177, and S178.
  • the Token value may be an integrity check code MAC calculated according to a security context (the NAS COUNT value may be all 0s or a preset value), or may be calculated by a hash function Hash.
  • the check value (the input parameter can be a message, or a message and a NAS layer integrity key, or a message, a NAS layer integrity key, and a NAS COUNT value), or a signature assigned by the MME to the UE.
  • the above message may be an attach request/location update request, or an attach request/location update request and GUTI, or an attach request/location update request, GUTI and eKSI.
  • the first MME calculates the Token through the hash function Hash, and then compares it with the Token value in the identity request/context request message. If it is consistent, the verification is considered successful; or the first MME determines the Token value and the calculation in the identity request/context request message. / assigned / saved Token (signature or random number) comparison, if consistent, the verification is considered successful.
  • the first MME may identify that the attach request/location update request in the identity request/context request is rerouted (according to Token or according to Token and eKSI), then the first MME may accept the sequence number and current in the attach request/location update request.
  • the attached NAS COUNT has the same sequence number attachment request/location update request. After the verification is passed, the NAS COUNT saved by the first MME is unchanged and the authentication data is returned to the second MME.
  • step S178 when the request message is an identity request message/context request message, the GUTI, eKSI, and Token are included in the identity request/context request message.
  • the request message includes an identity request message/context request message
  • the GUTI, eKSI, and Token may also be sent to the first MME, ie, the second MME, in addition to the identity request/context request message, together with the identity request/context request message.
  • a MMME initiates a request message, and the request message ultimately includes an identity request/ Context request message, GUTI, eKSI, and Token values.
  • An attach request/location update request is included in the identity request/context request.
  • Steps S1711 and S1712 of the NAS security mode command procedure are optional, and the process is initiated only when the second MME selects a new integrity algorithm and encryption algorithm for the UE.
  • the information using the specific network is used to indicate that the attach request needs to be rerouted to a specific network, and the information using the specific network may be the core network type.
  • Embodiment 8 of the present invention is a diagrammatic representation of Embodiment 8 of the present invention.
  • the New MME (the first MME) acquires the security context from the old MME (the third MME), and the subsequent specific MME (the second MME) requests the security Context from the old MME (the third MME).
  • the UE initiates an attach request/location update request to the eNB.
  • the eNB forwards the attach request/location update request to the first MME.
  • the first MME does not have an available security context, and the first MME sends an identity request/context request to the third MME.
  • the third MME calculates or allocates a Token for the UE.
  • the third MME sends an identity response message to the first MME, where the message includes a security context, using information of a specific network, eKSI, and Token.
  • the above information using the specific network, eKSI and Token may also be sent to the first MME in addition to the identity response message and the identity response message.
  • the new MME sends a re-routing command to the eNB, where the command includes an attach request/location update request, an eKSI, a Token value, and information using a specific network.
  • the eNB After receiving the rerouting command, the eNB selects a second MME of the specific network for the UE according to the information of using the specific network, and sends a message to the second MME, where the message includes an attach request/location update request, an eKSI, and a Token value.
  • the second MME finds the third MME according to the GUTI in the attach request/location update request, and initiates a request message to the third MME, where the request message may be an identity request/context request message. Or include an identity request message/context request message, which includes an attach request/location update request, an eKSI, and a Token value.
  • the third MME finds a corresponding security context according to the GUTI and the eKSI and uses the security context to verify the Token value in the request message.
  • the specific verification method is: the third MME calculates the Token value according to the security context, and then Compare with the Token value in the request message. If they are consistent, the verification is considered successful. If the verification is successful, the third MME finds the corresponding authentication data according to the GUTI.
  • the third MME sends the UE-related authentication data to the second MME, where the authentication data includes an authentication vector and a security context.
  • the second MME may re-select a new algorithm for the UE, derive a new NAS key according to the new algorithm, and send the NAS to the UE.
  • a security mode command message containing the selected new integrity algorithm identifier and the new encryption algorithm identifier.
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • the eKSI is not carried in the steps S186, S187, and S188, and the third MME uses the eKSI in the attach request/location update request.
  • the Token value may be an integrity check code MAC calculated according to the security context (the NAS COUNT value may be all 0s or a preset value), or may be calculated by using a hash function Hash.
  • the check value (the input parameter can be a message, or a message and a NAS layer integrity key, or a message, a NAS layer integrity key, and a NAS COUNT value), or a signature assigned by the first MME to the UE.
  • the above message may be an attach request/location update request, or an attach request/location update request and GUTI, or an attach request/location update request, GUTI and eKSI.
  • the third MME calculates the Token through the hash function Hash, and then compares it with the Token value in the identity request/context request message. If it is consistent, the verification is considered successful; or the third MME determines the Token value and the calculation in the identity request/context request message. / assigned / saved Token (signature or random number) If the comparison is consistent, the verification is considered successful.
  • the third MME may identify that the attach request/location update request in the identity request/context request is rerouted (according to Token or according to Token and eKSI), then the third MME may accept the sequence number and current in the attach request/location update request.
  • the attached NAS COUNT has the same sequence number attachment request/location update request. After the verification is passed, the NAS COUNT saved by the third MME is unchanged and the authentication data is returned to the second MME.
  • step S188 when the request message is an identity request message/context request message, the eKSI and/or Token are included in the identity request/context request message.
  • the request message includes an identity request message/context request message
  • the eKSI and/or Token may also be sent to the first MME, ie, the second MME, in addition to the identity request/context request message, together with the identity request/context request message.
  • An MMME initiates a request message, which ultimately includes an identity request/context request message, an eKSI and/or a Token value.
  • An attach request/location update request is included in the identity request/context request.
  • Steps S1811 and S1812 The NAS security mode command procedure is optional, and the process is initiated only when the second MME selects a new integrity algorithm and encryption algorithm for the UE.
  • Fifth: Information using a specific network is used to indicate that the attach request needs to be rerouted to a specific network, and the information using the specific network may be a core network type.
  • the third MME may be regarded as the first core network device.
  • Embodiment 9 of the present invention is a diagrammatic representation of Embodiment 9 of the present invention.
  • the New MME (the first MME) acquires the security context from the old MME (the third MME), and the subsequent specific MME (the second MME) requests the security Context from the old MME (the third MME).
  • the specific process includes the steps:
  • the UE initiates an attach request/location update request to the eNB.
  • the eNB forwards the attach request/location update request to the first MME.
  • the first MME has no security context available, and the first MME sends an identity request/context request to the third MME.
  • the third MME sends an identity response message to the first MME, where the message includes a security context and information using a specific network.
  • the first MME sends a re-routing command to the eNB, where the command includes an attach request/location update request and information using a specific network.
  • the eNB After receiving the rerouting command, the eNB selects an MME of the specific network for the UE according to the information of using the specific network, and sends a message to the second MME, where the message includes an attach request/location update request and a rerouting indication.
  • the second MME finds the third MME according to the GUTI in the attach request/location update request, and initiates a request message to the third MME, where the request message may be an identity request/context request message or include an identity request message/context request message.
  • the request message includes an attach request/location update request and a rerouting indication.
  • the third MME may identify that the attach request/location update request in the request message is rerouted (according to the rerouting indication), then the third MME may accept the attach request/location update request.
  • the sequence number is the same as the sequence number of the currently saved NAS COUNT.
  • the third MME finds the corresponding security context according to the GUTI and the eKSI and uses the security context to verify the Token value in the request message. The specific verification method is The third MME calculates the Token value according to the security context, and then compares it with the Token value in the identity request/context request message. If they are consistent, the verification is considered successful. If the verification is successful, the third MME finds the corresponding authentication data according to the GUTI. After the verification is passed, the NAS COUNT saved by the third MME is unchanged and the authentication data is returned to the second MME.
  • the Token value in this embodiment is the message authentication code MAC.
  • the third MME sends the UE-related authentication data to the second MME, where the authentication data includes an authentication vector and a security context.
  • the second MME may re-select a new algorithm for the UE, derive a new NAS key according to the new algorithm, and send the NAS to the UE.
  • a security mode command message containing the selected new integrity algorithm identifier and the new encryption algorithm identifier.
  • the UE derives a new NAS key according to the integrity algorithm identifier and the encryption algorithm identifier carried in the NAS security mode command, and sends a NAS security mode completion message to the second MME.
  • step S197 when the request message is an identity request message/context request message, the rerouting indication is included in the identity request/context request message.
  • the request message includes an identity request message/context request message
  • the rerouting indication may also be sent to the first MME, that is, the second MME to the first MMME, in addition to the identity request/context request message, together with the identity request/context request message.
  • a request message is initiated, which ultimately includes an identity request/context request message and a rerouting indication.
  • An attach request/location update request is included in the identity request/context request.
  • Steps S1910 and S1911 The NAS security mode command procedure is optional. The process is initiated only when the second MME selects a new integrity algorithm and encryption algorithm for the UE.
  • the information using the specific network is used to indicate that the attach request needs to be rerouted to a specific network, and the information using the specific network may be the core network type.
  • another method for providing a security context includes the following steps:
  • the first core network device receives a non-access stratum NAS message sent by the user equipment UE.
  • the first core network device sends a re-routing command to the access network device, where the re-routing command includes the NAS message and is used for Determining information of the second core network device.
  • the method further comprises:
  • the first core network device receives the request message sent by the second core network device, where the request message includes the identifier of the UE, and the first core network device searches for the corresponding authentication data according to the identifier of the UE, and the The authentication data is sent to the second core network device.
  • the method further includes: a check value in the first core network device verification request message;
  • the first core network sends the authentication data to the second core network device, where the first core network device sends the authentication data to the second core network device.
  • the verification value in the first core network device verification request message includes:
  • the first core network device determines the corresponding security context by using the identifier of the UE and the key set identifier, and calculates a check value by using the security context, if If the calculated check value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the first core network device calculates a check value by using a hash function, and if the calculated check value is consistent with the check value in the request message, determining that the verification is successful; or
  • the first core network device searches for the locally saved check value. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the method further includes: the first core network device adopts an authentication process with the UE, or Obtaining a security context of the UE from a third core network device;
  • the method further includes: the first core network device is the The UE allocates an identifier and determines a check value;
  • the rerouting command further includes: an identifier that is allocated by the first core network device to the UE, and the check value;
  • the re-routing command further includes: an identifier that is allocated by the first core network device to the UE, the check value, and a key set identifier of a security context of the UE.
  • the first core network further includes:
  • the first core network device sends a request message to the third core network device, where the request message includes the NAS message, and receives a response message replied by the third core network device, where the security context and the check value of the UE are included. And determining information about the second core network device; wherein the check value is determined by the third core network device;
  • the rerouting command further includes: the check value, or the check value and a key set identifier.
  • another method for obtaining a security context includes the following steps:
  • the second core network device receives a specific message sent by the access network device, where the specific message includes a non-access stratum NAS message;
  • the second core network device determines, according to the specific message, the first core network device, and sends a request message to the first core network device, where the request message includes an identifier of the UE.
  • the first core network device may be a new MME or an old MME.
  • the S2103, the second core network device receives the response message sent by the first core network device, and obtains the authentication data of the UE, where the authentication data includes the security context of the UE, and the authentication data is the first A core network device is determined according to the identity of the UE.
  • the identifier of the UE is an identifier that is allocated by the first core network device to the UE;
  • the specific message further includes: a check value, or a check value and a key set identifier;
  • the request message further includes: a check value, or a check value and a key set identifier.
  • the specific message further includes: a rerouting indication, where the rerouting indication is used to indicate that the NAS message is rerouted to the second core network device;
  • the request message includes the NAS message, where the NAS message includes an identifier of the UE, and the request message further includes the rerouting indication.
  • another method for providing a security context includes the following steps:
  • the third core network device receives the request message sent by the first core network device, where the non-access stratum NAS message of the user equipment UE is included;
  • the third core network device When it is determined that the NAS message needs to be rerouted to the second core network device in the specific network, the third core network device sends a response message to the first core network device, where the security context of the UE is used. Determining information of the second core network device.
  • the method further includes:
  • the third core network device determines a check value of the UE
  • the response message further includes: the check value, or the check value and a key set identifier corresponding to the security context of the UE.
  • the method further comprises:
  • the third core network device finds corresponding authentication data according to the identifier of the UE, and sends a response message to the second core network device, where the authentication data of the UE is included.
  • the method further includes: the third core network device verifying the check value in the request message;
  • the third core network device sends a response message to the second core network device, specifically: when the verification is successful, the third core network device sends a response message to the second core network device.
  • the third core network device verifies the check value in the request message, which specifically includes:
  • the third core network device determines a corresponding security context by using the identifier of the UE and the key set identifier, and calculates a check value by using the security context. If the calculated check value is consistent with the check value in the request message, determining that the verification is successful; or,
  • the third core network device calculates a check value by using a hash function, and if the calculated check value is consistent with the check value in the request message, determining that the verification is successful; or
  • the third core network device searches for a locally saved check value. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the method further comprises:
  • the third core network device determines, by using the rerouting indication, that the NAS message in the request message is rerouted to the second core network device;
  • the third core network device finds a corresponding security context according to the identifier and the key set identifier of the UE in the NAS message, and uses the security context to verify the integrity check code in the request message. When the verification succeeds, the third core The network device finds corresponding authentication data according to the identifier of the UE, and returns the authentication data to the second core network device.
  • another device for providing a security context includes:
  • Receiving a NAS message unit 2301 configured to receive a non-access stratum NAS message sent by the user equipment UE;
  • the rerouting command unit 2302 is configured to: when determining that the NAS message needs to be rerouted to the second core network device in the specific network, send a rerouting command to the access network device, where the rerouting command includes the NAS message and Information for determining the second core network device.
  • the device further comprises:
  • the authentication data providing unit 2303 is configured to receive a request message sent by the second core network device, where the request message includes an identifier of the UE, and according to the identifier of the UE, search for corresponding authentication data, and the The weight data is sent to the second core network device.
  • the authentication data providing unit is further configured to verify the check value in the request message before sending the authentication data to the second core network device.
  • the authentication data providing unit sends the authentication data to the second core network device, specifically: when the verification is successful, the authentication data is sent to the second core network device.
  • the authentication data providing unit verifies the check value in the request message, it is specifically used to:
  • the request message further includes a key set identifier, determining a corresponding security context by using the identifier of the UE and the key set identifier, and calculating a check value by using the security context, if the calculated school If the verification value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the locally saved check value is found. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the sending rerouting command unit is further configured to: before the second core network device in the specific network needs to be rerouted, by using an authentication process with the UE, or from The third core network device acquires a security context of the UE;
  • the sending rerouting command unit is further configured to: assign an identifier to the UE, And determine the check value;
  • the rerouting command further includes: an identifier that is sent by the sending rerouting command unit to the UE, and the check value;
  • the re-routing command further includes: an identifier that is sent by the sending re-routing command unit to the UE, the check value, and a key set identifier of a security context of the UE.
  • the sending rerouting command unit determines that the NAS message needs to be rerouted to the second core network device in the specific network, and is further configured to:
  • the rerouting command further includes: the check value, or the check value and a key set identifier.
  • the device shown in FIG. 23 may be a core network device such as an MME.
  • another device for obtaining a security context provided by the embodiment of the present invention includes:
  • the specific message receiving unit 2401 is configured to receive a specific message sent by the access network device, where the specific message includes a non-access stratum NAS message;
  • the requesting unit 2402 is configured to determine, according to the specific message, the first core network device, and send a request message to the first core network device, where the request message includes an identifier of the UE;
  • the obtaining unit 2403 is configured to receive a response message sent by the first core network device, and obtain the response message from the first core network device.
  • the authentication data of the UE where the authentication data includes a security context of the UE, and the authentication data is determined by the first core network device according to the identifier of the UE.
  • the identifier of the UE is an identifier that is allocated by the first core network device to the UE;
  • the specific message further includes: a check value, or a check value and a key set identifier;
  • the request message further includes: a check value, or a check value and a key set identifier.
  • the specific message further includes: a rerouting indication, where the rerouting indication is used to indicate that the NAS message is rerouted to the second core network device;
  • the request message includes the NAS message, where the NAS message includes an identifier of the UE, and the request message further includes the rerouting indication.
  • the device shown in FIG. 24 may be a core network device such as an MME.
  • another device for providing a security context includes:
  • the receiving request unit 2501 is configured to receive a request message sent by the first core network device, where the non-access stratum NAS message of the user equipment UE is included;
  • the response unit 2502 is configured to: when determining that the NAS message needs to be rerouted to the second core network device in the specific network, send a response message to the first core network device, where the security context of the UE is included and used Determining information of the second core network device.
  • the response unit is further configured to: when determining that the NAS message needs to be rerouted to the second core network device in the specific network:
  • the response message further includes: the check value, or the check value and a key set identifier corresponding to the security context of the UE.
  • the receiving requesting unit is further configured to: receive a request message sent by the second core network device, where the NAS message, a check value, and a key set identifier are included;
  • the response unit is further configured to: find corresponding authentication data according to the identifier of the UE, and send a response message to the second core network device, where the authentication data of the UE is included.
  • the response unit further sends a response message to the second core network device. Used to verify a check value in the request message;
  • the response unit sends a response message to the second core network device, specifically: when the verification is successful, the response unit sends a response message to the second core network device.
  • the response unit verifies the check value in the request message, it is specifically used to:
  • the request message further includes a key set identifier, determining a corresponding security context by using the identifier of the UE and the key set identifier, and calculating a check value by using the security context, if the calculated school If the verification value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the locally saved check value is found. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the receiving request unit is further configured to:
  • the device shown in Figure 25 can be a core network device, such as an MME.
  • the device includes a transceiver and a processor, where
  • the processor when determining that the NAS message needs to be rerouted to the second core network device in the specific network, sends a rerouting command to the access network device by using the transceiver, where the rerouting command includes the NAS message and is used to determine the location Information about the second core network device.
  • the transceiver is further configured to receive a request message sent by the second core network device, where The request message includes an identifier of the UE, and the processor is further configured to search for the corresponding authentication data according to the identifier of the UE, and send the authentication data to the second core network device by using the transceiver.
  • the processor is further configured to:
  • the processor verifies the check value in the request message, it is specifically used to:
  • the request message further includes a key set identifier, determining a corresponding security context by using the identifier of the UE and the key set identifier, and calculating a check value by using the security context, if the calculated school If the verification value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the locally saved check value is found. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the processor is further configured to: through an authentication process with the UE, or from a third core, before determining that the NAS message needs to be rerouted to a second core network device in a specific network.
  • the network device acquires a security context of the UE;
  • the processor is further configured to: assign an identifier to the UE, And determine the check value;
  • the rerouting command further includes: an identifier allocated by the processor to the UE and the check value;
  • the re-routing command further includes: an identifier that is allocated by the processor to the UE, the check value, and a key set identifier of a security context of the UE.
  • the processor determines that the NAS message needs to be rerouted to the second core network device in the specific network, and is further configured to: send, by using the transceiver, a request message to the third core network device, where the request message includes Describe the NAS message and receive the response of the third core network device reply through the transceiver a message including a security context of the UE, a check value, and information for determining the second core network device; wherein the check value is determined by the third core network device;
  • the rerouting command further includes: the check value, or the check value and a key set identifier.
  • the device includes: a transceiver and a processor, where
  • the processor obtains the authentication data of the UE, where the authentication data includes a security context of the UE, and the authentication data is the first core network device. Determined according to the identity of the UE.
  • the identifier of the UE is an identifier that is allocated by the first core network device to the UE;
  • the specific message further includes: a check value, or a check value and a key set identifier;
  • the request message further includes: a check value, or a check value and a key set identifier.
  • the specific message further includes: a rerouting indication, where the rerouting indication is used to indicate that the NAS message is rerouted to the second core network device;
  • the request message includes the NAS message, where the NAS message includes an identifier of the UE, and the request message further includes the rerouting indication.
  • the device includes: a transceiver and a processor, where
  • the transceiver When the processor determines that the NAS message needs to be rerouted to the second core network device in the specific network, the transceiver sends a response message to the first core network device, where the UE includes the UE Full context and information for determining the second core network device.
  • the processor determines that the NAS message needs to be rerouted to the second core network device in the specific network, the processor is further configured to:
  • the response message further includes: the check value, or the check value and a key set identifier corresponding to the security context of the UE.
  • the transceiver is further configured to receive a request message sent by the second core network device, where the NAS message, a check value, and a key set identifier are included;
  • the processor finds corresponding authentication data according to the identifier of the UE, and sends a response message to the second core network device by using the transceiver, where the authentication data of the UE is included.
  • the processor is further configured to verify a check value in the request message before sending a response message to the second core network device by using the transceiver;
  • the processor sends a response message to the second core network device by using the transceiver, where the processor sends a response message to the second core network device by using the transceiver.
  • the processor verifies the check value in the request message, it is specifically used to:
  • the request message further includes a key set identifier, determining a corresponding security context by using the identifier of the UE and the key set identifier, and calculating a check value by using the security context, if the calculated school If the verification value is consistent with the check value in the request message, it is determined that the verification is successful; or,
  • the locally saved check value is found. If the saved check value is consistent with the check value in the request message, it is determined that the verification is successful.
  • the transceiver is further configured to receive a request message sent by the second core network device, where the NAS message and a rerouting indication are used, where the rerouting indication is used to indicate that the NAS message is rerouted to the first Two core network equipment;
  • the processor is further configured to: determine, by using the rerouting indication, that the NAS message in the request message is rerouted to the second core network device; according to the identifier and key set identifier of the UE in the NAS message, Go to the corresponding security context, and use the security context to verify the integrity check code in the request message. When the verification is successful, the corresponding authentication data is found according to the identifier of the UE, and the authentication data is passed through the transceiver. Return to the second core network device.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

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

Abstract

本发明公开了一种安全上下文的提供、获取方法及设备,用以实现特定网络下的核心网设备可以获取安全上下文。所述的提供方法包括:第一核心网设备接收来自UE的NAS消息;第一核心网设备当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;第一核心网设备接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括重路由指示、UE的标识以及密钥集标识,第一核心网设备根据所述UE的标识以及密钥集标识,查找对应的安全上下文,并将该安全上下文发送给所述第二核心网设备,其中,所述根密钥,为安全上下文中的根密钥。

Description

一种安全上下文的提供、获取方法及设备 技术领域
本发明涉及通信技术领域,尤其涉及一种安全上下文的提供、获取方法及设备。
背景技术
版本(Release,R)10及R10之后的用户设备(User Equipment,UE)具有上报低接入优先级指示(Low Access Priority Indicator,LAPI)给演进型基站(evolved NodeB,eNB)的能力,这样eNB可以根据UE上报的指示为UE选择特定网络,从而防止进行特定业务的UE对普通网络带来的影响,例如大量低优先级UE接入网络带来的网络拥塞。其中,所述特定业务,例如机器类通信(Machine Type Communication,MTC)。特定网络是服务于特定业务的网络,例如机器类通信网络,专门服务于机器类通信,所有的机器类通信设备都接入到这个网络进行通信,可以防止机器类通信给普通网络带来的冲击。特定网络的网络架构与普通网络一样,只是网络实体功能上有些改变。
目前广泛应用的R10之前的UE并不支持此功能,为了在不改变现有UE前提下实现此功能,现有技术提出了基于网络侧的方案,使得R10之前的UE也可以选择在特定网络进行通信。具体方法参见图1,UE向网络侧发起附着请求或位置更新请求,移动性管理实体(Mobile Management Entity,MME)向归属用户服务器(Home Subscriber Server,HSS)请求签约数据,当签约数据中包含UE在特定网络通信的指示时,MME通过eNB将非接入层(Non Access Stratum,NAS)消息转发给特定(specific)MME,其中,所述NAS消息,例如附着请求或位置更新请求,所述specific MME,即特定网络中的MME。
在MME向HSS获取签约数据之前,UE与MME之间已经建立了安全关联,网络侧重新选择specific MME的行为对UE来说是不可知的,specific MME 需要从MME处获取安全上下文,从而利用该安全上下文与UE进行安全通信。另外,如果该NAS消息被完整性保护,需要考虑specific MME如何对重路由(reroute)的NAS消息进行完整性校验。
现有技术中的跟踪区域更新(Tracking Area Update,TAU)过程如下,假设UE发起TAU时,新MME(MMEn)上没有可用的安全上下文,需要向旧MME(MMEo)索要。参见图2,具体包括:
MMEn向MMEo发送安全上下文的请求消息,该请求消息中包括MMEo为UE分配的全球唯一临时标识(Globally Unique Temporary UE Identity,GUTI),即旧GUTI(GUTIo),该请求消息还包括从UE处接收的整个TAU消息;
MMEo根据GUTIo从数据库中检索用户数据,利用检索到的安全上下文验证TAU请求的完整性,并将认证数据(authentication data)和UE的国际移动签约用户识别码(International Mobile Subscriber Identification Number,IMSI)发送给MMEn,其中,所述认证数据中包含安全上下文,MMEn保存接收到的安全上下文。
综上所述,在MME重选场景下,现有技术无法解决specific MME如何获取UE的安全上下文的问题,导致specific MME不能和UE进行安全通信。
发明内容
本发明提供一种安全上下文的提供、获取方法及设备,用以实现特定网络下的核心网设备可以获取UE的安全上下文,从而使得特定网络下的核心网设备与UE可以进行安全通信。
第一方面,本发明实施例提供的一种提供安全上下文的方法,包括:
第一核心网设备接收用户设备UE发送的非接入层NAS消息;
当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
第一核心网设备接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,第一核心网设备根据所述UE的标识以及密钥集标识,查找对应的安全上下文,并将该安全上下文发送给所述第二核心网设备。
结合第一方面,在第一种可能的实现方式中,第一核心网设备向接入网设备发送重路由命令之前,该方法还包括:
第一核心网设备对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,第一核心网设备对接收到的来自所述UE的NAS消息进行重构,包括:
第一核心网设备利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
第一核心网设备根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中,将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE,包括:
将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证码MAC信元IE;或
将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码MAC。
结合第一方面的第二种可能的实现方式,在第四种可能的实现方式中,第一核心网设备对接收到的来自所述UE的NAS消息进行重构,还包括:
第一核心网设备将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消息中的UE的标识。
结合第一方面,在第五种可能的实现方式中,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
结合第一方面,在第六种可能的实现方式中,第一核心网设备确定当前的安全上下文后,将该安全上下文发送给第二核心网设备前,该方法还包括:
第一核心网设备利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
则,所述第一核心网设备将该安全上下文发送给第二核心网设备的步骤,是当所述验证成功时执行的。
结合第一方面的第六种可能的实现方式,在第七种可能的实现方式中,第一核心网设备利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性,包括:
第一核心网设备验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
第一核心网设备验证该上下文请求中的完整性保护校验值。
结合第一方面,在第八种可能的实现方式中,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
结合第一方面,在第九种可能的实现方式中,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
第二方面,本发明实施例提供的一种获取安全上下文的方法,包括:
第二核心网设备接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
第二核心网设备根据所述特定消息确定第一核心网设备,并向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
第二核心网设备接收第一核心网设备发送的上下文响应,并从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的
结合第二方面,在第一种可能的实现方式中,所述NAS消息中包含第一 核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
结合第二方面,在第二种可能的实现方式中,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
结合第二方面,在第三种可能的实现方式中,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
结合第二方面、或结合第二方面的第一种可能的实现方式、或结合第二方面的第二种可能的实现方式、结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中,第二核心网设备获取的所述UE的安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
结合第二方面的第四种可能的实现方式,在第五种可能的实现方式中,第二核心网设备获取所述UE的安全上下文后,该方法还包括:
当第二核心网设备需要选择新的算法时,第二核心网设备利用新的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或完整性保护算法;
第二核心网设备接收该UE反馈的NAS安全模式完成消息。
结合第二方面,在第六种可能的实现方式中,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
结合第二方面,在第七种可能的实现方式中,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
第三方面,本发明实施例提供的一种重路由命令的接收处理方法,包括:
接入网设备接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
接入网设备根据所述指示信息,确定所述第二核心网设备,并向所述第 二核心网设备发送携带所述NAS消息的特定消息。
结合第三方面,在第一种可能的实现方式中,所述特定消息中还包括:
重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
结合第三方面,或结合第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述特定消息中还包括:
第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
结合第三方面,在第三种可能的实现方式中,所述NAS消息是所述第一核心网设备对接收到的UE发送的NAS消息进行重构后的NAS消息。
结合第三方面,在第四种可能的实现方式中,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
结合第三方面,在第五种可能的实现方式中,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
第四方面,本发明实施例提供的一种提供安全上下文的设备,包括:
接收NAS消息单元,用于接收用户设备UE发送的非接入层NAS消息;
发送重路由命令单元,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
安全上下文提供单元,用于接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,根据所述UE的标识以及密钥集标识,查找对应的安全上下文,并将该安全上下文发送给所述第二核心网设备。
结合第四方面,在第一种可能的实现方式中,所述发送重路由命令单元还用于:
在向接入网设备发送重路由命令之前,对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
结合第四方面的第一种可能的实现方式,在第二种可能的实现方式中,所述发送重路由命令单元对接收到的来自所述UE的NAS消息进行重构时,具体用于:
利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
结合第四方面的第二种可能的实现方式,在第三种可能的实现方式中,所述发送重路由命令单元将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE时,具体用于:
将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证码MAC信元IE;或
将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码MAC。
结合第四方面的第二种可能的实现方式,在第四种可能的实现方式中,所述发送重路由命令单元,还用于:
将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消息中的UE的标识。
结合第四方面,在第五种可能的实现方式中,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
结合第四方面,在第六种可能的实现方式中,所述安全上下文提供单元还用于:
在确定当前的安全上下文后,将该安全上下文发送给第二核心网设备前,利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
则,当所述验证成功时,所述安全上下文将该安全上下文发送给第二核心网设备。
结合第四方面的第六种可能的实现方式,在第七种可能的实现方式中,所述安全上下文提供单元利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性时,具体用于:
验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
验证该上下文请求中的完整性保护校验值。
结合第四方面,在第八种可能的实现方式中,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
结合第四方面,在第九种可能的实现方式中,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
第五方面,本发明实施例提供的一种获取安全上下文的设备,包括:
特定消息接收单元,用于接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
上下文请求单元,用于根据所述特定消息确定第一核心网设备,并向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
上下文获取单元,用于接收第一核心网设备发送的上下文响应,并从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的。
结合第五方面,在第一种可能的实现方式中,所述NAS消息中包含第一核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
结合第五方面,在第二种可能的实现方式中,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
结合第五方面,在第三种可能的实现方式中,所述密钥集标识包含在所 述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
结合第五方面、或者结合第五方面的第一种可能的实现方式、或者结合第五方面的第二种可能的实现方式、或者结合第五方面的第三种可能的实现方式,在第四种可能的实现方式中,所述安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
结合第五方面的第四种可能的实现方式,在第五种可能的实现方式中,所述上下文获取单元获取所述UE的安全上下文后,还用于:
当需要选择新的算法时,利用新的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或完整性保护算法;
接收该UE反馈的NAS安全模式完成消息。
结合第五方面,在第六种可能的实现方式中,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
结合第五方面,在第七种可能的实现方式中,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
第六方面,本发明实施例提供的一种重路由命令的接收处理设备,包括:
重路由命令接收单元,用于接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
特定消息发送单元,用于根据所述指示信息,确定所述第二核心网设备,并向所述第二核心网设备发送携带所述NAS消息的特定消息。
结合第六方面,在第一种可能的实现方式中,所述特定消息中还包括:
重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
结合第六方面、或者结合第六方面的第一种可能的实现方式,在第二种可能的实现方式中,所述特定消息中还包括:
第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
结合第六方面,在第三种可能的实现方式中,所述NAS消息是所述第一核心网设备对接收到的UE发送的NAS消息进行重构后的NAS消息。
结合第六方面,在第四种可能的实现方式中,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
结合第六方面,在第五种可能的实现方式中,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
第七方面,本发明实施例提供的一种提供安全上下文的设备,该设备包括处理器和收发机,其中,
收发机接收用户设备UE发送的非接入层NAS消息;
当处理器确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,通过收发机向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
收发机接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,处理器根据所述UE的标识以及密钥集标识,查找对应的安全上下文,收发机将该安全上下文发送给所述第二核心网设备。
结合第七方面,在第一种可能的实现方式中,收发机在向接入网设备发送重路由命令之前,处理器还用于对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
结合第七方面的第一种可能的实现方式,在第二种可能的实现方式中,处理器对接收到的NAS消息进行重构时,具体用于:
利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
结合第七方面的第二种可能的实现方式,在第三种可能的实现方式中, 处理器将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE时,具体用于:
将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证码MAC信元IE;或
将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码MAC。
结合第七方面的第二种可能的实现方式,在第四种可能的实现方式中,处理器对接收到的NAS消息进行重构时,还用于:
将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消息中的UE的标识。
结合第七方面,在第五种可能的实现方式中,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
结合第七方面,在第六种可能的实现方式中,处理器确定当前的安全上下文后,收发机将该安全上下文发送给第二核心网设备前,处理器还用于:
利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
则,当所述验证成功时,收发机将该安全上下文发送给第二核心网设备。
结合第七方面的第六种可能的实现方式,在第七种可能的实现方式中,处理器利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性时,具体用于:
验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
验证该上下文请求中的完整性保护校验值。
结合第七方面,在第八种可能的实现方式中,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
结合第七方面,在第九种可能的实现方式中,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息 是重路由到第二核心网设备的。
第八方面,本发明实施例提供的一种获取安全上下文的设备,该设备包括收发机和处理器,其中:
收发机接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
处理器根据所述特定消息确定第一核心网设备,收发机向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
收发机接收第一核心网设备发送的上下文响应,处理器从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的。
结合第八方面,在第一种可能的实现方式中,所述NAS消息中包含第一核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
结合第八方面,在第二种可能的实现方式中,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
结合第八方面,在第三种可能的实现方式中,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
结合第八方面、或者结合第八方面的第一种可能的实现方式、或者结合第八方面的第二种可能的实现方式、或者结合第八方面的第三种可能的实现方式,在第四种可能的实现方式中,所述安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
结合第八方面的第四种可能的实现方式,在第五种可能的实现方式中,所述处理器获取所述UE的安全上下文后,还用于:当需要选择新的算法时,利用新的算法推衍新的NAS密钥,并通过收发机向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或 完整性保护算法;
收发机接收该UE反馈的NAS安全模式完成消息。
结合第八方面,在第六种可能的实现方式中,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
结合第八方面,在第七种可能的实现方式中,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
第九方面,本发明实施例提供的一种重路由命令的接收处理设备,该设备包括收发机和处理器,其中:
收发机接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
处理器根据所述指示信息,确定所述第二核心网设备,并通过收发机向所述第二核心网设备发送携带所述NAS消息的特定消息。
结合第九方面,在第一种可能的实现方式中,所述特定消息中还包括:
重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
结合第九方面,或者结合第九方面的第一种可能的实现方式,在第二种可能的实现方式中,所述特定消息中还包括:
第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
结合第九方面,在第三种可能的实现方式中,所述NAS消息是所述第一核心网设备对接收到的UE发送的NAS消息进行重构后的NAS消息。
结合第九方面,在第四种可能的实现方式中,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
结合第九方面,在第五种可能的实现方式中,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
本发明通过第一核心网设备接收用户设备UE发送的非接入层NAS消息; 当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;第一核心网设备接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,第一核心网设备根据所述UE的标识以及密钥集标识,查找对应的安全上下文,并将该安全上下文发送给所述第二核心网设备。从而,使得第一核心网设备可以向特定网络中的第二核心网设备提供UE的安全上下文。
本发明通过第二核心网设备接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;第二核心网设备根据所述特定消息确定第一核心网设备,并向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;第二核心网设备接收第一核心网设备发送的上下文响应,并从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的。从而使得特定网络中的第二核心网设备可以获取第一核心网设备提供的UE的安全上下文,使得特定网络下的核心网设备与UE可以进行安全通信。
第十方面,本发明实施例提供的一种提供安全上下文的方法,包括:
第一核心网设备接收用户设备UE发送的非接入层NAS消息;
当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
结合第十方面,在第一种可能的实现方式中,该方法还包括:
第一核心网设备接收所述第二核心网设备发送的请求消息,所述请求消息中包括UE的标识,第一核心网设备根据所述UE的标识,查找对应的鉴权数据,并将该鉴权数据发送给所述第二核心网设备。
结合第十方面的第一种可能的实现方式,在第二种可能的实现方式中,在第一核心网设备将该鉴权数据发送给所述第二核心网设备之前,该方法还包括:第一核心网设备验证请求消息中的校验值;
第一核心网将该鉴权数据发送给所述第二核心网设备,具体为:当验证成功时,第一核心网设备将鉴权数据发送给第二核心网设备。
结合第十方面的第二种可能的实现方式,在第三种可能的实现方式中,所述第一核心网设备验证请求消息中的校验值,具体包括:
当所述请求消息中还包括密钥集标识时,第一核心网设备利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
第一核心网设备通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
第一核心网设备查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
结合第十方面,在第四种可能的实现方式中,在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,该方法还包括:所述第一核心网设备通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,第一核心网设备向接入网设备发送重路由命令之前,该方法还包括:第一核心网设备为所述UE分配标识,并确定校验值;
所述重路由命令中,还包括:所述第一核心网设备为所述UE分配的标识和所述校验值;
或者,所述重路由命令中,还包括:所述第一核心网设备为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
结合第十方面,在第五种可能的实现方式中,所述第一核心网确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还包括:
所述第一核心网设备向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并接收第三核心网设备回复的响应消息,其中包括所述UE 的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
所述第一核心网设备通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要重路由到所述特定网络中的第二核心网设备;
所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
第十一方面,本发明实施例提供的一种获取安全上下文的方法,包括:
第二核心网设备接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
第二核心网设备根据所述特定消息确定第一核心网设备,并向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
第二核心网设备接收第一核心网设备发送的响应消息,并从中获取所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
结合第十一方面,如果把第二MME看作是第二核心网设备,则相应地,可以把第一MME或第三MME看作是第一核心网设备。
结合第十一方面,在第一种可能的实现方式中,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
所述特定消息中还包括:校验值,或者校验值和密钥集标识;
所述请求消息中还包括:校验值,或者校验值和密钥集标识。
结合第十一方面,在第二种可能的实现方式中,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
第十二方面,本发明实施例提供的一种提供安全上下文的方法,包括:
第三核心网设备接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;
当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第三核心网设备向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息。
结合第十二方面,在第一种可能的实现方式中,当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还包括:
第三核心网设备确定该UE的校验值;
所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
结合第十二方面的第一种可能的实现方式,在第二种可能的实现方式中,该方法还包括:
第三核心网设备接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
第三核心网设备根据所述UE的标识找到对应的鉴权数据,向所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
结合第十二方面的第二种可能的实现方式,在第三种可能的实现方式中,在第三核心网设备向所述第二核心网设备发送响应消息之前,该方法还包括:第三核心网设备验证所述请求消息中的校验值;
第三核心网设备向所述第二核心网设备发送响应消息,具体为:当验证成功时,第三核心网设备向所述第二核心网设备发送响应消息。
结合第十二方面的第三种可能的实现方式,在第四种可能的实现方式中,所述第三核心网设备验证所述请求消息中的校验值,具体包括:
当所述请求消息中还包括密钥集标识时,所述第三核心网设备利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
所述第三核心网设备通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
所述第三核心网设备查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
结合第十二方面,在第五种可能的实现方式中,该方法还包括:
第三核心网设备接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
第三核心网设备通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;
第三核心网设备根据该NAS消息中的UE的标识和密钥集标识找到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,第三核心网设备根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据返回给第二核心网设备。
第十三方面,本发明实施例提供的一种提供安全上下文的设备,包括:
接收NAS消息单元,用于接收用户设备UE发送的非接入层NAS消息;
发送重路由命令单元,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
结合第十三方面,在第一种可能的实现方式中,该设备还包括:
鉴权数据提供单元,用于接收所述第二核心网设备发送的请求消息,所述请求消息中包括UE的标识,根据所述UE的标识,查找对应的鉴权数据,并将该鉴权数据发送给所述第二核心网设备。
结合第十三方面第一种可能的实现方式,在第二种可能的实现方式中,所述鉴权数据提供单元将该鉴权数据发送给所述第二核心网设备之前,还用于验证请求消息中的校验值;
所述鉴权数据提供单元将该鉴权数据发送给所述第二核心网设备,具体为:当验证成功时,将鉴权数据发送给第二核心网设备。
结合第十三方面第二种可能的实现方式,在第三种可能的实现方式中, 所述鉴权数据提供单元验证请求消息中的校验值时,具体用于:
当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
结合第十三方面,在第四种可能的实现方式中,所述发送重路由命令单元在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,向接入网设备发送重路由命令之前,所述发送重路由命令单元还用于:为所述UE分配标识,并确定校验值;
所述重路由命令中,还包括:所述发送重路由命令单元为所述UE分配的标识和所述校验值;
或者,所述重路由命令中,还包括:所述发送重路由命令单元为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
结合第十三方面,在第五种可能的实现方式中,所述发送重路由命令单元确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:
向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并接收第三核心网设备回复的响应消息,其中包括所述UE的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要 重路由到所述特定网络中的第二核心网设备;
所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
第十四方面,本发明实施例提供的一种获取安全上下文的设备,包括:
特定消息接收单元,用于接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
请求单元,用于根据所述特定消息确定第一核心网设备,并向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
获取单元,用于接收第一核心网设备发送的响应消息,并从中获取所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
结合第十四方面,如果把第二MME看作是第二核心网设备,则相应地,可以把第一MME或第三MME看作是第一核心网设备。
结合第十四方面,在第一种可能的实现方式中,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
所述特定消息中还包括:校验值,或者校验值和密钥集标识;
所述请求消息中还包括:校验值,或者校验值和密钥集标识。
结合第十四方面,在第二种可能的实现方式中,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
第十五方面,本发明实施例提供的一种提供安全上下文的设备,包括:
接收请求单元,用于接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;
响应单元,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息。
结合第十五方面,在第一种可能的实现方式中,所述响应单元当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还用于:
确定该UE的校验值;
所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
结合第十五方面的第一种可能的实现方式,在第二种可能的实现方式中,所述接收请求单元还用于:接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
所述响应单元还用于:根据所述UE的标识找到对应的鉴权数据,向所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
结合第十五方面的第二种可能的实现方式,在第三种可能的实现方式中,所述响应单元在向所述第二核心网设备发送响应消息之前,还用于验证所述请求消息中的校验值;
所述响应单元向所述第二核心网设备发送响应消息,具体为:当验证成功时,所述响应单元向所述第二核心网设备发送响应消息。
结合第十五方面的第三种可能的实现方式,在第四种可能的实现方式中,所述响应单元验证所述请求消息中的校验值时,具体用于:
当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
结合第十五方面,在第五种可能的实现方式中,所述接收请求单元还用于:
接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重 路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;
根据该NAS消息中的UE的标识和密钥集标识找到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据返回给第二核心网设备。
第十六方面,本发明实施例提供的一种提供安全上下文的设备,包括收发机和处理器,其中,
收发机接收用户设备UE发送的非接入层NAS消息;
处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,通过收发机向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
结合第十六方面,在第一种可能的实现方式中,收发机还用于接收所述第二核心网设备发送的请求消息,所述请求消息中包括UE的标识,所述处理器还用于根据所述UE的标识,查找对应的鉴权数据,并通过收发机将该鉴权数据发送给所述第二核心网设备。
结合第十六方面的第一种可能的实现方式,在第二种可能的实现方式中,所述处理器还用于:
在所述收发机将该鉴权数据发送给所述第二核心网设备之前,验证请求消息中的校验值;当验证成功时,通过所述收发机将鉴权数据发送给第二核心网设备。
结合第十六方面的第二种可能的实现方式,在第三种可能的实现方式中,所述处理器验证请求消息中的校验值时,具体用于:
当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
结合第十六方面,在第四种可能的实现方式中,所述处理器在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,通过收发机向接入网设备发送重路由命令之前,所述处理器还用于:为所述UE分配标识,并确定校验值;
所述重路由命令中,还包括:所述处理器为所述UE分配的标识和所述校验值;
或者,所述重路由命令中,还包括:所述处理器为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
结合第十六方面,在第五种可能的实现方式中,所述处理器确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过收发机向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并通过收发机接收第三核心网设备回复的响应消息,其中包括所述UE的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要重路由到所述特定网络中的第二核心网设备;
所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
第十七方面,本发明实施例提供的一种获取安全上下文的设备,包括:收发机和处理器,其中,
收发机接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
处理器根据所述特定消息确定第一核心网设备,并通过收发机向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
收发机接收第一核心网设备发送的响应消息,处理器从中获取所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
结合第十七方面,在第一种可能的实现方式中,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
所述特定消息中还包括:校验值,或者校验值和密钥集标识;
所述请求消息中还包括:校验值,或者校验值和密钥集标识。
结合第十七方面,在第二种可能的实现方式中,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
第十八方面,本发明实施例提供的一种提供安全上下文的设备,包括:收发机和处理器,其中,
收发机接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;
处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,通过收发机向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息。
结合第十八方面,在第一种可能的实现方式中,处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还用于:
确定该UE的校验值;
所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
结合第十八方面的第一种可能的实现方式,在第二种可能的实现方式中, 所述收发机还用于接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
所述处理器根据所述UE的标识找到对应的鉴权数据,通过所述收发机向所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
结合第十八方面的第二种可能的实现方式,在第三种可能的实现方式中,所述处理器在通过收发机向所述第二核心网设备发送响应消息之前,还用于验证所述请求消息中的校验值;
所述处理器通过收发机向所述第二核心网设备发送响应消息,具体为:当验证成功时,所述处理器通过收发机向所述第二核心网设备发送响应消息。
结合第十八方面的第三种可能的实现方式,在第四种可能的实现方式中,所述处理器验证所述请求消息中的校验值时,具体用于:
当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
结合第十八方面,在第五种可能的实现方式中,所述收发机还用于接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
所述处理器还用于通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;根据该NAS消息中的UE的标识和密钥集标识找到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据通过收发机返回给第二核心网设备。
本发明实施例通过第一核心网设备接收用户设备UE发送的非接入层NAS 消息;当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。从而,使得第一核心网设备当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令。
本发明实施例通过第二核心网设备接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;第二核心网设备根据所述特定消息确定第一核心网设备,并向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;第二核心网设备接收第一核心网设备发送的响应消息,并从中获取所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。从而使得特定网络中的第二核心网设备可以获取第一核心网设备提供的UE的安全上下文,使得特定网络下的核心网设备与UE可以进行安全通信。
本发明实施例通过第三核心网设备接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第三核心网设备向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息,从而使得第三核心网设备当接收到第一核心网设备发送的请求消息时,当确定其中的NAS消息需要重路由到特定网络中的第二核心网设备时,通过向所述第一核心网设备发送响应消息将UE的安全上下文和用于确定所述第二核心网设备的信息提供给特定网络中的第二核心网设备。
附图说明
图1为现有技术中MME重选过程示意图;
图2为现有技术中TAU过程中MMEn向MMEo索要安全上下文的过程示意图;
图3为本发明实施例一提供的一种安全上下文的传输处理流程示意图;
图4为本发明实施例二提供的一种安全上下文的传输处理流程示意图;
图5为本发明实施例三提供的一种安全上下文的传输处理流程示意图;
图6为本发明实施例四提供的一种安全上下文的传输处理流程示意图;
图7为本发明实施例五提供的一种安全上下文的传输处理流程示意图;
图8为本发明实施例提供的第一种计算完整性保护校验值(Token值)的方法示意图;
图9为本发明实施例提供的第二种计算Token值的方法示意图;
图10为本发明实施例提供的一种安全上下文的提供方法的流程示意图;
图11为本发明实施例提供的一种安全上下文的获取方法的流程示意图;
图12为本发明实施例提供的一种重路由命令的接收处理方法的流程示意图;
图13为本发明实施例提供的一种安全上下文的提供设备的结构示意图;
图14为本发明实施例提供的一种安全上下文的获取设备的结构示意图;
图15为本发明实施例提供的一种重路由命令的接收处理设备的结构示意图;
图16为本发明实施例六提供的一种安全上下文的传输处理流程示意图;
图17为本发明实施例七提供的一种安全上下文的传输处理流程示意图;
图18为本发明实施例八提供的一种安全上下文的传输处理流程示意图;
图19为本发明实施例九提供的一种安全上下文的传输处理流程示意图;
图20为本发明实施例提供的另一种安全上下文的提供方法的流程示意图;
图21为本发明实施例提供的另一种安全上下文的获取方法的流程示意图;
图22为本发明实施例提供的第三种安全上下文的提供方法的流程示意图;
图23为本发明实施例提供的另一种安全上下文的提供设备的结构示意 图;
图24为本发明实施例提供的另一种安全上下文的获取设备的结构示意图;
图25为本发明实施例提供的第三种安全上下文的提供设备的结构示意图。
具体实施方式
本发明实施例提供了一种安全上下文的提供、获取方法及设备,用以实现特定网络下的MME可以获取UE的安全上下文,从而使得特定网络下的MME与UE可以进行安全通信。
另外,本发明实施例提供的技术方案还可以对重路由(reroute)的NAS消息进行完整性校验。
本发明中所述的核心网设备,可以是MME,也可以是SGSN等设备。本发明中所述的接入网设备,可以是eNB,也可以是无线网络控制器(Radio Network Controller,RNC)等设备。本发明中所述的NAS消息,可以是附着请求消息,也可以是跟踪区域更新请求消息等。
下面以核心网设备是MME,接入网设备是eNB,NAS消息是附着请求消息为例,给出本发明具体实施例的介绍。
本发明实施例一:
本实施例针对NAS消息没有被安全保护(包括完整性保护和机密性保护)的场景,例如UE初次附着到网络(即首次接入网络)上。具体流程如图3所示,包括步骤:
301.UE向第一MME初次发起附着请求(或跟踪区域更新请求);
该附着请求(或跟踪区域更新请求)中的演进型通用陆地无线接入网络(E-UTRAN)密钥集标识符(Key Set Identifier in E-UTRAN,eKSI)的所有比特位均设为1,即UE没有可用的安全上下文,该附着请求(或跟踪区域更新请求)未被安全保护。
其中,所述的eKSI用于标识该UE下的不同安全上下文,具体地,eKSI是安全上下文中的密钥集标识,由于不同的安全上下文中的根密钥不同,因此可以用密钥集标识来标识安全上下文。所述根密钥为Kasme。
302.UE与第一MME进行认证和密钥协商,建立UE与第一MME之间的NAS安全关联;
本步骤即建立了UE与第一MME之间共享的安全上下文。
303.第一MME向HSS发起更新位置请求;
304.HSS查询数据库,即查找UE的签约数据,确定UE是否为需要执行特定业务(例如MTC业务)的UE,是否需要将UE接入相应的特定网络,并返回更新位置确认,该更新位置确认消息中包含使用特定网络的信息,该信息例如包括该UE的业务类型及其接入的特定网络的类型信息等。
305.第一MME接收到使用特定网络的信息指示后,对附着请求(或跟踪区域更新请求)进行重构(re-structure),即使用当前与UE共享的安全上下文关联的eKSI替换附着请求中的eKSI。
其中,安全上下文关联的eKSI,即该安全上下文中的密钥集标识。
306.第一MME向eNB发送重路由命令,该重路由命令中包括重构的附着请求(或重构的跟踪区域更新请求),使用特定网络的信息。
其中,该使用特定网络的信息,即用于确定第二MME的信息。
所述第二MME,即特定网络中的MME,即背景技术中所述的specific MME。
307.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的第二MME,并向第二MME发送特定消息,该特定消息中包括重构的附着请求(或重构的跟踪区域更新请求)、重路由指示以及第一MME的标识信息。
其中,第一MME的标识信息可以是MME ID,也可以是GUTI等。
其中,eNB根据使用特定网络的信息为UE选择特定网络的第二MME,例如包括:
eNB根据预先配置的网络类型与第二MME标识的对应关系列表,通过特 定网络的类型信息确定对应的特定网络的第二MME。
308.第二MME根据第一MME的标识信息找到第一MME,并向第一MME发起上下文请求消息,其中包含UE的IMSI、eKSI和重路由指示。
309.第一MME接收到上下文请求消息后,从中获取UE的IMSI、eKSI和重路由指示,第一MME根据重路由指示确定需要查找安全上下文,进而根据IMSI和eKSI找到对应的安全上下文。其中,用IMSI确定UE,用eKSI确定该UE下的安全上下文。
3010.第一MME将UE当前与该第一MME共享的安全上下文通过上下文响应消息发给第二MME,该安全上下文中包含根密钥(Kasme),加密算法(用于防监听的算法)和完整性保护算法(用于防篡改的算法)。
3011.如果第二MME需要重新选择与该UE通信时使用的算法,例如如果第二MME选择的算法(包括加密算法和/或完整性保护算法)安全上下文中的算法不同,则第二MME利用新选择的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含第二MME选择的新算法。其中,第二MME选择的新算法,包括加密算法和/或完整性保护算法。
其中,第二MME利用新选择的算法推衍新的NAS密钥,包括:利用新选择的加密算法和/或完整性保护算法的标识(ID),以及根密钥Kasme,推衍新的NAS密钥。此为现有技术,在此不进行赘述。
3012.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
针对该实施例,可进一步扩展以下五个方面:
第一:如果在重路由之前,第一MME向UE分配了标识,例如分配了GUTI(其中包含第一MME的标识,可以用于查找对应的第一MME),那么在305步中还需要用分配的GUTI替换附着请求(或跟踪区域更新请求)中的IMSI(或P-TMSI或GUTI),这样307步中不需要携带第一MME的标识信息,308步中携带的不是IMSI而是GUTI。
第二:308步和309步上下文请求中携带的指示是可选的,不是必须携带 的指示。当上下文请求中携带重路由指示时,第一MME根据上下文请求中的重路由指示获知附着请求(或跟踪区域更新请求)是重路由到第二MME上的。
第三:3011步和3012步的NAS安全模式命令过程是可选的,只有在第二MME为UE选择了新的完整性算法和/或加密算法时才发起此过程。
第四:308步上下文请求中也可以携带重构的附着请求(或重构的跟踪区域更新请求),而不直接携带eKSI,第一MME根据IMSI和重构的附着请求(或重构的跟踪区域更新请求)中的eKSI获取安全上下文,第一MME不需要对重构的附着请求(或重构的跟踪区域更新请求)进行完整性验证,只需要根据重路由指示将该安全上下文发给第二MME即可。
第五:305步中不对附着请求(或跟踪区域更新请求)进行重构,那么后续步骤中使用的都是UE发送的附着请求(或跟踪区域更新请求)。因此306步重路由命令中还包括第一MME当前与UE共享的安全上下文所关联的eKSI。步骤307特定消息中还包括所述eKSI。308步上下文请求中还可以携带附着请求(或跟踪区域更新请求)。
本发明实施例二:
本实施例针对NAS消息没有被安全保护的场景,例如UE初次附着到网络上。本实施例增加了对附着请求(或跟踪区域更新请求)的完整性保护,提高了安全性。具体流程如图4所示,包括:
401.UE向第一MME初次发起附着请求(或跟踪区域更新请求)。;
其中的消息认证码(Message Authentication Code,MAC)信元(Information Element,IE)为空,即未被完整性保护。
402.UE与网络侧进行认证和密钥协商,建立UE与第一MME之间的NAS安全关联;
本步骤即建立了UE与第一MME之间共享的安全上下文。
403.第一MME向HSS发起更新位置请求;
404.HSS查询数据库,即查找UE的签约数据,看UE是否为需要执行特定业务(例如MTC业务)的UE,是否需要将UE接入相应的特定网络,并返回更 新位置确认,该更新位置确认消息中包含使用特定网络的信息,该信息例如包括该UE的业务类型及其接入的特定网络的类型信息等。
405.第一MME接收到使用特定网络的信息指示后,对原来接收到的附着请求消息(或跟踪区域更新请求)进行重构,即第一MME基于当前与UE共享的安全上下文计算令牌(Token)值,并将该Token值填充到附着请求消息的MAC IE,使用与当前安全上下文关联的eKSI替换附着请求中的eKSI.
其中,所述Token值,即完整性保护校验值。
406.第一MME向eNB发送重路由命令,该命令中包括重构的附着请求(或重构的跟踪区域更新请求),使用特定网络的信息。
其中,该使用特定网络的信息,即用于确定第二MME的信息。
所述第二MME,即特定网络中的MME,即背景技术中所述的specific MME。
407.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的第二MME,并向第二MME发送特定消息,该特定消息中包括重构的附着请求(或重构的跟踪区域更新请求)、重路由指示以及第一MME的标识信息。
其中,第一MME的标识信息可以是MME ID,也可以是GUTI等。
其中,eNB根据使用特定网络的信息为UE选择特定网络的第二MME,例如包括:
eNB根据预先配置的网络类型与第二MME标识的对应关系列表,通过特定网络的类型信息确定对应的特定网络的第二MME。
408.第二MME根据第一MME的标识信息找到第一MME,并向第一MME发起上下文请求消息,其中包含UE的IMSI、重构的附着请求和重路由指示。
409.第一MME根据IMSI和eKSI找到对应的安全上下文,并利用该安全上下文验证附着请求中的Token值。
其中,第一MME利用该安全上下文验证附着请求中的Token值,即第一MME将利用该安全上下文计算得到Token值,与附着请求中的Token值进行比较,一致则验证成功。
4010.如果验证成功,那么第一MME将UE当前与该第一MME共享的安全上下文通过上下文响应消息发给第二MME,该安全上下文中包含根密钥(Kasme),加密算法(用于防监听的算法)和完整性保护算法(用于防篡改的算法)。
4011.如果第二MME需要重新选择与该UE通信时使用的算法,例如如果第二MME选择的算法(包括加密算法和/或完整性保护算法)安全上下文中的算法不同,则第二MME利用新选择的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含第二MME选择的新算法。其中,第二MME选择的新算法,包括加密算法和/或完整性保护算法。
其中,第二MME利用新选择的算法推衍新的NAS密钥,包括:利用新选择的加密算法和/或完整性保护算法的标识(ID),以及根密钥Kasme,推衍新的NAS密钥。此为现有技术,在此不进行赘述。
4012.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
针对该实施例,可进一步扩展以下四个方面:
第一:如果在重路由之前,第一MME向UE分配了标识,例如分配了GUTI(其中包含第一MME的标识,可以用于查找对应的第一MME),那么在405步中还需要用分配的GUTI替换附着请求(或跟踪区域更新请求)中的IMSI(或P-TMSI或GUTI),这样407步中不需要携带第一MME的标识信息,408步中携带的不是IMSI而是GUTI。
第二:408步和409步上下文请求中携带的重路由指示是可选的,不是必须携带的指示。当上下文请求中携带重路由指示时,第一MME根据上下文请求中的重路由指示获知附着请求(或跟踪区域更新请求)是重路由到第二MME上的,第一MME接收该附着请求(或跟踪区域更新请求)并验证Token值。
第三:4011步和4012步的NAS安全模式命令过程是可选的,只有在第二MME为UE选择了新的完整性算法和/或加密算法时才发起此过程。
第四:405步中不对附着请求(或跟踪区域更新请求)进行重构,只计算 Token值,那么后续步骤中使用的都是UE发送的附着请求(或跟踪区域更新请求)。因此,406步重路由命令中还包括第一MME当前与UE共享的安全上下文所关联的eKSI和计算出的Token值。步骤407特定消息中还包括所述eKSI和计算出的Token值。步骤408上下文请求中还包括Token值。步骤409第一MME需要对安全上下文中的Token值进行验证。
本发明实施例三:
本实施例针对NAS消息被安全保护并且第一MME上不存在可用安全上下文的场景,例如UE发起附着请求或跟踪区域更新请求时,具体流程如图5所示,包括步骤:
501.UE向第一MME发起附着请求(或跟踪区域更新请求),该附着请求(或跟踪区域更新请求)被完整性保护;
502.第一MME上不存在可用的安全上下文,第一MME利用附着请求(或跟踪区域更新请求)中的GUTIo查找第三MME,从而向第三MME发起上下文请求;
其中,所述GUTIo即旧的GUTI,也就是第三MME为UE分配的GUTI。
503.第三MME验证接收到的附着请求(或跟踪区域更新请求)的完整性。
504.如果验证成功,第三MME向第一MME发送上下文响应,其中包含安全上下文。
505.第一MME向HSS发起更新位置请求;
506.HSS查询数据库,即查找UE的签约数据,看UE是否为需要执行特定业务(例如MTC业务)的UE,是否需要将UE接入相应的特定网络,并返回更新位置确认,该更新位置确认消息中包含使用特定网络的信息,该信息例如包括该UE的业务类型及其接入的特定网络的类型信息等。
507.第一MME接收到使用特定网络的信息指示后,对原来接收到的附着请求(或跟踪区域更新请求)消息进行重构,即如果第一MME已经为UE分配了GUTI,第一MME将附着请求(或跟踪区域更新请求)消息中的GUTIo替换为第一MME为UE分配的GUTI;如果第一MME没有为UE分配GUTI,则第一 MME将附着请求(或跟踪区域更新请求)消息中的GUTIo替换为IMSI。第一MME基于当前与UE共享的安全上下文计算Token值,并将该Token值替换附着请求(或跟踪区域更新请求)消息的MAC IE;
508.第一MME向eNB发送重路由命令,该命令中包括重构的附着请求(或重构的跟踪区域更新请求)以及使用特定网络的信息。
其中,该使用特定网络的信息,即用于确定第二MME的信息。
所述第二MME,即特定网络中的MME,即背景技术中所述的specific MME。
509.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的第二MME,并向第二MME发送特定消息,该特定消息中包括重构的附着请求(或重构的跟踪区域更新请求)以及重路由指示。
其中,eNB根据使用特定网络的信息为UE选择特定网络的第二MME,例如包括:
eNB根据预先配置的网络类型与第二MME标识的对应关系列表,通过特定网络的类型信息确定对应的特定网络的第二MME。
5010.第二MME根据重构的附着请求(或重构的跟踪区域更新请求)中的GUTI找到第一MME,并向第一MME发起上下文请求消息,其中包含第一MME为UE分配的GUTI、重构的附着请求(或重构的跟踪区域更新请求)和重路由指示。
5011.第一MME根据重路由指示获知该重构的附着请求(或重构的跟踪区域更新请求)是重路由的,第一MME接收该重构的附着请求(或重构的跟踪区域更新请求),并根据GUTI(或IMSI)和eKSI找到对应的安全上下文,并利用该安全上下文验证附着请求(或跟踪区域更新请求)中的Token值。
其中,第一MME根据GUTI(或IMSI)和eKSI找到对应的安全上下文,包括:第一MME根据GUTI(或IMSI)确定相应的UE,并根据eKSI确定该UE下的相应的安全上下文。
第一MME利用该安全上下文验证重构的附着请求(或重构的跟踪区域更 新请求)中的Token值,即第一MME将利用该安全上下文计算得到Token值,与重构的附着请求(或重构的跟踪区域更新请求)中的Token值进行比较,一致则验证成功。
5012.如果验证成功,那么第一MME将UE当前的安全上下文发给第二MME,该安全上下文中包含第根密钥(Kasme)、加密算法(用于防监听的算法)和完整性保护算法(用于防篡改的算法)。
5013.如果第二MME需要重新选择与该UE通信时使用的算法,例如如果第二MME选择的算法(包括加密算法和/或完整性保护算法)安全上下文中的算法不同,则第二MME利用新选择的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含第二MME选择的新算法。其中,第二MME选择的新算法,包括加密算法和/或完整性保护算法。其中,第二MME利用新选择的算法推衍新的NAS密钥,包括:利用新选择的加密算法和/或完整性保护算法的标识(ID),以及根密钥Kasme,推衍新的NAS密钥。此为现有技术,在此不进行赘述。
5014.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
针对该实施例,可进一步扩展以下二个方面:
第一:如果507步中将GUTIo替换为IMSI,那么609步中需要携带第一MME的标识信息,从而第二MME可以根据第一MME的标识信息找到对应的第一MME索要安全上下文。
第二:5013步和5014步NAS安全模式命令过程是可选的,只有在第二MME为UE选择了新的完整性算法和/或加密算法时才发起此过程。
本发明实施例四:
本实施例针对NAS消息被安全保护并且第一MME上不存在可用安全上下文的场景,例如UE发起附着请求或跟踪区域更新请求时,具体流程如图6所示,包括步骤:
601.UE向第一MME发起附着请求(或跟踪区域更新请求),该附着请求 (或跟踪区域更新请求)被完整性保护;
602.第一MME上不存在可用的安全上下文,第一MME利用附着请求(或跟踪区域更新请求)中的GUTIo查找第三MME,从而向第三MME发起上下文请求;
其中,所述GUTIo即旧的GUTI,也就是第三MME为UE分配的GUTI。
603.第三MME验证接收到的附着请求(或跟踪区域更新请求)的完整性。
604.如果验证成功,第三MME向第一MME发送上下文响应,其中包含安全上下文。
605.第一MME向HSS发起更新位置请求;
606.HSS查询数据库,即查找UE的签约数据,看UE是否为需要执行特定业务(例如MTC业务)的UE,是否需要将UE接入相应的特定网络,并返回更新位置确认,该更新位置确认消息中包含使用特定网络的信息,该信息例如包括该UE的业务类型及其接入的特定网络的类型信息等。
607.第一MME接收到使用特定网络的信息指示后,向eNB发送重路由命令,该命令中包括附着请求(或跟踪区域更新请求)、UE的标识以及使用特定网络的信息。
其中,该使用特定网络的信息,即用于确定第二MME的信息。
所述第二MME,即特定网络中的MME,即背景技术中所述的specific MME。
其中,所述UE的标识可以是第一MME为UE分配的GUTI,也可以是IMSI。
可选地,如果第一MME与UE之间进行了重认证,那么所述重路由命令中还可以包含eKSI。
609.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的第二MME,并向第二MME发送特定消息,该特定消息中包括附着请求(或跟踪区域更新请求),UE的标识以及重路由指示。
其中,eNB根据使用特定网络的信息为UE选择特定网络的第二MME,例如包括:
eNB根据预先配置的网络类型与第二MME标识的对应关系列表,通过特定网络的类型信息确定对应的特定网络的第二MME。
其中,所述UE的标识可以是第一MME为UE分配的GUTI,也可以是IMSI。
可选地,当UE的标识是IMSI时,所述特定消息中还可以包含第一MME的标识信息,从而第二MME可以根据第一MME的标识信息找到对应的第一MME。
可选地,如果第一MME与UE之间进行了重认证,那么所述特定消息中还可以包含eKSI。
6010.第二MME根据特定消息中的GUTI或第一MME的标识信息找到第一MME,并向第一MME发起上下文请求消息,其中包含UE的标识、附着请求(或跟踪区域更新请求)和重路由指示。
其中,所述UE的标识可以是第一MME为UE分配的GUTI,也可以是IMSI。
可选地,如果第一MME与UE之间进行了重认证,那么所述特定消息中还可以包含eKSI。
6011.第一MME根据重路由指示获知该附着请求(或跟踪区域更新请求)是重路由的,第一MME接收该附着请求(或跟踪区域更新请求),并根据GUTI(或IMSI)和eKSI找到对应的安全上下文,并利用该安全上下文验证附着请求(或跟踪区域更新请求)。
其中,第一MME根据GUTI(或IMSI)和eKSI找到对应的安全上下文,包括:第一MME根据GUTI(或IMSI)确定相应的UE,并根据eKSI确定该UE下的相应的安全上下文。
第一MME利用该安全上下文验证附着请求(或跟踪区域更新请求)中,即第一MME将利用该安全上下文计算得到MAC值,与附着请求(或跟踪区域更新请求)中的MAC值进行比较,一致则验证成功。
6012.如果验证成功,那么第一MME将UE当前的安全上下文发给第二MME,该安全上下文中包含第根密钥(Kasme)、加密算法(用于防监听的算法)和完整性保护算法(用于防篡改的算法)。
6013.如果第二MME需要重新选择与该UE通信时使用的算法,例如如果第二MME选择的算法(包括加密算法和/或完整性保护算法)安全上下文中的算法不同,则第二MME利用新选择的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含第二MME选择的新算法。其中,第二MME选择的新算法,包括加密算法和/或完整性保护算法。其中,第二MME利用新选择的算法推衍新的NAS密钥,包括:利用新选择的加密算法和/或完整性保护算法的标识(ID),以及根密钥Kasme,推衍新的NAS密钥。此为现有技术,在此不进行赘述。
6014.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
针对该实施例,可进一步扩展以下一个方面:
第一:6013步和6014步NAS安全模式命令过程是可选的,只有在第二MME为UE选择了新的完整性算法和/或加密算法时才发起此过程。
本发明实施例五:
本实施例针对NAS消息被安全保护并且第一MME上不存在可用安全上下文的场景,例如UE发起附着请求或跟踪区域更新请求时,具体流程如图7所示,包括步骤:
701.UE向第一MME发起附着请求(或跟踪区域更新请求),该附着请求(或跟踪区域更新请求)被完整性保护;
702.第一MME上不存在可用的安全上下文,第一MME利用附着请求(或跟踪区域更新请求)中的GUTIo查找第三MME,从而向第三MME发起上下文请求;
其中,所述GUTIo即旧的GUTI,也就是第三MME为UE分配的GUTI。
703.第三MME验证接收到的附着请求(或跟踪区域更新请求)的完整性。
704.如果验证成功,第三MME向第一MME发送上下文响应,其中包含安全上下文和使用特定网络的信息。
705.第一MME接收到使用特定网络的信息指示后,向eNB发送重路由命 令,该命令中包括附着请求(或跟踪区域更新请求)以及使用特定网络的信息。
其中,该使用特定网络的信息,即用于确定第二MME的信息。
所述第二MME,即特定网络中的MME,即背景技术中所述的specific MME。
706.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的第二MME,并向第二MME发送特定消息,该特定消息中包括附着请求(或跟踪区域更新请求)以及重路由指示。
其中,eNB根据使用特定网络的信息为UE选择特定网络的第二MME,例如包括:
eNB根据预先配置的网络类型与第二MME标识的对应关系列表,通过特定网络的类型信息确定对应的特定网络的第二MME。
707.第二MME根据附着请求(或跟踪区域更新请求)中的GUTI找到第三MME,并向第三MME发起上下文请求消息,其中包含GUTI、附着请求(或跟踪区域更新请求)和重路由指示。
708.第三MME根据重路由指示获知该附着请求(或跟踪区域更新请求)是重路由的,第三MME接收该附着请求(或跟踪区域更新请求),并根据GUTI和eKSI找到对应的安全上下文,并利用该安全上下文验证附着请求(或跟踪区域更新请求)。
其中,第三MME根据GUTI和eKSI找到对应的安全上下文,包括:第三MME根据GUTI确定相应的UE,并根据eKSI确定该UE下的相应的安全上下文。
第三MME利用该安全上下文验证附着请求(或跟踪区域更新请求)中,即第三MME将利用该安全上下文计算得到MAC值,与附着请求(或跟踪区域更新请求)中的MAC值进行比较,一致则验证成功。
709.如果验证成功,那么第三MME将UE当前的安全上下文发给第二MME,该安全上下文中包含第根密钥(Kasme)、加密算法(用于防监听的算 法)和完整性保护算法(用于防篡改的算法)。
7010.如果第二MME需要重新选择与该UE通信时使用的算法,例如如果第二MME选择的算法(包括加密算法和/或完整性保护算法)安全上下文中的算法不同,则第二MME利用新选择的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含第二MME选择的新算法。其中,第二MME选择的新算法,包括加密算法和/或完整性保护算法。其中,第二MME利用新选择的算法推衍新的NAS密钥,包括:利用新选择的加密算法和/或完整性保护算法的标识(ID),以及根密钥Kasme,推衍新的NAS密钥。此为现有技术,在此不进行赘述。
7011.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
本实施例中,如果把第二MME看作是第二核心网设备,则相应地,可以把第三MME看作是第一核心网设备。
针对该实施例,可进一步扩展以下一个方面:
第一:7010步和7011步NAS安全模式命令过程是可选的,只有在第二MME为UE选择了新的完整性算法和/或加密算法时才发起此过程。
以下结合附图介绍一下本实施例提供的Token的计算方法。
方法一:
参见图8,采用KEY、MESSAGE、COUNT、BEARER标识、DIRECTION值,通过EIA算法计算得到Token值。
其中,计数(COUNT)值为NAS消息的计数值,具体采用UE与第一MME共享的计数值;
消息(MESSAGE)为NAS消息;
EIA为完整性算法;
密钥(KEY)设置为KNASint;
承载(BEARER)标识所有比特位设置为默认值,例如1;
方向(DIRECTION)值比特位设置为默认值,例如1;
方法二:
参见图9,只采用NAS消息和NAS消息的计数值以及NAS层完整性密钥,用哈希函数计算得到Token值。
综上所述,在第一核心网设备侧,参见图10,本发明实施例提供的一种获取安全上下文的方法,包括步骤:
901、第一核心网设备接收用户设备UE发送的非接入层NAS消息;
902、当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
903、第一核心网设备接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,第一核心网设备根据所述UE的标识以及密钥集标识,查找对应的安全上下文,并将该安全上下文发送给所述第二核心网设备。
较佳地,第一核心网设备向接入网设备发送重路由命令之前,该方法还包括:
第一核心网设备对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
较佳地,第一核心网设备对接收到的来自所述UE的NAS消息进行重构,包括:
第一核心网设备利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
第一核心网设备根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
较佳地,将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE,包括:
将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证 码MAC信元IE;或
将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码MAC。
较佳地,第一核心网设备对接收到的来自所述UE的NAS消息进行重构,还包括:
第一核心网设备将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消息中的UE的标识。
较佳地,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
较佳地,第一核心网设备确定当前的安全上下文后,将该安全上下文发送给第二核心网设备前,该方法还包括:
第一核心网设备利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
则,所述第一核心网设备将该安全上下文发送给第二核心网设备的步骤,是当所述验证成功时执行的。
较佳地,第一核心网设备利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性,包括:
第一核心网设备验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
第一核心网设备验证该上下文请求中的完整性保护校验值
较佳地,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
较佳地,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
相应地,参见图11,在第二核心网设备侧,本发明实施例提供的一种获 取安全上下文的方法,包括:
101、第二核心网设备接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
102、第二核心网设备根据所述特定消息确定第一核心网设备,并向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
103、第二核心网设备接收第一核心网设备发送的上下文响应,并从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的。
较佳地,所述NAS消息中包含第一核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
较佳地,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
较佳地,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
较佳地,第二核心网设备获取的所述UE的安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
较佳地,第二核心网设备获取所述UE的安全上下文后,该方法还包括:
当第二核心网设备需要选择新的算法时,第二核心网设备利用新的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或完整性保护算法;
第二核心网设备接收该UE反馈的NAS安全模式完成消息。
较佳地,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
较佳地,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
相应地,在接入网设备侧,参见图12,本发明实施例提供的一种重路由命令的接收处理方法,包括:
111、接入网设备接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
112、接入网设备根据所述指示信息,确定所述第二核心网设备,并向所述第二核心网设备发送携带所述NAS消息的特定消息。
较佳地,所述特定消息中还包括:
重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
较佳地,所述特定消息中还包括:
第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
较佳地,所述NAS消息是所述第一核心网设备对接收到的UE发送的NAS消息进行重构后的NAS消息。
较佳地,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
较佳地,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
参见图13,本发明实施例提供的一种提供安全上下文的设备,包括:
接收NAS消息单元131,用于接收用户设备UE发送的非接入层NAS消息;
发送重路由命令单元132,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
安全上下文提供单元133,用于接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,根据所述UE的标识 以及密钥集标识,查找对应的安全上下文,并将该安全上下文发送给所述第二核心网设备。
较佳地,所述发送重路由命令单元还用于:
在向接入网设备发送重路由命令之前,对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
较佳地,所述发送重路由命令单元对接收到的来自所述UE的NAS消息进行重构时,具体用于:
利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
较佳地,所述发送重路由命令单元将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE时,具体用于:
将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证码MAC信元IE;或
将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码MAC。
较佳地,所述发送重路由命令单元,还用于:
将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消息中的UE的标识。
较佳地,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
较佳地,所述安全上下文提供单元还用于:
在确定当前的安全上下文后,将该安全上下文发送给第二核心网设备前,利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
则,当所述验证成功时,所述安全上下文将该安全上下文发送给第二核 心网设备。
较佳地,所述安全上下文提供单元利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性时,具体用于:
验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
验证该上下文请求中的完整性保护校验值。
较佳地,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
较佳地,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
图13所示的设备可以是核心网设备,例如MME。
参见图14,本发明实施例提供的一种获取安全上下文的设备,包括:
特定消息接收单元141,用于接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
上下文请求单元142,用于根据所述特定消息确定第一核心网设备,并向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
上下文获取单元143,用于接收第一核心网设备发送的上下文响应,并从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的。
较佳地,所述NAS消息中包含第一核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
较佳地,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
较佳地,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请 求。
较佳地,所述安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
较佳地,所述上下文获取单元获取所述UE的安全上下文后,还用于:
当需要选择新的算法时,利用新的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或完整性保护算法;
接收该UE反馈的NAS安全模式完成消息。
较佳地,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
较佳地,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
图14所示的设备可以是核心网设备,该设备可以和图13所示的核心网设备为同一核心网设备,例如MME。
参见图15,本发明实施例提供的一种重路由命令的接收处理设备,包括:
重路由命令接收单元151,用于接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
特定消息发送单元152,用于根据所述指示信息,确定所述第二核心网设备,并向所述第二核心网设备发送携带所述NAS消息的特定消息。
较佳地,所述特定消息中还包括:
重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
较佳地,所述特定消息中还包括:
第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
较佳地,所述NAS消息是所述第一核心网设备对接收到的UE发送的 NAS消息进行重构后的NAS消息。
较佳地,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
较佳地,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
图15所示的设备,可以是接入网设备,例如eNB。
本发明实施例提供的一种提供安全上下文的设备,该设备包括处理器和收发机,其中,
收发机接收用户设备UE发送的非接入层NAS消息;
当处理器确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,通过收发机向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
收发机接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,处理器根据所述UE的标识以及密钥集标识,查找对应的安全上下文,收发机将该安全上下文发送给所述第二核心网设备。
较佳地,收发机在向接入网设备发送重路由命令之前,处理器还用于对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
较佳地,处理器对接收到的NAS消息进行重构时,具体用于:
利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
较佳地,处理器将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE时,具体用于:
将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证码MAC信元IE;或
将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码MAC。
较佳地,处理器对接收到的NAS消息进行重构时,还用于:
将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消息中的UE的标识。
较佳地,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
较佳地,处理器确定当前的安全上下文后,收发机将该安全上下文发送给第二核心网设备前,处理器还用于:
利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
则,当所述验证成功时,收发机将该安全上下文发送给第二核心网设备。
较佳地,处理器利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性时,具体用于:
验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
验证该上下文请求中的完整性保护校验值。
较佳地,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
较佳地,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
本发明实施例提供的一种获取安全上下文的设备,该设备包括收发机和处理器,其中:
收发机接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
处理器根据所述特定消息确定第一核心网设备,收发机向第一核心网设 备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
收发机接收第一核心网设备发送的上下文响应,处理器从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的。
较佳地,所述NAS消息中包含第一核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
较佳地,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
较佳地,所述密钥集标识包含在所述上下文请求中;或者,
所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
较佳地,所述安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
较佳地,所述处理器获取所述UE的安全上下文后,还用于:当需要选择新的算法时,利用新的算法推衍新的NAS密钥,并通过收发机向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或完整性保护算法;
收发机接收该UE反馈的NAS安全模式完成消息。
较佳地,所述上下文请求中还包括:
重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
较佳地,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
本发明实施例提供的一种重路由命令的接收处理设备,该设备包括收发机和处理器,其中:
收发机接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
处理器根据所述指示信息,确定所述第二核心网设备,并通过收发机向所述第二核心网设备发送携带所述NAS消息的特定消息。
较佳地,所述特定消息中还包括:
重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
较佳地,所述特定消息中还包括:
第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
较佳地,所述NAS消息是所述第一核心网设备对接收到的UE发送的NAS消息进行重构后的NAS消息。
较佳地,所述重路由命令中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
较佳地,所述特定消息中还包括:
密钥集标识和/或完整性保护校验值和/或UE的标识。
由此可见,本发明实施例通过对NAS消息进行重构,使得重路由到特定网络的NAS消息可以被完整性校验,也使得特定网络的核心网设备可以获得安全上下文,从而与UE进行安全通信。
本发明实施例六:
本发明实施例六针对在NAS消息重路由之前,UE和MME上执行了鉴权流程,共享了新的安全上下文的场景,具体流程如图16所示,包括步骤:
S161.UE向第一MME(新的MME)发起附着请求或位置更新请求;
S162.当网络侧找不到UE对应的安全上下文或者向第三MME(旧的MME)获取上下文过程中完整性验证失败,UE与网络侧进行鉴权和密钥协商,建立UE与第一MME之间的NAS安全;
S163.第一MME向HSS发起更新位置请求;
S164.HSS查询数据库,并返回更新位置确认,该确认消息中包含使用特定网络的信息。
S165.第一MME接收到使用特定网络的信息后,为UE分配新的GUTI值(也可以不是新的GUTI),并利用鉴权生成的新的安全上下文计算Token值.
S166.第一MME向eNB发送重路由命令,该重路由命令中包括附着请求或位置更新请求、GUTI、eKSI、Token值和使用特定网络的信息,eKSI是鉴权后生成的新的安全上下文的密钥集标识。
S167.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的MME,即第二MME,并向第二MME发送消息,该消息中包括附着请求/位置更新请求、GUTI、eKSI和Token值。
S168.第二MME根据GUTI找到第一MME,并向第一MME发起请求消息,该请求消息可以是身份请求消息/上下文请求消息或者包含身份请求消息/上下文请求消息,该请求消息中包含附着请求/位置更新请求、GUTI、eKSI和Token值。
S169.第一MME接收到请求消息后,根据GUTI和eKSI找到对应的安全上下文并利用该安全上下文验证请求消息中的Token值,具体验证方法是,第一MME根据安全上下文计算出Token值,然后和请求消息中Token值比较,如果一致,则认为验证成功。如果验证成功,第一MME根据GUTI找到对应的鉴权数据。
S1610.第一MME将UE相关的鉴权数据发给第二MME,该鉴权数据包含鉴权向量和安全上下文。
S1611.如果第二MME的算法优先级列表与第一MME的算法优先级不同,那么第二MME可以重新为UE选择新的算法,根据新算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含选择的新完整性算法标识和新加密算法标识。
S1612.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
针对该实施例,可进一步扩展以下六个方面:
第一:第S165步中第一MME分配GUTI并计算Token值后,还可以重构附着请求/位置更新请求,包括用分配的GUTI替换附着请求/位置更新请求中的IMSI/GUTI,用鉴权后生成的新的安全上下文的eKSI替换附着请求/位置更新请求中的eKSI,用计算的Token替换/填充附着请求/位置更新请求中的MAC值。这样第S166步中不需要携带GUTI,eKSI和Token值,第S167步中不需要携带GUTI,eKSI和Token值,第S168步中不需要携带GUTI,eKSI和Token值,而是携带重构的附着请求/位置更新请求。
或者,第S165步中第一MME分配GUTI并计算Token值后,还可以重构附着请求/位置更新请求,包括用计算的Token替换/填充附着请求/位置更新请求中的MAC值。这样第S166步中不需要携带Token值,第S167步中不需要携带Token值,第S168步中不需要携带Token值,而是携带重构的附着请求/位置更新请求。
第二:可选的,第S166、S167、S168步中可以不携带eKSI。
第三:可选的,Token值可以是根据安全上下文计算的完整性校验码MAC(NAS COUNT值可以算是全0或者是一个预先设定的值),也可以是通过哈希函数Hash计算出的校验值(输入参数可以是消息,或者消息和NAS层完整性密钥,或者消息、NAS层完整性密钥和NAS COUNT值),或者是第一MME为UE分配的签名。上述消息可以是附着请求/位置更新请求,或附着请求/位置更新请求和GUTI,或附着请求/位置更新请求,GUTI和eKSI。第一MME通过哈希函数Hash计算出Token,然后和身份请求/上下文请求消息中Token值比较,如果一致,则认为验证成功;或者,第一MME将身份请求/上下文请求消息中Token值和计算的/分配的/保存的Token(签名或随机数)比较,如果一致,则认为验证成功。第一MME可以识别身份请求/上下文请求中的附着请求/位置更新请求是重路由的(根据Token和GUTI,或者根据Token、eKSI和GUTI识别),那么第一MME可以接受附着请求/位置更新请求中的序列号,并使用全0的NAS COUNT值或者预先设定的NAS COUNT值来验证该消息的完整性,在验证通过后不将请求/位置更新请求中的序列号 赋值给本地保存的NAS COUNT,保持本地的NAS COUNT值不变。
第四:第S168步中,当请求消息就是身份请求消息/上下文请求消息时,GUTI、eKSI和Token包含在身份请求/上下文请求消息内。当请求消息包含身份请求消息/上下文请求消息时,GUTI、eKSI和Token也可以在身份请求/上下文请求消息之外,和身份请求/上下文请求消息一起发送给第一MME,即第二MME向第一MMME发起请求消息,该消息最终包含身份请求/上下文请求消息,GUTI、eKSI和Token值。身份请求/上下文请求中包含附着请求/位置更新请求。
第五:第S1611步和第S1612步NAS安全模式命令过程是可选的,只有第二MME为UE选择了新的完整性算法和加密算法时才发起此过程。
第六:使用特定网络的信息用来指示该附着请求需要重路由到特定网络,使用特定网络的信息可以是核心网类型。
本发明实施例七:
本实施例针对在NAS消息重路由之前,New MME(第一MME)从old MME(第三MME)获取了安全上下文,后续specific MME(第二MME)向New MME(第一MME)索要安全上下文的场景,具体流程如图17所示,包括步骤:
S171.UE向eNB发起附着请求/位置更新请求;
S172.eNB将附着请求/位置更新请求转发给第一MME;
S173.第一MME没有可用的安全上下文,第一MME向第三MME发送身份请求/上下文请求。
S174.第三MME验证成功后,向第一MME发送身份响应消息,消息中包含安全上下文和使用特定网络的信息。
S175.第一MME接收到使用特定网络的信息指示后,为UE分配新的GUTI值,并利用鉴权生成的新的安全上下文计算Token值.
S176.第一MME向eNB发送重路由命令,该命令中包括附着请求/位置更新请求,GUTI、Token值和使用特定网络的信息,eKSI是附着请求/位置更 新请求消息中的密钥集标识。
S177.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的第二MME,并向第二MME发送消息,消息中包括附着请求/位置更新请求、GUTI和Token值。
S178.第二MME根据GUTI找到第一MME,并向第一MME发起请求消息,该请求消息可以是身份请求消息/上下文请求消息或者包含身份请求消息/上下文请求消息,该请求消息中包含附着请求/位置更新请求、GUTI和Token值。
S179.第一MME接收到请求消息后,根据GUTI和eKSI找到对应的安全上下文并利用该安全上下文验证请求消息中的Token值,具体验证方法是:第一MME根据安全上下文计算出Token值,然后和请求消息中Token值比较,如果一致,则认为验证成功。如果验证成功,第一MME根据GUTI找到对应的鉴权数据。
S1710.第一MME将UE相关的鉴权数据发给第二MME,该鉴权数据包含鉴权向量和安全上下文。
S1711.如果第二MME的算法优先级列表与第三MME的算法优先级不同,那么第二MME可以重新为UE选择新的算法,根据新算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含选择的新完整性算法标识和新加密算法标识。
S1712.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
针对该实施例,可进一步扩展以下六个方面:
第一:第S175步中第一MME分配GUTI并计算Token值后,还可以重构附着请求/位置更新请求,包括用分配的GUTI替换附着请求/位置更新请求中的IMSI/GUTI,用鉴权后生成的新的安全上下文的eKSI替换附着请求/位置更新请求中的eKSI,用计算的Token替换/填充附着请求/位置更新请求中的MAC值。这样第S176步中不需要携带GUTI、eKSI和Token值,第S177步 中不需要携带GUTI、eKSI和Token值,第S178步中不需要携带GUTI、eKSI和Token值,而是携带重构的附着请求/位置更新请求。
或者,第S175步中第一MME分配GUTI并计算Token值后,还可以重构附着请求/位置更新请求,包括用计算的Token替换/填充附着请求/位置更新请求中的MAC值。这样第S176步中不需要携带Token值,第S177步中不需要携带Token值,第S178步中不需要携带Token值,而是携带重构的附着请求/位置更新请求。
第二:可选的,第S176、S177、S178步中可以携带KSI。
第三:可选的,Token值可以是根据安全上下文计算的完整性校验码MAC(NAS COUNT值可以算是全0或者是一个预先设定的值),也可以是通过哈希函数Hash计算出的校验值(输入参数可以是消息,或者消息和NAS层完整性密钥,或者消息、NAS层完整性密钥和NAS COUNT值),或者是MME为UE分配的签名。上述消息可以是附着请求/位置更新请求,或附着请求/位置更新请求和GUTI,或附着请求/位置更新请求、GUTI和eKSI。第一MME通过哈希函数Hash计算出Token,然后和身份请求/上下文请求消息中Token值比较,如果一致,则认为验证成功;或者,第一MME将身份请求/上下文请求消息中Token值和计算的/分配的/保存的Token(签名或随机数)比较,如果一致,则认为验证成功。第一MME可以识别身份请求/上下文请求中的附着请求/位置更新请求是重路由的(根据Token或者根据Token和eKSI),那么第一MME可以接受附着请求/位置更新请求中的序列号与当前保存的NAS COUNT的序列号一样的附着请求/位置更新请求,验证通过后,第一MME保存的NASCOUNT不变并将鉴权数据返回给第二MME。
第四:第S178步中,当请求消息就是身份请求消息/上下文请求消息时,GUTI、eKSI和Token包含在身份请求/上下文请求消息内。当请求消息包含身份请求消息/上下文请求消息时,GUTI、eKSI和Token也可以在身份请求/上下文请求消息之外,和身份请求/上下文请求消息一起发送给第一MME,即第二MME向第一MMME发起请求消息,该请求消息最终包含身份请求/ 上下文请求消息,GUTI、eKSI和Token值。身份请求/上下文请求中包含附着请求/位置更新请求。
第五:第S1711步和第S1712步NAS安全模式命令过程是可选的,只有第二MME为UE选择了新的完整性算法和加密算法时才发起此过程。
第六:使用特定网络的信息用来指示该附着请求需要重路由到特定网络,使用特定网络的信息可以是核心网类型。
本发明实施例八:
本实施例针对在NAS消息重路由之前,New MME(第一MME)从old MME(第三MME)获取了安全上下文,后续specific MME(第二MME)向old MME(第三MME)索要安全上下文的场景,
具体流程如图18所示,包括步骤:
S181.UE向eNB发起附着请求/位置更新请求;
S182.eNB将附着请求/位置更新请求转发给第一MME;
S183.第一MME没有可用的安全上下文,第一MME向第三MME发送身份请求/上下文请求。
S184.第三MME验证成功后,如果该附着请求需要重路由到特定网络,那么第三MME为UE计算或分配一个Token。
S185.第三MME向第一MME发送身份响应消息,消息中包含安全上下文,使用特定网络的信息、eKSI和Token。上述使用特定网络的信息、eKSI和Token也可以在身份响应消息之外和身份响应消息一起发送给第一MME。
S186.新MME向eNB发送重路由命令,该命令中包括附着请求/位置更新请求、eKSI、Token值和使用特定网络的信息。
S187.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的第二MME,并向第二MME发送消息,消息中包括附着请求/位置更新请求、eKSI和Token值。
S188.第二MME根据附着请求/位置更新请求中的GUTI找到第三MME,并向第三MME发起请求消息,该请求消息可以是身份请求/上下文请求消息 或者包含身份请求消息/上下文请求消息,该请求消息中包含附着请求/位置更新请求、eKSI和Token值。
S189.第三MME接收到请求消息后,根据GUTI和eKSI找到对应的安全上下文并利用该安全上下文验证请求消息中的Token值,具体验证方法是,第三MME根据安全上下文计算出Token值,然后和请求消息中Token值比较,如果一致,则认为验证成功。如果验证成功,第三MME根据GUTI找到对应的鉴权数据。
S1810.第三MME将UE相关的鉴权数据发给第二MME,该鉴权数据包含鉴权向量和安全上下文。
S1811.如果第二MME的算法优先级列表与第三MME的算法优先级不同,那么第二MME可以重新为UE选择新的算法,根据新算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含选择的新完整性算法标识和新加密算法标识。
S1812.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
针对该实施例,可进一步扩展以下五个方面:
第一:可选的,第S186、S187、S188步中不携带eKSI,第三MME使用附着请求/位置更新请求中的eKSI。
第二:可选的,Token值可以是根据安全上下文计算的完整性校验码MAC(NAS COUNT值可以算是全0或者是一个预先设定的值),也可以是通过哈希函数Hash计算出的校验值(输入参数可以是消息,或者消息和NAS层完整性密钥,或者消息、NAS层完整性密钥和NAS COUNT值),或者是第一MME为UE分配的签名。上述消息可以是附着请求/位置更新请求,或附着请求/位置更新请求和GUTI,或附着请求/位置更新请求、GUTI和eKSI。第三MME通过哈希函数Hash计算出Token,然后和身份请求/上下文请求消息中Token值比较,如果一致,则认为验证成功;或者,第三MME将身份请求/上下文请求消息中Token值和计算的/分配的/保存的Token(签名或随机数) 比较,如果一致,则认为验证成功。第三MME可以识别身份请求/上下文请求中的附着请求/位置更新请求是重路由的(根据Token或者根据Token和eKSI),那么第三MME可以接受附着请求/位置更新请求中的序列号与当前保存的NAS COUNT的序列号一样的附着请求/位置更新请求,验证通过后,第三MME保存的NAS COUNT不变并将鉴权数据返回给第二MME。
第三:第S188步中,当请求消息就是身份请求消息/上下文请求消息时,eKSI和/或Token包含在身份请求/上下文请求消息内。当请求消息包含身份请求消息/上下文请求消息时,eKSI和/或Token也可以在身份请求/上下文请求消息之外,和身份请求/上下文请求消息一起发送给第一MME,即第二MME向第一MMME发起请求消息,该请求消息最终包含身份请求/上下文请求消息,eKSI和/或Token值。身份请求/上下文请求中包含附着请求/位置更新请求。
第四:第S1811步和第S1812步NAS安全模式命令过程是可选的,只有第二MME为UE选择了新的完整性算法和加密算法时才发起此过程。
第五:使用特定网络的信息用来指示该附着请求需要重路由到特定网络,使用特定网络的信息可以是核心网类型。
本实施例中,如果把第二MME看作是第二核心网设备,则相应地,可以把第三MME看作是第一核心网设备。
本发明实施例九:
本实施例针对在NAS消息重路由之前,New MME(第一MME)从old MME(第三MME)获取了安全上下文,后续specific MME(第二MME)向old MME(第三MME)索要安全上下文的场景,具体流程如图19所示,包括步骤:
S191.UE向eNB发起附着请求/位置更新请求;
S192.eNB将附着请求/位置更新请求转发给第一MME;
S193.第一MME没有可用的安全上下文,第一MME向第三MME发送身份请求/上下文请求。
S194.第三MME向第一MME发送身份响应消息,消息中包含安全上下文和使用特定网络的信息。
S195.第一MME向eNB发送重路由命令,该命令中包括附着请求/位置更新请求和使用特定网络的信息。
S196.eNB接收到重路由命令后,根据使用特定网络的信息为UE选择特定网络的MME,并向第二MME发送消息,消息中包括附着请求/位置更新请求和重路由指示。
S197.第二MME根据附着请求/位置更新请求中的GUTI找到第三MME,并向第三MME发起请求消息,该请求消息可以是身份请求/上下文请求消息或者包含身份请求消息/上下文请求消息,该请求消息中包含附着请求/位置更新请求和重路由指示。
S198.第三MME接收到请求消息后,第三MME可以识别请求消息中的附着请求/位置更新请求是重路由的(根据重路由指示),那么第三MME可以接受附着请求/位置更新请求中的序列号与当前保存的NAS COUNT的序列号一样的附着请求/位置更新请求,第三MME根据GUTI和eKSI找到对应的安全上下文并利用该安全上下文验证请求消息中的Token值,具体验证方法是,第三MME根据安全上下文计算出Token值,然后和身份请求/上下文请求消息中Token值比较,如果一致,则认为验证成功。如果验证成功,第三MME根据GUTI找到对应的鉴权数据。验证通过后,第三MME保存的NAS COUNT不变并将鉴权数据返回给第二MME。此实施例中的Token值即为消息鉴权码MAC。
S199.第三MME将UE相关的鉴权数据发给第二MME,该鉴权数据包含鉴权向量和安全上下文。
S1910.如果第二MME的算法优先级列表与第三MME的算法优先级不同,那么第二MME可以重新为UE选择新的算法,根据新算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,该消息中包含选择的新完整性算法标识和新加密算法标识。
S1911.UE根据NAS安全模式命令中携带的完整性算法标识和加密算法标识推衍新的NAS密钥,并向第二MME发送NAS安全模式完成消息。
针对该实施例,可进一步扩展以下三个方面:
第一:第S197步中,当请求消息就是身份请求消息/上下文请求消息时,重路由指示包含在身份请求/上下文请求消息内。当请求消息包含身份请求消息/上下文请求消息时,重路由指示也可以在身份请求/上下文请求消息之外,和身份请求/上下文请求消息一起发送给第一MME,即第二MME向第一MMME发起请求消息,该请求消息最终包含身份请求/上下文请求消息和重路由指示。身份请求/上下文请求中包含附着请求/位置更新请求。
第二:第S1910步和第S1911步NAS安全模式命令过程是可选的,只有第二MME为UE选择了新的完整性算法和加密算法时才发起此过程。
第三:使用特定网络的信息用来指示该附着请求需要重路由到特定网络,使用特定网络的信息可以是核心网类型。
综上所述,在第一核心网设备侧,参见图20,本发明实施例提供的另一种提供安全上下文的方法,包括步骤:
S2001、第一核心网设备接收用户设备UE发送的非接入层NAS消息;
S2002、当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
较佳地,该方法还包括:
第一核心网设备接收所述第二核心网设备发送的请求消息,所述请求消息中包括UE的标识,第一核心网设备根据所述UE的标识,查找对应的鉴权数据,并将该鉴权数据发送给所述第二核心网设备。
较佳地,在第一核心网设备将该鉴权数据发送给所述第二核心网设备之前,该方法还包括:第一核心网设备验证请求消息中的校验值;
第一核心网将该鉴权数据发送给所述第二核心网设备,具体为:当验证成功时,第一核心网设备将鉴权数据发送给第二核心网设备。
较佳地,所述第一核心网设备验证请求消息中的校验值,具体包括:
当所述请求消息中还包括密钥集标识时,第一核心网设备利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
第一核心网设备通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
第一核心网设备查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
较佳地,在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,该方法还包括:所述第一核心网设备通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,第一核心网设备向接入网设备发送重路由命令之前,该方法还包括:第一核心网设备为所述UE分配标识,并确定校验值;
所述重路由命令中,还包括:所述第一核心网设备为所述UE分配的标识和所述校验值;
或者,所述重路由命令中,还包括:所述第一核心网设备为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
较佳地,所述第一核心网确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还包括:
所述第一核心网设备向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并接收第三核心网设备回复的响应消息,其中包括所述UE的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
所述第一核心网设备通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要重路由到所述特定网络中的第二核心网设备;
所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
相应地,参见图21,在第二核心网设备侧,本发明实施例提供的另一种获取安全上下文的方法,包括步骤:
S2101、第二核心网设备接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
S2102、第二核心网设备根据所述特定消息确定第一核心网设备,并向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
其中的第一核心网设备,可以是新的MME,也可以是旧的MME。
S2103、第二核心网设备接收第一核心网设备发送的响应消息,并从中获取所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
较佳地,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
所述特定消息中还包括:校验值,或者校验值和密钥集标识;
所述请求消息中还包括:校验值,或者校验值和密钥集标识。
较佳地,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
相应地,参见图22,在第三核心网设备侧,本发明实施例提供的另一种提供安全上下文的方法,包括步骤:
S2201、第三核心网设备接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;
S2202、当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第三核心网设备向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息。
较佳地,当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还包括:
第三核心网设备确定该UE的校验值;
所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
较佳地,该方法还包括:
第三核心网设备接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
第三核心网设备根据所述UE的标识找到对应的鉴权数据,向所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
较佳地,在第三核心网设备向所述第二核心网设备发送响应消息之前,该方法还包括:第三核心网设备验证所述请求消息中的校验值;
第三核心网设备向所述第二核心网设备发送响应消息,具体为:当验证成功时,第三核心网设备向所述第二核心网设备发送响应消息。
较佳地,所述第三核心网设备验证所述请求消息中的校验值,具体包括:
当所述请求消息中还包括密钥集标识时,所述第三核心网设备利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
所述第三核心网设备通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
所述第三核心网设备查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
较佳地,该方法还包括:
第三核心网设备接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
第三核心网设备通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;
第三核心网设备根据该NAS消息中的UE的标识和密钥集标识找到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,第三核心网设备根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据返回给第二核心网设备。
参见图23,在第一核心网设备侧,本发明实施例提供的另一种提供安全上下文的设备,包括:
接收NAS消息单元2301,用于接收用户设备UE发送的非接入层NAS消息;
发送重路由命令单元2302,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
较佳地,该设备还包括:
鉴权数据提供单元2303,用于接收所述第二核心网设备发送的请求消息,所述请求消息中包括UE的标识,根据所述UE的标识,查找对应的鉴权数据,并将该鉴权数据发送给所述第二核心网设备。
较佳地,所述鉴权数据提供单元将该鉴权数据发送给所述第二核心网设备之前,还用于验证请求消息中的校验值;
所述鉴权数据提供单元将该鉴权数据发送给所述第二核心网设备,具体为:当验证成功时,将鉴权数据发送给第二核心网设备。
较佳地,所述鉴权数据提供单元验证请求消息中的校验值时,具体用于:
当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
较佳地,所述发送重路由命令单元在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,向接入网设备发送重路由命令之前,所述发送重路由命令单元还用于:为所述UE分配标识,并确定校验值;
所述重路由命令中,还包括:所述发送重路由命令单元为所述UE分配的标识和所述校验值;
或者,所述重路由命令中,还包括:所述发送重路由命令单元为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
较佳地,所述发送重路由命令单元确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:
向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并接收第三核心网设备回复的响应消息,其中包括所述UE的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要重路由到所述特定网络中的第二核心网设备;
所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
图23所示的设备可以是核心网设备,例如MME。
相应地,参见图24,在第二核心网设备侧,本发明实施例提供的另一种获取安全上下文的设备,包括:
特定消息接收单元2401,用于接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
请求单元2402,用于根据所述特定消息确定第一核心网设备,并向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
获取单元2403,用于接收第一核心网设备发送的响应消息,并从中获取 所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
较佳地,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
所述特定消息中还包括:校验值,或者校验值和密钥集标识;
所述请求消息中还包括:校验值,或者校验值和密钥集标识。
较佳地,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
图24所示的设备可以是核心网设备,例如MME。
参见图25,在第三核心网设备侧,本发明实施例提供的另一种提供安全上下文的设备,包括:
接收请求单元2501,用于接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;
响应单元2502,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息。
较佳地,所述响应单元当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还用于:
确定该UE的校验值;
所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
较佳地,所述接收请求单元还用于:接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
所述响应单元还用于:根据所述UE的标识找到对应的鉴权数据,向所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
较佳地,所述响应单元在向所述第二核心网设备发送响应消息之前,还 用于验证所述请求消息中的校验值;
所述响应单元向所述第二核心网设备发送响应消息,具体为:当验证成功时,所述响应单元向所述第二核心网设备发送响应消息。
较佳地,所述响应单元验证所述请求消息中的校验值时,具体用于:
当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
较佳地,所述接收请求单元还用于:
接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;
根据该NAS消息中的UE的标识和密钥集标识找到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据返回给第二核心网设备。
图25所示的设备可以是核心网设备,例如MME。
本发明实施例提供的另一种提供安全上下文的设备,该设备包括收发机和处理器,其中,
收发机接收用户设备UE发送的非接入层NAS消息;
处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,通过收发机向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
较佳地,收发机还用于接收所述第二核心网设备发送的请求消息,所述 请求消息中包括UE的标识,所述处理器还用于根据所述UE的标识,查找对应的鉴权数据,并通过收发机将该鉴权数据发送给所述第二核心网设备。
较佳地,所述处理器还用于:
在所述收发机将该鉴权数据发送给所述第二核心网设备之前,验证请求消息中的校验值;当验证成功时,通过所述收发机将鉴权数据发送给第二核心网设备。
较佳地,所述处理器验证请求消息中的校验值时,具体用于:
当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
较佳地,所述处理器在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,通过收发机向接入网设备发送重路由命令之前,所述处理器还用于:为所述UE分配标识,并确定校验值;
所述重路由命令中,还包括:所述处理器为所述UE分配的标识和所述校验值;
或者,所述重路由命令中,还包括:所述处理器为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
较佳地,所述处理器确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过收发机向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并通过收发机接收第三核心网设备回复的响应 消息,其中包括所述UE的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要重路由到所述特定网络中的第二核心网设备;
所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
本发明实施例提供的另一种获取安全上下文的设备,该设备包括:收发机和处理器,其中,
收发机接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
处理器根据所述特定消息确定第一核心网设备,并通过收发机向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
收发机接收第一核心网设备发送的响应消息,处理器从中获取所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
较佳地,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
所述特定消息中还包括:校验值,或者校验值和密钥集标识;
所述请求消息中还包括:校验值,或者校验值和密钥集标识。
较佳地,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
本发明实施例提供的另一种提供安全上下文的设备,该设备包括:收发机和处理器,其中,
收发机接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;
处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,通过收发机向所述第一核心网设备发送响应消息,其中包括所述UE的安 全上下文和用于确定所述第二核心网设备的信息。
较佳地,处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还用于:
确定该UE的校验值;
所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
较佳地,所述收发机还用于接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
所述处理器根据所述UE的标识找到对应的鉴权数据,通过所述收发机向所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
较佳地,所述处理器在通过收发机向所述第二核心网设备发送响应消息之前,还用于验证所述请求消息中的校验值;
所述处理器通过收发机向所述第二核心网设备发送响应消息,具体为:当验证成功时,所述处理器通过收发机向所述第二核心网设备发送响应消息。
较佳地,所述处理器验证所述请求消息中的校验值时,具体用于:
当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
较佳地,所述收发机还用于接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
所述处理器还用于通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;根据该NAS消息中的UE的标识和密钥集标识找 到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据通过收发机返回给第二核心网设备。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权 利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (117)

  1. 一种提供安全上下文的方法,其特征在于,该方法包括:
    第一核心网设备接收用户设备UE发送的非接入层NAS消息;
    当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
    第一核心网设备接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,第一核心网设备根据所述UE的标识以及密钥集标识,查找对应的安全上下文,并将该安全上下文发送给所述第二核心网设备。
  2. 根据权利要求1所述的方法,其特征在于,第一核心网设备向接入网设备发送重路由命令之前,该方法还包括:
    第一核心网设备对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
  3. 根据权利要求2所述的方法,其特征在于,第一核心网设备对接收到的来自所述UE的NAS消息进行重构,包括:
    第一核心网设备利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
    第一核心网设备根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
  4. 根据权利要求3所述的方法,其特征在于,将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE,包括:
    将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证码MAC信元IE;或
    将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码 MAC。
  5. 根据权利要求3所述的方法,其特征在于,第一核心网设备对接收到的来自所述UE的NAS消息进行重构,还包括:
    第一核心网设备将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消息中的UE的标识。
  6. 根据权利要求1所述的方法,其特征在于,所述密钥集标识包含在所述上下文请求中;或者,
    所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
  7. 根据权利要求1所述的方法,其特征在于,第一核心网设备确定当前的安全上下文后,将该安全上下文发送给第二核心网设备前,该方法还包括:
    第一核心网设备利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
    则,所述第一核心网设备将该安全上下文发送给第二核心网设备的步骤,是当所述验证成功时执行的。
  8. 根据权利要求7所述的方法,其特征在于,第一核心网设备利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性,包括:
    第一核心网设备验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
    第一核心网设备验证该上下文请求中的完整性保护校验值。
  9. 根据权利要求1所述的方法,其特征在于,所述重路由命令中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  10. 根据权利要求1所述的方法,其特征在于,所述上下文请求中还包括:
    重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  11. 一种获取安全上下文的方法,其特征在于,该方法包括:
    第二核心网设备接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
    第二核心网设备根据所述特定消息确定第一核心网设备,并向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
    第二核心网设备接收第一核心网设备发送的上下文响应,并从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的。
  12. 根据权利要求11所述的方法,其特征在于,所述NAS消息中包含第一核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
  13. 根据权利要求11所述的方法,其特征在于,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
  14. 根据权利要求11所述的方法,其特征在于,所述密钥集标识包含在所述上下文请求中;或者,
    所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
  15. 根据权利要求11至14任一权项所述的方法,其特征在于,第二核心网设备获取的所述UE的安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
  16. 根据权利要求15所述的方法,其特征在于,第二核心网设备获取所述UE的安全上下文后,该方法还包括:
    当第二核心网设备需要选择新的算法时,第二核心网设备利用新的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或完整性保护算法;
    第二核心网设备接收该UE反馈的NAS安全模式完成消息。
  17. 根据权利要求11所述的方法,其特征在于,所述上下文请求中还包括:
    重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  18. 根据权利要求11所述的方法,其特征在于,所述特定消息中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  19. 一种重路由命令的接收处理方法,其特征在于,该方法包括:
    接入网设备接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
    接入网设备根据所述指示信息,确定所述第二核心网设备,并向所述第二核心网设备发送携带所述NAS消息的特定消息。
  20. 根据权利要求19所述的方法,其特征在于,所述特定消息中还包括:
    重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  21. 根据权利要求19或20所述的方法,其特征在于,所述特定消息中还包括:
    第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
  22. 根据权利要求19所述的方法,其特征在于,所述NAS消息是所述第一核心网设备对接收到的UE发送的NAS消息进行重构后的NAS消息。
  23. 根据权利要求19所述的方法,其特征在于,所述重路由命令中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  24. 根据权利要求19所述的方法,其特征在于,所述特定消息中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  25. 一种提供安全上下文的设备,其特征在于,该设备包括:
    接收NAS消息单元,用于接收用户设备UE发送的非接入层NAS消息;
    发送重路由命令单元,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
    安全上下文提供单元,用于接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,根据所述UE的标识以及密钥集标识,查找对应的安全上下文,并将该安全上下文发送给所述第二核心网设备。
  26. 根据权利要求25所述的设备,其特征在于,所述发送重路由命令单元还用于:
    在向接入网设备发送重路由命令之前,对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
  27. 根据权利要求26所述的设备,其特征在于,所述发送重路由命令单元对接收到的来自所述UE的NAS消息进行重构时,具体用于:
    利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
    根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
  28. 根据权利要求27所述的设备,其特征在于,所述发送重路由命令单元将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE时,具体用于:
    将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证码MAC信元IE;或
    将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码MAC。
  29. 根据权利要求27所述的设备,其特征在于,所述发送重路由命令单元,还用于:
    将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消 息中的UE的标识。
  30. 根据权利要求25所述的设备,其特征在于,所述密钥集标识包含在所述上下文请求中;或者,
    所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
  31. 根据权利要求25所述的设备,其特征在于,所述安全上下文提供单元还用于:
    在确定当前的安全上下文后,将该安全上下文发送给第二核心网设备前,利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
    则,当所述验证成功时,所述安全上下文将该安全上下文发送给第二核心网设备。
  32. 根据权利要求31所述的设备,其特征在于,所述安全上下文提供单元利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性时,具体用于:
    验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
    验证该上下文请求中的完整性保护校验值。
  33. 根据权利要求25所述的设备,其特征在于,所述重路由命令中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  34. 根据权利要求25所述的设备,其特征在于,所述上下文请求中还包括:
    重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  35. 一种获取安全上下文的设备,其特征在于,该设备包括:
    特定消息接收单元,用于接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
    上下文请求单元,用于根据所述特定消息确定第一核心网设备,并向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
    上下文获取单元,用于接收第一核心网设备发送的上下文响应,并从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识以及密钥集标识确定的。
  36. 根据权利要求35所述的设备,其特征在于,所述NAS消息中包含第一核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
  37. 根据权利要求35所述的设备,其特征在于,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
  38. 根据权利要求35所述的设备,其特征在于,所述密钥集标识包含在所述上下文请求中;或者,
    所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
  39. 根据权利要求35至38任一权项所述的设备,其特征在于,所述安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
  40. 根据权利要求39所述的设备,其特征在于,所述上下文获取单元获取所述UE的安全上下文后,还用于:
    当需要选择新的算法时,利用新的算法推衍新的NAS密钥,并向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或完整性保护算法;
    接收该UE反馈的NAS安全模式完成消息。
  41. 根据权利要求35所述的设备,其特征在于,所述上下文请求中还包括:
    重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  42. 根据权利要求35所述的设备,其特征在于,所述特定消息中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  43. 一种重路由命令的接收处理设备,其特征在于,该设备包括:
    重路由命令接收单元,用于接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
    特定消息发送单元,用于根据所述指示信息,确定所述第二核心网设备,并向所述第二核心网设备发送携带所述NAS消息的特定消息。
  44. 根据权利要求43所述的设备,其特征在于,所述特定消息中还包括:
    重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  45. 根据权利要求43或44所述的设备,其特征在于,所述特定消息中还包括:
    第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
  46. 根据权利要求43所述的设备,其特征在于,所述NAS消息是所述第一核心网设备对接收到的UE发送的NAS消息进行重构后的NAS消息。
  47. 根据权利要求43所述的设备,其特征在于,所述重路由命令中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  48. 根据权利要求43所述的设备,其特征在于,所述特定消息中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  49. 一种提供安全上下文的设备,其特征在于,该设备包括处理器和收发机,其中,
    收发机接收用户设备UE发送的非接入层NAS消息;
    当处理器确定所述NAS消息需要重路由到特定网络中的第二核心网设备 时,通过收发机向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息;
    收发机接收所述第二核心网设备发送的上下文请求,所述上下文请求中包括UE的标识以及密钥集标识,处理器根据所述UE的标识以及密钥集标识,查找对应的安全上下文,收发机将该安全上下文发送给所述第二核心网设备。
  50. 根据权利要求49所述的设备,其特征在于,收发机在向接入网设备发送重路由命令之前,处理器还用于对接收到的NAS消息进行重构,所述重路由命令中包含的NAS消息,为重构的NAS消息。
  51. 根据权利要求50所述的设备,其特征在于,处理器对接收到的NAS消息进行重构时,具体用于:
    利用当前安全上下文中的密钥集标识,替换该UE发送的NAS消息中的密钥集标识;和/或,
    根据当前安全上下文计算完整性保护校验值,并将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE。
  52. 根据权利要求51所述的设备,其特征在于,处理器将所述完整性保护校验值作为所述UE发送的NAS消息中的消息认证码MAC信元IE时,具体用于:
    将所述完整性保护校验值填充到所述UE发送的NAS消息中的消息认证码MAC信元IE;或
    将所述完整性保护校验值替换所述UE发送的NAS消息中的消息认证码MAC。
  53. 根据权利要求51所述的设备,其特征在于,处理器对接收到的NAS消息进行重构时,还用于:
    将第一核心网设备为所述UE分配的标识替换从该UE接收到的NAS消息中的UE的标识。
  54. 根据权利要求49所述的设备,其特征在于,所述密钥集标识包含在所述上下文请求中;或者,
    所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
  55. 根据权利要求49所述的设备,其特征在于,处理器确定当前的安全上下文后,收发机将该安全上下文发送给第二核心网设备前,处理器还用于:
    利用当前的安全上下文验证该上下文请求中携带的NAS消息的完整性;
    则,当所述验证成功时,收发机将该安全上下文发送给第二核心网设备。
  56. 根据权利要求55所述的设备,其特征在于,处理器利用当前与该UE共享的安全上下文验证该上下文请求中携带的NAS消息的完整性时,具体用于:
    验证该上下文请求中携带的NAS消息中的完整性保护校验值或者消息认证码MAC值;或者
    验证该上下文请求中的完整性保护校验值。
  57. 根据权利要求49所述的设备,其特征在于,所述重路由命令中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  58. 根据权利要求49所述的设备,其特征在于,所述上下文请求中还包括:
    重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  59. 一种获取安全上下文的设备,其特征在于,该设备包括收发机和处理器,其中:
    收发机接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
    处理器根据所述特定消息确定第一核心网设备,收发机向第一核心网设备发送上下文请求,所述上下文请求中包括UE的标识以及密钥集标识;
    收发机接收第一核心网设备发送的上下文响应,处理器从中获取安全上下文,该安全上下文是第一核心网设备根据所述上下文请求中所述UE的标识 以及密钥集标识确定的。
  60. 根据权利要求59所述的设备,其特征在于,所述NAS消息中包含第一核心网设备为所述UE分配的标识,第二核心网设备根据该标识确定第一核心网设备。
  61. 根据权利要求59所述的设备,其特征在于,所述特定消息中还包括第一核心网设备的标识信息,第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
  62. 根据权利要求59所述的设备,其特征在于,所述密钥集标识包含在所述上下文请求中;或者,
    所述密钥集标识包含在NAS消息中,该NAS消息包含在所述上下文请求。
  63. 根据权利要求59至62任一权项所述的设备,其特征在于,所述安全上下文中,包含第一核心网设备保护NAS消息所使用的加密算法和完整性保护算法。
  64. 根据权利要求63所述的设备,其特征在于,所述处理器获取所述UE的安全上下文后,还用于:当需要选择新的算法时,利用新的算法推衍新的NAS密钥,并通过收发机向UE发送NAS安全模式命令消息,其中包含新的算法的标识;其中,所述新的算法包括加密算法和/或完整性保护算法;
    收发机接收该UE反馈的NAS安全模式完成消息。
  65. 根据权利要求59所述的设备,其特征在于,所述上下文请求中还包括:
    重路由指示和/或完整性保护校验值,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  66. 根据权利要求59所述的设备,其特征在于,所述特定消息中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  67. 一种重路由命令的接收处理设备,其特征在于,该设备包括收发机和处理器,其中:
    收发机接收第一核心网设备发送的重路由命令,其中包含非接入层NAS消息和用于确定第二核心网设备的指示信息;
    处理器根据所述指示信息,确定所述第二核心网设备,并通过收发机向所述第二核心网设备发送携带所述NAS消息的特定消息。
  68. 根据权利要求67所述的设备,其特征在于,所述特定消息中还包括:
    重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的。
  69. 根据权利要求67或68所述的设备,其特征在于,所述特定消息中还包括:
    第一核心网设备的标识信息,所述第二核心网设备根据该第一核心网设备的标识信息确定第一核心网设备。
  70. 根据权利要求67所述的设备,其特征在于,所述NAS消息是所述第一核心网设备对接收到的UE发送的NAS消息进行重构后的NAS消息。
  71. 根据权利要求67所述的设备,其特征在于,所述重路由命令中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  72. 根据权利要求67所述的设备,其特征在于,所述特定消息中还包括:
    密钥集标识和/或完整性保护校验值和/或UE的标识。
  73. 一种提供安全上下文的方法,其特征在于,该方法包括:
    第一核心网设备接收用户设备UE发送的非接入层NAS消息;
    当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第一核心网设备向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
  74. 根据权利要求73所述的方法,其特征在于,该方法还包括:
    第一核心网设备接收所述第二核心网设备发送的请求消息,所述请求消息中包括UE的标识,第一核心网设备根据所述UE的标识,查找对应的鉴权数据,并将该鉴权数据发送给所述第二核心网设备。
  75. 根据权利要求74所述的方法,其特征在于,在第一核心网设备将该鉴权数据发送给所述第二核心网设备之前,该方法还包括:第一核心网设备验证请求消息中的校验值;
    第一核心网将该鉴权数据发送给所述第二核心网设备,具体为:当验证成功时,第一核心网设备将鉴权数据发送给第二核心网设备。
  76. 根据权利要求75所述的方法,其特征在于,所述第一核心网设备验证请求消息中的校验值,具体包括:
    当所述请求消息中还包括密钥集标识时,第一核心网设备利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
    第一核心网设备通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
    第一核心网设备查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
  77. 根据权利要求73所述的方法,其特征在于,在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,该方法还包括:所述第一核心网设备通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
    在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,第一核心网设备向接入网设备发送重路由命令之前,该方法还包括:第一核心网设备为所述UE分配标识,并确定校验值;
    所述重路由命令中,还包括:所述第一核心网设备为所述UE分配的标识和所述校验值;
    或者,所述重路由命令中,还包括:所述第一核心网设备为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
  78. 根据权利要求73所述的方法,其特征在于,所述第一核心网确定所 述NAS消息需要重路由到特定网络中的第二核心网设备之前,还包括:
    所述第一核心网设备向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并接收第三核心网设备回复的响应消息,其中包括所述UE的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
    所述第一核心网设备通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要重路由到所述特定网络中的第二核心网设备;
    所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
  79. 一种获取安全上下文的方法,其特征在于,该方法包括:
    第二核心网设备接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
    第二核心网设备根据所述特定消息确定第一核心网设备,并向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
    第二核心网设备接收第一核心网设备发送的响应消息,并从中获取所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
  80. 根据权利要求79所述的方法,其特征在于,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
    所述特定消息中还包括:校验值,或者校验值和密钥集标识;
    所述请求消息中还包括:校验值,或者校验值和密钥集标识。
  81. 根据权利要求79所述的方法,其特征在于,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
    所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
  82. 一种提供安全上下文的方法,其特征在于,该方法包括:
    第三核心网设备接收第一核心网设备发送的请求消息,其中包括用户设 备UE的非接入层NAS消息;
    当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,第三核心网设备向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息。
  83. 根据权利要求82所述的方法,其特征在于,当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还包括:
    第三核心网设备确定该UE的校验值;
    所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
  84. 根据权利要求83所述的方法,其特征在于,该方法还包括:
    第三核心网设备接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
    第三核心网设备根据所述UE的标识找到对应的鉴权数据,向所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
  85. 根据权利要求84所述的方法,其特征在于,在第三核心网设备向所述第二核心网设备发送响应消息之前,该方法还包括:第三核心网设备验证所述请求消息中的校验值;
    第三核心网设备向所述第二核心网设备发送响应消息,具体为:当验证成功时,第三核心网设备向所述第二核心网设备发送响应消息。
  86. 根据权利要求85所述的方法,其特征在于,所述第三核心网设备验证所述请求消息中的校验值,具体包括:
    当所述请求消息中还包括密钥集标识时,所述第三核心网设备利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
    所述第三核心网设备通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
    所述第三核心网设备查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
  87. 根据权利要求82所述的方法,其特征在于,该方法还包括:
    第三核心网设备接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
    第三核心网设备通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;
    第三核心网设备根据该NAS消息中的UE的标识和密钥集标识找到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,第三核心网设备根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据返回给第二核心网设备。
  88. 一种提供安全上下文的设备,其特征在于,该设备包括:
    接收NAS消息单元,用于接收用户设备UE发送的非接入层NAS消息;
    发送重路由命令单元,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
  89. 根据权利要求88所述的设备,其特征在于,该设备还包括:
    鉴权数据提供单元,用于接收所述第二核心网设备发送的请求消息,所述请求消息中包括UE的标识,根据所述UE的标识,查找对应的鉴权数据,并将该鉴权数据发送给所述第二核心网设备。
  90. 根据权利要求89所述的设备,其特征在于,所述鉴权数据提供单元将该鉴权数据发送给所述第二核心网设备之前,还用于验证请求消息中的校验值;
    所述鉴权数据提供单元将该鉴权数据发送给所述第二核心网设备,具体为:当验证成功时,将鉴权数据发送给第二核心网设备。
  91. 根据权利要求90所述的设备,其特征在于,所述鉴权数据提供单元 验证请求消息中的校验值时,具体用于:
    当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
    通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
    查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
  92. 根据权利要求88所述的设备,其特征在于,所述发送重路由命令单元在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
    在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,向接入网设备发送重路由命令之前,所述发送重路由命令单元还用于:为所述UE分配标识,并确定校验值;
    所述重路由命令中,还包括:所述发送重路由命令单元为所述UE分配的标识和所述校验值;
    或者,所述重路由命令中,还包括:所述发送重路由命令单元为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
  93. 根据权利要求88所述的设备,其特征在于,所述发送重路由命令单元确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:
    向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并接收第三核心网设备回复的响应消息,其中包括所述UE的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
    通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要 重路由到所述特定网络中的第二核心网设备;
    所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
  94. 一种获取安全上下文的设备,其特征在于,该设备包括:
    特定消息接收单元,用于接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
    请求单元,用于根据所述特定消息确定第一核心网设备,并向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
    获取单元,用于接收第一核心网设备发送的响应消息,并从中获取所述UE的鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
  95. 根据权利要求94所述的设备,其特征在于,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
    所述特定消息中还包括:校验值,或者校验值和密钥集标识;
    所述请求消息中还包括:校验值,或者校验值和密钥集标识。
  96. 根据权利要求94所述的设备,其特征在于,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
    所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
  97. 一种提供安全上下文的设备,其特征在于,该设备包括:
    接收请求单元,用于接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;
    响应单元,用于当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息。
  98. 根据权利要求97所述的设备,其特征在于,所述响应单元当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还用于:
    确定该UE的校验值;
    所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
  99. 根据权利要求98所述的设备,其特征在于,所述接收请求单元还用于:接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
    所述响应单元还用于:根据所述UE的标识找到对应的鉴权数据,向所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
  100. 根据权利要求99所述的设备,其特征在于,所述响应单元在向所述第二核心网设备发送响应消息之前,还用于验证所述请求消息中的校验值;
    所述响应单元向所述第二核心网设备发送响应消息,具体为:当验证成功时,所述响应单元向所述第二核心网设备发送响应消息。
  101. 根据权利要求100所述的设备,其特征在于,所述响应单元验证所述请求消息中的校验值时,具体用于:
    当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
    通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
    查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
  102. 根据权利要求97所述的设备,其特征在于,所述接收请求单元还用于:
    接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
    通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;
    根据该NAS消息中的UE的标识和密钥集标识找到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据返回给第二核心网设备。
  103. 一种提供安全上下文的设备,其特征在于,该设备包括收发机和处理器,其中,
    收发机接收用户设备UE发送的非接入层NAS消息;
    处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,通过收发机向接入网设备发送重路由命令,所述重路由命令中包含NAS消息和用于确定所述第二核心网设备的信息。
  104. 根据权利要求103所述的设备,其特征在于,收发机还用于接收所述第二核心网设备发送的请求消息,所述请求消息中包括UE的标识,所述处理器还用于根据所述UE的标识,查找对应的鉴权数据,并通过收发机将该鉴权数据发送给所述第二核心网设备。
  105. 根据权利要求104所述的设备,其特征在于,所述处理器还用于:
    在所述收发机将该鉴权数据发送给所述第二核心网设备之前,验证请求消息中的校验值;当验证成功时,通过所述收发机将鉴权数据发送给第二核心网设备。
  106. 根据权利要求105所述的设备,其特征在于,所述处理器验证请求消息中的校验值时,具体用于:
    当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
    通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
    查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
  107. 根据权利要求103所述的设备,其特征在于,所述处理器在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过与所述UE之间的鉴权过程,或者从第三核心网设备获取所述UE的安全上下文;
    在确定所述NAS消息需要重路由到特定网络中的第二核心网设备之后,通过收发机向接入网设备发送重路由命令之前,所述处理器还用于:为所述UE分配标识,并确定校验值;
    所述重路由命令中,还包括:所述处理器为所述UE分配的标识和所述校验值;
    或者,所述重路由命令中,还包括:所述处理器为所述UE分配的标识、所述校验值、以及该UE的安全上下文的密钥集标识。
  108. 根据权利要求103所述的设备,其特征在于,所述处理器确定所述NAS消息需要重路由到特定网络中的第二核心网设备之前,还用于:通过收发机向第三核心网设备发送请求消息,请求消息中包含所述NAS消息,并通过收发机接收第三核心网设备回复的响应消息,其中包括所述UE的安全上下文、校验值以及用于确定所述第二核心网设备的信息;其中,所述校验值是所述第三核心网设备确定的;
    通过所述用于确定所述第二核心网设备的信息,确定所述NAS消息需要重路由到所述特定网络中的第二核心网设备;
    所述重路由命令中还包括:所述校验值,或者所述校验值和密钥集标识。
  109. 一种获取安全上下文的设备,其特征在于,该设备包括:收发机和处理器,其中,
    收发机接收接入网设备发送的特定消息,该特定消息中包括非接入层NAS消息;
    处理器根据所述特定消息确定第一核心网设备,并通过收发机向第一核心网设备发送请求消息,所述请求消息中包括UE的标识;
    收发机接收第一核心网设备发送的响应消息,处理器从中获取所述UE的 鉴权数据,该鉴权数据中包括所述UE的安全上下文,该鉴权数据是所述第一核心网设备根据所述UE的标识确定的。
  110. 根据权利要求109所述的设备,其特征在于,所述UE的标识,为所述第一核心网设备为所述UE分配的标识;
    所述特定消息中还包括:校验值,或者校验值和密钥集标识;
    所述请求消息中还包括:校验值,或者校验值和密钥集标识。
  111. 根据权利要求109所述的设备,其特征在于,所述特定消息中还包括:重路由指示,所述重路由指示用于指示所述NAS消息是重路由到第二核心网设备的;
    所述请求消息中包括所述NAS消息,所述NAS消息中包括所述UE的标识,并且,所述请求消息中还包括所述重路由指示。
  112. 一种提供安全上下文的设备,其特征在于,该设备包括:收发机和处理器,其中,
    收发机接收第一核心网设备发送的请求消息,其中包括用户设备UE的非接入层NAS消息;
    处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,通过收发机向所述第一核心网设备发送响应消息,其中包括所述UE的安全上下文和用于确定所述第二核心网设备的信息。
  113. 根据权利要求112所述的设备,其特征在于,处理器当确定所述NAS消息需要重路由到特定网络中的第二核心网设备时,还用于:
    确定该UE的校验值;
    所述响应消息中还包括:所述校验值,或者所述校验值和所述UE的安全上下文对应的密钥集标识。
  114. 根据权利要求113所述的设备,其特征在于,所述收发机还用于接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息、校验值和密钥集标识;
    所述处理器根据所述UE的标识找到对应的鉴权数据,通过所述收发机向 所述第二核心网设备发送响应消息,其中包括该UE的鉴权数据。
  115. 根据权利要求114所述的设备,其特征在于,所述处理器在通过收发机向所述第二核心网设备发送响应消息之前,还用于验证所述请求消息中的校验值;
    所述处理器通过收发机向所述第二核心网设备发送响应消息,具体为:当验证成功时,所述处理器通过收发机向所述第二核心网设备发送响应消息。
  116. 根据权利要求115所述的设备,其特征在于,所述处理器验证所述请求消息中的校验值时,具体用于:
    当所述请求消息中还包括密钥集标识时,利用所述UE的标识和所述密钥集标识确定对应的安全上下文,并利用所述安全上下文计算校验值,如果所述计算的校验值和所述请求消息中的校验值一致,则确定验证成功;或者,
    通过哈希函数计算校验值,如果所述计算的校验值和请求消息中的校验值一致,则确定验证成功;或者,
    查找本地保存的校验值,如果所述保存的校验值和请求消息中的校验值一致,则确定验证成功。
  117. 根据权利要求112所述的设备,其特征在于,所述收发机还用于接收所述第二核心网设备发送的请求消息,其中包括所述NAS消息和重路由指示,所述重路由指示用于指示NAS消息是重路由到第二核心网设备的;
    所述处理器还用于通过所述重路由指示确定该请求消息中的NAS消息是重路由到第二核心网设备的;根据该NAS消息中的UE的标识和密钥集标识找到对应的安全上下文,并利用该安全上下文验证该请求消息中的完整性校验码,当验证成功时,根据所述UE的标识找到对应的鉴权数据,并将该鉴权数据通过收发机返回给第二核心网设备。
PCT/CN2014/089734 2013-10-28 2014-10-28 一种安全上下文的提供、获取方法及设备 WO2015062488A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201480035973.7A CN105340319B (zh) 2013-10-28 2014-10-28 一种安全上下文的提供、获取方法及设备

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/086088 WO2015061951A1 (zh) 2013-10-28 2013-10-28 一种安全上下文的提供、获取方法及设备
CNPCT/CN2013/086088 2013-10-28

Publications (1)

Publication Number Publication Date
WO2015062488A1 true WO2015062488A1 (zh) 2015-05-07

Family

ID=53003086

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2013/086088 WO2015061951A1 (zh) 2013-10-28 2013-10-28 一种安全上下文的提供、获取方法及设备
PCT/CN2014/089734 WO2015062488A1 (zh) 2013-10-28 2014-10-28 一种安全上下文的提供、获取方法及设备

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/086088 WO2015061951A1 (zh) 2013-10-28 2013-10-28 一种安全上下文的提供、获取方法及设备

Country Status (2)

Country Link
CN (1) CN105532026A (zh)
WO (2) WO2015061951A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108156645A (zh) * 2016-12-06 2018-06-12 中国移动通信有限公司研究院 接入处理方法、基站及移动通信终端
CN108924826B (zh) * 2017-03-24 2023-04-14 北京三星通信技术研究有限公司 数据传送的控制方法及设备
CN108738015B (zh) * 2017-04-25 2021-04-09 华为技术有限公司 网络安全保护方法、设备及系统
CN110225517B (zh) * 2018-04-08 2020-07-14 华为技术有限公司 一种信息发送方法、装置、系统以及计算机可读存储介质
JP7172126B2 (ja) * 2018-05-14 2022-11-16 オムロン株式会社 モータ制御装置
CN110536298B (zh) * 2018-08-10 2023-11-03 中兴通讯股份有限公司 非接入层消息安全指示方法、装置、amf设备、终端及介质
EP3857935A4 (en) * 2018-09-24 2023-01-04 Nokia Technologies Oy NAS MESSAGE SECURITY PROTECTION SYSTEMS AND METHOD
CN112087297B (zh) * 2019-06-14 2022-05-24 华为技术有限公司 一种获取安全上下文的方法、系统及设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101500270A (zh) * 2008-02-02 2009-08-05 华为技术有限公司 一种负荷均衡的方法和装置
CN102348201A (zh) * 2010-08-05 2012-02-08 华为技术有限公司 获取安全上下文的方法和装置
CN103002521A (zh) * 2011-09-08 2013-03-27 华为技术有限公司 传递上下文的方法及移动性管理实体

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114927A (zh) * 2006-07-24 2008-01-30 华为技术有限公司 一种实现负载均衡的系统及方法
CN101594608B (zh) * 2008-05-30 2012-08-22 华为技术有限公司 提供安全上下文的方法、移动性管理网元及移动通信系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101500270A (zh) * 2008-02-02 2009-08-05 华为技术有限公司 一种负荷均衡的方法和装置
CN102348201A (zh) * 2010-08-05 2012-02-08 华为技术有限公司 获取安全上下文的方法和装置
CN103002521A (zh) * 2011-09-08 2013-03-27 华为技术有限公司 传递上下文的方法及移动性管理实体

Also Published As

Publication number Publication date
CN105532026A (zh) 2016-04-27
WO2015061951A1 (zh) 2015-05-07

Similar Documents

Publication Publication Date Title
WO2015062488A1 (zh) 一种安全上下文的提供、获取方法及设备
CN108848502B (zh) 一种利用5g-aka对supi进行保护的方法
CN111669276B (zh) 一种网络验证方法、装置及系统
CN106465106B (zh) 用于从无线电接入网络提供安全性的方法和系统
WO2018019046A1 (zh) 密钥的衍生方法及装置
US8812848B2 (en) Method, system and device for negotiating security capability when terminal moves
JP7400865B2 (ja) 通信端末、及び通信端末の方法
ES2548868T3 (es) Métodos y aparatos para generar una clave de estación base de radio y un autentificador de identidad de terminal en un sistema de radio celular
WO2016201733A1 (zh) 安全验证方法、安全验证装置和安全验证系统
US20180034635A1 (en) GPRS System Key Enhancement Method, SGSN Device, UE, HLR/HSS, and GPRS System
TW201208329A (en) Methods and apparatuses facilitating synchronization of security configurations
KR20150111687A (ko) 통신 시스템에서 인증 방법 및 장치
CN102685730B (zh) 一种ue上下文信息发送方法及mme
JPWO2018079692A1 (ja) システム、基地局、コアネットワークノード、及び方法
WO2015055807A1 (en) Method and network node device for controlling the run of technology specific push-button configuration sessions within a heterogeneous or homogeneous wireless network and heterogeneous or homogeneous wireless network
BR102020010985A2 (pt) Método, dispositivo e sistema para conexão segura em redes de comunicações sem fio, mídia de armazenamento digital não transitório
CN102892114B (zh) 一种设备合法性检验的方法及装置
TWI685267B (zh) 一種接入控制的方法及設備
CN105340319B (zh) 一种安全上下文的提供、获取方法及设备
WO2011150808A1 (zh) 获取安全上下文的方法和装置
CN116669032A (zh) 一种城域物联网系统及其安全认证方法、装置、存储介质
US11943612B2 (en) Method and network server for authenticating a communication apparatus
WO2022078058A1 (zh) 解密方法、服务器及存储介质
CN102905267B (zh) Me标识鉴权、安全模式控制方法及装置
US20180131676A1 (en) Code encryption

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480035973.7

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14856876

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

Country of ref document: EP

Kind code of ref document: A1