WO2023072271A1 - Method and apparatus for managing security context - Google Patents

Method and apparatus for managing security context Download PDF

Info

Publication number
WO2023072271A1
WO2023072271A1 PCT/CN2022/128421 CN2022128421W WO2023072271A1 WO 2023072271 A1 WO2023072271 A1 WO 2023072271A1 CN 2022128421 W CN2022128421 W CN 2022128421W WO 2023072271 A1 WO2023072271 A1 WO 2023072271A1
Authority
WO
WIPO (PCT)
Prior art keywords
security context
network element
context
mobility management
management network
Prior art date
Application number
PCT/CN2022/128421
Other languages
French (fr)
Chinese (zh)
Inventor
杨林平
胡文
强鹂
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023072271A1 publication Critical patent/WO2023072271A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/043Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
    • H04W12/0433Key management protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security

Definitions

  • the present application relates to the field of communication technologies, and in particular to a method and device for managing a security context.
  • the access and mobility management function is mainly used for UE registration, connection, mobility management, subscription information authentication, etc.
  • the user equipment UE moves from the area of one AMF (marked as the source AMF) to the area of another AMF (marked as the target AMF) (this refers to the location change of the UE in the idle state)
  • the UE needs to register through the network registration process onto the target AMF.
  • the network registration process of the UE fails due to some reasons at this time, it may cause inconsistency between the security contexts of the UE and the source AMF on the network side.
  • the registration request of the UE cannot pass the integrity protection check of the NAS, so that the session information of the session established by the UE through the source AMF cannot be migrated to the target AMF, which may cause the previously established PDU session to be deleted. freed.
  • the present application provides a method and device for managing a complete context, which can avoid the problem of inconsistency between the security context of the UE and the network side.
  • a method for managing a security context comprising: a terminal device sends a registration request message to a target mobility management network element, where the registration request message includes an identifier of the terminal device; the terminal device receives a message from the target mobile
  • the NAS security mode command message of the management network element, the NAS security mode command message includes horizontal derivation indication information; according to the horizontal derivation indication information, the terminal device generates a new key Kamf according to the first security context Key Kamf'; wherein, the first security context is the current security context of the terminal device; if the registration process is not successfully completed, the terminal device uses the first security context as the current security context.
  • the terminal device in the registration process of the terminal device, if the terminal device performs horizontal key derivation, that is, uses the key Kamf in the first security context to perform horizontal deduction to obtain a new key Kamf', if the registration process is not successful After completion (or failure of the registration process), the terminal device uses the first security context as the current security context, thereby avoiding the problem of inconsistent security contexts between the terminal device and the network side. Therefore, in this case, when the registration process is not successfully completed, the terminal device can use the first security context to initiate the registration process again.
  • the method further includes: after the terminal device generates the new key Kamf', maintaining the first security context and the second security context; wherein, the The second security context includes the Kamf' and a NAS key, and the NAS key is generated according to the Kamf'.
  • the terminal device after the terminal device performs horizontal key derivation, it can maintain the first security context and the second security context at the same time. In this case, regardless of whether the registration is successful or the registration fails, the terminal can select an appropriate security context. In order to avoid inconsistency between the security context on the terminal side and the security context on the network side.
  • maintaining the first security context and the second security context includes: the terminal device continues to use the first security context as the current security context, and saves the second security context. Two security contexts.
  • the terminal device can maintain the first security context as the current security context and save the second security context.
  • the terminal can choose Appropriate security context. For example, if the registration is successful, the terminal device can set the second security context as the current security context; if the registration fails, the terminal device can delete the second security context, and use the first security context for subsequent possible registration processes, so as to avoid terminal side
  • the security context of the network side is inconsistent with the security context of the network side.
  • the terminal device uses the first security context as the current security context, including: the terminal device continues to use the first security context A security context is used as the current security context, and the second security context is deleted.
  • the terminal device performs horizontal key derivation, when the terminal device maintains the first security context as the current security context and saves the second security context, in this case, if the registration fails, the terminal device can continue to use
  • the first security context is used as the current security context, so when the UE fails to register, it is also possible to avoid inconsistency between the security contexts on the terminal side and the network side.
  • maintaining the first security context and the second security context includes: the terminal device saves the first security context, and uses the second security context as the current security context.
  • the terminal device can save the first security context and set the second security context as the current security context.
  • the terminal can choose Appropriate security context. For example, if the registration is successful, the terminal device can maintain the second security context as the current security context and delete the first security context; if the registration fails, the terminal device can set the first security context as the current security context, so that the first security context can be used Performing subsequent possible registration processes can avoid inconsistency between the security context on the terminal side and the security context on the network side.
  • the terminal device uses the first security context as the current security context, including: the terminal device uses the first The security context is set as the current security context, and the second security context is deleted.
  • the terminal device after the terminal device performs horizontal key derivation, when the terminal device sets the second security context as the current security context and saves the first security context, in this case, if the registration fails, the terminal device can save the The first security context of the UE is set as the current security context, so when the UE fails to register, it is also possible to avoid inconsistency between the security contexts on the terminal side and the network side.
  • the method further includes: the terminal device determines that the registration process is not successfully completed.
  • the terminal device can determine or judge whether the registration process fails. If the registration process is not successfully completed (or the registration process fails), the terminal device will set or maintain the first security context as the current security context, so that the first security context can be used.
  • the security context is used to carry out subsequent possible registration processes, so as to avoid the failure of the registration process caused by the inconsistency of the security contexts on the terminal side or the network side in the subsequent registration process.
  • the terminal device determining that the registration process has not been successfully completed includes: the terminal device determines that the NAS security mode completion message fails to be sent before receiving the registration acceptance message; or , the terminal device determines that the link between itself and the access network device is released before receiving the registration acceptance message; the terminal device determines that the RRC connection between itself and the access network device is suspended before receiving the registration acceptance message rise or release.
  • the terminal device before receiving the registration acceptance message, the terminal device can determine whether the registration process is complete according to whether the NAS security mode completion message is successfully sent, or whether the link is released abnormally, or whether the RRC connection is suspended or released, etc. fail. If the registration process is not successfully completed, the terminal device will set or maintain the first security context as the current security context, so that the first security context can be used for subsequent possible registration processes, and the subsequent registration process can be avoided due to the failure of the terminal side or the network side. Cases where the registration process fails due to inconsistent security contexts.
  • a method for managing a security context comprising: a source mobility management network element receives a context request message from a target mobility management network element, and the context request message is used to request to obtain a context of a terminal device; In the case of horizontal key derivation, the source mobility management network element generates a new key Kamf' according to the key Kamf in the first security context; where the first security context is the source mobility management network element and the The current security context between terminal devices; in response to the context request message, the source mobility management network element sends a second security context to the target mobility management network element; wherein the second security context includes the new key Kamf' and a NAS key, where the NAS key is generated according to the Kamf'; the source mobility management network element maintains the first security context and/or the second security context.
  • the source mobility management network element after the source mobility management network element performs horizontal key derivation, it can maintain the first security context and/or the second security context.
  • the first security context may be maintained as the current security context, and the second security context may be deleted.
  • the source mobility management network element always uses the first security context, which can avoid context inconsistency between the network side and the terminal side.
  • the source mobility management network element can use the first security context to perform security verification on subsequent possible registration requests of the terminal device, and this solution can prevent registration failures caused by inconsistencies between the security context on the network side and the terminal side.
  • the second security context is also possible to set the second security context as the current security context and delete the first security context.
  • the source mobility management network element After the source mobility management network element generates the second security context, it sets the second security context as the current security context.
  • the terminal device generates the second security context and then sets the second security context as the current security context, problems caused by inconsistencies between the security contexts of the terminal device and the network side can be avoided.
  • first security context As the current security context and save the second security context; or set the second security context as the current security context and save the first security context.
  • the terminal device uses the first security context or the second security context as the current security context after horizontal deduction, it can ensure that the source mobility management network element side holds the corresponding security context, thereby avoiding network The problem that the security protection verification of the registration request of the terminal device cannot be successfully verified on the side.
  • the method further includes: the source mobility management network The element receives a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, and the registration request message includes the terminal device's identification; the source mobility management network element uses the first security context and the second security context to perform security verification on the registration request message; If the message security verification is successful and horizontal key derivation is required, the source mobility management network element generates a new key Kamf" based on the key in the security context of the successful verification, and sends it to the target mobility management network element A third security context, the third security context includes the new key Kamf".
  • the source mobility management network element when the source mobility management network element maintains the first security context and the second security context, if the source mobility management network element receives a context request message from another target mobility management network element, the source mobility management network element The unit can respectively use the first security context and the second security context to perform security verification on the registration request message carried in the context request message, so as to avoid the problem of verification failure caused by inconsistent security contexts on the terminal side and the network side.
  • the method further includes: the source mobility management network The element receives a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, and the registration request message includes the terminal device's identification; the source mobility management network element uses the first security context and the second security context to perform security verification on the registration request message; If the message security verification is successful and no horizontal key derivation is required, the source mobility management network element sends the security context of successful verification to the target mobility management network element.
  • the source mobility management network element when the source mobility management network element maintains the first security context and the second security context, if the source mobility management network element receives a context request message from another target mobility management network element, the source mobility management network element The unit can respectively use the first security context and the second security context to perform security verification on the registration request message carried in the context request message, so as to avoid the problem of verification failure caused by inconsistent security contexts on the terminal side and the network side.
  • the method further includes: the source mobility management network element receiving registration success indication information from the target mobility management network element, where the registration success indication information is used to indicate that the The terminal device is successfully registered to the network; the source mobility management network element deletes the first security context and/or the second security context.
  • the source mobility management network element can delete the security context it maintains after receiving the registration success indication information, so as to save resources.
  • the method further includes: the source mobility management network element receives a de-registration notification message, and the de-registration notification message is used to instruct the source mobility management network element to execute the terminal De-registration of the device: the source mobility management network element deletes the first security context and/or the second security context.
  • the source mobility management network element after receiving the de-registration notification message, the source mobility management network element can delete the security context it maintains, thereby saving resources.
  • the method further includes: after a preset time, the source mobility management network element deletes the first security context and/or the second security context.
  • the source mobility management network element can delete the security context it maintains after the preset time elapses, thereby saving resources.
  • the method further includes: the source mobility management network element deleting the second security context.
  • the source mobility management network element when the source mobility management network element maintains the first security context as the current security context, the second security context can be deleted, thereby saving resources.
  • a method for managing a security context comprising: a target mobility management network element receiving a registration request message from a terminal device, where the registration request message includes an identity of the terminal device; the target mobility management network element Sending a context request message to the source mobility management network element, where the context request message is used to request to obtain the context of the terminal device; the target mobility management network element receives a context response message from the target mobility management network element, and the context response message includes security Context and horizontal derivation indication information; the target mobility management network element sends a non-access stratum NAS security mode command message to the terminal device, the NAS security mode command message includes the horizontal derivation indication information, and the horizontal derivation indication information is used to indicate the The terminal device performs horizontal key derivation; the target mobility management network element receives the security-protected NAS security mode completion message from the terminal device; the target mobility management network element uses the security context to secure the NAS security mode completion message Verifying: if the verification is successful, the target mobility
  • the target mobility management network element after the target mobility management network element successfully verifies the NAS security mode message from the terminal device, only the source mobility management network element can delete the context of the terminal device, thereby saving resources and reducing the possibility of key leakage , improve security.
  • an apparatus for managing a security context includes: a transceiver module configured to send a registration request message to a target mobility management network element, where the registration request message includes an identity of the terminal device; the transceiver module further For receiving a non-access stratum NAS security mode command message from the target mobility management network element, the NAS security mode command message includes horizontal derivation indication information; the processing module is used for, according to the key Kamf in the first security context, Generate a new key Kamf'; wherein, the first security context is the current security context of the terminal device; the processing module is also used to use the first security context as the current security context if the registration process is not successfully completed. context.
  • the processing module is further configured to: after generating the new key Kamf', maintain the first security context and the second security context; wherein, the second The security context includes the Kamf' and a NAS key, and the NAS key is generated according to the Kamf'.
  • the processing module is specifically configured to: continue to use the first security context as the current security context, and save the second security context.
  • the processing module is specifically configured to: continue to use the first security context as the current security context, and delete the second security context.
  • the processing module is specifically configured to: the terminal device saves the first security context, and uses the second security context as a current security context.
  • the processing module is specifically configured to: the terminal device sets the first security context as the current security context, and deletes the second security context.
  • the processing module is further configured to: the terminal device determines that the registration process has not been successfully completed.
  • the processing module is specifically configured to: before the transceiver module receives the registration acceptance message, determine that the NAS security mode completion message fails to be sent; or, before the transceiver module receives the registration acceptance message; Before accepting the message, it is determined that the link between itself and the access network device is released; before the transceiver module receives the registration acceptance message, it is determined that the RRC connection between itself and the access network device is suspended or released.
  • an apparatus for managing security context includes: a transceiver module, configured to receive a context request message from a target mobility management network element, where the context request message is used to request to obtain a context of a terminal device; a processing module , used to generate a new key Kamf' according to the key Kamf in the first security context when horizontal key derivation is required; where the first security context is the source mobility management network element and the device The current security context between; the transceiver module is also used to send a second security context to the target mobility management network element; wherein, the second security context includes the new key Kamf' and the NAS key, the NAS key Generated according to the Kamf'; the processing module is also used to maintain the first security context and/or the second security context.
  • the transceiving module is further configured to: receive a context request message from another target mobility management network element, where the context request message is used to request the context of the terminal device, the The context request message includes a security-protected registration request message, the registration request message includes the identity of the terminal device; a processing module, configured to use the first security context and the second security context to perform security verification on the registration request message ; In the case that the security verification of the registration request message is successful using any one of the first security context and the second security context, and horizontal key derivation is required, the processing module is also used to The key in is used to generate a new key Kamf", and the transceiver module is also used to send a third security context to the target mobility management network element, where the third security context includes the new key Kamf".
  • the transceiving module is further configured to: receive a context request message from another target mobility management network element, where the context request message is used to request the context of the terminal device, the The context request message includes a security-protected registration request message, the registration request message includes the identity of the terminal device; the processing module is also used to use the first security context and the second security context to secure the registration request message Verification; when the security verification of the registration request message is successful using any one of the first security context and the second security context, and horizontal key derivation is not required, the transceiver module is also used to move to the target The management network element sends the security context of successful authentication.
  • the transceiver module is further configured to: receive registration success indication information from the target mobility management network element, where the registration success indication information is used to indicate that the terminal device has successfully registered to the network; the processing module is further configured to: delete the first security context and/or the second security context.
  • the transceiver module is further configured to: receive a de-registration notification message, where the de-registration notification message is used to instruct the source mobility management network element to perform de-registration of the terminal device ;
  • the processing module is also used to: delete the first security context and/or the second security context.
  • the processing module is further configured to: delete the first security context and/or the second security context after a preset time.
  • the processing module when the processing module maintains the first security context, the processing module is further configured to: delete the second security context.
  • an apparatus for managing a security context which includes: a transceiver module, configured to receive a registration request message from a terminal device, where the registration request message includes the identity of the terminal device; The source mobility management network element sends a context request message, where the context request message is used to request to acquire the context of the terminal device; the transceiver module is also used to receive a context response message from the target mobility management network element, where the context response message includes a security context and horizontal derivation indication information; the transceiver module is also used to send a non-access stratum NAS security mode command message to the terminal device, the NAS security mode command message includes the horizontal derivation indication information, and the horizontal derivation indication information is used to instruct the terminal The device performs horizontal key derivation; the transceiver module is also used to receive a security-protected NAS security mode completion message from the terminal device; the processing module is also used to use the security context to perform security verification on the NAS security mode completion message ; If the verification
  • a communication device is provided, and the device is configured to execute the methods provided in the first aspect to the fifth aspect.
  • the apparatus may include a unit and/or module for executing the methods provided in the first aspect to the third aspect, such as a processing unit and/or a communication unit.
  • the apparatus is a network device, for example, the apparatus is a source mobility management network element or a target mobility management network element.
  • the communication unit may be a transceiver, or an input/output interface; the processing unit may be a processor.
  • the apparatus is a chip, a chip system or a circuit used in a network device.
  • the communication unit may be an input/output interface, interface circuit, output circuit, input circuit, pin or related circuit on the chip, chip system or circuit etc.
  • the processing unit may be a processor, a processing circuit or a logic circuit and the like.
  • the device is the source mobility management network element or a chip, chip system or circuit in the source mobility management network element.
  • the device may include units and/or modules for performing the method provided by the second aspect, such as a processing unit and/or a communication unit.
  • the device is a chip, a chip system or a circuit in the target mobility management network element.
  • the apparatus may include units and/or modules for executing the method provided by the third aspect, such as a processing unit and/or a communication unit.
  • the apparatus is a terminal device.
  • the communication unit may be a transceiver, or an input/output interface;
  • the processing unit may be a processor.
  • the device is the terminal device (10) or a chip, a chip system or a circuit in the terminal device (10).
  • the apparatus may include units and/or modules for performing the method provided in any one of the first aspects, such as a processing unit and/or a communication unit.
  • the above-mentioned transceiver may be a transceiver circuit.
  • the above input/output interface may be an input/output circuit.
  • a communication device which includes: a memory for storing a program; a processor for executing the program stored in the memory, and when the program stored in the memory is executed, the processor is used for executing the above-mentioned first aspect to The method provided by the third aspect.
  • the present application provides a processor configured to execute the methods provided in the foregoing aspects.
  • the process of sending the above information and obtaining/receiving the above information in the above method can be understood as the process of outputting the above information by the processor and the process of receiving the input of the above information by the processor.
  • the processor When outputting the above information, the processor outputs the above information to the transceiver for transmission by the transceiver. After the above information is output by the processor, other processing may be required before reaching the transceiver.
  • the transceiver acquires/receives the above-mentioned information and inputs it into the processor. Furthermore, after the transceiver receives the above information, the above information may need to be processed before being input to the processor.
  • the receiving request message mentioned in the foregoing method may be understood as the processor receiving input information.
  • processor For the operations of transmitting, sending, and acquiring/receiving involved in the processor, if there is no special description, or if it does not conflict with its actual function or internal logic in the relevant description, it can be understood more generally as the processor Output and receive, input and other operations, rather than the transmission, transmission and reception operations performed directly by radio frequency circuits and antennas.
  • the above-mentioned processor may be a processor dedicated to performing these methods, or may be a processor that executes computer instructions in a memory to perform these methods, such as a general-purpose processor.
  • the above-mentioned memory can be a non-transitory (non-transitory) memory, such as a read-only memory (read only memory, ROM), which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
  • ROM read-only memory
  • a computer-readable storage medium stores program code for execution by a device, and the program code includes a method for executing the methods provided in the first aspect to the third aspect above.
  • a computer program product containing instructions is provided, and when the computer program product is run on a computer, the computer is made to execute the methods provided in the first aspect to the third aspect above.
  • a twelfth aspect provides a chip, the chip includes a processor and a communication interface, the processor reads instructions stored in the memory through the communication interface, and executes the methods provided in the first aspect to the third aspect above.
  • the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the above-mentioned first The method provided by the first aspect to the third aspect.
  • Fig. 1 is a schematic diagram of a network structure applicable to the embodiment of the present application.
  • Fig. 2 is a schematic flowchart of a method for registering a terminal device.
  • Fig. 3 is an exemplary flow chart of a method for managing a security context provided by an embodiment of the present application.
  • Fig. 4 is an exemplary flowchart of another method for managing a security context provided by an embodiment of the present application.
  • Fig. 5 is an exemplary flow chart of another method for managing a security context provided by an embodiment of the present application.
  • Fig. 6 is an exemplary flow chart of another method for managing a security context provided by an embodiment of the present application.
  • Fig. 7 is a schematic block diagram of an apparatus for managing a security context provided by an embodiment of the present application.
  • Fig. 8 is a schematic block diagram of an apparatus for managing a security context provided by another embodiment of the present application.
  • Fig. 9 is a schematic block diagram of an apparatus for managing a security context provided by another embodiment of the present application.
  • Fig. 10 is a schematic block diagram of an apparatus for managing a security context provided by another embodiment of the present application.
  • the present application provides a communication system, which includes a target mobility management network element 10 and a source mobility management network element 20 .
  • the target mobility management network element 10 is configured to send a context request message to the source mobility management network element after receiving the registration request message from the terminal device; receive a context response message from the target mobility management network element, and the context response
  • the message includes the context information of the terminal device, and the context information of the terminal device includes security context and horizontal game indication information.
  • the context information may also include other information, which is not limited in this application, and may refer to existing protocols for details; further, the target mobility management network element 10 sends a non-access stratum NAS security mode command message to the terminal device, and the The NAS security mode command message includes the horizontal derivation instruction information, and the horizontal derivation instruction information is used to instruct the terminal device to perform horizontal key derivation; after receiving the NAS security mode completion message from the terminal device, use the security context to secure the NAS mode completion message for security verification; after the verification is successful, if the registration process of the terminal device is successfully completed, the target mobility management network element sends instruction information to the source mobility management network element, and the instruction information is used to instruct the source mobility management network element to delete The context of this end device.
  • the source mobility management network element 20 is used to request to obtain the context of the terminal device after receiving the context request message from the target mobility management network element; if horizontal key derivation is required, according to the first
  • the key Kamf in the security context generates a new key Kamf'; wherein, the first security context is the current security context between the source mobility management network element and the terminal device; in response to the context request message, send the The target mobility management network element sends a second security context; wherein, the second security context includes the new key Kamf' and a NAS key, and the NAS key is generated according to the Kamf'; maintaining the first security context and/or The second security context.
  • the communication system may further include one or more terminal devices, such as the terminal device 30 .
  • the terminal device 30 is configured to: send a registration request message to the target mobility management network element, where the registration request message includes the identifier of the terminal device; receive a non-access stratum NAS security mode command message from the target mobility management network element, and the NAS
  • the security mode command message includes horizontal derivation instruction information; according to the horizontal derivation instruction information, a new key Kamf' and a new NAS key are generated according to the key Kamf in the first security context; wherein, the first security context is The current security context of the terminal device; if the registration process is not successfully completed, use the first security context as the current security context.
  • both the target mobility management network element 10 and the source mobility management network element 20 are network elements for implementing mobility management and access management functions, wherein the target mobility management network element 10 may be a terminal device 30 requesting registration
  • the source mobility management network element 20 may be the mobility management network element that provides services for the terminal device 30 before the terminal device 30 requests to register with the target mobility management network element 10 .
  • the terminal device 30 Before the terminal device 30 requests to register with the target mobility management network element, the terminal device 30 has already registered with the source mobility management network element through a registration process.
  • the above network element names are only used to distinguish different network elements. In different scenarios or examples, they may also have other names. In other words, network elements that implement the same function should be within the scope of protection of this application.
  • the technical solution provided by this application can be applied to various communication systems, such as: the fifth generation (5th generation, 5G) or new radio (new radio, NR) system, long term evolution (long term evolution, LTE) system, LTE frequency division Duplex (frequency division duplex, FDD) system, LTE time division duplex (time division duplex, TDD) system, etc.
  • 5G fifth generation
  • NR new radio
  • long term evolution long term evolution
  • LTE long term evolution
  • LTE frequency division Duplex frequency division duplex
  • FDD frequency division duplex
  • TDD time division duplex
  • the technical solution provided by this application can also be applied to device to device (device to device, D2D) communication, vehicle to everything (vehicle-to-everything, V2X) communication, machine to machine (machine to machine, M2M) communication, machine type Communication (machine type communication, MTC), and Internet of things (internet of things, IoT) communication system or other communication systems.
  • D2D device to device
  • V2X vehicle-to-everything
  • M2M machine to machine
  • M2M machine type Communication
  • MTC machine type communication
  • IoT Internet of things
  • FIG. 1 it is a schematic diagram of a fifth generation (5th generation, 5G) network architecture based on a service architecture.
  • the 5G network architecture shown in (b) of FIG. 1 may include three parts, namely a terminal device part, a data network (data network, DN) and an operator network part.
  • a terminal device part namely a terminal device part, a data network (data network, DN) and an operator network part.
  • DN data network
  • operator network part namely a data network (data network, DN) and a operator network part.
  • the operator network may include one or more of the following network elements: authentication server function (authentication server function, AUSF) network element, network exposure function (network exposure function, NEF) network element, policy control function (policy control function, PCF) network element, unified data management (unified data management, UDM) network element, unified database (unified data repository, UDR), network storage function (network repository function, NRF) network element, application function (application function, AF) ) network elements, access and mobility management function (access and mobility management function, AMF) network elements, session management function (session management function, SMF) network elements, radio access network (radioaccess network, RAN) and user plane functions (user plane function, UPF) network element, etc.
  • authentication server function authentication server function, AUSF
  • NEF network exposure function
  • policy control function policy control function
  • PCF policy control function
  • unified data management unified data management
  • UDM unified database
  • NRF network repository function
  • application function application function, AF
  • AMF access and mobility management function
  • Terminal device it can also be called user equipment (UE), which is a device with wireless transceiver function, which can be deployed on land, including indoor or outdoor, handheld or vehicle-mounted; it can also be deployed in On the water (such as ships, etc.); can also be deployed in the air (such as aircraft, balloons and satellites, etc.).
  • the terminal device may be a mobile phone, a tablet computer (pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal, an augmented reality (augmented reality, AR) terminal, an industrial control (industrial control ), wireless terminals in self driving, wireless terminals in remote medical, wireless terminals in smart grid, wireless terminals in transportation safety , wireless terminals in smart cities, wireless terminals in smart homes, etc.
  • the terminal device here refers to a 3rd generation partnership project (3rd generation partnership project, 3GPP) terminal.
  • 3rd generation partnership project 3rd generation partnership project
  • the above-mentioned terminal device can establish a connection with the operator network through an interface provided by the operator network (such as N1, etc.), and use services such as data and/or voice provided by the operator network.
  • the terminal device can also access the DN through the operator's network, and use the operator's service deployed on the DN, and/or the service provided by a third party.
  • the above-mentioned third party may be a service party other than the operator's network and the terminal device, and may provide other services such as data and/or voice for the terminal device.
  • the specific form of expression of the above-mentioned third party can be determined according to the actual application scenario, and is not limited here.
  • Wireless access network radio access network, RAN
  • RAN radio access network
  • the RAN is a sub-network of the operator's network and an implementation system between service nodes and terminal equipment in the operator's network.
  • the terminal equipment To access the operator's network, the terminal equipment first passes through the RAN, and then can be connected to the service node of the operator's network through the RAN.
  • the RAN device in this application is a device that provides a wireless communication function for a terminal device, and the RAN device is also called an access network device.
  • the RAN equipment in this application includes but is not limited to: next-generation base station (g nodeB, gNB) in 5G, evolved node B (evolved node B, eNB), radio network controller (radio network controller, RNC), node B (node B, NB), base station controller (base station controller, BSC), base transceiver station (base transceiver station, BTS), home base station (for example, home evolved nodeB, or home node B, HNB), baseband unit (baseBand unit, BBU), transmission point (transmitting and receiving point, TRP), transmission point (transmitting point, TP), mobile switching center, etc.
  • next-generation base station g nodeB, gNB
  • 5G evolved node B (evolved node B, eNB), radio network controller (radio network controller, RNC), node B (node B, NB), base station controller (base station controller, BSC), base transceiver station (base transceiver station, BTS
  • User plane function used for packet routing and forwarding and quality of service (QoS) processing of user plane data.
  • QoS quality of service
  • the user plane network element may be a user plane function (user plane function, UPF) network element.
  • UPF user plane function
  • the user plane network element may still be a UPF network element, or may have other names, which are not limited in this application.
  • the access and mobility management network element is mainly used for mobility management and access management, etc., and can be used to implement other functions in the MME function except session management, for example, functions such as access authorization/authentication.
  • the access and mobility management network element may be an access and mobility management function (access and mobility management function, AMF).
  • AMF access and mobility management function
  • the access and mobility management device may still be an AMF, or may have other names, which are not limited in this application.
  • Session management function session management function, SMF: mainly used for session management, user equipment network interconnection protocol (internet protocol, IP) address allocation and management, selection of manageable user plane functions, policy control and charging function interface endpoints and downlink data notifications, etc.
  • the session management network element may be a session management function network element.
  • the session management network element may still be an SMF network element, or may have other names, which are not limited in this application.
  • PCF Policy control function
  • the policy control network element may be a policy and charging rules function (policy and charging rules function, PCRF) network element.
  • policy control network element may be a policy control function PCF network element.
  • the policy control network element may still be a PCF network element, or may have other names, which are not limited in this application.
  • Application function (Application function, AF): It is used for data routing affected by applications, open function network elements of wireless access networks, and interacts with policy frameworks for policy control, etc.
  • the application network element may be an application function network element.
  • the application network element may still be an AF network element, or may have other names, which are not limited in this application.
  • Unified data management used to process UE identification, access authentication, registration and mobility management.
  • the data management network element may be a unified data management network element; in a 4G communication system, the data management network element may be a home subscriber server (HSS) network element.
  • HSS home subscriber server
  • the unified data management may still be a UDM network element, or may have other names, which are not limited in this application.
  • AUSF Authentication server function
  • the authentication server may be an authentication server functional network element.
  • the authentication server functional network element may still be an AUSF network element, or may have other names, which are not limited in this application.
  • DN is a network located outside the operator's network.
  • the operator's network can access multiple DNs, and multiple services can be deployed on the DN, which can provide data and/or voice for terminal equipment. and other services.
  • DN is a private network of a smart factory.
  • the sensors installed in the workshop of the smart factory can be terminal devices.
  • the control server of the sensor is deployed in the DN, and the control server can provide services for the sensor.
  • the sensor can communicate with the control server, obtain instructions from the control server, and transmit the collected sensor data to the control server according to the instructions.
  • DN is a company's internal office network, and the mobile phone or computer of the company's employees can be a terminal device, and the employee's mobile phone or computer can access information and data resources on the company's internal office network.
  • Nausf, Nnef, Npcf, Nudm, Naf, Namf, Nsmf, N1, N2, N3, N4, and N6 are interface serial numbers.
  • interface serial numbers refer to the meanings defined in the 3GPP standard protocol, and there is no limitation here.
  • various network elements can communicate through the interfaces shown in the figure.
  • the UE and the AMF can interact through the N1 interface, and the interaction message can be called an N1 message (N1 Message), for example.
  • the RAN and the AMF can interact through the N2 interface, and the N2 interface can be used for sending non-access stratum (non-access stratum, NAS) messages, etc.
  • the RAN and UPF can interact through the N3 interface, and the N3 interface can be used to transmit user plane data, etc.
  • the SMF and UPF can interact through the N4 interface, and the N4 interface can be used to transmit information such as the tunnel identification information of the N3 connection, data cache indication information, and downlink data notification messages.
  • the UPF and DN can interact through the N6 interface, and the N6 interface can be used to transmit data on the user plane.
  • the relationship between other interfaces and each network element is shown in FIG. 1 , and for the sake of brevity, details are not described here one by one.
  • the above-mentioned network architecture applied to the embodiment of the present application is only an example network architecture described from the perspective of a service-oriented architecture, and the network architecture applicable to the embodiment of the present application is not limited thereto. Any network element that can implement the above-mentioned All functional network architectures are applicable to this embodiment of the application.
  • Functional network elements can be combined into network slices on demand.
  • These core network elements may be independent devices, or may be integrated into the same device to implement different functions. This application does not limit the specific forms of the above network elements.
  • the above-mentioned network element or function may be a network element in a hardware device, or a software function running on dedicated hardware, or a virtualization function instantiated on a platform (for example, a cloud platform).
  • the network device is the access and mobility management network element AMF
  • the base station is the radio access network RAN as an example for description.
  • the network architecture and business scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions provided by the embodiments of the present application.
  • the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
  • Computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disk, floppy disk, or tape, etc.), optical disks (e.g., compact disc (compact disc, CD), digital versatile disc (digital versatile disc, DVD) etc.), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.).
  • magnetic storage devices e.g., hard disk, floppy disk, or tape, etc.
  • optical disks e.g., compact disc (compact disc, CD), digital versatile disc (digital versatile disc, DVD) etc.
  • smart cards and flash memory devices for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.
  • various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
  • NAS security context information that can be used to implement data encryption/decryption and/or integrity protection/verification at the NAS layer.
  • the NAS security context corresponding to the UE includes: key identifier (eg ngKSI), Kamf, security capability of the UE, uplink NAS COUNT and downlink NAS COUNT.
  • key identifier eg ngKSI
  • Kamf security capability of the UE
  • uplink NAS COUNT uplink NAS COUNT
  • downlink NAS COUNT e.g. ngKSI
  • the integrity protection key and the selected integrity protection algorithm, the encryption key and the selected encryption algorithm are also included.
  • the encryption key and the selected encryption algorithm are used to encrypt and protect the NAS message transmitted between the UE and the AMF
  • the integrity key and the selected integrity protection algorithm are used to protect the NAS message transmitted between the UE and the AMF Integrity protection.
  • the UE's security capability is used to characterize the encryption algorithm and integrity protection algorithm supported by the UE.
  • the source AMF decides to perform horizontal Kamf deduction according to the local policy, the source AMF can perform horizontal Kamf according to the key Kamf in the current NAS security context and the uplink NAS count value in the received registration request message. Deduce the new key Kamf'.
  • the source AMF may then send the new key Kamf', the new ngKSI, the UE security capabilities and the level derivation indication (keyAmfHDerivationInd) to the target AMF.
  • keyAmfHDerivationInd level derivation indication
  • the new ngKSI here is the same as the previous (ie pre-derivation) ngKSI.
  • the target AMF can send a K_AMF_change_flag with a value of 1 to the UE through a NASSMC message, where the K_AMF_change_flag with a value of 1 is used to instruct the UE to perform horizontal key derivation.
  • the NASSMC message here also includes UE security capability, selected NAS algorithm and ngKSI. If the UE receives K_AMF_change_flag with a value of 1, the UE performs horizontal Kamf derivation to obtain a new key Kamf'.
  • Current NAS security context (currentNAS security context): the NAS security context in use or active state.
  • Non-current NAS security context A NAS security context that is not currently in use or is in an inactive state.
  • a method 200 for managing a security context is introduced below with reference to FIG. 2 .
  • the method 200 includes:
  • the UE sends a registration request message to a target AMF.
  • the UE triggers a Registration Request message to the network. For example, the UE moves to a new AMF area (denoted as the target AMF), and the registration request message of the UE is delivered to the target AMF.
  • the UE sends a registration request (registration request, RR) message to a target AMF (target AMF), and the RR message carries an identifier of the UE, such as a 5G globally unique temporary user equipment identity (5G generation globally unique temporary user equipment identity, 5G-GUTI).
  • 5G globally unique temporary user equipment identity 5G generation globally unique temporary user equipment identity, 5G-GUTI
  • the UE has protected the integrity of the RR message through the current NAS security context
  • the current NAS security context is the NAS security context used by the UE to protect the NAS message transmitted between the UE and the source AMF before the registration process
  • the current NAS security context is the NAS security context used by the source AMF before performing horizontal K AMF deduction in 203 .
  • the target AMF sends a UE context transfer request message to the source AMF.
  • the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE.
  • the Namf_Communication_UEContextTransfer includes the identity of the UE (such as 5G-GUTI), and the Namf_Communication_UEContextTransfer also includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 201 in the Namf_Communication_UEContextTransfer.
  • the source AMF performs horizontal deduction according to the local policy to generate a new NAS security context.
  • the source AMF acquires UE data (including the current NAS security context corresponding to the UE) in the database according to the UE identifier, and the source AMF uses the current NAS security context to verify the received integrity of the RR message. If the integrity verification of the RR message passes, the source AMF decides whether to deduce a new NAS security context according to the local policy. If the source AMF decides to deduce a new NAS security context, the source AMF performs horizontal K AMF deduction to obtain a new NAS security context. Specifically, the source AMF uses the currently activated Kamf and the uplink NAScount carried in the registration request message to perform horizontal deduction to obtain a new key Kamf'.
  • the new key Kamf' is included in the security context of the new NAS.
  • the new NAS security context here is relative to the NAS security context before the source AMF performs horizontal deduction. Therefore, at this time, the NAS security context before the source AMF performs horizontal deduction can also be recorded as the old NAS security context.
  • the source AMF then deletes the NAS security context it holds.
  • the source AMF sends a UE context transfer response message to the target AMF.
  • the source AMF finds the data corresponding to the UE in the database, and performs horizontal key derivation according to the local policy, the source AMF sends a UE context transfer response (Namf_Communication_UEContextTransfer Response) message to the target AMF, and the response message carries UE Context, SUPI, horizontal K AMF derivation indication (keyAmfHDerivationInd indication).
  • the UE context includes a security context. If the source AMF has deduced the horizontal K AMF according to the local policy, the security context carried in the response message is the new security context deduced by the source AMF in 203 .
  • the target AMF sends a security mode command message to the UE.
  • the target AMF receives the UE context transfer response message from the source AMF, and if the response message carries the SUPI of the UE, the target AMF saves the NAS security context carried in the UE context transfer response message. If the target AMF activates the security context carried in the response message according to the local policy, that is, the new NAS security context deduced by the source AMF, the target AMF initiates a non access stratum security mode command (NAS SMC ) message to the UE, which is used to establish the NAS security context between the UE and the target AMF.
  • the security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP).
  • the HDP may be K_AMF_change_flag with a value of 1, wherein the K_AMF_change_flag with a value of 1 is used to instruct the UE to perform horizontal K AMF derivation.
  • the NASSMC message also includes selected NAS algorithms, including NAS encryption algorithms and NAS integrity protection algorithms.
  • the target AMF sets the non-access stratum count value (NAScounts) to 0, and derives a new key NASkeys according to the new key Kamf' and the selected NAS algorithm, including the NAS encryption key and the NAS integrity protection key.
  • This new security context is then used to encrypt and integrity-protect the security mode command messages (using derived new NAS keys).
  • the UE performs horizontal deduction to generate a new NAS security context.
  • the UE receives a security mode command message from the target AMF. If the security mode command message carries K_AMF_change_flag with a value of 1, the UE performs KAMF deduction based on the key Kamf in the current security context to generate a new key Kamf', thereby obtaining a new NAS security context.
  • the new NAS security context Including the new key Kamf' and the NAS key, the NAS key is generated according to the algorithm generated and selected by the Kamf'.
  • the NAS key includes a NAS encryption key and a NAS integrity key.
  • the UE uses the NAS key in the new NAS security context (specifically, it can be the NAS integrity key in the NAS key) to perform integrity check on the security mode command message, if the security mode command message If the integrity check passes, the UE sends a security mode completion message to the target AMF.
  • the NAS key in the new NAS security context specifically, it can be the NAS integrity key in the NAS key
  • the UE may fail the registration process due to some internal or external reasons.
  • the UE's security mode completion message fails to be sent, or the UE's link is released before the registration is completed, or due to some other reasons, the UE's registration process may fail.
  • the registration failure caused by the failure to send the security mode completion message of the UE is taken as an example for illustration.
  • the UE sends a security mode completion message to the target AMF, but the security mode completion message fails to be sent, the UE receives an underlying instruction, and determines that the security mode completion message fails to be sent according to the underlying instruction.
  • the UE sends a registration request message to the target AMF.
  • the UE resends the registration request to the target AMF. It should be understood that the UE performs integrity protection on the registration request message.
  • the target AMF sends a UE context transfer request message to the source AMF.
  • the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE.
  • the Namf_Communication_UEContextTransfer includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 208 in the Namf_Communication_UEContextTransfer.
  • the source AMF after the source AMF receives the UE context request from the target AMF, the source AMF performs integrity verification on the received RR message.
  • the source AMF performs integrity verification on the received RR message.
  • the source AMF continues to maintain and use the old security context as the current security context, and the UE uses the new security context to perform integrity protection on the registration request message in 208, then the source AMF uses the old security context in 209 The security context verification of the integrity of the RR message will fail;
  • the source AMF deletes the old security context and uses the new security context as the current security context, and the UE uses the old security context to perform integrity protection on the registration request message in 208, then If the source AMF uses the new security context to verify the integrity of the RR message in 209, the verification fails.
  • the source AMF sends a UE context transfer response message to the target AMF at 210, where the response message is used to indicate that the temporary identifier 5G-GUTI cannot be obtained.
  • the target AMF performs an identity authentication and authentication process with the UE.
  • the target AMF receives the UE context transfer response message from the source AMF, and determines that the UE identity cannot be identified through the response message, and then the target AMF starts the UE identity authentication and authentication process.
  • the target AMF sends a registration acceptance message to the UE.
  • the target AMF sends a registration acceptance message to the UE.
  • the network since the network re-authenticates and authenticates the UE, all PDU session information previously established by the UE may not be migrated to the target AMF, resulting in the release of the previously activated PDU session.
  • FIG. 3 shows an exemplary flow chart of a method 300 for managing a security context provided by an embodiment of the present application.
  • the method 300 includes: 301, the terminal device 30 sends a registration request message to the target mobility management network element 10 .
  • the terminal device 30 sends a registration request message to the target mobility management network element 10 to request to register with the target mobility management network element 10 , and the registration request message includes the identifier of the terminal device 30 .
  • the identifier of the terminal device 30 is, for example, the GUTI of the terminal device 30 .
  • the terminal device 30 uses the first security context to perform security protection on the registration request message, for example, the terminal device 30 uses the first security context and the registration request message to generate an integrity check parameter, and the integrity check parameter It is used to verify whether the registration request message has been tampered with.
  • the first security context is the current security context of the source mobility management network element 20 of the terminal device 30 .
  • the first security context includes the key Kamf and the NAS key set identifier ngKSI.
  • the first security context may also include other information elements (information element, IE), such as the selected algorithm, uplink NAScount, downlink NAScount, etc., which are not limited in this application, and may refer to existing standards for details. It should be understood that, unless otherwise specified, the security contexts in the embodiments of the present application are non-access stratum NAS security contexts.
  • the registration request message may also include an uplink non-access stratum count (NAScount) value.
  • NAScount uplink non-access stratum count
  • the target mobility management network element 10 sends a context request message to the source mobility management network element 20.
  • the target mobility management network element 10 receives the registration request message from the terminal equipment 30, and determines the source mobility management network element 20 corresponding to the identifier of the terminal equipment 30 according to the identifier of the terminal equipment 30, denoted as the source mobility management network element 20
  • the element 20 targets the mobility management network element 10 .
  • the target mobility management network element 10 sends a context request message to the source mobility management network element 20, where the context request message is used to request to obtain the context of the terminal device 30.
  • the context request message includes the identification of the terminal device 30 .
  • the target mobility management network element 10 carries a complete registration request message from the terminal device 30 in the context request message, or in other words, the target mobility management network element 10 will receive the security protection in step 301
  • the registration request message of is carried in the context request message.
  • the source mobility management network element 20 When horizontal key derivation is required, the source mobility management network element 20 generates a new key Kamf' according to the key Kamf in the first security context.
  • the source mobility management network element 20 receives the context request message from the target mobility management network element 10 .
  • the source mobility management network element 20 searches the local database for the context information of the terminal device 30 according to the identifier of the terminal device 30 carried in the context request message, the context information includes the first security context, and the first security context is the The current security context between the source mobility management network element 20 and the terminal device 30 .
  • the source mobility management network element 20 uses the first security context to perform security verification on the registration request message carried in the context request message. If the verification is successful, the source mobility management network element 20 judges whether to perform horizontal key derivation. If the source mobility management network element 20 determines that horizontal key derivation is required, further, the source mobility management network element 20 generates a new key Kamf' according to the key Kamf in the first security context. For example, the source mobility management network element 20 uses Kamf in the first security context and the non-access stratum count value carried in the registration request message to perform horizontal key derivation to obtain a new key Kamf'.
  • the source mobility management network element 20 sends the second security context to the target mobility management network element 10.
  • the source mobility management network element 20 in response to the context request message, sends a context response message to the target mobility management network element 10, the context response message includes the second security context, and the second security context includes the new key Kamf '.
  • the second security context may also include other IEs, such as NAS key set identifier ngKSI', selected algorithm, uplink NAScount, downlink NAScount, etc., which are not limited in this application, and can refer to existing standards for details.
  • the context response message includes the identifier of the terminal device 30 , such as the SUPI of the terminal device 30 .
  • the target mobility management network element 10 sends a security mode command message to the terminal device 30.
  • the target mobility management network element 10 receives a context response message from the source mobility management network element 20 from the terminal device 30, and if the context response message carries a horizontal derivation instruction, the target mobility management network element 10 then uses the new key Kamf' and the selected algorithm deduce the new key NASkeys, and then save the second security context carried in the context response message. If the target mobility management network element 10 enables the second security context according to the local policy, the target mobility management network element 10 sends a security mode command message to the terminal device 30, the security mode command message includes horizontal derivation indication information, and the horizontal derivation indication The information is used to instruct the terminal device 30 to perform horizontal key derivation.
  • the terminal device 30 generates a new key Kamf' according to the key Kamf in the first security context.
  • the terminal device 30 receives a security mode command message from the target mobility management network element 10, and according to the horizontal derivation instruction information in the security mode command message, the terminal device 30 generates a new key Kamf according to the first security context.
  • the key Kamf' For example, the target mobility management network element 10, the terminal device 30 uses the key Kamf in the first security context and the uplink non-access stratum count value carried in the registration request message to perform horizontal key derivation to obtain the key Kamf', and then uses the The new key Kamf' and the algorithm identifier (ngKSI) in the security mode completion message are used to deduce the new NAS key (NASkeys).
  • ngKSI algorithm identifier
  • the source mobility management network element 20 maintains the first security context as the current security context.
  • the source mobility management network element 20 after the source mobility management network element 20 generates Kamf' according to Kamf, it maintains the first security context as the first security context, or continues to use the first security context as the current security context, or does not delete the first security context. context.
  • the maintenance here can be that after the terminal device deduces the new kamf', it does not immediately set the new security context as the current context, but continues to maintain the first security context as the current security context. After the registration process is successful, the new The security context (the second security context) is set as the current security context, and the first security context is deleted.
  • the source mobility management network element 20 deletes the second security context.
  • 307 may be performed before 304 or after 304, which is not limited in this application.
  • the source mobility management network element 20 deletes the first security context.
  • the source mobility management network element 20 receives indication information from the target mobility management network element 10, and the source mobility management network element 20 deletes the context of the terminal device 30 according to the indication information.
  • the indication information is used to indicate that the terminal device 30 has successfully registered to the network; in another example, the indication information indicates that the context of the terminal device 30 is deleted. According to the indication information, the source mobility management network element 20 deletes the first security context.
  • the source mobility management network element 20 receives a de-registration notification message, for example, the source mobility management network element 20 receives a de-registration notification message from a unified data management network element, and the de-registration notification message is used to indicate that the source mobility management network element 20
  • the unified data management network element may be, for example, a UDM in a 5G network.
  • the source mobility management network element 20 deletes the second security context. Specifically, for example, after the source mobility management network element 20 sends the second security context to the target mobility management network element 10, a timer is started.
  • the source mobility management network element 20 When When the timer expires, the source mobility management network element 20 still does not receive a response message, then the source mobility management network element 20 deletes the second security context; or, the source mobility management network element 20 starts the timer after generating a new key Kamf' When the timer expires and the source mobility management network element 20 still does not receive the response message, the source mobility management network element 20 deletes the second security context. It should be understood that the present application does not limit the specific timing for starting the timer. It should be understood that the registration success indication information may be carried in an existing message, or in a message newly added by the source mobility management network element 20, which is not limited in this application.
  • the terminal device 30 determines that the registration process has not been successfully completed. It should be understood that the successful registration here refers to the situation that the registration process of the terminal device cannot be successfully completed due to abnormal conditions, or the failure of the registration process can be interpreted as a failure of the registration process. It should also be understood that this application does not limit the specific reasons for the unsuccessful completion of the registration process. Several possible situations in which the terminal device 30 determines that the registration process has not been successfully completed are illustrated below: In one example, the terminal device does not receive a registration acceptance message within a preset time.
  • the terminal device 30 After the terminal device 30 sends the registration request message, the timer is started, and after the timer expires, if the registration acceptance message is not received, the terminal device 30 determines that the registration process has not been successfully completed; in another example, the terminal device 30 receives Receive a registration rejection message, the registration rejection message is used to deny the terminal device 30 access to the network, or in other words, the registration rejection message is used to deny the terminal device 30 to register with the target mobility management network element, according to the registration rejection message, the terminal device 30 determines that the registration process has not been successfully completed; in another example, the terminal device 30 needs to re-trigger the registration process before receiving the registration acceptance message.
  • the terminal device 30 enters a new tracking area, so that the registration process needs to be triggered again. In this case, the terminal device 30 determines that the registration process fails; in another example, the terminal device 30 bottom layer Failure (Lower layer failure) indication information, according to the underlying failure indication information, the terminal device 30 determines that the registration process has not been successfully completed; in another example, the terminal device 30 determines that the NAS security mode completes the message sending before receiving the registration acceptance message Failure; in another example, before receiving the registration acceptance message, the terminal device 30 determines that the link between itself and the access network device is released; The RRC connection between network devices is suspended or released.
  • the terminal device 30 determines that the registration process fails; in another example, the terminal device 30 bottom layer Failure (Lower layer failure) indication information, according to the underlying failure indication information, the terminal device 30 determines that the registration process has not been successfully completed; in another example, the terminal device 30 determines that the NAS security mode completes the message sending before receiving the registration acceptance message Failure; in another example, before receiving the registration
  • the terminal device 30 uses the first security context as the current security context.
  • the terminal device 30 After the terminal device 30 generates the new key Kamf', it maintains the first security context and the second security context, wherein the second security context includes the Kamf' and the NAS key, and the NAS key is based on the Kamf' generate.
  • the NAS keys may include NAS encryption keys and NAS integrity keys.
  • the terminal device 30 after the terminal device 30 generates a new key Kamf', it continues to use the first security context as the current security context, and saves the second security context, that is, the terminal device network maintains the first security context
  • the context is the current security context.
  • the first security context is the current security context, which means that after the terminal device deduces the new Kamf', it will not immediately set the new security context (second security context) as the current context. , but continue to maintain the first security context as the current security context, and after the registration process is successful, set the new security context as the current security context and delete the first security context.
  • the terminal device when the registration process fails, if the reason for the registration process failure is that the terminal device receives a registration rejection message, and the registration rejection message causes the security context to be deleted, the terminal device deletes the first security context and the second security context. security context. If the failure of the registration process does not cause the terminal device to delete the security context, the terminal device 30 continues to use the first security context as the current security context and delete the second security context. If the registration is successful, the terminal device 30 sets the second security context as the current security context, and deletes the first security context. For example, after the terminal device 30 uses the second security context to successfully verify the security of the NAS security mode command message, it sends a NAS security mode completion message to the target mobility management network element 10.
  • the terminal device 30 If the security mode completion message is sent successfully, or the terminal device 30 receives a message from A registration acceptance message of the target mobility management network element 10, the registration acceptance message is used to indicate that the terminal device 30 has successfully registered to the network, then the terminal device 30 sets the second security context as the current security context, and deletes the first security context.
  • the terminal device 30 After the terminal device 30 generates a new key Kamf', it saves the first security context, and sets the second security context as the current security context.
  • setting the second security context here as the current security context means that after the terminal device generates a new security context (the second security context), it sets the new security context as the current security context while saving the old security context (the second security context) A security context), if it is determined that the registration process fails, the current security context is rolled back, that is, the first security context is re-set as the current security context.
  • the terminal device deletes the first security context and the second security context. Two security contexts. If the failure of the registration process does not cause the terminal device to delete the security context, the terminal device 30 sets the first security context as the current security context and deletes the second security context. If the registration is successful, the terminal device 30 deletes the first security context.
  • the terminal device 30 re-initiates the registration process.
  • the terminal device 30 sends a registration request message to another target mobility management network element, the registration request message includes the identifier of the terminal device 30, and the registration request message is secured by the first security context.
  • the further target mobility management network element may be the same as or may be different from the target mobility management network element 10 .
  • the target mobility management network element 10 After the target mobility management network element 10 receives the registration request message from the terminal device 30, according to the registration request message, the target mobility management network element 10 sends a context request message to the source mobility management network element 20, and the context request message is used to request to obtain The context of the terminal device 30 .
  • the second target mobility management network element 10 carries the complete registration request message received from the terminal device 30 in the context request message.
  • the source mobility management network element 20 receives the context request message from the second target mobility management network element 10, and then, the source mobility management network element 20 uses the first security context to secure the registration request message carried in the context request message. verify. If the verification is passed, the source mobility management network element 20 continues to perform subsequent procedures. It should be understood that the registration process here is similar to the processes in 301 to 303, and for the sake of brevity, repeated content will not be repeated.
  • the source mobility management network element 20 sets the second security context as the current security context.
  • the source mobility management network element 20 After the source mobility management network element 20 generates the new key Kamf', it sets the second security context as the current security context, and the second security context includes the new key Kamf' and deduced NASkeys.
  • 309 may be performed before 304 or after 304, which is not limited in this application.
  • the source mobility management network element 20 deletes the first security context.
  • the terminal device 30 sets the second security context as the current security context.
  • the terminal device 30 After the terminal device 30 generates a new key Kamf', it sets the second security context as the current security context.
  • the source mobility management network element 20 uses the new key Kamf' and the selected algorithm to derive a new NAS key.
  • the terminal device 30 deletes the first security context.
  • the terminal device 30 sends a security mode completion message to the target mobility management network element 10, and the NAS security mode completion message is used to respond to the NAS security mode command message.
  • the terminal device 30 may re-initiate the registration process. For example, the terminal device 30 sends a registration request message to the target mobility management network element 10, where the registration request message includes the identifier of the terminal device 30. The terminal device 30 performs integrity protection on the registration request message through the second security context.
  • the second target mobility management network element 10 sends a second context request message to the source mobility management network element 20 according to the registration request message, and the second context request message carries the received complete registration request message.
  • the source mobility management network element 20 uses the second security context to perform security verification on the registration request message. If the verification is passed, proceed to the subsequent process.
  • the source mobility management network element 20 maintains the first security context and the second security context.
  • the source mobility management network element 20 after the source mobility management network element 20 generates a new key kamf', it maintains the first security context and the second security context. For example, the source mobility management network element 20 continues to use the first security context as the current security context between the mobility management network element and the terminal device 30, and saves the second security context. For another example, the source mobility management network element 20 saves the first security context, and uses the second security context as the current security context between the source mobility management network element 20 and the terminal device 30
  • the terminal device 30 maintains the first security context as the current security context, or sets the second security context as the current security context.
  • the terminal device 30 maintains the first security context as the current security context after generating the new key Kamf', and saves the second security context.
  • the terminal device 30 deletes the second security context; or the terminal device 30 saves the first security context after generating a new key Kamf', and sets the second security context as the current security context.
  • the terminal device 30 sets the first security context as the current security context, and delete the second security context. That is, the terminal device 30 can implement the solution performed by 308 in solution 1; or, as another possible implementation, after the terminal device 30 uses the first security context to perform horizontal key derivation to obtain the second security context, set the second security context.
  • the security context is the current security context, and the first security context is deleted. That is, the terminal device 30 may execute the solution performed by 310 in solution 2.
  • the terminal device 30 may re-initiate the registration process.
  • the terminal device 30 sends a security-protected registration request message to the target mobility management network element 10 .
  • the target mobility management network element 10 receives the registration request message, and according to the registration request message, the target mobility management network element 10 sends a context request message to the source mobility management network element 20, and carries the received The complete registration request message.
  • the source mobility management network element 20 uses the first security context and the second security context to perform security verification on the registration request message.
  • the source mobility management network element 20 When the source mobility management network element 20 uses the first security context to successfully verify the registration request message, the source mobility management network element 20 deletes the second security context; when the source mobility management network element 20 uses the second When the security verification of the registration request message by the security context succeeds, the source mobility management network element 20 sets the second security context as the current security context, and deletes the first security context. If the source mobility management network element 20 fails to verify the registration request message using the first security context and the second security context, the source mobility management network element 20 may delete the first security context and the second security context.
  • the source mobility management network element 20 uses the new key Kamf' and the selected algorithm to derive a new NAS key.
  • this application does not limit the sequence of security verification using the first security context and the second security context, that is, the source mobility management network element 20 can first use the first security Context to verify.
  • the source mobility management network element 20 after the source mobility management network element 20 successfully authenticates the registration request message using one of the security contexts, it may not need to use another security context for authentication. For example, the source mobility management network element 20 first uses the first security context to perform security verification on the registration request message. If the verification is successful, it may no longer use the second security context to verify the registration request message, and may delete the second security context. Context; if the verification fails, the source mobility management network element 20 can then use the second security context to perform security verification on the registration request message, and if the verification is successful, the source mobility management network element 20 sets the second security context as the current security context, And delete the first security context.
  • the new security context (such as the second security context in the above embodiment) and the old security context (such as the above embodiment
  • the processing method of the first security context can avoid that the registration request of the terminal device cannot pass the integrity protection check of the NAS at the source mobility management network element due to the inconsistency of the security contexts on the terminal side and the network side, so that the terminal device has already
  • the established security context cannot be migrated to the target mobility management network element, thereby avoiding the release of the previously activated PDU session of the terminal device and affecting user experience.
  • it can avoid the problem of increasing signaling overhead due to the identity authentication and re-authentication process caused by the registration request of the terminal device failing to pass the integrity protection check of the NAS at the source mobility management network element.
  • FIG. 4 shows an exemplary flow chart of a method 400 for managing a security context provided by an embodiment of the present application.
  • the method 400 includes:
  • the UE sends a registration request message to a target AMF.
  • the UE triggers a Registration Request message to the network. For example, the UE moves to a new AMF area (denoted as the target AMF), and the registration request message of the UE is delivered to the target AMF.
  • the UE sends a registration request (registration request, RR) message to a target AMF (target AMF), and the RR message carries an identifier of the UE, such as a 5G globally unique temporary user equipment identity (5G generation globally unique temporary user equipment identity, 5G-GUTI).
  • 5G globally unique temporary user equipment identity 5G generation globally unique temporary user equipment identity, 5G-GUTI
  • the UE has protected the integrity of the RR message through the current NAS security context
  • the current NAS security context is the NAS security context used by the UE to protect the NAS message transmitted between the UE and the source AMF before the registration process
  • the current security context is the current security context of the NAS used by the source AMF before performing horizontal K AMF deduction in 403 .
  • the target AMF sends a UE context transfer request message to the source AMF.
  • the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE.
  • the Namf_Communication_UEContextTransfer includes the identity of the UE (such as 5G-GUTI), and the Namf_Communication_UEContextTransfer also includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 401 in the Namf_Communication_UEContextTransfer.
  • the source AMF performs horizontal deduction according to the local policy to generate a new security context #1.
  • the source AMF after the source AMF receives the UE context transfer request message, it obtains the data of the UE (including the current NAS security context corresponding to the UE) in the database according to the identifier of the UE, and the source AMF uses the current security context to verify the received Integrity of RR messages. If the integrity verification of the RR message passes, the source AMF decides whether to derive a new security context according to the local policy. If the source AMF decides to deduce a new security context, the source AMF uses the Kamf in the old security context to perform horizontal Kamf deduction to obtain a new key Kamf', thereby generating a new security context #1, the new security context# 1 includes the new key Kamf'.
  • the source AMF uses the currently activated Kamf and the uplink NAScount carried in the registration request message to perform horizontal deduction to obtain a new key Kamf'.
  • the new key Kamf' is included in the security context of the new NAS.
  • the new security context #1 here is relative to the current NAS security context before the source AMF performs horizontal deduction. Therefore, the NAS security context before the source AMF performs horizontal deduction can be recorded as the old security context.
  • the source AMF sends a UE context transfer response message to the target AMF.
  • the source AMF finds the data corresponding to the UE in the database, and performs horizontal key derivation according to the local policy, the source AMF sends a UE context transfer response (Namf_Communication_UEContextTransfer Response) message to the target AMF, and the UE context transfer response message Carries UE context, SUPI, horizontal K AMF derivation indication (keyAmfHDerivationInd indication).
  • the UE context includes a security context. If the source AMF has deduced the horizontal K AMF according to the local policy, the UE context carried in the response message is the new security context #1 derived by the source AMF in 403 .
  • the source AMF maintains the old security context as the current security context.
  • the source AMF maintains the old security context as the current security context between the source AMF and the UE, In other words, the source AMF continues to use the old security context as the current security context between the source AMF and the UE, that is, the source AMF does not delete the old security context and the non-current security context, and does not change the security context between the source AMF and the UE.
  • the current security context is the old security context as the current security context between the source AMF and the UE.
  • the source AMF may not need to maintain the new security context #1, that is, after 403, the source AMF may delete the new security context #1.
  • the target AMF sends a security mode command message to the UE.
  • the target AMF receives the UE context transfer response message from the source AMF, and if the UE context transfer response message carries the SUPI of the UE, the target AMF saves the new NAS security context# carried in the UE context transfer response message 1. If the target AMF activates the security context carried in the response message according to the local policy, that is, the new security context #1 deduced by the source AMF, the target AMF initiates a non access stratum security mode command (non access stratum security mode command, NAS SMC) message to the UE to establish the NAS security context between the UE and the target AMF.
  • the security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP).
  • the HDP may be K_AMF_change_flag with a value of 1, wherein the K_AMF_change_flag with a value of 1 is used to instruct the UE to perform horizontal K AMF derivation.
  • the NASSMC message may also include selected NAS algorithms, including NAS encryption algorithms and NAS integrity protection algorithms. It should be understood that the target AMF performs integrity protection on the security mode command message through the new security context #1.
  • the UE horizontally deduces and generates a new security context #1.
  • the UE receives a security mode command message from the target AMF, and performs K AMF derivation according to the horizontal K AMF derivation indication carried in the security mode command message, that is, the UE performs Kamf derivation generation according to the key Kamf in the current security context A new key Kamf' is obtained, so as to obtain a new security context #1, and the new security context #1 includes the new key Kamf'.
  • the UE uses the new security context #1 to check the integrity of the security mode command message, and if the integrity check of the security mode command message passes, the UE sends a security mode completion message to the target AMF.
  • the UE maintains the old security context and the new security context #1.
  • the UE after successfully verifying the security mode command message using the new security context #1, the UE saves the old security context, and then sets the new security context #1 as the current security context; or, in another In the implementation manner, after the UE successfully verifies the security model command message through the new security context #1, it saves the new security context #1, and at the same time, the UE continues to maintain the old security context as the current security context.
  • the UE After 408, if the UE receives a registration acceptance message from the target AMF, if the UE saves the old security context at 408 and sets the new security context #1 as the current security context, then according to the registration acceptance message, the UE deletes the old security context If the UE saves the new security context #1 in 408 and maintains the old security context as the current security context, according to the registration acceptance message, the UE sets the second security context as the current security context and deletes the first Security context, that is, when the second security context is used for the current access, the UE deletes the stored old security context (and Kamf).
  • the UE sends a registration request message to the target AMF.
  • the UE saves the old security context at 408, and sets the new security context #1 as the current security context, in this case, if the registration process is not successfully completed, or if the registration process fails, or That is, if the security mode completion message fails to be sent, the UE sets the old security context as the current security context (or the UE maintains Kamf and the NAS security context associated with Kamf), or the UE uses the old security context as the current security context, In other words, the UE makes the old security context the current security context, and the UE deletes the new security context #1.
  • the old security context here can also be referred to as the previous security context, or the security context before horizontal deduction, or the security context used before registration; if the UE saves the new security context #1 at 408 and maintains the old security context The context is the current security context. In this case, if the registration process is not successfully completed, or if the registration process fails, or the security mode completion message fails to be sent, the UE deletes the new security context #1.
  • the UE may re-initiate the registration procedure, for example, the UE sends a registration request message to the target AMF. It should be understood that the UE performs integrity protection on the registration request message through the old security context. It should also be understood that the target AMF here may be different from the target AMF receiving the registration request message in step 401, that is, the UE may have moved to the area of another target AMF.
  • the UE deletes the new security context #1, and sets the old security context as the current security context;
  • the UE receives a registration rejection message from the network. If the registration rejection message causes the security context to be deleted, the UE deletes the new security context #1 and the old security context; if the registration rejection message does not cause the security context to be deleted , the UE deletes the new security context #1, and sets the old security context as the current security context;
  • the UE deletes the new security context #1 and sets the old security context as the current security context.
  • the target AMF sends a UE context transfer request message to the source AMF.
  • the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE.
  • the Namf_Communication_UEContextTransfer includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 409 in the Namf_Communication_UEContextTransfer.
  • the source AMF performs horizontal deduction according to the local policy to generate a new security context #2.
  • the source AMF uses the old security context to verify the integrity of the RR message in the UE context transfer request message. If the integrity verification of the RR message passes, the source AMF decides whether to derive a new security context according to the local policy. If the source AMF decides to deduce a new security context, the source AMF performs horizontal K AMF deduction to obtain a new security context #2.
  • the source AMF sends a UE context transfer response message to the target AMF.
  • the source AMF in response to the UE context transfer request message, sends a UE context transfer response (Namf_Communication_UEContextTransfer Response) message to the target AMF, and the UE context transfer response message carries the UE context, SUPI, and horizontal K AMF derivation indication (keyAmfHDerivationInd indication) .
  • the UE context includes a security context. If the source AMF has deduced the horizontal K AMF according to the local policy, the UE context carried in the response message is the new security context #2 derived by the source AMF in step 411 .
  • the target AMF sends a security mode command message to the UE.
  • the target AMF receives the UE context transfer response message from the source AMF, and if the UE context transfer response message carries the SUPI of the UE, the target AMF saves the new NAS security context# carried in the UE context transfer response message 2. If the target AMF activates the security context carried in the response message according to the local policy, that is, the new security context #2 deduced by the source AMF, the target AMF initiates a non-access stratum security mode command message to the UE to establish UE and NAS security context between target AMFs.
  • the security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP).
  • the HDP may be K_AMF_change_flag with a value of 1, wherein the K_AMF_change_flag with a value of 1 is used to instruct the UE to perform horizontal K AMF derivation. It should be understood that the target AMF performs integrity protection on the security mode command message through the new security context #2.
  • the UE horizontally deduces to obtain a new security context.
  • the UE receives a security mode command message from the target AMF, performs K AMF derivation according to the horizontal K AMF derivation indication carried in the security mode command message, and generates a new security context #2.
  • the UE uses the new security context #2 to check the integrity of the security mode command message.
  • the UE sends a security mode completion message to the target AMF.
  • the UE sends a security mode completion message to the target AMF.
  • the UE sets new security context #2 as the current security context.
  • the UE After the UE passes the integrity check of the security mode command message using the new security context #2, it saves the old security context, and then sets the new security context #2 as the current security context. It should be understood that 416 may be performed before 415 or after 415, which is not limited in this application.
  • the target AMF sends a registration acceptance message to the UE.
  • the target AMF sends a registration acceptance message to the UE. It should be understood that the target AMF uses the new security context #2 deduced at 414 to perform integrity protection on the registration acceptance message.
  • the UE deletes the old security context.
  • the UE determines that the registration is successful, and then the UE deletes the old security context.
  • the source mobility management network element maintains the first security context as the current security context after performing horizontal key derivation, and the terminal device maintains or sets The first security context is the current security context, thereby avoiding the problem that the security contexts maintained by the terminal side and the network side are inconsistent, which may lead to subsequent failure of the registration process.
  • FIG. 5 shows an exemplary flow chart of a method 500 for managing security context provided by an embodiment of the present application.
  • Method 500 includes:
  • the UE sends a registration request message to a target AMF.
  • the target AMF sends a UE context transfer request message to the source AMF.
  • the source AMF performs horizontal deduction according to the local policy to generate a new security context #1.
  • the source AMF sends a UE context transfer response message to the target AMF.
  • steps 501 to 504 are similar to steps 401 to 404 of the method 400, and for the sake of brevity, no detailed description is given.
  • the source AMF sets new security context #1 as the current security context.
  • the source AMF after the source AMF obtains the new key Kamf' through derivation, or after the source AMF obtains the new security context #1, it sets the new security context #1 as the current security context.
  • the source AMF deletes the old security context and the non-current security context.
  • 505 may be performed before 504, may be performed after 504, or may be performed at the same time, which is not limited in this application.
  • the target AMF sends a security mode command message to the UE.
  • the UE performs horizontal derivation to obtain a new security context #1.
  • steps 506 to 507 are similar to steps 406 to 407 in the method 400 and will not be repeated here.
  • the UE sets new security context #1 as the current security context.
  • the UE after obtaining the new security context #1 through horizontal derivation, the UE sets the new security context #1 as the current security context.
  • the UE deletes the old security context and the non-current security context.
  • the UE sends a registration request message to the target AMF.
  • the UE may re-initiate the registration procedure. For example, the UE sends a registration request message to the target AMF. It should be understood that the UE performs integrity protection on the registration request message through the new security context #1. It should also be understood that the present application does not limit the reasons for UE registration failure.
  • the target AMF sends a UE context transfer request message to the source AMF.
  • the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE.
  • the Namf_Communication_UEContextTransfer includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received at 510 in the Namf_Communication_UEContextTransfer.
  • the source AMF performs horizontal deduction according to the local policy to generate a new security context #2.
  • the source AMF uses the old security context to verify the integrity of the received RR message. If the integrity verification of the RR message passes, the source AMF decides whether to derive a new security context according to the local policy. If the source AMF decides to deduce a new security context, the source AMF performs horizontal K AMF deduction to obtain a new security context #2.
  • the source AMF Since in this embodiment, the source AMF has obtained the new security context #1 by performing horizontal K AMF derivation in step 503, and in step 505, the source AMF sets the new security context #1 as the current security context, therefore, the source The AMF may also not perform step 511 .
  • the source AMF sends a UE context transfer response message to the target AMF
  • the source AMF in response to the UE context transfer request message, sends a UE context transfer response (Namf_Communication_UEContextTransfer Response) message to the target AMF, and the UE context transfer response message carries UE context and SUPI.
  • the UE context includes a security context. If the source AMF executes step 511, the security context is the new security context #2 obtained by the source AMF through horizontal derivation in step 511, and the response message also carries a horizontal K AMF derivation indication (keyAmfHDerivationInd indication); if the source AMF If step 511 is not executed, the security context is the new security context #1 obtained by the source AMF through horizontal derivation in step 503 .
  • the target AMF sends a security mode command message to the UE.
  • the target AMF receives the UE context transmission response message from the source AMF, and obtains the new security context deduced by the source AMF from the response message. If the source AMF executes step 511, the new security context is new security context #2; if the source AMF does not execute step 511, then the new security context is new security context #1.
  • the target AMF initiates a non-access stratum security mode command message to the UE for establishing a NAS security context between the UE and the target AMF.
  • the security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP), and the HDP includes K_AMF_change_flag with a value of 1, which is used to instruct the UE to perform horizontal K AMF derivation.
  • HDP horizontal derivation parameter
  • K_AMF_change_flag K_AMF_change_flag with a value of 1, which is used to instruct the UE to perform horizontal K AMF derivation.
  • the UE performs horizontal deduction to generate a new security context.
  • the UE receives a security mode command message from the target AMF, and if the security mode command message carries a horizontal K AMF derivation indication, the UE performs horizontal K AMF derivation to generate a new security context #2.
  • the UE sends a security mode completion message to the target AMF.
  • the UE uses the new security context #2 to perform integrity verification on the security mode command message; if the UE does not perform step 514, the UE uses the new security context #1 to verify the security mode command messages for integrity verification. If the verification is passed, the UE sends a security mode completion message to the target AMF.
  • the UE If the UE successfully verifies the integrity of the security mode complete message through the new security context #2, the UE sets the new security context #2 as the current security context. And the UE deletes the old security context.
  • the target AMF uses the new security context to send a registration acceptance message to the UE.
  • the source mobility management network element sets the second security context as the current security context after performing horizontal key derivation, and the terminal device also sets the second security context as the current security context after performing horizontal key derivation, so that To avoid the inconsistency of the security context maintained on the terminal side and the network side, resulting in the possible subsequent failure of the registration process.
  • FIG. 6 shows an exemplary flowchart of a method 600 for managing a full context provided by an embodiment of the present application.
  • Method 600 includes:
  • the UE sends a registration request message to a target AMF.
  • the target AMF sends a UE context transfer request message to the source AMF.
  • the source AMF performs horizontal deduction according to the local policy to generate a new security context #1.
  • the source AMF sends a UE context transfer response message to the target AMF.
  • steps 601 to 604 are similar to steps 401 to 404 of the method 400, and for the sake of brevity, no detailed description is given.
  • the source AMF saves the old security context and the new security context #1.
  • the source AMF After the source AMF generates the new security context #1 through horizontal deduction, it saves the new security context #1 and the old security context at the same time, or in other words, maintains the new security context #1 and the old security context at the same time, or in other words, saves the new security context #1, retaining the old security context.
  • the source AMF saves the old security context and sets the new security context #1 as the current security context; in another example, the source AMF continues to maintain the old security context as the current security context while saving the new security context # 1.
  • the target AMF sends a security mode command message to the UE.
  • the UE performs horizontal derivation to obtain a new security context #1.
  • steps 606 to 607 are similar to steps 406 to 407 in the method 400 and will not be repeated here.
  • the UE sets new security context #1 as the current security context.
  • the UE after obtaining the new security context #1 through horizontal derivation, the UE sets the new security context #1 as the current security context.
  • the UE deletes the old security context and the non-current security context.
  • the UE sends a registration request message to the target AMF.
  • the UE when the UE fails to register, the UE re-initiates the registration procedure. For example, the UE sends a registration request message to the target AMF. It should be understood that the UE performs integrity protection on the registration request message through the new security context #1. This application does not limit the reasons for UE registration failure.
  • the target AMF sends a UE context transfer request message to the source AMF.
  • the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE.
  • the Namf_Communication_UEContextTransfer includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 609 in the Namf_Communication_UEContextTransfer.
  • the source AMF uses the new security context and the old security context to check the integrity of the registration request message.
  • the source AMF uses the new security context #1 and the old security context to verify the integrity of the registration request message in the UE context transfer request message.
  • the source AMF If the source AMF successfully checks the integrity of the registration request message using the new security context #1, the source AMF deletes the old security context. If the source AMF sets the old security context as the current security context in step 605, then the source AMF deletes the old security context and sets the new security context #1 as the current security context;
  • the source AMF fails to verify the integrity of the registration request message using the new security context #1, the source AMF uses the old security context to verify the integrity of the registration request message. If the verification is successful, the source AMF Delete the new security context #1, and if the source AMF sets the new security context #1 as the current security context in step 605, then the source AMF sets the old security context as the current security context at this time;
  • the source AMF can delete both the new security context #1 and the old security context.
  • the source AMF returns a UE context transmission response message to the target AMF, where the response message is used to indicate that the temporary identifier 5G-GUTI cannot be obtained.
  • the present application does not limit the sequence of integrity verification using the new security context #1 and the old security context. That is to say, the source AMF can first use the new security context #1 to verify the integrity of the registration request message, or use the old security context to first verify the integrity of the registration request message, which is not limited in this application .
  • the source AMF performs horizontal deduction according to the local policy to generate a new security context #2.
  • the source AMF After the source AMF successfully checks the integrity of the registration request message through the new security context #1 or the old security context, if the source AMF decides to deduce a new security context according to the local policy, the source AMF performs level K AMF Deduction, get the new security context #2.
  • step 612 may not be executed.
  • the source AMF sends a UE context transfer response message to the target AMF.
  • the source AMF in response to the UE context transfer request message, sends a UE context transfer response message to the target AMF, and the response message carries the UE context and SUPI.
  • the UE context includes a security context. If the source AMF executes step 612, the security context is the new security context #2 obtained by the source AMF through horizontal derivation in step 612, and the response message carries the level K AMF derivation indication (keyAmfHDerivationInd indication); if the source AMF does not Step 612 is executed, and the security context is the new security context #1 obtained by the source AMF through horizontal derivation in step 603 .
  • the target AMF sends a security mode command message to the UE.
  • the target AMF receives the UE context transmission response message from the source AMF, and obtains the new security context deduced by the source AMF from the response message. If the source AMF executes 612, the new security context is new security context #2; if the source AMF does not execute 612, then the new security context is new security context #1.
  • the target AMF initiates a non-access stratum security mode command message to the UE for establishing a NAS security context between the UE and the target AMF.
  • the security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP), and the HDP includes K_AMF_change_flag with a value of 1, which is used to instruct the UE to perform horizontal K AMF derivation.
  • HDP horizontal derivation parameter
  • K_AMF_change_flag K_AMF_change_flag with a value of 1, which is used to instruct the UE to perform horizontal K AMF derivation.
  • a new security context is generated through UE horizontal deduction.
  • the UE receives a security mode command message from the target AMF, and if the security mode command message carries a horizontal K AMF derivation indication, the UE performs horizontal K AMF derivation to generate a new security context #2.
  • the UE sends a security mode completion message to the target AMF.
  • the UE uses the new security context #2 to verify the integrity of the security mode command message; if the UE does not perform step 615, the UE uses the new security context #1 to verify the security mode command messages for integrity verification. If the verification is passed, the UE sends a security mode complete message to the target AMF.
  • the UE if the UE successfully verifies the integrity of the security mode command message through the new security context #2, the UE sets the new security context #2 as the current security context. And the UE deletes the old security context.
  • the target AMF uses the new security context to send a registration acceptance message to the UE.
  • the source mobility management network element maintains the first security context and the second security context at the same time after performing horizontal key derivation, so that no matter whether the terminal device side sets the first security context or the second security context as the current security context , can avoid the problem of inconsistency of the security context maintained by the terminal side and the network side.
  • the method for managing the security context provided by the embodiment of the present application is described by taking the registration process applied to the terminal device as an example, but it should be understood that the method is also applicable to scenarios where other network devices perform horizontal key derivation, for example In other processes in the future, the network device performs horizontal key derivation according to the local policy, and the method for managing the security context provided by the embodiment of the present application can be used to solve the problem of inconsistency between the security context maintained by the network side and the terminal side.
  • FIG. 7 is a schematic block diagram of an apparatus 10 for managing a security context provided by an embodiment of the present application.
  • the device 10 includes a transceiver module 11 and a processing module 12 .
  • the transceiver module 11 can realize corresponding communication functions, the processing module 12 is used for data processing, or the transceiver module 11 is used for performing receiving and sending related operations, and the processing module 12 is used for performing other operations except receiving and sending .
  • the transceiver module 11 can also be called a communication interface or a communication unit.
  • the device 10 may correspond to the mobility management network element in the above method embodiment, for example, the source mobility management network element, or the target mobility management network element (including the first target mobility management network element or the second 2. The target mobility management network element), or the source AMF, or the target AMF.
  • the apparatus 10 may correspond to the target mobility management network element 20 or the source mobility management network element 30 in the method 300 of the embodiment of the present application, or the target AMF or the source AMF in the methods 400 to 600 .
  • the apparatus 10 may include a module for executing the method performed by the target mobility management network element 20 or the source mobility management network element 30 (target AMF or source AMF) in FIGS. 3 to 6 .
  • each unit in the device 10 and the above-mentioned other operations and/or functions are respectively for realizing the corresponding flow of the method shown in FIG. 3 to FIG. 6 .
  • the transceiver module 11 in the device 10 executes the receiving and sending operations performed by the target mobility management network element 20 or the source mobility management network element 30 (target AMF or source AMF) in the above method embodiments, and the processing module 12 then Perform operations other than this receive and send operation.
  • the apparatus 10 may correspond to the terminal device 30 (or UE) in the above method embodiments.
  • the apparatus 10 may correspond to the terminal device 30 in the method 300 of the embodiment of the present application, or the UE in the methods 400 to 600.
  • the apparatus 10 may include modules for executing the methods performed by the terminal device 30 (or UE) in FIG. 3 to FIG. 6 .
  • each unit in the device 10 and the above-mentioned other operations and/or functions are respectively for realizing the corresponding flow of the method shown in FIG. 3 to FIG. 6 .
  • the transceiver module 11 in the apparatus 10 executes the receiving and sending operations performed by the terminal equipment 30 (or UE) in the above method embodiments, and the processing module 12 executes operations other than the receiving and sending operations.
  • FIG. 8 is a schematic diagram of an apparatus 20 for managing a security context provided by an embodiment of the present application.
  • the device 20 may correspond to the target mobility management network element 20 or the source mobility management network element 30 (target AMF or source AMF) in the above method embodiment; in another possible design , the apparatus 10 may correspond to the terminal device 30 (or UE) in the above method embodiments.
  • the device 20 may include a processor 21 (ie, an example of a processing module) and a memory 22 .
  • the memory 22 is used to store instructions
  • the processor 21 is used to execute the instructions stored in the memory 22, so that the device 20 implements the steps performed by the terminal device or the network device in the method corresponding to FIG. 3 to FIG. 6 , the network device It may be the target mobility management network element in methods 300 to 600, or the source mobility management network element, or the target AMF, or the source AMF.
  • the device 20 may also include an input port 23 (ie, an example of a transceiver module) and an output port 24 (ie, another example of a transceiver module).
  • the processor 21 , the memory 22 , the input port 23 and the output port 24 can communicate with each other through internal connection paths, and transmit control and/or data signals.
  • the memory 22 is used to store a computer program, and the processor 21 can be used to call and run the computer program from the memory 22, to control the input port 23 to receive signals, and to control the output port 24 to send signals, so as to complete the terminal equipment or Steps for network devices.
  • the memory 22 can be integrated in the processor 21 or can be set separately from the processor 21 .
  • the input port 23 is a receiver
  • the output port 24 is a transmitter.
  • the receiver and the transmitter may be the same or different physical entities. When they are the same physical entity, they can be collectively referred to as transceivers.
  • the input port 23 is an input interface
  • the output port 24 is an output interface
  • the functions of the input port 23 and the output port 24 may be realized by a transceiver circuit or a dedicated chip for transceiver.
  • the processor 21 may be realized by a dedicated processing chip, a processing circuit, a processor or a general-purpose chip.
  • a general-purpose computer to implement the communication device provided in the embodiment of the present application.
  • the program codes to realize the functions of the processor 21 , the input port 23 and the output port 24 are stored in the memory 22 , and the general processor realizes the functions of the processor 21 , the input port 23 and the output port 24 by executing the codes in the memory 22 .
  • FIG. 9 shows a schematic structural diagram of a simplified network device 30 .
  • the network equipment includes 31 parts and 32 parts.
  • Part 31 is mainly used for the transmission and reception of radio frequency signals and the conversion of radio frequency signals and baseband signals; part 32 is mainly used for baseband processing and control of network equipment.
  • Part 31 may generally be referred to as a transceiver module, a transceiver, a transceiver circuit, or a transceiver.
  • the part 32 is usually the control center of the network device, which can be generally referred to as a processing module, and is used to control the network device to perform the processing operations on the network device side in the foregoing method embodiments.
  • the transceiver module of Part 31, which may also be referred to as a transceiver or transceiver, etc., includes an antenna and a radio frequency circuit, wherein the radio frequency circuit is mainly used for radio frequency processing.
  • the device used to realize the receiving function in Part 31 can be regarded as a receiving module
  • the device used to realize the sending function can be regarded as a sending module, that is, Part 31 includes a receiving module and a sending module.
  • the receiving module may also be called a receiver, receiver, or receiving circuit, etc.
  • the sending module may be called a transmitter, transmitter, or transmitting circuit, etc.
  • Section 32 may include one or more single boards, and each single board may include one or more processors and one or more memories.
  • the processor is used to read and execute programs in the memory to realize baseband processing functions and control of network devices. If there are multiple single boards, each single board can be interconnected to enhance the processing capability. As an optional implementation, it is also possible that multiple single boards share one or more processors, or that multiple single boards share one or more memories, or that multiple single boards share one or more processors at the same time. device.
  • the network device shown in FIG. 9 may be any network device shown in the methods shown in FIGS. 3 to 6, such as the source mobility management network element (20), the target mobility management network element (10) etc.
  • the transceiver module of part 31 is used to execute the steps related to the sending and receiving of any network device in the methods shown in Figures 3 to 6; the part 32 is used to execute the steps related to the processing of any network device in the methods shown in Figures 3 to 6 step.
  • FIG. 9 is only an example rather than a limitation, and the foregoing network device including a transceiver module and a processing module may not depend on the structure shown in FIG. 9 .
  • the chip When the device 40 is a chip, the chip includes a transceiver module and a processing module.
  • the transceiver module may be an input-output circuit or a communication interface;
  • the processing module is a processor or a microprocessor or an integrated circuit integrated on the chip.
  • FIG. 10 is a schematic structural diagram of a terminal device 40 provided in the present application.
  • the terminal device 40 includes a processor, a memory, a control circuit, an antenna, and an input and output device.
  • the processor is mainly used to process the communication protocol and communication data, and to control the entire terminal device, execute the software program, and process the data of the software program. described action.
  • the memory is mainly used for storing software programs and data, such as storing the codebook described in the above embodiments.
  • the control circuit is mainly used for conversion of baseband signal and radio frequency signal and processing of radio frequency signal.
  • the control circuit and the antenna can also be called a transceiver, which is mainly used to send and receive radio frequency signals in the form of electromagnetic waves.
  • Input and output devices such as touch screens, display screens, and keyboards, are mainly used to receive data input by users and output data to users.
  • the processor can read the software program in the storage unit, interpret and execute the instructions of the software program, and process the data of the software program.
  • the processor performs baseband processing on the data to be sent, and then outputs the baseband signal to the radio frequency circuit.
  • the radio frequency circuit receives the radio frequency signal through the antenna, converts the radio frequency signal into a baseband signal, and outputs the baseband signal to the processor, and the processor converts the baseband signal into data and processes the data.
  • FIG. 10 only shows a memory and a processor. In an actual terminal device, there may be multiple processors and memories.
  • a storage may also be called a storage medium or a storage device, etc., which is not limited in this embodiment of the present application.
  • the processor may include a baseband processor and a central processing unit, the baseband processor is mainly used to process communication protocols and communication data, and the central processor is mainly used to control the entire terminal device, execute A software program that processes data for a software program.
  • the processor in FIG. 10 integrates the functions of the baseband processor and the central processing unit.
  • the baseband processor and the central processing unit may also be independent processors, interconnected through technologies such as a bus.
  • a terminal device may include multiple baseband processors to adapt to different network standards, a terminal device may include multiple central processors to enhance its processing capability, and various components of the terminal device may be connected through various buses.
  • the baseband processor may also be expressed as a baseband processing circuit or a baseband processing chip.
  • the central processing unit may also be expressed as a central processing circuit or a central processing chip.
  • the function of processing the communication protocol and communication data can be built in the processor, or can be stored in the storage unit in the form of a software program, and the processor executes the software program to realize the baseband processing function.
  • the terminal device 40 includes a transceiver unit 41 and a processing unit 42 .
  • the transceiver unit may also be referred to as a transceiver, a transceiver, a transceiver device, and the like.
  • the device in the transceiver unit 41 for realizing the receiving function can be regarded as a receiving unit
  • the device in the transceiver unit 41 for realizing the sending function can be regarded as a sending unit, that is, the transceiver unit 41 includes a receiving unit and a sending unit.
  • the receiving unit may also be called a receiver, receiver, receiving circuit, etc.
  • the sending unit may be called a transmitter, transmitter, or transmitting circuit, etc.
  • the terminal device shown in FIG. 10 may perform the actions performed by the terminal device in the methods shown in FIGS. 3 to 6 .
  • the terminal device shown in FIG. 10 may perform the actions performed by the terminal device in the methods shown in FIGS. 3 to 6 .
  • detailed descriptions thereof are omitted.
  • the embodiment of the present application further provides a computer-readable storage medium, on which computer instructions for implementing the method executed by the first network device in the above method embodiment are stored.
  • the computer program when executed by a computer, the computer can implement the method performed by the network device in the foregoing method embodiments.
  • the embodiments of the present application also provide a computer program product including instructions, which, when executed by a computer, enable the computer to implement the method executed by the first device or the method executed by the second device in the above method embodiments.
  • An embodiment of the present application further provides a communication system, where the communication system includes the network device in the foregoing embodiments.
  • the network device may include a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
  • the hardware layer may include hardware such as a central processing unit (central processing unit, CPU), a memory management unit (memory management unit, MMU), and memory (also called main memory).
  • the operating system of the operating system layer can be any one or more computer operating systems that realize business processing through processes, for example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system.
  • the application layer may include applications such as browsers, address books, word processing software, and instant messaging software.
  • the embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application, as long as the program that records the code of the method provided in the embodiment of the present application can be executed according to the method provided in the embodiment of the present application Just communicate.
  • the execution subject of the method provided by the embodiment of the present application may be a network device, or a functional module in the network device that can call a program and execute the program.
  • Computer-readable media may include, but are not limited to, magnetic storage devices (such as hard disks, floppy disks, or tapes, etc.), optical disks (such as compact discs (compact disc, CD), digital versatile discs (digital versatile disc, DVD), etc. ), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.).
  • magnetic storage devices such as hard disks, floppy disks, or tapes, etc.
  • optical disks such as compact discs (compact disc, CD), digital versatile discs (digital versatile disc, DVD), etc.
  • smart cards and flash memory devices for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.
  • Various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
  • processors mentioned in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and may also be other general processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits ( application specific integrated circuit (ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the memory mentioned in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (RAM).
  • RAM can be used as an external cache.
  • RAM may include the following forms: static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM) , double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and Direct memory bus random access memory (direct rambus RAM, DR RAM).
  • static random access memory static random access memory
  • dynamic RAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous DRAM
  • double data rate SDRAM double data rate SDRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • Direct memory bus random access memory direct rambus RAM, DR RAM
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components
  • the memory storage module may be integrated in the processor.
  • memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to implement the solutions provided in this application.
  • each functional unit in each embodiment of the present application may be integrated into one unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer may be a personal computer, a server, or a network device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium, (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, DVD
  • a semiconductor medium for example, a solid state disk (SSD)
  • the aforementioned available The medium may include but not limited to: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

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

Abstract

The present application provides a method and apparatus for managing a security context. The method comprises: a terminal device sends a registration request message to a target mobility management network element, the registration request message comprising an identifier of the terminal device; the terminal device receives a non-access stratum (NAS) security mode command message from the target mobility management network element, the NAS security mode command message comprising horizontal derivation indication information; according to the horizontal derivation indication information, the terminal device generates a new key Kamf' according to a key Kamf in a first security context, wherein the first security context is a current security context of the terminal device; and in the case that a registration process is not successfully completed, the terminal device uses the first security context as the current security context. According to the solution, the problem of inconsistency between security contexts of a UE and a network side can be avoided.

Description

管理安全上下文的方法和装置Method and apparatus for managing security context
本申请要求于2021年10月30日提交中国专利局、申请号为202111278501.2、申请名称为“管理安全上下文的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202111278501.2 and application title "Method and Apparatus for Managing Security Context" filed with the China Patent Office on October 30, 2021, the entire contents of which are incorporated herein by reference .
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种管理安全上下文的方法和装置。The present application relates to the field of communication technologies, and in particular to a method and device for managing a security context.
背景技术Background technique
在第五代(the 5th generation)通信系统中,接入和移动管理功能(access and mobility management function,AMF)主要用于UE的注册、连接、移动性管理、签约信息鉴权等。当用户设备UE从一个AMF(记为源AMF)的区域移动到另一个AMF(记为目标AMF)的区域时(这里指UE在空闲态下发生位置变化),该UE需要通过网络注册流程注册到该目标AMF上。然而,按照现有技术规范,如果此时因为某些原因导致UE的网络注册流程失败,则可能会导致UE和网络侧源AMF上的安全上下文不一致。这种情况下,UE的注册请求无法通过NAS的完整性保护检查,从而导致UE之前通过源AMF建立的会话的会话信息也无法迁移到目标AMF中,进而可能会导致之前建立的PDU会话将被释放。In the fifth generation (the 5th generation) communication system, the access and mobility management function (AMF) is mainly used for UE registration, connection, mobility management, subscription information authentication, etc. When the user equipment UE moves from the area of one AMF (marked as the source AMF) to the area of another AMF (marked as the target AMF) (this refers to the location change of the UE in the idle state), the UE needs to register through the network registration process onto the target AMF. However, according to the existing technical specifications, if the network registration process of the UE fails due to some reasons at this time, it may cause inconsistency between the security contexts of the UE and the source AMF on the network side. In this case, the registration request of the UE cannot pass the integrity protection check of the NAS, so that the session information of the session established by the UE through the source AMF cannot be migrated to the target AMF, which may cause the previously established PDU session to be deleted. freed.
因此,在移动注册场景下,如何避免UE与网络侧的安全上下文不一致导致的问题。Therefore, in a mobile registration scenario, how to avoid problems caused by inconsistencies between security contexts of the UE and the network side.
发明内容Contents of the invention
本申请提供了一种管理完全上下文的方法和装置,可以避免出现UE与网络侧安全上下文不一致的问题。The present application provides a method and device for managing a complete context, which can avoid the problem of inconsistency between the security context of the UE and the network side.
第一方面,提供了一种管理安全上下文的方法,该方法包括:终端设备向目标移动管理网元发送注册请求消息,该注册请求消息包括该终端设备的标识;该终端设备接收来自该目标移动管理网元的非接入层NAS安全模式命令消息,该NAS安全模式命令消息包括水平推演指示信息;根据该水平推演指示信息,该终端设备根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,该第一安全上下文为该终端设备当前的安全上下文;在注册流程没有成功完成的情况下,该终端设备使用该第一安全上下文为当前安全上下文。In a first aspect, a method for managing a security context is provided, the method comprising: a terminal device sends a registration request message to a target mobility management network element, where the registration request message includes an identifier of the terminal device; the terminal device receives a message from the target mobile The NAS security mode command message of the management network element, the NAS security mode command message includes horizontal derivation indication information; according to the horizontal derivation indication information, the terminal device generates a new key Kamf according to the first security context Key Kamf'; wherein, the first security context is the current security context of the terminal device; if the registration process is not successfully completed, the terminal device uses the first security context as the current security context.
基于上述方案,在终端设备的注册流程中,如果终端设备进行了水平密钥推演,即利用第一安全上下文中的密钥Kamf进行水平推演得到了新的密钥Kamf’,若注册流程没有成功完成(或者说注册流程失败),终端设备使用第一安全上下文作为当前安全上下文,从而可以避免终端设备和网络侧安全上下文不一致的问题。因此在这种情况下,当注册流程没有成功完成,终端设备可以利用第一安全上下文再次发起注册流程。Based on the above solution, in the registration process of the terminal device, if the terminal device performs horizontal key derivation, that is, uses the key Kamf in the first security context to perform horizontal deduction to obtain a new key Kamf', if the registration process is not successful After completion (or failure of the registration process), the terminal device uses the first security context as the current security context, thereby avoiding the problem of inconsistent security contexts between the terminal device and the network side. Therefore, in this case, when the registration process is not successfully completed, the terminal device can use the first security context to initiate the registration process again.
结合第一方面,在第一方面的某些实现方式中,该方法还包括:该终端设备在生成该新的密钥Kamf’之后,维护该第一安全上下文和第二安全上下文;其中,该第二安全上下文包括该Kamf’和NAS密钥,该NAS密钥根据该Kamf’生成。With reference to the first aspect, in some implementation manners of the first aspect, the method further includes: after the terminal device generates the new key Kamf', maintaining the first security context and the second security context; wherein, the The second security context includes the Kamf' and a NAS key, and the NAS key is generated according to the Kamf'.
基于上述方案,终端设备进行了水平密钥推演之后,可以同时维护第一安全上下文和第二安全上下文,在这种情况下,无论注册成功,还是注册失败,终端都可以选择合适的安全上下文,以避免终端侧的安全上下文和网络侧的安全上下文不一致。Based on the above solution, after the terminal device performs horizontal key derivation, it can maintain the first security context and the second security context at the same time. In this case, regardless of whether the registration is successful or the registration fails, the terminal can select an appropriate security context. In order to avoid inconsistency between the security context on the terminal side and the security context on the network side.
结合第一方面,在第一方面的某些实现方式中,该维护该第一安全上下文和第二安全上下文,包括:该终端设备继续将该第一安全上下文作为当前安全上下文,且保存该第二安全上下文。With reference to the first aspect, in some implementation manners of the first aspect, maintaining the first security context and the second security context includes: the terminal device continues to use the first security context as the current security context, and saves the second security context. Two security contexts.
基于上述方案,终端设备在进行水平密钥推演之后,可以维护第一安全上下文为当前安全上下文,并保存第二安全上下文,在这种情况下,无论注册成功,还是注册失败,终端都可以选择合适的安全上下文。例如,如果注册成功,终端设备可以将第二安全上下文设置成当前安全上下文;如果注册失败,终端设备可以删除第二安全上下文,而使用第一安全上下文进行后续可能的注册流程从而可以避免终端侧的安全上下文和网络侧的安全上下文不一致。Based on the above solution, after performing horizontal key derivation, the terminal device can maintain the first security context as the current security context and save the second security context. In this case, whether the registration is successful or the registration fails, the terminal can choose Appropriate security context. For example, if the registration is successful, the terminal device can set the second security context as the current security context; if the registration fails, the terminal device can delete the second security context, and use the first security context for subsequent possible registration processes, so as to avoid terminal side The security context of the network side is inconsistent with the security context of the network side.
结合第一方面,在第一方面的某些实现方式中,该在注册流程没有成功完成的情况下,该终端设备使用该第一安全上下文为当前安全上下文,包括:该终端设备继续将该第一安全上下文作为当前安全上下文,以及删除该第二安全上下文。With reference to the first aspect, in some implementations of the first aspect, if the registration process is not successfully completed, the terminal device uses the first security context as the current security context, including: the terminal device continues to use the first security context A security context is used as the current security context, and the second security context is deleted.
基于上述方案,终端设备在进行水平密钥推演之后,当终端设备维护第一安全上下文为当前安全上下文,并保存第二安全上下文时,在这种情况下,如果注册失败,终端设备可以继续使用第一安全上下文作为当前安全上下文,因此在UE注册失败的情况下,也可以避免终端侧和网络侧的安全上下文不一致。Based on the above solution, after the terminal device performs horizontal key derivation, when the terminal device maintains the first security context as the current security context and saves the second security context, in this case, if the registration fails, the terminal device can continue to use The first security context is used as the current security context, so when the UE fails to register, it is also possible to avoid inconsistency between the security contexts on the terminal side and the network side.
结合第一方面,在第一方面的某些实现方式中,该维护该第一安全上下文和第二安全上下文,包括:该终端设备保存该第一安全上下文,并将该第二安全上下文作为当前安全上下文。With reference to the first aspect, in some implementation manners of the first aspect, maintaining the first security context and the second security context includes: the terminal device saves the first security context, and uses the second security context as the current security context.
基于上述方案,终端设备在进行水平密钥推演之后,可以保存第一安全上下文,并设置第二安全上下文为当前安全上下文,在这种情况下,无论注册成功,还是注册失败,终端都可以选择合适的安全上下文。例如,如果注册成功,终端设备可以维护第二安全上下文为当前安全上下文,并删除第一安全上下文;如果注册失败,终端设备可以设置第一安全上下文为当前安全上下文,从而可以使用第一安全上下文进行后续可能的注册流程,可以避免终端侧的安全上下文和网络侧的安全上下文不一致。Based on the above scheme, after performing horizontal key derivation, the terminal device can save the first security context and set the second security context as the current security context. In this case, regardless of whether the registration is successful or the registration fails, the terminal can choose Appropriate security context. For example, if the registration is successful, the terminal device can maintain the second security context as the current security context and delete the first security context; if the registration fails, the terminal device can set the first security context as the current security context, so that the first security context can be used Performing subsequent possible registration processes can avoid inconsistency between the security context on the terminal side and the security context on the network side.
结合第一方面,在第一方面的某些实现方式中,该在注册流程没有成功完成的情况下,该终端设备使用该第一安全上下文为当前安全上下文,包括:该终端设备将该第一安全上下文设置为当前安全上下文,以及删除该第二安全上下文。With reference to the first aspect, in some implementation manners of the first aspect, if the registration process is not successfully completed, the terminal device uses the first security context as the current security context, including: the terminal device uses the first The security context is set as the current security context, and the second security context is deleted.
基于上述方案,终端设备在进行水平密钥推演之后,当终端设备设置第二安全上下文为当前安全上下文,并保存第一安全上下文时,在这种情况下,如果注册失败,终端设备可以将保存的第一安全上下文设置为当前安全上下文,因此在UE注册失败的情况下,也可以避免终端侧和网络侧的安全上下文不一致。Based on the above solution, after the terminal device performs horizontal key derivation, when the terminal device sets the second security context as the current security context and saves the first security context, in this case, if the registration fails, the terminal device can save the The first security context of the UE is set as the current security context, so when the UE fails to register, it is also possible to avoid inconsistency between the security contexts on the terminal side and the network side.
结合第一方面,在第一方面的某些实现方式中,该方法还包括:该终端设备确定该注册流程没有成功完成。With reference to the first aspect, in some implementation manners of the first aspect, the method further includes: the terminal device determines that the registration process is not successfully completed.
基于上述方案,终端设备可以确定或判断注册流程是否失败,如果注册流程没有成功完成(或者说注册流程失败)的话,终端设备便设置或维护第一安全上下文为当前安全上下文,从而可以利用第一安全上下文进行后续可能的注册流程,避免在后续注册流程中因 终端侧或网络侧的安全上下文不一致导致的注册流程失败的情况。Based on the above solution, the terminal device can determine or judge whether the registration process fails. If the registration process is not successfully completed (or the registration process fails), the terminal device will set or maintain the first security context as the current security context, so that the first security context can be used. The security context is used to carry out subsequent possible registration processes, so as to avoid the failure of the registration process caused by the inconsistency of the security contexts on the terminal side or the network side in the subsequent registration process.
结合第一方面,在第一方面的某些实现方式中,该终端设备确定该注册流程没有成功完成,包括:该终端设备在接收到注册接受消息之前,确定NAS安全模式完成消息发送失败;或者,该终端设备在接收到注册接受消息之前,确定自身与接入网设备之间的链接释放;该终端设备在接收到注册接受消息之前,确定自身与接入网设备之间的RRC连接被挂起或者释放。With reference to the first aspect, in some implementation manners of the first aspect, the terminal device determining that the registration process has not been successfully completed includes: the terminal device determines that the NAS security mode completion message fails to be sent before receiving the registration acceptance message; or , the terminal device determines that the link between itself and the access network device is released before receiving the registration acceptance message; the terminal device determines that the RRC connection between itself and the access network device is suspended before receiving the registration acceptance message rise or release.
基于上述技术方案,在接收到注册接受消息之前,终端设备可以根据是否成功发送了NAS安全模式完成消息,或者是否链路异常释放、或者RRC连接是否被挂起或者释放等,来确定注册流程是否失败。如果注册流程没有成功完成的话,终端设备便设置或维护第一安全上下文为当前安全上下文,从而可以利用第一安全上下文进行后续可能的注册流程,避免在后续注册流程中因终端侧或网络侧的安全上下文不一致导致的注册流程失败的情况。Based on the above technical solution, before receiving the registration acceptance message, the terminal device can determine whether the registration process is complete according to whether the NAS security mode completion message is successfully sent, or whether the link is released abnormally, or whether the RRC connection is suspended or released, etc. fail. If the registration process is not successfully completed, the terminal device will set or maintain the first security context as the current security context, so that the first security context can be used for subsequent possible registration processes, and the subsequent registration process can be avoided due to the failure of the terminal side or the network side. Cases where the registration process fails due to inconsistent security contexts.
第二方面,提供了一种管理安全上下文的方法,该方法包括:源移动管理网元接收来自目标移动管理网元的上下文请求消息,该上下文请求消息用于请求获取终端设备的上下文;在需要进行水平密钥推演的情况下,该源移动管理网元根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,该第一安全上下文为该源移动管理网元与该终端设备之间当前的安全上下文;响应于该上下文请求消息,该源移动管理网元向该目标移动管理网元发送第二安全上下文;其中,该第二安全上下文包括该新的密钥Kamf’和NAS密钥,该NAS密钥根据该Kamf’生成;该源移动管理网元维护该第一安全上下文和/或该第二安全上下文。In a second aspect, a method for managing a security context is provided, the method comprising: a source mobility management network element receives a context request message from a target mobility management network element, and the context request message is used to request to obtain a context of a terminal device; In the case of horizontal key derivation, the source mobility management network element generates a new key Kamf' according to the key Kamf in the first security context; where the first security context is the source mobility management network element and the The current security context between terminal devices; in response to the context request message, the source mobility management network element sends a second security context to the target mobility management network element; wherein the second security context includes the new key Kamf' and a NAS key, where the NAS key is generated according to the Kamf'; the source mobility management network element maintains the first security context and/or the second security context.
基于上述方案,当源移动管理网元进行了水平密钥推演之后,可以维护第一安全上下文和/或第二安全上下文。Based on the above solution, after the source mobility management network element performs horizontal key derivation, it can maintain the first security context and/or the second security context.
具体来说,对于源移动管理网元,在水平推演之后,可以维持第一安全上下文为当前安全上下文,并删除第二安全上下文。在这种情况下,源移动管理网元始终使用第一安全上下文,可以避免网络侧和终端侧的上下文不一致。源移动管理网元可以利用该第一安全上下文对终端设备后续可能的注册请求进行安全验证,该方案可以防止网络侧因安全上下文和终端侧不一致导致的注册失败的情况。Specifically, for the source mobility management network element, after horizontal deduction, the first security context may be maintained as the current security context, and the second security context may be deleted. In this case, the source mobility management network element always uses the first security context, which can avoid context inconsistency between the network side and the terminal side. The source mobility management network element can use the first security context to perform security verification on subsequent possible registration requests of the terminal device, and this solution can prevent registration failures caused by inconsistencies between the security context on the network side and the terminal side.
也可以设置第二安全上下文为当前安全上下文,并删除第一安全上下文。在这种情况下,源移动管理网元在生成第二安全上下文之后,并将第二安全上下文设置为当前安全上下文。在终端设备生成第二安全上下文便将第二安全上下文设置为当前安全上下文的情况下,可以避免终端设备和网络侧的安全上下文不一致所带来的问题。It is also possible to set the second security context as the current security context and delete the first security context. In this case, after the source mobility management network element generates the second security context, it sets the second security context as the current security context. In the case that the terminal device generates the second security context and then sets the second security context as the current security context, problems caused by inconsistencies between the security contexts of the terminal device and the network side can be avoided.
也可以维持第一安全上下文为当前安全上下文,并保存第二安全上下文;或者设置第二安全上下文为当前安全上下文,并保存第一安全上下文。在这两种情况中,无论终端设备在水平推演之后,使用第一安全上下文还是第二安全上下文作为当前安全上下文,都可以保证源移动管理网元侧持有对应的安全上下文,从而可以避免网络侧无法对终端设备的注册请求的安全保护验证成功的问题。It is also possible to maintain the first security context as the current security context and save the second security context; or set the second security context as the current security context and save the first security context. In these two cases, no matter whether the terminal device uses the first security context or the second security context as the current security context after horizontal deduction, it can ensure that the source mobility management network element side holds the corresponding security context, thereby avoiding network The problem that the security protection verification of the registration request of the terminal device cannot be successfully verified on the side.
结合第二方面,在第二方面的某些实现方式中,该在该源移动管理网元维护该第一安全上下文和该第二安全上下文的情况下,该方法还包括:该源移动管理网元接收来自又一个目标移动管理网元的上下文请求消息,该上下文请求消息用于请求终端设备的上下文,该上下文请求消息包括受到了安全保护的注册请求消息,该注册请求消息包括该终端设备 的标识;该源移动管理网元利用该第一安全上下文和该第二安全上下文对该注册请求消息进行安全验证;在利用该第一安全上下文和该第二安全上下文中的任一个对该注册请求消息安全验证成功,且需要进行水平密钥推演的情况下,该源移动管理网元根据验证成功的安全上下文中的密钥,生成新的密钥Kamf”,并向该目标移动管理网元发送第三安全上下文,该第三安全上下文包括该新的密钥Kamf”。With reference to the second aspect, in some implementations of the second aspect, when the source mobility management network element maintains the first security context and the second security context, the method further includes: the source mobility management network The element receives a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, and the registration request message includes the terminal device's identification; the source mobility management network element uses the first security context and the second security context to perform security verification on the registration request message; If the message security verification is successful and horizontal key derivation is required, the source mobility management network element generates a new key Kamf" based on the key in the security context of the successful verification, and sends it to the target mobility management network element A third security context, the third security context includes the new key Kamf".
基于上述技术方案,在源移动管理网元维护第一安全上下文和第二安全上下文的情况,如果源移动管理网元接收到来自又一个目标移动管理网元的上下文请求消息的话,源移动管理网元可以分别使用第一安全上下文和第二安全上下文对该上下文请求消息中携带的注册请求消息进行安全验证,从而可以避免终端侧和网络侧的安全上下文不一致导致的验证失败的问题。Based on the above technical solution, when the source mobility management network element maintains the first security context and the second security context, if the source mobility management network element receives a context request message from another target mobility management network element, the source mobility management network element The unit can respectively use the first security context and the second security context to perform security verification on the registration request message carried in the context request message, so as to avoid the problem of verification failure caused by inconsistent security contexts on the terminal side and the network side.
结合第二方面,在第二方面的某些实现方式中,该在该源移动管理网元维护该第一安全上下文和该第二安全上下文的情况下,该方法还包括:该源移动管理网元接收来自又一个目标移动管理网元的上下文请求消息,该上下文请求消息用于请求终端设备的上下文,该上下文请求消息包括受到了安全保护的注册请求消息,该注册请求消息包括该终端设备的标识;该源移动管理网元利用该第一安全上下文和该第二安全上下文对该注册请求消息进行安全验证;在利用该第一安全上下文和该第二安全上下文中的任一个对该注册请求消息安全验证成功,且不需要进行水平密钥推演的情况下,该源移动管理网元向该目标移动管理网元发送验证成功的安全上下文。With reference to the second aspect, in some implementations of the second aspect, when the source mobility management network element maintains the first security context and the second security context, the method further includes: the source mobility management network The element receives a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, and the registration request message includes the terminal device's identification; the source mobility management network element uses the first security context and the second security context to perform security verification on the registration request message; If the message security verification is successful and no horizontal key derivation is required, the source mobility management network element sends the security context of successful verification to the target mobility management network element.
基于上述技术方案,在源移动管理网元维护第一安全上下文和第二安全上下文的情况,如果源移动管理网元接收到来自又一个目标移动管理网元的上下文请求消息的话,源移动管理网元可以分别使用第一安全上下文和第二安全上下文对该上下文请求消息中携带的注册请求消息进行安全验证,从而可以避免终端侧和网络侧的安全上下文不一致导致的验证失败的问题。Based on the above technical solution, when the source mobility management network element maintains the first security context and the second security context, if the source mobility management network element receives a context request message from another target mobility management network element, the source mobility management network element The unit can respectively use the first security context and the second security context to perform security verification on the registration request message carried in the context request message, so as to avoid the problem of verification failure caused by inconsistent security contexts on the terminal side and the network side.
结合第二方面,在第二方面的某些实现方式中,该方法还包括:该源移动管理网元接收来自该目标移动管理网元的注册成功指示信息,该注册成功指示信息用于指示该终端设备成功注册到了网络;该源移动管理网元删除该第一安全上下文和/或该第二安全上下文。With reference to the second aspect, in some implementations of the second aspect, the method further includes: the source mobility management network element receiving registration success indication information from the target mobility management network element, where the registration success indication information is used to indicate that the The terminal device is successfully registered to the network; the source mobility management network element deletes the first security context and/or the second security context.
基于上述技术方案,源移动管理网元可以在接收到注册成功指示信息之后,将其维护的安全上下文删除,从而可以节省资源。Based on the above technical solution, the source mobility management network element can delete the security context it maintains after receiving the registration success indication information, so as to save resources.
结合第二方面,在第二方面的某些实现方式中,该方法还包括:该源移动管理网元接收去注册通知消息,该去注册通知消息用于指示该源移动管理网元执行该终端设备的去注册;该源移动管理网元删除该第一安全上下文和/或该第二安全上下文。With reference to the second aspect, in some implementations of the second aspect, the method further includes: the source mobility management network element receives a de-registration notification message, and the de-registration notification message is used to instruct the source mobility management network element to execute the terminal De-registration of the device: the source mobility management network element deletes the first security context and/or the second security context.
基于上述技术方案,源移动管理网元可以在接收到去注册通知消息之后,将其维护的安全上下文删除,从而可以节省资源。Based on the above technical solution, after receiving the de-registration notification message, the source mobility management network element can delete the security context it maintains, thereby saving resources.
结合第二方面,在第二方面的某些实现方式中,该方法还包括:在预设时间之后,该源移动管理网元删除该第一安全上下文和/或该第二安全上下文。With reference to the second aspect, in some implementation manners of the second aspect, the method further includes: after a preset time, the source mobility management network element deletes the first security context and/or the second security context.
基于上述技术方案,源移动管理网元可以在预设时间过后,将其维护的安全上下文删除,从而可以节省资源。Based on the above technical solution, the source mobility management network element can delete the security context it maintains after the preset time elapses, thereby saving resources.
结合第二方面,在第二方面的某些实现方式中,该源移动管理网元维护该第一安全上下文的情况下,该方法还包括:该源移动管理网元删除该第二安全上下文。With reference to the second aspect, in some implementation manners of the second aspect, when the source mobility management network element maintains the first security context, the method further includes: the source mobility management network element deleting the second security context.
基于上述技术方案,在源移动管理网元维护第一安全上下文为当前安全上下文的情况, 可以删除第二安全上下文,从而可以节省资源。Based on the above technical solution, when the source mobility management network element maintains the first security context as the current security context, the second security context can be deleted, thereby saving resources.
第三方面,提供了一种管理安全上下文的方法,该方法包括:目标移动管理网元接收来自终端设备的注册请求消息,该注册请求消息包括该终端设备的身份标识;该目标移动管理网元向源移动管理网元发送上下文请求消息,该上下文请求消息用于请求获取该终端设备的上下文;该目标移动管理网元接收来自该目标移动管理网元的上下文响应消息,该上下文响应消息包括安全上下文和水平推演指示信息;该目标移动管理网元向该终端设备发送非接入层NAS安全模式命令消息,该NAS安全模式命令消息包括该水平推演指示信息,该水平推演指示信息用于指示该终端设备进行水平密钥推演;该目标移动管理网元接收来自该终端设备的受到了安全保护的NAS安全模式完成消息;该目标移动管理网元利用该安全上下文对该NAS安全模式完成消息进行安全验证;在验证成功的情况下,该目标移动管理网元向该源移动管理网元发送指示信息,该指示信息用于指示该源移动管理网元删除该终端设备的上下文。In a third aspect, a method for managing a security context is provided, the method comprising: a target mobility management network element receiving a registration request message from a terminal device, where the registration request message includes an identity of the terminal device; the target mobility management network element Sending a context request message to the source mobility management network element, where the context request message is used to request to obtain the context of the terminal device; the target mobility management network element receives a context response message from the target mobility management network element, and the context response message includes security Context and horizontal derivation indication information; the target mobility management network element sends a non-access stratum NAS security mode command message to the terminal device, the NAS security mode command message includes the horizontal derivation indication information, and the horizontal derivation indication information is used to indicate the The terminal device performs horizontal key derivation; the target mobility management network element receives the security-protected NAS security mode completion message from the terminal device; the target mobility management network element uses the security context to secure the NAS security mode completion message Verifying: if the verification is successful, the target mobility management network element sends instruction information to the source mobility management network element, where the instruction information is used to instruct the source mobility management network element to delete the context of the terminal device.
基于上述技术方案,目标移动管理网元对来自终端设备的NAS安全模式完成消息验证成功后,可以只是源移动管理网元删除终端设备的上下文,从而可以节省资源,并降低密钥泄露的可能性,提高安全性。Based on the above technical solution, after the target mobility management network element successfully verifies the NAS security mode message from the terminal device, only the source mobility management network element can delete the context of the terminal device, thereby saving resources and reducing the possibility of key leakage , improve security.
第四方面,提供了一种管理安全上下文的装置,该装置包括:收发模块,用于向目标移动管理网元发送注册请求消息,该注册请求消息包括该终端设备的身份标识;该收发模块还用于接收来自该目标移动管理网元的非接入层NAS安全模式命令消息,该NAS安全模式命令消息包括水平推演指示信息;处理模块,用于,根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,该第一安全上下文为该终端设备当前的安全上下文;该处理模块还用于,在注册流程没有成功完成的情况下,使用该第一安全上下文为当前安全上下文。In a fourth aspect, an apparatus for managing a security context is provided, and the apparatus includes: a transceiver module configured to send a registration request message to a target mobility management network element, where the registration request message includes an identity of the terminal device; the transceiver module further For receiving a non-access stratum NAS security mode command message from the target mobility management network element, the NAS security mode command message includes horizontal derivation indication information; the processing module is used for, according to the key Kamf in the first security context, Generate a new key Kamf'; wherein, the first security context is the current security context of the terminal device; the processing module is also used to use the first security context as the current security context if the registration process is not successfully completed. context.
结合第四方面,在第四方面的某些实现方式中,该处理模块还用于:生成该新的密钥Kamf’之后,维护该第一安全上下文和第二安全上下文;其中,该第二安全上下文包括该Kamf’和NAS密钥,该NAS密钥根据该Kamf’生成。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the processing module is further configured to: after generating the new key Kamf', maintain the first security context and the second security context; wherein, the second The security context includes the Kamf' and a NAS key, and the NAS key is generated according to the Kamf'.
结合第四方面,在第四方面的某些实现方式中,该处理模块具体用于:继续将该第一安全上下文作为当前安全上下文,且保存该第二安全上下文。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the processing module is specifically configured to: continue to use the first security context as the current security context, and save the second security context.
结合第四方面,在第四方面的某些实现方式中,该处理模块具体用于:继续将该第一安全上下文作为当前安全上下文,以及删除该第二安全上下文。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the processing module is specifically configured to: continue to use the first security context as the current security context, and delete the second security context.
结合第四方面,在第四方面的某些实现方式中,该处理模块具体用于:该终端设备保存该第一安全上下文,并将该第二安全上下文作为当前安全上下文。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the processing module is specifically configured to: the terminal device saves the first security context, and uses the second security context as a current security context.
结合第四方面,在第四方面的某些实现方式中,该处理模块具体用于:该终端设备将该第一安全上下文设置为当前安全上下文,以及删除该第二安全上下文。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the processing module is specifically configured to: the terminal device sets the first security context as the current security context, and deletes the second security context.
结合第四方面,在第四方面的某些实现方式中,该处理模块还用于:该终端设备确定该注册流程没有成功完成。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the processing module is further configured to: the terminal device determines that the registration process has not been successfully completed.
结合第四方面,在第四方面的某些实现方式中,该处理模块具体用于:在收发模块接收到注册接受消息之前,确定NAS安全模式完成消息发送失败;或者,在收发模块接收到注册接受消息之前,确定自身与接入网设备之间的链接释放;在收发模块接收到注册接受消息之前,确定自身与接入网设备之间的RRC连接被挂起或者释放。With reference to the fourth aspect, in some implementations of the fourth aspect, the processing module is specifically configured to: before the transceiver module receives the registration acceptance message, determine that the NAS security mode completion message fails to be sent; or, before the transceiver module receives the registration acceptance message; Before accepting the message, it is determined that the link between itself and the access network device is released; before the transceiver module receives the registration acceptance message, it is determined that the RRC connection between itself and the access network device is suspended or released.
第五方面,提供了一种管理安全上下文的装置,该方法包括:收发模块,用于接收来 自目标移动管理网元的上下文请求消息,该上下文请求消息用于请求获取终端设备的上下文;处理模块,用于在需要进行水平密钥推演的情况下,根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,该第一安全上下文为该源移动管理网元与该装置之间当前的安全上下文;该收发模块还用于向该目标移动管理网元发送第二安全上下文;其中,该第二安全上下文包括该新的密钥Kamf’和NAS密钥,该NAS密钥根据该Kamf’生成;该处理模块还用于维护该第一安全上下文和/或该第二安全上下文。In a fifth aspect, an apparatus for managing security context is provided, and the method includes: a transceiver module, configured to receive a context request message from a target mobility management network element, where the context request message is used to request to obtain a context of a terminal device; a processing module , used to generate a new key Kamf' according to the key Kamf in the first security context when horizontal key derivation is required; where the first security context is the source mobility management network element and the device The current security context between; the transceiver module is also used to send a second security context to the target mobility management network element; wherein, the second security context includes the new key Kamf' and the NAS key, the NAS key Generated according to the Kamf'; the processing module is also used to maintain the first security context and/or the second security context.
结合第五方面,在第五方面的某些实现方式中,该收发模块还用于:接收来自又一个目标移动管理网元的上下文请求消息,该上下文请求消息用于请求终端设备的上下文,该上下文请求消息包括受到了安全保护的注册请求消息,该注册请求消息包括该终端设备的身份标识;处理模块,用于利用该第一安全上下文和该第二安全上下文对该注册请求消息进行安全验证;在利用该第一安全上下文和该第二安全上下文中的任一个对该注册请求消息安全验证成功,且需要进行水平密钥推演的情况下,该处理模块还用于根据验证成功的安全上下文中的密钥,生成新的密钥Kamf”,该收发模块还用于向该目标移动管理网元发送第三安全上下文,该第三安全上下文包括该新的密钥Kamf”。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the transceiving module is further configured to: receive a context request message from another target mobility management network element, where the context request message is used to request the context of the terminal device, the The context request message includes a security-protected registration request message, the registration request message includes the identity of the terminal device; a processing module, configured to use the first security context and the second security context to perform security verification on the registration request message ; In the case that the security verification of the registration request message is successful using any one of the first security context and the second security context, and horizontal key derivation is required, the processing module is also used to The key in is used to generate a new key Kamf", and the transceiver module is also used to send a third security context to the target mobility management network element, where the third security context includes the new key Kamf".
结合第五方面,在第五方面的某些实现方式中,该收发模块还用于:接收来自又一个目标移动管理网元的上下文请求消息,该上下文请求消息用于请求终端设备的上下文,该上下文请求消息包括受到了安全保护的注册请求消息,该注册请求消息包括该终端设备的身份标识;该处理模块还用于利用该第一安全上下文和该第二安全上下文对该注册请求消息进行安全验证;在利用该第一安全上下文和该第二安全上下文中的任一个对该注册请求消息安全验证成功,且不需要进行水平密钥推演的情况下,该收发模块还用于向该目标移动管理网元发送验证成功的安全上下文。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the transceiving module is further configured to: receive a context request message from another target mobility management network element, where the context request message is used to request the context of the terminal device, the The context request message includes a security-protected registration request message, the registration request message includes the identity of the terminal device; the processing module is also used to use the first security context and the second security context to secure the registration request message Verification; when the security verification of the registration request message is successful using any one of the first security context and the second security context, and horizontal key derivation is not required, the transceiver module is also used to move to the target The management network element sends the security context of successful authentication.
结合第五方面,在第五方面的某些实现方式中,该收发模块还用于:接收来自该目标移动管理网元的注册成功指示信息,该注册成功指示信息用于指示该终端设备成功注册到了网络;该处理模块还用于:删除该第一安全上下文和/或该第二安全上下文。With reference to the fifth aspect, in some implementations of the fifth aspect, the transceiver module is further configured to: receive registration success indication information from the target mobility management network element, where the registration success indication information is used to indicate that the terminal device has successfully registered to the network; the processing module is further configured to: delete the first security context and/or the second security context.
结合第五方面,在第五方面的某些实现方式中,该收发模块还用于:接收去注册通知消息,该去注册通知消息用于指示该源移动管理网元执行该终端设备的去注册;该处理模块还用于:删除该第一安全上下文和/或该第二安全上下文。With reference to the fifth aspect, in some implementations of the fifth aspect, the transceiver module is further configured to: receive a de-registration notification message, where the de-registration notification message is used to instruct the source mobility management network element to perform de-registration of the terminal device ; The processing module is also used to: delete the first security context and/or the second security context.
结合第五方面,在第五方面的某些实现方式中,该处理模块还用于:在预设时间之后,删除该第一安全上下文和/或该第二安全上下文。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the processing module is further configured to: delete the first security context and/or the second security context after a preset time.
结合第五方面,在第五方面的某些实现方式中,在该处理模块维护该第一安全上下文的情况下,该处理模块还用于:删除该第二安全上下文。With reference to the fifth aspect, in some implementation manners of the fifth aspect, when the processing module maintains the first security context, the processing module is further configured to: delete the second security context.
第六方面,提供了一种管理安全上下文的装置,该装置包括:收发模块,用于接收来自终端设备的注册请求消息,该注册请求消息包括该终端设备的身份标识;收发模块,用于向源移动管理网元发送上下文请求消息,该上下文请求消息用于请求获取该终端设备的上下文;该收发模块还用于接收来自该目标移动管理网元的上下文响应消息,该上下文响应消息包括安全上下文和水平推演指示信息;该收发模块还用于向该终端设备发送非接入层NAS安全模式命令消息,该NAS安全模式命令消息包括该水平推演指示信息,该水平推演指示信息用于指示该终端设备进行水平密钥推演;该收发模块还用于接收来自该终端设备的受到了安全保护的NAS安全模式完成消息;该处理模块还用于利用该安全上下文对该NAS安全模式完成消息进行安全验证;在验证成功的情况下,该收发模块还用于向 该源移动管理网元发送指示信息,该指示信息用于指示该源移动管理网元删除该终端设备的上下文。According to the sixth aspect, an apparatus for managing a security context is provided, which includes: a transceiver module, configured to receive a registration request message from a terminal device, where the registration request message includes the identity of the terminal device; The source mobility management network element sends a context request message, where the context request message is used to request to acquire the context of the terminal device; the transceiver module is also used to receive a context response message from the target mobility management network element, where the context response message includes a security context and horizontal derivation indication information; the transceiver module is also used to send a non-access stratum NAS security mode command message to the terminal device, the NAS security mode command message includes the horizontal derivation indication information, and the horizontal derivation indication information is used to instruct the terminal The device performs horizontal key derivation; the transceiver module is also used to receive a security-protected NAS security mode completion message from the terminal device; the processing module is also used to use the security context to perform security verification on the NAS security mode completion message ; If the verification is successful, the transceiver module is further configured to send indication information to the source mobility management network element, where the indication information is used to instruct the source mobility management network element to delete the context of the terminal device.
第七方面,提供一种通信装置,该装置用于执行上述第一方面至第五方面提供的方法。具体地,该装置可以包括用于执行第一方面至第三方面提供的方法的单元和/或模块,如处理单元和/或通信单元。In a seventh aspect, a communication device is provided, and the device is configured to execute the methods provided in the first aspect to the fifth aspect. Specifically, the apparatus may include a unit and/or module for executing the methods provided in the first aspect to the third aspect, such as a processing unit and/or a communication unit.
在一种实现方式中,该装置为网络设备,例如该装置为源移动管理网元,或目标移动管理网元。当该装置为网络设备时,通信单元可以是收发器,或,输入/输出接口;处理单元可以是处理器。In an implementation manner, the apparatus is a network device, for example, the apparatus is a source mobility management network element or a target mobility management network element. When the device is a network device, the communication unit may be a transceiver, or an input/output interface; the processing unit may be a processor.
在另一种实现方式中,该装置为用于网络设备中的芯片、芯片系统或电路。当该装置为用于通信设备中的芯片、芯片系统或电路时,通信单元可以是该芯片、芯片系统或电路上的输入/输出接口、接口电路、输出电路、输入电路、管脚或相关电路等;处理单元可以是处理器、处理电路或逻辑电路等。In another implementation manner, the apparatus is a chip, a chip system or a circuit used in a network device. When the device is a chip, chip system or circuit used in communication equipment, the communication unit may be an input/output interface, interface circuit, output circuit, input circuit, pin or related circuit on the chip, chip system or circuit etc.; the processing unit may be a processor, a processing circuit or a logic circuit and the like.
一种可能情况,该装置为源移动管理网元或源移动管理网元中的芯片、芯片系统或电路。在该情况下,该装置可以包括用于执行第二方面提供的方法的单元和/或模块,如处理单元和/或通信单元。In one possible situation, the device is the source mobility management network element or a chip, chip system or circuit in the source mobility management network element. In this case, the device may include units and/or modules for performing the method provided by the second aspect, such as a processing unit and/or a communication unit.
又一种可能情况,该装置为目标移动管理网元中的芯片、芯片系统或电路。在该情况下,该装置可以包括用于执行第三方面提供的方法的单元和/或模块,如处理单元和/或通信单元。In another possible situation, the device is a chip, a chip system or a circuit in the target mobility management network element. In this case, the apparatus may include units and/or modules for executing the method provided by the third aspect, such as a processing unit and/or a communication unit.
在另一种实现方式中,该装置为终端设备。当该装置为终端设备时,通信单元可以是收发器,或,输入/输出接口;处理单元可以是处理器。In another implementation manner, the apparatus is a terminal device. When the device is a terminal device, the communication unit may be a transceiver, or an input/output interface; the processing unit may be a processor.
一种可能情况,该装置为终端设备(10)或终端设备(10)中的芯片、芯片系统或电路。在该情况下,该装置可以包括用于执行第一方面中任一方面提供的方法的单元和/或模块,如处理单元和/或通信单元。In one possible situation, the device is the terminal device (10) or a chip, a chip system or a circuit in the terminal device (10). In this case, the apparatus may include units and/or modules for performing the method provided in any one of the first aspects, such as a processing unit and/or a communication unit.
可选地,上述收发器可以为收发电路。可选地,上述输入/输出接口可以为输入/输出电路。Optionally, the above-mentioned transceiver may be a transceiver circuit. Optionally, the above input/output interface may be an input/output circuit.
第八方面,提供一种通信装置,该装置包括:存储器,用于存储程序;处理器,用于执行存储器存储的程序,当存储器存储的程序被执行时,处理器用于执行上述第一方面至第三方面提供的方法。In an eighth aspect, there is provided a communication device, which includes: a memory for storing a program; a processor for executing the program stored in the memory, and when the program stored in the memory is executed, the processor is used for executing the above-mentioned first aspect to The method provided by the third aspect.
第九方面,本申请提供一种处理器,用于执行上述各方面提供的方法。在执行这些方法的过程中,上述方法中有关发送上述信息和获取/接收上述信息的过程,可以理解为由处理器输出上述信息的过程,以及处理器接收输入的上述信息的过程。在输出上述信息时,处理器将该上述信息输出给收发器,以便由收发器进行发射。该上述信息在由处理器输出之后,还可能需要进行其他的处理,然后才到达收发器。类似的,处理器接收输入的上述信息时,收发器获取/接收该上述信息,并将其输入处理器。更进一步的,在收发器收到该上述信息之后,该上述信息可能需要进行其他的处理,然后才输入处理器。In a ninth aspect, the present application provides a processor configured to execute the methods provided in the foregoing aspects. In the process of executing these methods, the process of sending the above information and obtaining/receiving the above information in the above method can be understood as the process of outputting the above information by the processor and the process of receiving the input of the above information by the processor. When outputting the above information, the processor outputs the above information to the transceiver for transmission by the transceiver. After the above information is output by the processor, other processing may be required before reaching the transceiver. Similarly, when the processor receives the above-mentioned input information, the transceiver acquires/receives the above-mentioned information and inputs it into the processor. Furthermore, after the transceiver receives the above information, the above information may need to be processed before being input to the processor.
基于上述原理,举例来说,前述方法中提及的接收请求消息可以理解为处理器接收输入的信息。Based on the above principles, for example, the receiving request message mentioned in the foregoing method may be understood as the processor receiving input information.
对于处理器所涉及的发射、发送和获取/接收等操作,如果没有特殊说明,或者,如果未与其在相关描述中的实际作用或者内在逻辑相抵触,则均可以更加一般性的理解为处理器输出和接收、输入等操作,而不是直接由射频电路和天线所进行的发射、发送和接收 操作。For the operations of transmitting, sending, and acquiring/receiving involved in the processor, if there is no special description, or if it does not conflict with its actual function or internal logic in the relevant description, it can be understood more generally as the processor Output and receive, input and other operations, rather than the transmission, transmission and reception operations performed directly by radio frequency circuits and antennas.
在实现过程中,上述处理器可以是专门用于执行这些方法的处理器,也可以是执行存储器中的计算机指令来执行这些方法的处理器,例如通用处理器。上述存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型以及存储器与处理器的设置方式不做限定。During implementation, the above-mentioned processor may be a processor dedicated to performing these methods, or may be a processor that executes computer instructions in a memory to perform these methods, such as a general-purpose processor. The above-mentioned memory can be a non-transitory (non-transitory) memory, such as a read-only memory (read only memory, ROM), which can be integrated with the processor on the same chip, or can be respectively arranged on different chips. The embodiment does not limit the type of the memory and the arrangement of the memory and the processor.
第十方面,提供一种计算机可读存储介质,该计算机可读介质存储用于设备执行的程序代码,该程序代码包括用于执行上述第一方面至第三方面提供的方法。In a tenth aspect, a computer-readable storage medium is provided, where the computer-readable medium stores program code for execution by a device, and the program code includes a method for executing the methods provided in the first aspect to the third aspect above.
第十一方面,提供一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述第一方面至第三方面提供的方法。In an eleventh aspect, a computer program product containing instructions is provided, and when the computer program product is run on a computer, the computer is made to execute the methods provided in the first aspect to the third aspect above.
第十二方面,提供一种芯片,该芯片包括处理器与通信接口,该处理器通过该通信接口读取存储器上存储的指令,执行上述第一方面至第三方面提供的方法。A twelfth aspect provides a chip, the chip includes a processor and a communication interface, the processor reads instructions stored in the memory through the communication interface, and executes the methods provided in the first aspect to the third aspect above.
可选地,作为一种实现方式,该芯片还可以包括存储器,该存储器中存储有指令,该处理器用于执行该存储器上存储的指令,当该指令被执行时,该处理器用于执行上述第一方面至第三方面提供的方法。Optionally, as an implementation manner, the chip may further include a memory, the memory stores instructions, the processor is used to execute the instructions stored in the memory, and when the instructions are executed, the processor is used to execute the above-mentioned first The method provided by the first aspect to the third aspect.
附图说明Description of drawings
图1是一种适用于本申请实施例的网络结构的示意图。Fig. 1 is a schematic diagram of a network structure applicable to the embodiment of the present application.
图2是一种终端设备进行注册的方法的示意性流程图。Fig. 2 is a schematic flowchart of a method for registering a terminal device.
图3是本申请实施例提供的一种管理安全上下文的方法的示例性流程图。Fig. 3 is an exemplary flow chart of a method for managing a security context provided by an embodiment of the present application.
图4是本申请实施例提供的另一种管理安全上下文的方法的示例性流程图。Fig. 4 is an exemplary flowchart of another method for managing a security context provided by an embodiment of the present application.
图5是本申请实施例提供的又一种管理安全上下文的方法的示例性流程图。Fig. 5 is an exemplary flow chart of another method for managing a security context provided by an embodiment of the present application.
图6是本申请实施例提供的又一种管理安全上下文的方法的示例性流程图。Fig. 6 is an exemplary flow chart of another method for managing a security context provided by an embodiment of the present application.
图7是本申请一个实施例提供的管理安全上下文的装置的示意性框图。Fig. 7 is a schematic block diagram of an apparatus for managing a security context provided by an embodiment of the present application.
图8是本申请另一个实施例提供的管理安全上下文的装置的示意性框图。Fig. 8 is a schematic block diagram of an apparatus for managing a security context provided by another embodiment of the present application.
图9是本申请又一个实施例提供的管理安全上下文的装置的示意性框图。Fig. 9 is a schematic block diagram of an apparatus for managing a security context provided by another embodiment of the present application.
图10是本申请又一个实施例提供的管理安全上下文的装置的示意性框图。Fig. 10 is a schematic block diagram of an apparatus for managing a security context provided by another embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图,对本申请中的技术方案进行描述。方法实施例中的具体操作方法也可以应用于装置实施例或系统实施例中。其中,在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described below in conjunction with the accompanying drawings. The specific operation methods in the method embodiments can also be applied to the device embodiments or system embodiments. Wherein, in the description of the present application, unless otherwise specified, "plurality" means two or more.
在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。In each embodiment of the present application, if there is no special explanation and logical conflict, the terms and/or descriptions between different embodiments are consistent and can be referred to each other, and the technical features in different embodiments are based on their inherent Logical relationships can be combined to form new embodiments.
可以理解的是,在本申请中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的范围。上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定。It can be understood that the various numbers involved in the application are only for the convenience of description, and are not used to limit the scope of the application. The size of the serial numbers of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its functions and internal logic.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”以及其他各种术语标号等(如果存在)是用于区别类似的对象,而不必用于描述 特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth" and other term labels (if any) in the description and claims of the application and the above drawings are used to distinguish similar objects without necessarily being used to describe a particular order or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
为了解决背景技术提及的问题,如图1的(a)所示,本申请提供了一种通信系统,该通信系统包括目标移动管理网元10和源移动管理网元20。其中,该目标移动管理网元10用于在接收到来自终端设备的注册请求消息后,向源移动管理网元发送上下文请求消息;接收来自该目标移动管理网元的上下文响应消息,该上下文响应消息包括终端设备的上下文信息,该终端设备的上下文信息包括安全上下文和水平推演指示信息。应理解,该上下文信息还可能包括其他信息,本申请不做限定,具体可参考现有协议;进一步的,目标移动管理网元10向该终端设备发送非接入层NAS安全模式命令消息,该NAS安全模式命令消息包括该水平推演指示信息,该水平推演指示信息用于指示该终端设备进行水平密钥推演;接收来自该终端设备的NAS安全模式完成消息后,利用该安全上下文对该NAS安全模式完成消息进行安全验证;在验证成功之后,如果终端设备的注册流程成功完成,目标移动管理网元向该源移动管理网元发送指示信息,该指示信息用于指示该源移动管理网元删除该终端设备的上下文。该源移动管理网元20用于在接收来自目标移动管理网元的上下文请求消息后,该上下文请求消息用于请求获取终端设备的上下文;在需要进行水平密钥推演的情况下,根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,该第一安全上下文为该源移动管理网元与该终端设备之间当前的安全上下文;响应于该上下文请求消息,向该目标移动管理网元发送第二安全上下文;其中,该第二安全上下文包括该新的密钥Kamf’和NAS密钥,该NAS密钥根据该Kamf’生成;维护该第一安全上下文和/或该第二安全上下文。可选地,该通信系统中还可以包括一个或多个终端设备,例如终端设备30。该终端设备30用于:向目标移动管理网元发送注册请求消息,该注册请求消息包括该终端设备的标识;接收来自该目标移动管理网元的非接入层NAS安全模式命令消息,该NAS安全模式命令消息包括水平推演指示信息;根据该水平推演指示信息,根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’和新的NAS密钥;其中,该第一安全上下文为该终端设备当前的安全上下文;在注册流程没有成功完成的情况下,使用该第一安全上下文为当前安全上下文。In order to solve the problems mentioned in the background technology, as shown in (a) of FIG. 1 , the present application provides a communication system, which includes a target mobility management network element 10 and a source mobility management network element 20 . Wherein, the target mobility management network element 10 is configured to send a context request message to the source mobility management network element after receiving the registration request message from the terminal device; receive a context response message from the target mobility management network element, and the context response The message includes the context information of the terminal device, and the context information of the terminal device includes security context and horizontal game indication information. It should be understood that the context information may also include other information, which is not limited in this application, and may refer to existing protocols for details; further, the target mobility management network element 10 sends a non-access stratum NAS security mode command message to the terminal device, and the The NAS security mode command message includes the horizontal derivation instruction information, and the horizontal derivation instruction information is used to instruct the terminal device to perform horizontal key derivation; after receiving the NAS security mode completion message from the terminal device, use the security context to secure the NAS mode completion message for security verification; after the verification is successful, if the registration process of the terminal device is successfully completed, the target mobility management network element sends instruction information to the source mobility management network element, and the instruction information is used to instruct the source mobility management network element to delete The context of this end device. The source mobility management network element 20 is used to request to obtain the context of the terminal device after receiving the context request message from the target mobility management network element; if horizontal key derivation is required, according to the first The key Kamf in the security context generates a new key Kamf'; wherein, the first security context is the current security context between the source mobility management network element and the terminal device; in response to the context request message, send the The target mobility management network element sends a second security context; wherein, the second security context includes the new key Kamf' and a NAS key, and the NAS key is generated according to the Kamf'; maintaining the first security context and/or The second security context. Optionally, the communication system may further include one or more terminal devices, such as the terminal device 30 . The terminal device 30 is configured to: send a registration request message to the target mobility management network element, where the registration request message includes the identifier of the terminal device; receive a non-access stratum NAS security mode command message from the target mobility management network element, and the NAS The security mode command message includes horizontal derivation instruction information; according to the horizontal derivation instruction information, a new key Kamf' and a new NAS key are generated according to the key Kamf in the first security context; wherein, the first security context is The current security context of the terminal device; if the registration process is not successfully completed, use the first security context as the current security context.
应理解,上述通信系统中的各网元的名称仅作为一种示例,不造成任何限定作用。在上述系统中,目标移动管理网元10和源移动管理网元20均为用于实现移动性管理和接入管理功能的网元,其中,目标移动管理网元10可以是终端设备30请求注册到的移动管理网元,源移动管理网元20可以是终端设备30请求注册到目标移动管理网元10之前,为终端设备30提供服务的移动管理网元。在终端设备30请求注册到目标移动管理网元之前,终端设备30已经通过注册流程注册到了源移动管理网元。上述网元名称只是为了区分不同网元,在不同的场景或者示例中,它们还可以有其他名称,或者说,实现相同功能的网元均应在本申请的保护范围内。It should be understood that the names of the network elements in the above communication system are only used as examples, and do not cause any limitation. In the above system, both the target mobility management network element 10 and the source mobility management network element 20 are network elements for implementing mobility management and access management functions, wherein the target mobility management network element 10 may be a terminal device 30 requesting registration The source mobility management network element 20 may be the mobility management network element that provides services for the terminal device 30 before the terminal device 30 requests to register with the target mobility management network element 10 . Before the terminal device 30 requests to register with the target mobility management network element, the terminal device 30 has already registered with the source mobility management network element through a registration process. The above network element names are only used to distinguish different network elements. In different scenarios or examples, they may also have other names. In other words, network elements that implement the same function should be within the scope of protection of this application.
应理解,图1的(a)中各网元之间的具体交互过程可以参照图3中的方法流程,具体实现方案见方法300中的详细说明。It should be understood that, for a specific interaction process between network elements in (a) of FIG. 1 , reference may be made to the method flow in FIG.
本申请提供的技术方案可以应用于各种通信系统,例如:第五代(5th generation,5G) 或新无线(new radio,NR)系统、长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)系统等。本申请提供的技术方案还可以应用于未来的通信系统,如第六代移动通信系统。本申请提供的技术方案还可以应用于设备到设备(device to device,D2D)通信,车到万物(vehicle-to-everything,V2X)通信,机器到机器(machine to machine,M2M)通信,机器类型通信(machine type communication,MTC),以及物联网(internet of things,IoT)通信系统或者其他通信系统。The technical solution provided by this application can be applied to various communication systems, such as: the fifth generation (5th generation, 5G) or new radio (new radio, NR) system, long term evolution (long term evolution, LTE) system, LTE frequency division Duplex (frequency division duplex, FDD) system, LTE time division duplex (time division duplex, TDD) system, etc. The technical solution provided by this application can also be applied to future communication systems, such as the sixth generation mobile communication system. The technical solution provided by this application can also be applied to device to device (device to device, D2D) communication, vehicle to everything (vehicle-to-everything, V2X) communication, machine to machine (machine to machine, M2M) communication, machine type Communication (machine type communication, MTC), and Internet of things (internet of things, IoT) communication system or other communication systems.
如图1的(b)所示,为基于服务化架构的第五代(5th generation,5G)网络架构示意图。As shown in (b) of FIG. 1 , it is a schematic diagram of a fifth generation (5th generation, 5G) network architecture based on a service architecture.
图1的(b)所示的5G网络架构中可包括三部分,分别是终端设备部分、数据网络(data network,DN)和运营商网络部分。下面对其中的部分网元的功能进行简单介绍说明。The 5G network architecture shown in (b) of FIG. 1 may include three parts, namely a terminal device part, a data network (data network, DN) and an operator network part. The functions of some of the network elements are briefly introduced and described below.
其中,运营商网络可包括以下网元中的一个或多个:鉴权服务器功能(authentication server function,AUSF)网元、网络开放功能(network exposure function,NEF)网元、策略控制功能(policy control function,PCF)网元、统一数据管理(unified data management,UDM)网元、统一数据库(unified data repository,UDR)、网络存储功能(network repository function,NRF)网元、应用功能(application function,AF)网元、接入与移动性管理功能(access and mobility management function,AMF)网元、会话管理功能(session management function,SMF)网元、无线接入网(radioaccess network,RAN)以及用户面功能(user plane function,UPF)网元等。上述运营商网络中,除无线接入网部分之外的部分可以称为核心网络部分。Wherein, the operator network may include one or more of the following network elements: authentication server function (authentication server function, AUSF) network element, network exposure function (network exposure function, NEF) network element, policy control function (policy control function, PCF) network element, unified data management (unified data management, UDM) network element, unified database (unified data repository, UDR), network storage function (network repository function, NRF) network element, application function (application function, AF) ) network elements, access and mobility management function (access and mobility management function, AMF) network elements, session management function (session management function, SMF) network elements, radio access network (radioaccess network, RAN) and user plane functions (user plane function, UPF) network element, etc. In the above operator network, the part other than the radio access network part may be referred to as the core network part.
1、终端设备(terminal device):也可以成为用户设备(user equipment,UE),是一种具有无线收发功能的设备,可以部署在陆地上,包括室内或室外、手持或车载;也可以部署在水面上(如轮船等);还可以部署在空中(例如飞机、气球和卫星上等)。所述终端设备可以是手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端、增强现实(augmented reality,AR)终端、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等。这里的终端设备,指的是第三代合作伙伴计划(3rd generation partnership project,3GPP)终端。为便于说明,本申请后续以UE代指终端设备为例进行说明。1. Terminal device: it can also be called user equipment (UE), which is a device with wireless transceiver function, which can be deployed on land, including indoor or outdoor, handheld or vehicle-mounted; it can also be deployed in On the water (such as ships, etc.); can also be deployed in the air (such as aircraft, balloons and satellites, etc.). The terminal device may be a mobile phone, a tablet computer (pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal, an augmented reality (augmented reality, AR) terminal, an industrial control (industrial control ), wireless terminals in self driving, wireless terminals in remote medical, wireless terminals in smart grid, wireless terminals in transportation safety , wireless terminals in smart cities, wireless terminals in smart homes, etc. The terminal device here refers to a 3rd generation partnership project (3rd generation partnership project, 3GPP) terminal. For ease of description, the following descriptions in this application will take UE as an example to refer to terminal equipment.
上述终端设备可通过运营商网络提供的接口(例如N1等)与运营商网络建立连接,使用运营商网络提供的数据和/或语音等服务。终端设备还可通过运营商网络访问DN,使用DN上部署的运营商业务,和/或第三方提供的业务。其中,上述第三方可为运营商网络和终端设备之外的服务方,可为终端设备提供他数据和/或语音等服务。其中,上述第三方的具体表现形式,具体可根据实际应用场景确定,在此不做限制。The above-mentioned terminal device can establish a connection with the operator network through an interface provided by the operator network (such as N1, etc.), and use services such as data and/or voice provided by the operator network. The terminal device can also access the DN through the operator's network, and use the operator's service deployed on the DN, and/or the service provided by a third party. Wherein, the above-mentioned third party may be a service party other than the operator's network and the terminal device, and may provide other services such as data and/or voice for the terminal device. Among them, the specific form of expression of the above-mentioned third party can be determined according to the actual application scenario, and is not limited here.
2、无线接入网络(radio access network,RAN)网元:在下文中简称为RAN,对应接入网设备。2. Wireless access network (radio access network, RAN) network element: hereinafter referred to as RAN, corresponding to access network equipment.
RAN是运营商网络的子网络,是运营商网络中业务节点与终端设备之间的实施系统。终端设备要接入运营商网络,首先是经过RAN,进而可通过RAN与运营商网络的业务节点连接。本申请中的RAN设备,是一种为终端设备提供无线通信功能的设备,RAN设备 也称为接入网设备。本申请中的RAN设备包括但不限于:5G中的下一代基站(g nodeB,gNB)、演进型节点B(evolved node B,eNB)、无线网络控制器(radio network controller,RNC)、节点B(node B,NB)、基站控制器(base station controller,BSC)、基站收发台(base transceiver station,BTS)、家庭基站(例如,home evolved nodeB,或home node B,HNB)、基带单元(baseBand unit,BBU)、传输点(transmitting and receiving point,TRP)、发射点(transmitting point,TP)、移动交换中心等。The RAN is a sub-network of the operator's network and an implementation system between service nodes and terminal equipment in the operator's network. To access the operator's network, the terminal equipment first passes through the RAN, and then can be connected to the service node of the operator's network through the RAN. The RAN device in this application is a device that provides a wireless communication function for a terminal device, and the RAN device is also called an access network device. The RAN equipment in this application includes but is not limited to: next-generation base station (g nodeB, gNB) in 5G, evolved node B (evolved node B, eNB), radio network controller (radio network controller, RNC), node B (node B, NB), base station controller (base station controller, BSC), base transceiver station (base transceiver station, BTS), home base station (for example, home evolved nodeB, or home node B, HNB), baseband unit (baseBand unit, BBU), transmission point (transmitting and receiving point, TRP), transmission point (transmitting point, TP), mobile switching center, etc.
3、用户面功能(user plane function,UPF):用于分组路由和转发以及用户面数据的服务质量(quality of service,QoS)处理等。3. User plane function (UPF): used for packet routing and forwarding and quality of service (QoS) processing of user plane data.
在5G通信系统中,该用户面网元可以是用户面功能(user plane function,UPF)网元。在未来通信系统中,用户面网元仍可以是UPF网元,或者,还可以有其它的名称,本申请不做限定。In a 5G communication system, the user plane network element may be a user plane function (user plane function, UPF) network element. In the future communication system, the user plane network element may still be a UPF network element, or may have other names, which are not limited in this application.
4、接入和移动管理网元4. Access and mobility management network elements
接入和移动管理网元主要用于移动性管理和接入管理等,可以用于实现MME功能中除会话管理之外的其它功能,例如,接入授权/鉴权等功能。The access and mobility management network element is mainly used for mobility management and access management, etc., and can be used to implement other functions in the MME function except session management, for example, functions such as access authorization/authentication.
在5G通信系统中,该接入和移动管理网元可以是接入和移动管理功能(access and mobility management function,AMF)。在未来通信系统中,接入和移动管理设备仍可以是AMF,或者,还可以有其它的名称,本申请不做限定。In a 5G communication system, the access and mobility management network element may be an access and mobility management function (access and mobility management function, AMF). In the future communication system, the access and mobility management device may still be an AMF, or may have other names, which are not limited in this application.
5、会话管理功能(session management function,SMF):主要用于会话管理、用户设备的网络互连协议(internet protocol,IP)地址分配和管理、选择可管理用户平面功能、策略控制和收费功能接口的终结点以及下行数据通知等。5. Session management function (session management function, SMF): mainly used for session management, user equipment network interconnection protocol (internet protocol, IP) address allocation and management, selection of manageable user plane functions, policy control and charging function interface endpoints and downlink data notifications, etc.
在5G通信系统中,该会话管理网元可以是会话管理功能网元。在未来通信系统中,会话管理网元仍可以是SMF网元,或者,还可以有其它的名称,本申请不做限定。In a 5G communication system, the session management network element may be a session management function network element. In the future communication system, the session management network element may still be an SMF network element, or may have other names, which are not limited in this application.
6、策略控制功能(policy control function,PCF):用于指导网络行为的统一策略框架,为控制面功能网元(例如AMF,SMF等)提供策略规则信息等。6. Policy control function (PCF): A unified policy framework for guiding network behavior, providing policy rule information for control plane functional network elements (such as AMF, SMF, etc.).
在4G通信系统中,该策略控制网元可以是策略和计费规则功能(policy and charging rules function,PCRF)网元。在5G通信系统中,该策略控制网元可以是策略控制功能PCF网元。在未来通信系统中,策略控制网元仍可以是PCF网元,或者,还可以有其它的名称,本申请不做限定。In the 4G communication system, the policy control network element may be a policy and charging rules function (policy and charging rules function, PCRF) network element. In a 5G communication system, the policy control network element may be a policy control function PCF network element. In the future communication system, the policy control network element may still be a PCF network element, or may have other names, which are not limited in this application.
7、应用功能(application function,AF):用于进行应用影响的数据路由,无线接入网络开放功能网元,与策略框架交互进行策略控制等。7. Application function (Application function, AF): It is used for data routing affected by applications, open function network elements of wireless access networks, and interacts with policy frameworks for policy control, etc.
在5G通信系统中,该应用网元可以是应用功能网元。在未来通信系统中,应用网元仍可以是AF网元,或者,还可以有其它的名称,本申请不做限定。In a 5G communication system, the application network element may be an application function network element. In the future communication system, the application network element may still be an AF network element, or may have other names, which are not limited in this application.
8、统一数据管理(unified data management,UDM):用于处理UE标识,接入鉴权,注册以及移动性管理等。8. Unified data management (UDM): used to process UE identification, access authentication, registration and mobility management.
在5G通信系统中,该数据管理网元可以是统一数据管理网元;在4G通信系统中,该数据管理网元可以是归属用户服务器(home subscriber server,HSS)网元在未来通信系统中,统一数据管理仍可以是UDM网元,或者,还可以有其它的名称,本申请不做限定。In a 5G communication system, the data management network element may be a unified data management network element; in a 4G communication system, the data management network element may be a home subscriber server (HSS) network element. In future communication systems, The unified data management may still be a UDM network element, or may have other names, which are not limited in this application.
9、认证服务器(authentication server function,AUSF):用于鉴权服务、产生密钥实现对用户设备的双向鉴权,支持统一的鉴权框架。9. Authentication server function (AUSF): used for authentication services, generating keys to realize two-way authentication of user equipment, and supporting a unified authentication framework.
在5G通信系统中,该认证服务器可以是认证服务器功能网元。在未来通信系统中, 认证服务器功能网元仍可以是AUSF网元,或者,还可以有其它的名称,本申请不做限定。In a 5G communication system, the authentication server may be an authentication server functional network element. In the future communication system, the authentication server functional network element may still be an AUSF network element, or may have other names, which are not limited in this application.
10、数据网络(data network,DN):DN是位于运营商网络之外的网络,运营商网络可以接入多个DN,DN上可部署多种业务,可为终端设备提供数据和/或语音等服务。例如,DN是某智能工厂的私有网络,智能工厂安装在车间的传感器可为终端设备,DN中部署了传感器的控制服务器,控制服务器可为传感器提供服务。传感器可与控制服务器通信,获取控制服务器的指令,根据指令将采集的传感器数据传送给控制服务器等。又例如,DN是某公司的内部办公网络,该公司员工的手机或者电脑可为终端设备,员工的手机或者电脑可以访问公司内部办公网络上的信息、数据资源等。10. Data network (data network, DN): DN is a network located outside the operator's network. The operator's network can access multiple DNs, and multiple services can be deployed on the DN, which can provide data and/or voice for terminal equipment. and other services. For example, DN is a private network of a smart factory. The sensors installed in the workshop of the smart factory can be terminal devices. The control server of the sensor is deployed in the DN, and the control server can provide services for the sensor. The sensor can communicate with the control server, obtain instructions from the control server, and transmit the collected sensor data to the control server according to the instructions. For another example, DN is a company's internal office network, and the mobile phone or computer of the company's employees can be a terminal device, and the employee's mobile phone or computer can access information and data resources on the company's internal office network.
图1的(b)中Nausf、Nnef、Npcf、Nudm、Naf、Namf、Nsmf、N1、N2、N3、N4,以及N6为接口序列号。这些接口序列号的含义可参见3GPP标准协议中定义的含义,在此不做限制。In (b) of FIG. 1 , Nausf, Nnef, Npcf, Nudm, Naf, Namf, Nsmf, N1, N2, N3, N4, and N6 are interface serial numbers. For the meanings of these interface serial numbers, refer to the meanings defined in the 3GPP standard protocol, and there is no limitation here.
在图1的(b)所示的网络架构中,各网元之间可以通过图中所示的接口通信。如图所示,UE和AMF之间可以通过N1接口进行交互,交互消息例如可以称为N1消息(N1 Message)。RAN和AMF之间可以通过N2接口进行交互,N2接口可以用于非接入层(non-access stratum,NAS)消息的发送等。RAN和UPF之间可以通过N3接口进行交互,N3接口可以用于传输用户面的数据等。SMF和UPF之间可以通过N4接口进行交互,N4接口可以用于传输例如N3连接的隧道标识信息,数据缓存指示信息,以及下行数据通知消息等信息。UPF和DN之间可以通过N6接口进行交互,N6接口可以于传输用户面的数据等。其他接口与各网元之间的关系如图1中所示,为了简洁,这里不一一详述。In the network architecture shown in (b) of FIG. 1 , various network elements can communicate through the interfaces shown in the figure. As shown in the figure, the UE and the AMF can interact through the N1 interface, and the interaction message can be called an N1 message (N1 Message), for example. The RAN and the AMF can interact through the N2 interface, and the N2 interface can be used for sending non-access stratum (non-access stratum, NAS) messages, etc. The RAN and UPF can interact through the N3 interface, and the N3 interface can be used to transmit user plane data, etc. The SMF and UPF can interact through the N4 interface, and the N4 interface can be used to transmit information such as the tunnel identification information of the N3 connection, data cache indication information, and downlink data notification messages. The UPF and DN can interact through the N6 interface, and the N6 interface can be used to transmit data on the user plane. The relationship between other interfaces and each network element is shown in FIG. 1 , and for the sake of brevity, details are not described here one by one.
应理解,上述应用于本申请实施例的网络架构仅是举例说明的从服务化架构的角度描述的网络架构,适用本申请实施例的网络架构并不局限于此,任何能够实现上述各个网元的功能的网络架构都适用于本申请实施例。It should be understood that the above-mentioned network architecture applied to the embodiment of the present application is only an example network architecture described from the perspective of a service-oriented architecture, and the network architecture applicable to the embodiment of the present application is not limited thereto. Any network element that can implement the above-mentioned All functional network architectures are applicable to this embodiment of the application.
还应理解,图1中所示的AMF、SMF、UPF、网络切片选择功能网元(network slice selection function,NSSF)、NEF、AUSF、NRF、PCF、UDM可以理解为核心网中用于实现不同功能的网元,例如可以按需组合成网络切片。这些核心网网元可以各自独立的设备,也可以集成于同一设备中实现不同的功能,本申请对于上述网元的具体形态不作限定。It should also be understood that AMF, SMF, UPF, network slice selection function (network slice selection function, NSSF), NEF, AUSF, NRF, PCF, and UDM shown in FIG. Functional network elements, for example, can be combined into network slices on demand. These core network elements may be independent devices, or may be integrated into the same device to implement different functions. This application does not limit the specific forms of the above network elements.
还应理解,上述命名仅为便于区分不同的功能而定义,不应对本申请构成任何限定。本申请并不排除在5G网络以及未来其它的网络中采用其他命名的可能。例如,在6G网络中,上述各个网元中的部分或全部可以沿用5G中的术语,也可能采用其他名称等。图1中的各个网元之间的接口名称只是一个示例,具体实现中接口的名称可能为其他的名称,本申请对此不作具体限定。此外,上述各个网元之间的所传输的消息(或信令)的名称也仅仅是一个示例,对消息本身的功能不构成任何限定。It should also be understood that the above names are only defined for the convenience of distinguishing different functions, and shall not constitute any limitation to the present application. This application does not exclude the possibility of using other names in the 5G network and other networks in the future. For example, in a 6G network, some or all of the above network elements may use the terms in 5G, or may use other names. The name of the interface between network elements in FIG. 1 is just an example, and the name of the interface in a specific implementation may be another name, which is not specifically limited in this application. In addition, the name of the message (or signaling) transmitted between the above network elements is only an example, and does not constitute any limitation on the function of the message itself.
可以理解的是,上述网元或者功能既可以是硬件设备中的网络元件,也可以是在专用硬件上运行软件功能,或者是平台(例如,云平台)上实例化的虚拟化功能。为方便说明,本申请后续,以网络设备为接入和移动管理网元AMF,基站为无线接入网络RAN为例进行说明。It can be understood that the above-mentioned network element or function may be a network element in a hardware device, or a software function running on dedicated hardware, or a virtualization function instantiated on a platform (for example, a cloud platform). For the convenience of description, in the follow-up of this application, the network device is the access and mobility management network element AMF, and the base station is the radio access network RAN as an example for description.
应理解,上述应用于本申请实施例的网络架构仅是一种举例说明,适用本申请实施例的网络架构并不局限于此,任何能够实现上述各个网元的功能的网络架构都适用于本申请实施例。It should be understood that the above-mentioned network architecture applied to the embodiment of the present application is only an example, and the network architecture applicable to the embodiment of the present application is not limited thereto. Any network architecture that can realize the functions of the above-mentioned network elements is applicable to this application. Application example.
本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的 技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The network architecture and business scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions provided by the embodiments of the present application. For the evolution of architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
本申请实施例的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。Various aspects or features of the embodiments of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques. The term "article of manufacture" as used in this application covers a computer program accessible from any computer readable device, carrier or media. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disk, floppy disk, or tape, etc.), optical disks (e.g., compact disc (compact disc, CD), digital versatile disc (digital versatile disc, DVD) etc.), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.). Additionally, various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
为便于理解本申请实施例,首先对本申请中涉及到的术语做简单说明。In order to facilitate the understanding of the embodiments of the present application, a brief description of the terms involved in the present application is given first.
1、NAS安全上下文:可以用于实现数据进行NAS层加/解密和/或完整性保护/验证的信息。1. NAS security context: information that can be used to implement data encryption/decryption and/or integrity protection/verification at the NAS layer.
UE对应的NAS安全上下文包括:密钥标识符(例如ngKSI)、Kamf、UE的安全能力、上行NAS COUNT和下行NAS COUNT。可选的,还包括完整性保护密钥与选择的完整性保护算法,加密密钥与选择的加密算法。其中,加密密钥和选择的加密算法用于对UE与AMF之间传输的NAS消息进行加密保护;完整性密钥和选择的完整性保护算法用于对UE与AMF之间传输的NAS消息进行完整性保护。UE的安全能力用于表征UE支持的加密算法和完整性保护算法。The NAS security context corresponding to the UE includes: key identifier (eg ngKSI), Kamf, security capability of the UE, uplink NAS COUNT and downlink NAS COUNT. Optionally, the integrity protection key and the selected integrity protection algorithm, the encryption key and the selected encryption algorithm are also included. Among them, the encryption key and the selected encryption algorithm are used to encrypt and protect the NAS message transmitted between the UE and the AMF; the integrity key and the selected integrity protection algorithm are used to protect the NAS message transmitted between the UE and the AMF Integrity protection. The UE's security capability is used to characterize the encryption algorithm and integrity protection algorithm supported by the UE.
在移动注册场景中,如果源AMF根据本地策略决定进行水平Kamf推演,源AMF可以根据当前的NAS安全上下文中的密钥Kamf,以及接收到的注册请求消息中的上行NAS计数值,进行水平Kamf推演得到新的密钥Kamf’。然后源AMF可以将新的密钥Kamf’、新的ngKSI、UE安全能力和水平推演指示(keyAmfHDerivationInd)发送给目标AMF。应理解,这里的新的ngKSI和之前的(即推演前的)ngKSI相同。如果目标AMF决定使用从源AMF接收到的新的密钥Kamf’,目标AMF可以通过NASSMC消息向UE发送值为1的K_AMF_change_flag,其中值为1的K_AMF_change_flag用于指示UE进行水平密钥推演。这里的NASSMC消息中还包括UE安全能力、选择的NAS算法和ngKSI。如果UE接收到值为1的K_AMF_change_flag,则UE进行水平Kamf推演得到新的密钥Kamf’。In the mobile registration scenario, if the source AMF decides to perform horizontal Kamf deduction according to the local policy, the source AMF can perform horizontal Kamf according to the key Kamf in the current NAS security context and the uplink NAS count value in the received registration request message. Deduce the new key Kamf'. The source AMF may then send the new key Kamf', the new ngKSI, the UE security capabilities and the level derivation indication (keyAmfHDerivationInd) to the target AMF. It should be understood that the new ngKSI here is the same as the previous (ie pre-derivation) ngKSI. If the target AMF decides to use the new key Kamf' received from the source AMF, the target AMF can send a K_AMF_change_flag with a value of 1 to the UE through a NASSMC message, where the K_AMF_change_flag with a value of 1 is used to instruct the UE to perform horizontal key derivation. The NASSMC message here also includes UE security capability, selected NAS algorithm and ngKSI. If the UE receives K_AMF_change_flag with a value of 1, the UE performs horizontal Kamf derivation to obtain a new key Kamf'.
2、当前NAS安全上下文(currentNASsecuritycontext):处于使用中或者激活状态的NAS安全上下文。2. Current NAS security context (currentNAS security context): the NAS security context in use or active state.
3、非当前NAS安全上下文(non-current NAS security context):非当前正在使用的或者处于非激活状态的NAS安全上下文。下面结合图2介绍一种管理安全上下文的方法200。该方法200包括:3. Non-current NAS security context (non-current NAS security context): A NAS security context that is not currently in use or is in an inactive state. A method 200 for managing a security context is introduced below with reference to FIG. 2 . The method 200 includes:
201,UE向目标AMF发送注册请求消息。201. The UE sends a registration request message to a target AMF.
由于位置移动,UE触发注册请求消息给网络。例如,UE移动到一个新的AMF区域(记为目标AMF),该UE的注册请求消息被投递到该目标AMF上。示例性地,UE向目标AMF(target AMF)发送注册请求(registration request,RR)消息,该RR消息中携带UE的标识,例如5G全球唯一临时用户设备标识(5G generation globally unique temporary user equipment identity,5G-GUTI)。应理解,UE通过当前NAS安全上下文对该RR消 息进行了完整性保护,该当前NAS安全上下文为UE在该注册流程之前,用于保护UE与源AMF之间的传递的NAS消息的NAS安全上下文,或者说该当前NAS安全上下文为源AMF在203进行水平K AMF推演之前使用的NAS安全上下文。 Due to location movement, the UE triggers a Registration Request message to the network. For example, the UE moves to a new AMF area (denoted as the target AMF), and the registration request message of the UE is delivered to the target AMF. Exemplarily, the UE sends a registration request (registration request, RR) message to a target AMF (target AMF), and the RR message carries an identifier of the UE, such as a 5G globally unique temporary user equipment identity (5G generation globally unique temporary user equipment identity, 5G-GUTI). It should be understood that the UE has protected the integrity of the RR message through the current NAS security context, and the current NAS security context is the NAS security context used by the UE to protect the NAS message transmitted between the UE and the source AMF before the registration process , or the current NAS security context is the NAS security context used by the source AMF before performing horizontal K AMF deduction in 203 .
202,目标AMF向源AMF发送UE上下文传输请求消息。202. The target AMF sends a UE context transfer request message to the source AMF.
示例性地,目标AMF接收来自UE的注册请求消息,根据该消息中携带的GUTI,确定上一次为UE提供服务的AMF(记为源AMF)。然后目标AMF调用源AMF提供的UE上下文传输服务(Namf_Communication_UEContextTransfer)操作,以请求UE的上下文信息。该Namf_Communication_UEContextTransfer中包括UE的标识(例如5G-GUTI),该Namf_Communication_UEContextTransfer中还包括目标AMF接收到的完整的RR消息,即目标AMF在Namf_Communication_UEContextTransfer中发送在201接收到的RR消息。Exemplarily, the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE. The Namf_Communication_UEContextTransfer includes the identity of the UE (such as 5G-GUTI), and the Namf_Communication_UEContextTransfer also includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 201 in the Namf_Communication_UEContextTransfer.
203,源AMF根据本地策略进行水平推演,生成新的NAS安全上下文。203. The source AMF performs horizontal deduction according to the local policy to generate a new NAS security context.
示例性地,源AMF在接收到UE上下文传输请求消息之后,根据UE的标识在数据库中获取UE的数据(包括与该UE对应的当前NAS安全上下文),源AMF利用当前NAS安全上下文验证接收到的RR消息的完整性。如果RR消息的完整性验证通过,源AMF根据本地策略,决定是否推演新的NAS安全上下文。如果源AMF决定进行推演新的NAS安全上下文,则源AMF进行水平K AMF推演,得到新的NAS安全上下文。具体地,源AMF利用当前激活的Kamf和注册请求消息中携带的上行NAScount,进行水平推演得到新的密钥Kamf’。该新NAS的安全上下文中包括该新的密钥Kamf’。这里的新的NAS安全上下文是相对于源AMF进行水平推演前的NAS安全上下文而言的,因此,此时也可以将源AMF进行水平推演前的NAS安全上下文记为旧的NAS安全上下文。 Exemplarily, after receiving the UE context transfer request message, the source AMF acquires UE data (including the current NAS security context corresponding to the UE) in the database according to the UE identifier, and the source AMF uses the current NAS security context to verify the received integrity of the RR message. If the integrity verification of the RR message passes, the source AMF decides whether to deduce a new NAS security context according to the local policy. If the source AMF decides to deduce a new NAS security context, the source AMF performs horizontal K AMF deduction to obtain a new NAS security context. Specifically, the source AMF uses the currently activated Kamf and the uplink NAScount carried in the registration request message to perform horizontal deduction to obtain a new key Kamf'. The new key Kamf' is included in the security context of the new NAS. The new NAS security context here is relative to the NAS security context before the source AMF performs horizontal deduction. Therefore, at this time, the NAS security context before the source AMF performs horizontal deduction can also be recorded as the old NAS security context.
源AMF随后删除其持有的NAS安全上下文。The source AMF then deletes the NAS security context it holds.
204,源AMF向目标AMF发送UE上下文传输响应消息。204. The source AMF sends a UE context transfer response message to the target AMF.
示例性地,如果源AMF在数据库中找到了UE对应的数据,并且根据本地策略进行了水平密钥推演,源AMF向目标AMF发送UE上下文传输响应(Namf_Communication_UEContextTransfer Response)消息,该响应消息中携带UE上下文、SUPI、水平K AMF推演指示(keyAmfHDerivationInd指示)。该UE上下文中包括安全上下文。如果源AMF根据本地策略进行了水平K AMF推演,则该响应消息中携带的安全上下文为源AMF在203推演得到的新的安全上下文。 Exemplarily, if the source AMF finds the data corresponding to the UE in the database, and performs horizontal key derivation according to the local policy, the source AMF sends a UE context transfer response (Namf_Communication_UEContextTransfer Response) message to the target AMF, and the response message carries UE Context, SUPI, horizontal K AMF derivation indication (keyAmfHDerivationInd indication). The UE context includes a security context. If the source AMF has deduced the horizontal K AMF according to the local policy, the security context carried in the response message is the new security context deduced by the source AMF in 203 .
205,目标AMF向UE发送安全模式命令消息。205. The target AMF sends a security mode command message to the UE.
示例性地,目标AMF接收来自源AMF的UE上下文传输响应消息,如果该响应消息中携带了UE的SUPI,则目标AMF保存该UE上下文传输响应消息中携带的NAS安全上下文。如果目标AMF根据本地策略,启用该响应消息中携带的安全上下文,即源AMF推演得到的新的NAS安全上下文,则目标AMF发起非接入层安全模式命令(non access stratum security mode command,NAS SMC)消息给UE,用于建立UE和目标AMF之间的NAS安全上下文。该安全模式命令消息中携带水平推演参数(horizontal derivation parameter,HDP),该HDP可以是值为1的K_AMF_change_flag,其中值为1的K_AMF_change_flag用于指示UE进行水平K AMF推演。该NASSMC消息还包括选择的NAS算法,包括NAS加密算法和NAS完整性保护算法。 Exemplarily, the target AMF receives the UE context transfer response message from the source AMF, and if the response message carries the SUPI of the UE, the target AMF saves the NAS security context carried in the UE context transfer response message. If the target AMF activates the security context carried in the response message according to the local policy, that is, the new NAS security context deduced by the source AMF, the target AMF initiates a non access stratum security mode command (NAS SMC ) message to the UE, which is used to establish the NAS security context between the UE and the target AMF. The security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP). The HDP may be K_AMF_change_flag with a value of 1, wherein the K_AMF_change_flag with a value of 1 is used to instruct the UE to perform horizontal K AMF derivation. The NASSMC message also includes selected NAS algorithms, including NAS encryption algorithms and NAS integrity protection algorithms.
目标AMF将非接入层计数值(NAScounts)设置为0,并且根据新的密钥Kamf’和选择的NAS算法推演得到新的密钥NASkeys,包括NAS加密密钥和NAS完整性保护密钥。 然后使用该新的安全上下文对安全模式命令消息进行加密和完整性保护(使用推演的新的密钥NAS keys)。The target AMF sets the non-access stratum count value (NAScounts) to 0, and derives a new key NASkeys according to the new key Kamf' and the selected NAS algorithm, including the NAS encryption key and the NAS integrity protection key. This new security context is then used to encrypt and integrity-protect the security mode command messages (using derived new NAS keys).
206,UE水平推演生成新的NAS安全上下文。206. The UE performs horizontal deduction to generate a new NAS security context.
示例性地,UE接收来自目标AMF的安全模式命令消息。如果该安全模式命令消息中携带值为1的K_AMF_change_flag,则UE根据当前安全上下文中的密钥Kamf进行KAMF推演生成新的密钥Kamf’,从而得到新的NAS安全上下文,该新的NAS安全上下文包括该新的密钥Kamf’和NAS密钥,该NAS密钥根据该Kamf’生成和选择的算法生成。该NAS密钥包括NAS加密密钥和NAS完整性密钥。UE使用新的NAS安全上下文中的NAS密钥(具体地,可以是该NAS密钥中的NAS完整性密钥)对该安全模式命令消息进行完整性校验,如果对该安全模式命令消息的完整性校验通过,则UE向目标AMF发送安全模式完成消息。Exemplarily, the UE receives a security mode command message from the target AMF. If the security mode command message carries K_AMF_change_flag with a value of 1, the UE performs KAMF deduction based on the key Kamf in the current security context to generate a new key Kamf', thereby obtaining a new NAS security context. The new NAS security context Including the new key Kamf' and the NAS key, the NAS key is generated according to the algorithm generated and selected by the Kamf'. The NAS key includes a NAS encryption key and a NAS integrity key. The UE uses the NAS key in the new NAS security context (specifically, it can be the NAS integrity key in the NAS key) to perform integrity check on the security mode command message, if the security mode command message If the integrity check passes, the UE sends a security mode completion message to the target AMF.
进一步,UE可能会由于某些内部或外部原因导致注册流程失败。例如,UE的安全模式完成消息发送失败,或者,UE在注册完成前出现了链路释放,或者由于某些其他的原因,都可能导致UE的注册流程失败。本实施例以UE的安全模式完成消息发送失败导致注册失败为例进行说明。示例性地,在207,UE向目标AMF发送安全模式完成消息,但是该安全模式完成消息发送失败,UE收到底层指示,根据底层指示确定安全模式完成消息发送失败。Furthermore, the UE may fail the registration process due to some internal or external reasons. For example, the UE's security mode completion message fails to be sent, or the UE's link is released before the registration is completed, or due to some other reasons, the UE's registration process may fail. In this embodiment, the registration failure caused by the failure to send the security mode completion message of the UE is taken as an example for illustration. Exemplarily, at 207, the UE sends a security mode completion message to the target AMF, but the security mode completion message fails to be sent, the UE receives an underlying instruction, and determines that the security mode completion message fails to be sent according to the underlying instruction.
208,UE向目标AMF发送注册请求消息。208. The UE sends a registration request message to the target AMF.
示例性地,UE确定上一次注册流程失败后,UE重新发送注册请求给目标AMF。应理解,UE对该注册请求消息进行了完整性保护。Exemplarily, after the UE determines that the last registration procedure fails, the UE resends the registration request to the target AMF. It should be understood that the UE performs integrity protection on the registration request message.
209,目标AMF向源AMF发送UE上下文传输请求消息。209. The target AMF sends a UE context transfer request message to the source AMF.
示例性地,目标AMF接收来自UE的注册请求消息,根据该消息中携带的GUTI,确定上一次为UE提供服务的AMF(记为源AMF)。然后目标AMF调用源AMF提供的UE上下文传输服务(Namf_Communication_UEContextTransfer)操作,以请求UE的上下文信息。该Namf_Communication_UEContextTransfer中包括目标AMF接收到的完整的RR消息,即目标AMF在Namf_Communication_UEContextTransfer中发送在208接收到的RR消息。Exemplarily, the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE. The Namf_Communication_UEContextTransfer includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 208 in the Namf_Communication_UEContextTransfer.
对应地,源AMF在接收到来自目标AMF的UE上下文请求之后,源AMF对接收到的RR消息进行完整性验证。这里可能会出现两种情况导致源AMF对该RR消息的完整性校验失败:Correspondingly, after the source AMF receives the UE context request from the target AMF, the source AMF performs integrity verification on the received RR message. There may be two situations here that cause the source AMF to fail the integrity verification of the RR message:
一种情况,在204之后,源AMF继续维护并使用旧的安全上下文作为当前安全上下文,而UE在208使用了新的安全上下文对注册请求消息进行了完整性保护,则源AMF在209使用旧的安全上下文验证RR消息的完整性便会失败;In one case, after 204, the source AMF continues to maintain and use the old security context as the current security context, and the UE uses the new security context to perform integrity protection on the registration request message in 208, then the source AMF uses the old security context in 209 The security context verification of the integrity of the RR message will fail;
另一种情况,在204之后,源AMF删除了旧的安全上下文,并使用新的安全上下文作为当前安全上下文,而UE在208使用了旧的安全上下文对注册请求消息进行了完整性保护,则源AMF在209使用新的安全上下文验证RR消息的完整性便会验证失败。In another case, after 204, the source AMF deletes the old security context and uses the new security context as the current security context, and the UE uses the old security context to perform integrity protection on the registration request message in 208, then If the source AMF uses the new security context to verify the integrity of the RR message in 209, the verification fails.
如果上述完整性校验失败,则源AMF在210,向目标AMF发送UE上下文传输响应消息,该响应消息用于指示无法获取临时标识5G-GUTI。If the integrity check fails, the source AMF sends a UE context transfer response message to the target AMF at 210, where the response message is used to indicate that the temporary identifier 5G-GUTI cannot be obtained.
211,目标AMF与UE进行身份认证和鉴权流程。211. The target AMF performs an identity authentication and authentication process with the UE.
示例性地,目标AMF接收到来自源AMF的UE上下文传输响应消息,通过该响应消 息确定UE身份无法识别,则目标AMF启动UE身份认证和鉴权流程。Exemplarily, the target AMF receives the UE context transfer response message from the source AMF, and determines that the UE identity cannot be identified through the response message, and then the target AMF starts the UE identity authentication and authentication process.
212,目标AMF向UE发送注册接受消息。212. The target AMF sends a registration acceptance message to the UE.
示例性地,在身份认证和鉴权流程完成后,目标AMF向UE下发注册接受消息。但是,由于网络重新对UE进行了身份认证和鉴权,因此UE之前建立的所有PDU会话信息可能无法迁移到目标AMF,导致之前激活的PDU会话被释放。Exemplarily, after the identity authentication and authentication procedures are completed, the target AMF sends a registration acceptance message to the UE. However, since the network re-authenticates and authenticates the UE, all PDU session information previously established by the UE may not be migrated to the target AMF, resulting in the release of the previously activated PDU session.
通过上面的分析可知,由于现有技术规范中并没有规定上述场景(UE移动到目标AMF处,在源AMF向目标AMF请求UE的上下文时,源AMF确定推演了新的安全上下文,且此后出现UE注册到目标AMF失败的情况)下,UE和源AMF该如何维护当前的NAS安全上下文,从而导致UE与源AMF上的当前NAS安全上下文可能会出现不一致的问题。针对上述场景下出现的UE与源AMF上的当前NAS安全上下文不一致的问题,本申请下面实施例中提出了不同的解决方案。From the above analysis, it can be seen that since the above scenario is not specified in the existing technical specifications (UE moves to the target AMF, when the source AMF requests the target AMF for the context of the UE, the source AMF determines that a new security context has been deduced, and thereafter appears In the case where the UE fails to register with the target AMF), how should the UE and the source AMF maintain the current NAS security context, which may cause inconsistencies between the current NAS security context on the UE and the source AMF. Aiming at the problem of inconsistency between the UE and the current NAS security context on the source AMF in the above scenario, different solutions are proposed in the following embodiments of the present application.
图3示出了本申请实施例提供的管理安全上下文的方法300的示例性流程图。该方法300包括:301,终端设备30向目标移动管理网元10发送注册请求消息。FIG. 3 shows an exemplary flow chart of a method 300 for managing a security context provided by an embodiment of the present application. The method 300 includes: 301, the terminal device 30 sends a registration request message to the target mobility management network element 10 .
示例性地,终端设备30向目标移动管理网元10发送注册请求消息,以请求注册到该目标移动管理网元10,该注册请求消息包括该终端设备30的标识。该终端设备30的标识例如是该终端设备30的GUTI。Exemplarily, the terminal device 30 sends a registration request message to the target mobility management network element 10 to request to register with the target mobility management network element 10 , and the registration request message includes the identifier of the terminal device 30 . The identifier of the terminal device 30 is, for example, the GUTI of the terminal device 30 .
可选地,终端设备30利用第一安全上下文对该注册请求消息进行了安全保护,例如,终端设备30利用第一安全上下文和该注册请求消息生成完整性校验参数,该完整性校验参数用于验证该注册请求消息是否被篡改。该第一安全上下文为该终端设备30源移动管理网元20当前的安全上下文。第一安全上下文中包括密钥Kamf、NAS密钥集标识符ngKSI。该第一安全上下文中还可能包括其他信息元素(informationelement,IE),例如选择的算法、上行NAScount、下行NAScount等,本申请不做限定,具体可参考现有标准。应理解,在没有特殊说明的情况下,本申请实施例中的安全上下文均为非接入层NAS安全上下文。Optionally, the terminal device 30 uses the first security context to perform security protection on the registration request message, for example, the terminal device 30 uses the first security context and the registration request message to generate an integrity check parameter, and the integrity check parameter It is used to verify whether the registration request message has been tampered with. The first security context is the current security context of the source mobility management network element 20 of the terminal device 30 . The first security context includes the key Kamf and the NAS key set identifier ngKSI. The first security context may also include other information elements (information element, IE), such as the selected algorithm, uplink NAScount, downlink NAScount, etc., which are not limited in this application, and may refer to existing standards for details. It should be understood that, unless otherwise specified, the security contexts in the embodiments of the present application are non-access stratum NAS security contexts.
该注册请求消息中还可以包括上行非接入层计数(NAScount)值。The registration request message may also include an uplink non-access stratum count (NAScount) value.
302,目标移动管理网元10向源移动管理网元20发送上下文请求消息。302. The target mobility management network element 10 sends a context request message to the source mobility management network element 20.
示例性地,目标移动管理网元10接收来自终端设备30的注册请求消息,根据该终端设备30的标识确定与该终端设备30的标识对应的源移动管理网元20,记为源移动管理网元20目标移动管理网元10。根据该注册请求消息,目标移动管理网元10向源移动管理网元20发送上下文请求消息,该上下文请求消息用于请求获取该终端设备30的上下文。该上下文请求消息包括该终端设备30的标识。Exemplarily, the target mobility management network element 10 receives the registration request message from the terminal equipment 30, and determines the source mobility management network element 20 corresponding to the identifier of the terminal equipment 30 according to the identifier of the terminal equipment 30, denoted as the source mobility management network element 20 The element 20 targets the mobility management network element 10 . According to the registration request message, the target mobility management network element 10 sends a context request message to the source mobility management network element 20, where the context request message is used to request to obtain the context of the terminal device 30. The context request message includes the identification of the terminal device 30 .
可选地,目标移动管理网元10在该上下文请求消息中携带了来自该终端设备30的完整的注册请求消息,或者说,目标移动管理网元10将在步骤301接收到的受到了安全保护的注册请求消息携带在上下文请求消息中。Optionally, the target mobility management network element 10 carries a complete registration request message from the terminal device 30 in the context request message, or in other words, the target mobility management network element 10 will receive the security protection in step 301 The registration request message of is carried in the context request message.
303,在需要进行水平密钥推演的情况下,源移动管理网元20根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’。303. When horizontal key derivation is required, the source mobility management network element 20 generates a new key Kamf' according to the key Kamf in the first security context.
示例性地,源移动管理网元20接收来自目标移动管理网元10的上下文请求消息。源移动管理网元20根据该上下文请求消息中携带的终端设备30的标识,在本地数据库中搜寻该终端设备30的上下文信息,该上下文信息中包括第一安全上下文,该第一安全上下文为该源移动管理网元20和该终端设备30之间当前的安全上下文。Exemplarily, the source mobility management network element 20 receives the context request message from the target mobility management network element 10 . The source mobility management network element 20 searches the local database for the context information of the terminal device 30 according to the identifier of the terminal device 30 carried in the context request message, the context information includes the first security context, and the first security context is the The current security context between the source mobility management network element 20 and the terminal device 30 .
可选地,源移动管理网元20利用第一安全上下文对上下文请求消息中携带的注册请 求消息进行安全验证。如果验证成功,则源移动管理网元20判断是否需要进行水平密钥推演。如果源移动管理网元20确定需要进行水平密钥推演,则进一步,源移动管理网元20根据第一安全上下文中的密钥Kamf生成新的密钥Kamf’。例如,源移动管理网元20利用第一安全上下文中的Kamf和注册请求消息中携带的非接入层计数值进行水平密钥推演,得到新的密钥Kamf’。Optionally, the source mobility management network element 20 uses the first security context to perform security verification on the registration request message carried in the context request message. If the verification is successful, the source mobility management network element 20 judges whether to perform horizontal key derivation. If the source mobility management network element 20 determines that horizontal key derivation is required, further, the source mobility management network element 20 generates a new key Kamf' according to the key Kamf in the first security context. For example, the source mobility management network element 20 uses Kamf in the first security context and the non-access stratum count value carried in the registration request message to perform horizontal key derivation to obtain a new key Kamf'.
304,源移动管理网元20向目标移动管理网元10发送第二安全上下文。304. The source mobility management network element 20 sends the second security context to the target mobility management network element 10.
示例性地,响应于上下文请求消息,源移动管理网元20向目标移动管理网元10发送上下文响应消息,该上下文响应消息包括该第二安全上下文,该第二安全上下文包括新的密钥Kamf’。该第二安全上下文中还可能包括其他IE,例如NAS密钥集标识符ngKSI’、选择的算法、上行NAScount、下行NAScount等,本申请不做限定,具体可参考现有标准。Exemplarily, in response to the context request message, the source mobility management network element 20 sends a context response message to the target mobility management network element 10, the context response message includes the second security context, and the second security context includes the new key Kamf '. The second security context may also include other IEs, such as NAS key set identifier ngKSI', selected algorithm, uplink NAScount, downlink NAScount, etc., which are not limited in this application, and can refer to existing standards for details.
该上下文响应消息包括该终端设备30的标识,例如该终端设备30的SUPI。The context response message includes the identifier of the terminal device 30 , such as the SUPI of the terminal device 30 .
305,目标移动管理网元10向终端设备30发送安全模式命令消息。305. The target mobility management network element 10 sends a security mode command message to the terminal device 30.
示例性地,目标移动管理网元10接收到终端设备30来自源移动管理网元20的上下文响应消息,如果该上下文响应消息中携带水平推演指示,则目标移动管理网元10根据新的密钥Kamf’和选择的算法推演得到新的密钥NASkeys,然后保存该上下文响应消息中携带的第二安全上下文。如果目标移动管理网元10根据本地策略,启用第二安全上下文,则目标移动管理网元10向终端设备30发送安全模式命令消息,该安全模式命令消息中包括水平推演指示信息,该水平推演指示信息用于指示终端设备30进行水平密钥推演。Exemplarily, the target mobility management network element 10 receives a context response message from the source mobility management network element 20 from the terminal device 30, and if the context response message carries a horizontal derivation instruction, the target mobility management network element 10 then uses the new key Kamf' and the selected algorithm deduce the new key NASkeys, and then save the second security context carried in the context response message. If the target mobility management network element 10 enables the second security context according to the local policy, the target mobility management network element 10 sends a security mode command message to the terminal device 30, the security mode command message includes horizontal derivation indication information, and the horizontal derivation indication The information is used to instruct the terminal device 30 to perform horizontal key derivation.
306,终端设备30根据第一安全上下文中的密钥Kamf生成新的密钥Kamf’。306. The terminal device 30 generates a new key Kamf' according to the key Kamf in the first security context.
示例性地,终端设备30接收来自目标移动管理网元10的安全模式命令消息,根据该安全模式命令消息中的水平推演指示信息,该终端设备30根据第一安全上下文中的密钥Kamf生成新的密钥Kamf’。目标移动管理网元10例如,该终端设备30利用第一安全上下文中的密钥Kamf和注册请求消息中携带的上行非接入层计数值进行水平密钥推演得到密钥Kamf’,然后利用该新的密钥Kamf’以及安全模式完成消息中算法标识(ngKSI),推演新的NAS密钥(NASkeys)。Exemplarily, the terminal device 30 receives a security mode command message from the target mobility management network element 10, and according to the horizontal derivation instruction information in the security mode command message, the terminal device 30 generates a new key Kamf according to the first security context. The key Kamf'. For example, the target mobility management network element 10, the terminal device 30 uses the key Kamf in the first security context and the uplink non-access stratum count value carried in the registration request message to perform horizontal key derivation to obtain the key Kamf', and then uses the The new key Kamf' and the algorithm identifier (ngKSI) in the security mode completion message are used to deduce the new NAS key (NASkeys).
下面对源移动管理网元20和终端设备30对第一安全上下文和第二安全上下文的几种可能的维护方式作示例性说明。Several possible ways of maintaining the first security context and the second security context by the source mobility management network element 20 and the terminal device 30 are exemplified below.
一种可能的实现方式(记为方案1):A possible implementation (denoted as scheme 1):
307,源移动管理网元20维持第一安全上下文为当前安全上下文。307. The source mobility management network element 20 maintains the first security context as the current security context.
示例性地,源移动管理网元20根据Kamf生成Kamf’之后,维持第一安全上下文为第一安全上下文,或者说,继续使用第一安全上下文作为当前安全上下文,或者说,不删除第一安全上下文。Exemplarily, after the source mobility management network element 20 generates Kamf' according to Kamf, it maintains the first security context as the first security context, or continues to use the first security context as the current security context, or does not delete the first security context. context.
这里的维持可以是终端设备推演新的kamf’之后,并不会立刻将新的安全上下文设置为当前上下文,而是继续维持第一安全上下文为当前安全上下文,等到注册流程成功之后,将新的安全上下文(第二安全上下文)设置为当前安全上下文,并删除第一安全上下文。The maintenance here can be that after the terminal device deduces the new kamf', it does not immediately set the new security context as the current context, but continues to maintain the first security context as the current security context. After the registration process is successful, the new The security context (the second security context) is set as the current security context, and the first security context is deleted.
可选地,源移动管理网元20删除第二安全上下文。Optionally, the source mobility management network element 20 deletes the second security context.
应理解,307可以在304之前执行,也可以在304之后执行,本申请不做限定。It should be understood that 307 may be performed before 304 or after 304, which is not limited in this application.
可选地,在一定条件下,源移动管理网元20删除第一安全上下文。例如,源移动管理网元20接收来自目标移动管理网元10的指示信息,根据该指示信息该源移动管理网元20删除该终端设备30的上下文。一种示例,该指示信息用于指示终端设备30成功注册 到了网络;另一种示例,该指示信息指示删除终端设备30的上下文。根据该指示信息,源移动管理网元20删除第一安全上下文。又例如,源移动管理网元20接收去注册通知消息,例如,源移动管理网元20接收来自统一数据管理网元的去注册通知消息,该去注册通知消息用于指示源移动管理网元20执行该终端设备30的去注册,该统一数据管理网元例如可以是5G网络中的UDM。又例如,在预设时间之后,源移动管理网元20删除第二安全上下文,具体例如,在源移动管理网元20向目标移动管理网元10发送第二安全上下文之后,启动定时器,当定时器超时,源移动管理网元20仍没有接收到响应消息,则源移动管理网元20删除第二安全上下文;或者,源移动管理网元20在生成新的密钥Kamf’之后,启动定时器,当定时器超时,源移动管理网元20仍没有接收到响应消息,则源移动管理网元20删除第二安全上下文。应理解,本申请对启动定时器的具体时机不做限定。应理解,该注册成功指示信息可以承载于现有消息中,也可以承载于源移动管理网元20新增的消息中,本申请对此不做限定。Optionally, under certain conditions, the source mobility management network element 20 deletes the first security context. For example, the source mobility management network element 20 receives indication information from the target mobility management network element 10, and the source mobility management network element 20 deletes the context of the terminal device 30 according to the indication information. In one example, the indication information is used to indicate that the terminal device 30 has successfully registered to the network; in another example, the indication information indicates that the context of the terminal device 30 is deleted. According to the indication information, the source mobility management network element 20 deletes the first security context. For another example, the source mobility management network element 20 receives a de-registration notification message, for example, the source mobility management network element 20 receives a de-registration notification message from a unified data management network element, and the de-registration notification message is used to indicate that the source mobility management network element 20 To perform de-registration of the terminal device 30, the unified data management network element may be, for example, a UDM in a 5G network. For another example, after a preset time, the source mobility management network element 20 deletes the second security context. Specifically, for example, after the source mobility management network element 20 sends the second security context to the target mobility management network element 10, a timer is started. When When the timer expires, the source mobility management network element 20 still does not receive a response message, then the source mobility management network element 20 deletes the second security context; or, the source mobility management network element 20 starts the timer after generating a new key Kamf' When the timer expires and the source mobility management network element 20 still does not receive the response message, the source mobility management network element 20 deletes the second security context. It should be understood that the present application does not limit the specific timing for starting the timer. It should be understood that the registration success indication information may be carried in an existing message, or in a message newly added by the source mobility management network element 20, which is not limited in this application.
可选地,终端设备30确定注册流程没有成功完成。应理解,这里的注册成功指的是终端设备的注册流程因为异常情况导致的无法成功完成的情况,或者该注册流程没有成功可以理解为注册流程失败。还应理解,本申请对注册流程没有成功完成的具体原因不做限定。下面对终端设备30确定注册流程没有成功完成的几种可能的情况作示例性说明:一示例,终端设备在预设时间内没有接收到注册接受消息。例如,终端设备30发送了注册请求消息之后,开启定时器,在定时器到期后,仍没有收到注册接受消息,则终端设备30确定注册流程没有成功完成;另一示例,终端设备30接收到注册拒绝消息,该注册拒绝消息用于拒绝终端设备30接入到网络,或者说,该注册拒绝消息用于拒绝终端设备30注册到目标移动管理网元,根据该注册拒绝消息,该终端设备30确定该注册流程没有成功完成;另一示例,终端设备30在接收到注册接受消息之前,需要重新触发注册流程。例如,在本次注册流程完成之前,终端设备30进入了新的跟踪区域,从而需要重新触发注册流程,在这种情况下,终端设备30确定该注册流程失败;又一示例,终端设备30底层失败(Lower layer failure)指示信息,根据该底层失败指示信息,终端设备30确定本次注册流程没有成功完成;又一示例,终端设备30在接收到注册接受消息之前,确定NAS安全模式完成消息发送失败;又一示例,终端设备30在接收到注册接受消息之前,确定自身与接入网设备之间的链接释放;又一示例,终端设备30在接收到注册接受消息之前,确定自身与接入网设备之间的RRC连接被挂起或者释放。Optionally, the terminal device 30 determines that the registration process has not been successfully completed. It should be understood that the successful registration here refers to the situation that the registration process of the terminal device cannot be successfully completed due to abnormal conditions, or the failure of the registration process can be interpreted as a failure of the registration process. It should also be understood that this application does not limit the specific reasons for the unsuccessful completion of the registration process. Several possible situations in which the terminal device 30 determines that the registration process has not been successfully completed are illustrated below: In one example, the terminal device does not receive a registration acceptance message within a preset time. For example, after the terminal device 30 sends the registration request message, the timer is started, and after the timer expires, if the registration acceptance message is not received, the terminal device 30 determines that the registration process has not been successfully completed; in another example, the terminal device 30 receives Receive a registration rejection message, the registration rejection message is used to deny the terminal device 30 access to the network, or in other words, the registration rejection message is used to deny the terminal device 30 to register with the target mobility management network element, according to the registration rejection message, the terminal device 30 determines that the registration process has not been successfully completed; in another example, the terminal device 30 needs to re-trigger the registration process before receiving the registration acceptance message. For example, before the current registration process is completed, the terminal device 30 enters a new tracking area, so that the registration process needs to be triggered again. In this case, the terminal device 30 determines that the registration process fails; in another example, the terminal device 30 bottom layer Failure (Lower layer failure) indication information, according to the underlying failure indication information, the terminal device 30 determines that the registration process has not been successfully completed; in another example, the terminal device 30 determines that the NAS security mode completes the message sending before receiving the registration acceptance message Failure; in another example, before receiving the registration acceptance message, the terminal device 30 determines that the link between itself and the access network device is released; The RRC connection between network devices is suspended or released.
308,在注册流程失败的情况下,终端设备30使用第一安全上下文为当前安全上下文。308. When the registration process fails, the terminal device 30 uses the first security context as the current security context.
示例性地,终端设备30生成新的密钥Kamf’之后,维护第一安全上下文和第二安全上下文,其中,第二安全上下文包括该Kamf’和NAS密钥,该NAS密钥根据该Kamf’生成。该NAS密钥可以包括NAS加密密钥和NAS完整性密钥。Exemplarily, after the terminal device 30 generates the new key Kamf', it maintains the first security context and the second security context, wherein the second security context includes the Kamf' and the NAS key, and the NAS key is based on the Kamf' generate. The NAS keys may include NAS encryption keys and NAS integrity keys.
具体地,作为一种可能的实现方式,终端设备30生成新的密钥Kamf’之后,继续将第一安全上下文作为当前安全上下文,并且保存第二安全上下文,即,终端设备网维护第一安全上下文为当前安全上下文,这里的文虎第一安全上下文为当前安全上下文指的是终端设备推演了新的Kamf’之后,并不会立刻将新的安全上下文(第二安全上下文)设置为当前上下文,而是继续维持第一安全上下文为当前安全上下文,等到注册流程成功之后,将新的安全上下文设置为当前安全上下文,删除第一安全上下文。在这种实现方式中,在注册流程失败的情况下,如果注册流程失败的原因为终端设备接收到注册拒绝消息,且注 册拒绝消息造成安全上下文删除,则终端设备删除第一安全上下文和第二安全上下文。如果注册流程失败没有导致终端设备删除安全上下文,则终端设备30继续将第一安全上下文为当前安全上下文,以及删除第二安全上下文。如果注册成功,则终端设备30设置第二安全上下文为当前安全上下文,并删除第一安全上下文。例如终端设备30利用第二安全上下文对NAS安全模式命令消息的安全验证成功之后,向目标移动管理网元10发送NAS安全模式完成消息,如果安全模式完成消息发送成功,或者终端设备30接收到来自目标移动管理网元10的注册接受消息,该注册接受消息用于指示该终端设备30成功注册到了网络,则终端设备30设置第二安全上下文为当前安全上下文,并删除第一安全上下文。Specifically, as a possible implementation, after the terminal device 30 generates a new key Kamf', it continues to use the first security context as the current security context, and saves the second security context, that is, the terminal device network maintains the first security context The context is the current security context. Here, the first security context is the current security context, which means that after the terminal device deduces the new Kamf', it will not immediately set the new security context (second security context) as the current context. , but continue to maintain the first security context as the current security context, and after the registration process is successful, set the new security context as the current security context and delete the first security context. In this implementation, when the registration process fails, if the reason for the registration process failure is that the terminal device receives a registration rejection message, and the registration rejection message causes the security context to be deleted, the terminal device deletes the first security context and the second security context. security context. If the failure of the registration process does not cause the terminal device to delete the security context, the terminal device 30 continues to use the first security context as the current security context and delete the second security context. If the registration is successful, the terminal device 30 sets the second security context as the current security context, and deletes the first security context. For example, after the terminal device 30 uses the second security context to successfully verify the security of the NAS security mode command message, it sends a NAS security mode completion message to the target mobility management network element 10. If the security mode completion message is sent successfully, or the terminal device 30 receives a message from A registration acceptance message of the target mobility management network element 10, the registration acceptance message is used to indicate that the terminal device 30 has successfully registered to the network, then the terminal device 30 sets the second security context as the current security context, and deletes the first security context.
作为另一种可能的实现方式,终端设备30生成新的密钥Kamf’之后,保存第一安全上下文,并设置第二安全上下文为当前安全上下文。应理解,这里的设置第二安全上下文为当前安全上下文,表示终端设备生成新的安全上下文(第二安全上下文)之后,将新的安全上下文设置为当前安全上下文,同时保存旧的安全上下文(第一安全上下文),在确定注册流程失败的情况下,将当前安全上下文进行回退,即重新将第一安全上下文设置为当前安全上下文。在这种实现方式中,在注册流程失败的情况下,,如果注册流程失败的原因为终端设备接收到注册拒绝消息,且注册拒绝消息造成安全上下文删除,则终端设备删除第一安全上下文和第二安全上下文。如果注册流程失败没有导致终端设备删除安全上下文,则终端设备30将第一安全上下文为当前安全上下文,以及删除第二安全上下文。如果注册成功,则终端设备30删除第一安全上下文。可选地,在安全模式完成消息发送失败之后,或者说在注册流程失败后,终端设备30重新发起注册流程。例如,在注册流程失败之后,终端设备30向又一个目标移动管理网元发送注册请求消息,该注册请求消息包括该终端设备30的标识,该注册请求消息通过第一安全上下文进行了安全保护。应理解,该又一个目标移动管理网元与目标移动管理网元10可能相同也可能不同,。As another possible implementation manner, after the terminal device 30 generates a new key Kamf', it saves the first security context, and sets the second security context as the current security context. It should be understood that setting the second security context here as the current security context means that after the terminal device generates a new security context (the second security context), it sets the new security context as the current security context while saving the old security context (the second security context) A security context), if it is determined that the registration process fails, the current security context is rolled back, that is, the first security context is re-set as the current security context. In this implementation, if the registration process fails, if the reason for the registration process failure is that the terminal device receives a registration rejection message, and the registration rejection message causes the security context to be deleted, the terminal device deletes the first security context and the second security context. Two security contexts. If the failure of the registration process does not cause the terminal device to delete the security context, the terminal device 30 sets the first security context as the current security context and deletes the second security context. If the registration is successful, the terminal device 30 deletes the first security context. Optionally, after the security mode complete message fails to be sent, or after the registration process fails, the terminal device 30 re-initiates the registration process. For example, after the registration process fails, the terminal device 30 sends a registration request message to another target mobility management network element, the registration request message includes the identifier of the terminal device 30, and the registration request message is secured by the first security context. It should be understood that the further target mobility management network element may be the same as or may be different from the target mobility management network element 10 .
目标移动管理网元10接收到来自终端设备30的注册请求消息之后,根据该注册请求消息,目标移动管理网元10向源移动管理网元20发送上下文请求消息,该上下文请求消息用于请求获取该终端设备30的上下文。第二目标移动管理网元10将从终端设备30接收到的完整的注册请求消息携带在该上下文请求消息中。对应地,源移动管理网元20接收来自第二目标移动管理网元10的上下文请求消息,然后,源移动管理网元20利用第一安全上下文对该上下文请求消息中携带的注册请求消息进行安全验证。如果验证通过,则源移动管理网元20继续执行后续流程。应理解,这里的注册过程与301至303的过程类似,为了简洁,重复的内容不再赘述。After the target mobility management network element 10 receives the registration request message from the terminal device 30, according to the registration request message, the target mobility management network element 10 sends a context request message to the source mobility management network element 20, and the context request message is used to request to obtain The context of the terminal device 30 . The second target mobility management network element 10 carries the complete registration request message received from the terminal device 30 in the context request message. Correspondingly, the source mobility management network element 20 receives the context request message from the second target mobility management network element 10, and then, the source mobility management network element 20 uses the first security context to secure the registration request message carried in the context request message. verify. If the verification is passed, the source mobility management network element 20 continues to perform subsequent procedures. It should be understood that the registration process here is similar to the processes in 301 to 303, and for the sake of brevity, repeated content will not be repeated.
另一种可能的实现方式(记为方案2):Another possible implementation (denoted as scheme 2):
309,源移动管理网元20设置第二安全上下文为当前安全上下文。309. The source mobility management network element 20 sets the second security context as the current security context.
示例性地,源移动管理网元20生成新的密钥Kamf’之后,设置第二安全上下文为当前安全上下文,该第二安全上下文包括新的密钥Kamf’以及推演的NASkeys。Exemplarily, after the source mobility management network element 20 generates the new key Kamf', it sets the second security context as the current security context, and the second security context includes the new key Kamf' and deduced NASkeys.
应理解,309可以在304之前执行,也可以在304之后执行,本申请不做限定。It should be understood that 309 may be performed before 304 or after 304, which is not limited in this application.
可选地,源移动管理网元20删除第一安全上下文。Optionally, the source mobility management network element 20 deletes the first security context.
310,终端设备30设置第二安全上下文为当前安全上下文。310. The terminal device 30 sets the second security context as the current security context.
示例性地,终端设备30生成新的密钥Kamf’之后,设置第二安全上下文为当前安全上下文。Exemplarily, after the terminal device 30 generates a new key Kamf', it sets the second security context as the current security context.
应理解,在这种实现方式中,源移动管理网元20使用新的密钥Kamf’以及选择的算法推演新的NAS密钥。It should be understood that in this implementation manner, the source mobility management network element 20 uses the new key Kamf' and the selected algorithm to derive a new NAS key.
可选地,终端设备30删除第一安全上下文。Optionally, the terminal device 30 deletes the first security context.
进一步地,终端设备30向目标移动管理网元10发送安全模式完成消息,该NAS安全模式完成消息用于响应于NAS安全模式命令消息。Further, the terminal device 30 sends a security mode completion message to the target mobility management network element 10, and the NAS security mode completion message is used to respond to the NAS security mode command message.
如果注册流程没有成功完成,例如,该安全模式完成消息发送失败,终端设备30可以重新发起注册流程。例如,终端设备30向目标移动管理网元10发送注册请求消息,该注册请求消息包括该终端设备30的标识。终端设备30通过第二安全上下文对该注册请求消息进行完整性保护。第二目标移动管理网元10根据该注册请求消息,向源移动管理网元20发送第二上下文请求消息,并在该第二上下文请求消息中携带了接收到的完整的注册请求消息。源移动管理网元20接收到该第二上下文请求消息之后,利用第二安全上下文对该注册请求消息进行安全验证。如果验证通过,则继续执行后续流程。If the registration process is not successfully completed, for example, the security mode completion message fails to be sent, the terminal device 30 may re-initiate the registration process. For example, the terminal device 30 sends a registration request message to the target mobility management network element 10, where the registration request message includes the identifier of the terminal device 30. The terminal device 30 performs integrity protection on the registration request message through the second security context. The second target mobility management network element 10 sends a second context request message to the source mobility management network element 20 according to the registration request message, and the second context request message carries the received complete registration request message. After receiving the second context request message, the source mobility management network element 20 uses the second security context to perform security verification on the registration request message. If the verification is passed, proceed to the subsequent process.
又一种可能的实现方式(记为方案3):Yet another possible implementation (denoted as scheme 3):
311,源移动管理网元20维护第一安全上下文和第二安全上下文。311. The source mobility management network element 20 maintains the first security context and the second security context.
示例性地,源移动管理网元20生成新的密钥kamf’之后,维护第一安全上下文和第二安全上下文。例如,源移动管理网元20继续将第一安全上下文作为移动管理网元与终端设备30之间的当前安全上下文,并保存第二安全上下文。又例如,源移动管理网元20保存第一安全上下文,并将第二安全上下文作为源移动管理网元20和终端设备30之间的当前安全上下文Exemplarily, after the source mobility management network element 20 generates a new key kamf', it maintains the first security context and the second security context. For example, the source mobility management network element 20 continues to use the first security context as the current security context between the mobility management network element and the terminal device 30, and saves the second security context. For another example, the source mobility management network element 20 saves the first security context, and uses the second security context as the current security context between the source mobility management network element 20 and the terminal device 30
312,终端设备30维护第一安全上下文为当前安全上下文,或设置第二安全上下文为当前安全上下文。312. The terminal device 30 maintains the first security context as the current security context, or sets the second security context as the current security context.
示例性地,作为一种可能的实现方式,终端设备30在生成新的密钥Kamf’之后,维护第一安全上下文为当前安全上下文,并保存第二安全上下文,当注册流程没有成功完成,则终端设备30删除第二安全上下文;或者终端设备30在生成新的密钥Kamf’之后,保存第一安全上下文,并设置第二安全上下文为当前安全上下文,当注册流程没有成功完成,则终端设备30设置第一安全上下文为当前安全上下文,并删除第二安全上下文。即终端设备30可以执行方案1中308所执行的方案;或者,作为另一种可能的实现方式,终端设备30在利用第一安全上下文进行水平密钥推演得到第二安全上下文之后,设置第二安全上下文为当前安全上下文,并删除第一安全上下文。即终端设备30可以执行方案2中310所执行的方案。Exemplarily, as a possible implementation, the terminal device 30 maintains the first security context as the current security context after generating the new key Kamf', and saves the second security context. When the registration process is not successfully completed, then The terminal device 30 deletes the second security context; or the terminal device 30 saves the first security context after generating a new key Kamf', and sets the second security context as the current security context. When the registration process is not successfully completed, the terminal device 30. Set the first security context as the current security context, and delete the second security context. That is, the terminal device 30 can implement the solution performed by 308 in solution 1; or, as another possible implementation, after the terminal device 30 uses the first security context to perform horizontal key derivation to obtain the second security context, set the second security context. The security context is the current security context, and the first security context is deleted. That is, the terminal device 30 may execute the solution performed by 310 in solution 2.
当终端设备30的安全模式完成消息发送失败,或者终端设备30因为其他原因导致注册流程没有成功完成,终端设备30可以重新发起注册流程。例如,终端设备30向目标移动管理网元10发送受到了安全保护的注册请求消息。对应地,目标移动管理网元10接收该注册请求消息,根据该注册请求消息,目标移动管理网元10向源移动管理网元20发送上下文请求消息,并在该上下文请求消息中携带了接收到的完整的注册请求消息。源移动管理网元20接收到该上下文请求消息之后,分别利用第一安全上下文和第二安全上下文对该注册请求消息进行安全验证。当该源移动管理网元20利用该第一安全上下文对该注册请求消息的安全验证成功,该源移动管理网元20删除该第二安全上下文;当该源移动管理网元20利用该第二安全上下文对该注册请求消息的安全验证成功时,该源移动管理网元20设置第二安全上下文为当前安全上下文,并删除该第一安全上下文。如果源移动 管理网元20使用该第一安全上下文和该第二安全上下文验证该注册请求消息均失败,则源移动管理网元20可以删除该第一安全上下文和该第二安全上下文。When the security mode completion message of the terminal device 30 fails to be sent, or the terminal device 30 fails to complete the registration process due to other reasons, the terminal device 30 may re-initiate the registration process. For example, the terminal device 30 sends a security-protected registration request message to the target mobility management network element 10 . Correspondingly, the target mobility management network element 10 receives the registration request message, and according to the registration request message, the target mobility management network element 10 sends a context request message to the source mobility management network element 20, and carries the received The complete registration request message. After receiving the context request message, the source mobility management network element 20 uses the first security context and the second security context to perform security verification on the registration request message. When the source mobility management network element 20 uses the first security context to successfully verify the registration request message, the source mobility management network element 20 deletes the second security context; when the source mobility management network element 20 uses the second When the security verification of the registration request message by the security context succeeds, the source mobility management network element 20 sets the second security context as the current security context, and deletes the first security context. If the source mobility management network element 20 fails to verify the registration request message using the first security context and the second security context, the source mobility management network element 20 may delete the first security context and the second security context.
应理解,在这种实现方式中,源移动管理网元20使用新的密钥Kamf’以及选择的算法推演新的NAS密钥。It should be understood that in this implementation manner, the source mobility management network element 20 uses the new key Kamf' and the selected algorithm to derive a new NAS key.
应理解,本申请对使用第一安全上下文和第二安全上下文进行安全验证的顺序不做限定,即源移动管理网元20既可以先使用第一安全上下文进行验证,也可以先使用第二安全上下文进行验证。It should be understood that this application does not limit the sequence of security verification using the first security context and the second security context, that is, the source mobility management network element 20 can first use the first security Context to verify.
还应理解,当源移动管理网元20使用其中一个安全上下文对该注册请求消息验证成功之后,可以不需要再使用另一个安全上下文进行验证。例如,源移动管理网元20先利用第一安全上下文对该注册请求消息进行安全验证,如果验证成功,可以不再用第二安全上下文对该注册请求消息进行验证,并且可以删除该第二安全上下文;如果验证失败,源移动管理网元20可以再利用第二安全上下文对该注册请求消息进行安全验证,如果验证成功,源移动管理网元20将该第二安全上下文设置为当前安全上下文,并删除第一安全上下文。It should also be understood that after the source mobility management network element 20 successfully authenticates the registration request message using one of the security contexts, it may not need to use another security context for authentication. For example, the source mobility management network element 20 first uses the first security context to perform security verification on the registration request message. If the verification is successful, it may no longer use the second security context to verify the registration request message, and may delete the second security context. Context; if the verification fails, the source mobility management network element 20 can then use the second security context to perform security verification on the registration request message, and if the verification is successful, the source mobility management network element 20 sets the second security context as the current security context, And delete the first security context.
基于上述技术方案,通过定义终端设备和源移动管理网元在进行水平密钥推演之后,对新的安全上下文(如上述实施例中的第二安全上下文)和旧的安全上下文(如上述实施例中的第一安全上下文)的处理方式,可以避免因为终端侧和网络侧的安全上下文不一致,导致终端设备的注册请求无法在源移动管理网元通过NAS的完整性保护检查,从而使得终端设备已经建立的安全上下文无法迁移到目标移动管理网元,从而避免终端设备之前激活的PDU会话被释放,影响用户体验。另一方面,可以避免因为终端设备的注册请求无法在源移动管理网元通过NAS的完整性保护检查,导致的身份认证和重鉴权流程,从而增加信令开销的问题。Based on the above technical solution, by defining the terminal device and the source mobility management network element after performing horizontal key derivation, the new security context (such as the second security context in the above embodiment) and the old security context (such as the above embodiment The processing method of the first security context) can avoid that the registration request of the terminal device cannot pass the integrity protection check of the NAS at the source mobility management network element due to the inconsistency of the security contexts on the terminal side and the network side, so that the terminal device has already The established security context cannot be migrated to the target mobility management network element, thereby avoiding the release of the previously activated PDU session of the terminal device and affecting user experience. On the other hand, it can avoid the problem of increasing signaling overhead due to the identity authentication and re-authentication process caused by the registration request of the terminal device failing to pass the integrity protection check of the NAS at the source mobility management network element.
图4示出了本申请实施例提供的管理安全上下文的方法400的示例性流程图。该方法400包括:FIG. 4 shows an exemplary flow chart of a method 400 for managing a security context provided by an embodiment of the present application. The method 400 includes:
401,UE向目标AMF发送注册请求消息。401. The UE sends a registration request message to a target AMF.
由于位置移动,UE触发注册请求消息给网络。例如,UE移动到一个新的AMF区域(记为目标AMF),该UE的注册请求消息被投递到该目标AMF上。示例性地,UE向目标AMF(target AMF)发送注册请求(registration request,RR)消息,该RR消息中携带UE的标识,例如5G全球唯一临时用户设备标识(5G generation globally unique temporary user equipment identity,5G-GUTI)。应理解,UE通过当前NAS安全上下文对该RR消息进行了完整性保护,该当前NAS安全上下文为UE在该注册流程之前,用于保护UE与源AMF之间的传递的NAS消息的NAS安全上下文,或者说该当前安全上下文为源AMF在403进行水平K AMF推演之前使用的NAS当前安全上下文。 Due to location movement, the UE triggers a Registration Request message to the network. For example, the UE moves to a new AMF area (denoted as the target AMF), and the registration request message of the UE is delivered to the target AMF. Exemplarily, the UE sends a registration request (registration request, RR) message to a target AMF (target AMF), and the RR message carries an identifier of the UE, such as a 5G globally unique temporary user equipment identity (5G generation globally unique temporary user equipment identity, 5G-GUTI). It should be understood that the UE has protected the integrity of the RR message through the current NAS security context, and the current NAS security context is the NAS security context used by the UE to protect the NAS message transmitted between the UE and the source AMF before the registration process , or the current security context is the current security context of the NAS used by the source AMF before performing horizontal K AMF deduction in 403 .
402,目标AMF向源AMF发送UE上下文传输请求消息。402. The target AMF sends a UE context transfer request message to the source AMF.
示例性地,目标AMF接收来自UE的注册请求消息,根据该消息中携带的GUTI,确定上一次为UE提供服务的AMF(记为源AMF)。然后目标AMF调用源AMF提供的UE上下文传输服务(Namf_Communication_UEContextTransfer)操作,以请求UE的上下文信息。该Namf_Communication_UEContextTransfer中包括UE的标识(例如5G-GUTI),该Namf_Communication_UEContextTransfer中还包括目标AMF接收到的完整的RR消息,即目标AMF在Namf_Communication_UEContextTransfer中发送在401接收到的RR消息。Exemplarily, the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE. The Namf_Communication_UEContextTransfer includes the identity of the UE (such as 5G-GUTI), and the Namf_Communication_UEContextTransfer also includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 401 in the Namf_Communication_UEContextTransfer.
403,源AMF根据本地策略进行水平推演,生成新的安全上下文#1。403. The source AMF performs horizontal deduction according to the local policy to generate a new security context #1.
示例性地,源AMF在接收到UE上下文传输请求消息之后,根据UE的标识在数据库中获取UE的数据(包括与该UE对应的当前NAS安全上下文),源AMF利用当前安全上下文验证接收到的RR消息的完整性。如果RR消息的完整性验证通过,源AMF根据本地策略,决定是否推演新的安全上下文。如果源AMF决定进行推演新的安全上下文,则源AMF利用旧的安全上下文中的Kamf进行水平Kamf推演,得到新的密钥Kamf’,从而生成新的安全上下文#1,该新的安全上下文#1包括新的密钥Kamf’。具体地,源AMF利用当前激活的Kamf和注册请求消息中携带的上行NAScount,进行水平推演得到新的密钥Kamf’。该新NAS的安全上下文中包括该新的密钥Kamf’。这里的新的安全上下文#1是相对于源AMF进行水平推演前的当前NAS安全上下文而言的,因此,可以将源AMF进行水平推演前的NAS安全上下文记为旧的安全上下文。Exemplarily, after the source AMF receives the UE context transfer request message, it obtains the data of the UE (including the current NAS security context corresponding to the UE) in the database according to the identifier of the UE, and the source AMF uses the current security context to verify the received Integrity of RR messages. If the integrity verification of the RR message passes, the source AMF decides whether to derive a new security context according to the local policy. If the source AMF decides to deduce a new security context, the source AMF uses the Kamf in the old security context to perform horizontal Kamf deduction to obtain a new key Kamf', thereby generating a new security context #1, the new security context# 1 includes the new key Kamf'. Specifically, the source AMF uses the currently activated Kamf and the uplink NAScount carried in the registration request message to perform horizontal deduction to obtain a new key Kamf'. The new key Kamf' is included in the security context of the new NAS. The new security context #1 here is relative to the current NAS security context before the source AMF performs horizontal deduction. Therefore, the NAS security context before the source AMF performs horizontal deduction can be recorded as the old security context.
404,源AMF向目标AMF发送UE上下文传输响应消息。404. The source AMF sends a UE context transfer response message to the target AMF.
示例性地,如果源AMF在数据库中找到了UE对应的数据,并且根据本地策略进行了水平密钥推演,源AMF向目标AMF发送UE上下文传输响应(Namf_Communication_UEContextTransfer Response)消息,该UE上下文传输响应消息中携带UE上下文、SUPI、水平K AMF推演指示(keyAmfHDerivationInd指示)。该UE上下文中包括安全上下文。如果源AMF根据本地策略进行了水平K AMF推演,则该响应消息中携带的UE上下文为源AMF在403推演得到的新的安全上下文#1。 Exemplarily, if the source AMF finds the data corresponding to the UE in the database, and performs horizontal key derivation according to the local policy, the source AMF sends a UE context transfer response (Namf_Communication_UEContextTransfer Response) message to the target AMF, and the UE context transfer response message Carries UE context, SUPI, horizontal K AMF derivation indication (keyAmfHDerivationInd indication). The UE context includes a security context. If the source AMF has deduced the horizontal K AMF according to the local policy, the UE context carried in the response message is the new security context #1 derived by the source AMF in 403 .
405,源AMF维持旧的安全上下文为当前安全上下文。405. The source AMF maintains the old security context as the current security context.
示例性地,在源AMF生成新的密钥Kamf’之后,或者说,在源AMF生成新的安全上下文#1之后,源AMF维持旧的安全上下文为源AMF和UE之间的当前安全上下文,或者说,源AMF继续使用旧的安全上下文为源AMF和UE之间的当前安全上下文,即源AMF不删除旧的安全上下文和非当前的安全上下文,且不更改源AMF和该UE之间的当前安全上下文。Exemplarily, after the source AMF generates a new key Kamf', or in other words, after the source AMF generates a new security context #1, the source AMF maintains the old security context as the current security context between the source AMF and the UE, In other words, the source AMF continues to use the old security context as the current security context between the source AMF and the UE, that is, the source AMF does not delete the old security context and the non-current security context, and does not change the security context between the source AMF and the UE. The current security context.
此时,源AMF可以不需要维护新的安全上下文#1,即403之后,源AMF可以删除新的安全上下文#1。At this time, the source AMF may not need to maintain the new security context #1, that is, after 403, the source AMF may delete the new security context #1.
406,目标AMF向UE发送安全模式命令消息。406. The target AMF sends a security mode command message to the UE.
示例性地,目标AMF接收来自源AMF的UE上下文传输响应消息,如果该UE上下文传输响应消息中携带了UE的SUPI,则目标AMF保存该UE上下文传输响应消息中携带的新的NAS安全上下文#1。如果目标AMF根据本地策略,启用该响应消息中携带的安全上下文,即源AMF推演得到的新的安全上下文#1,则目标AMF发起非接入层安全模式命令(non access stratum security mode command,NAS SMC)消息给UE,用于建立UE和目标AMF之间的NAS安全上下文。该安全模式命令消息中携带水平推演参数(horizontal derivation parameter,HDP),该HDP可以是值为1的K_AMF_change_flag,其中值为1的K_AMF_change_flag用于指示UE进行水平K AMF推演。该NASSMC消息还可以包括选择的NAS算法,包括NAS加密算法和NAS完整性保护算法。应理解,目标AMF通过新的安全上下文#1对该安全模式命令消息进行完整性保护。 Exemplarily, the target AMF receives the UE context transfer response message from the source AMF, and if the UE context transfer response message carries the SUPI of the UE, the target AMF saves the new NAS security context# carried in the UE context transfer response message 1. If the target AMF activates the security context carried in the response message according to the local policy, that is, the new security context #1 deduced by the source AMF, the target AMF initiates a non access stratum security mode command (non access stratum security mode command, NAS SMC) message to the UE to establish the NAS security context between the UE and the target AMF. The security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP). The HDP may be K_AMF_change_flag with a value of 1, wherein the K_AMF_change_flag with a value of 1 is used to instruct the UE to perform horizontal K AMF derivation. The NASSMC message may also include selected NAS algorithms, including NAS encryption algorithms and NAS integrity protection algorithms. It should be understood that the target AMF performs integrity protection on the security mode command message through the new security context #1.
407,UE水平推演生成新的安全上下文#1。407. The UE horizontally deduces and generates a new security context #1.
示例性地,UE接收来自目标AMF的安全模式命令消息,根据该安全模式命令消息中携带的水平K AMF推演指示,进行K AMF推演,即UE根据当前安全上下文中的密钥Kamf 进行Kamf推演生成新的密钥Kamf’,从而获取到新的安全上下文#1,该新的安全上下文#1中包括该新的密钥Kamf’。UE使用新的安全上下文#1对该安全模式命令消息进行完整性校验,如果该安全模式命令消息的完整性校验通过,则UE向目标AMF发送安全模式完成消息。 Exemplarily, the UE receives a security mode command message from the target AMF, and performs K AMF derivation according to the horizontal K AMF derivation indication carried in the security mode command message, that is, the UE performs Kamf derivation generation according to the key Kamf in the current security context A new key Kamf' is obtained, so as to obtain a new security context #1, and the new security context #1 includes the new key Kamf'. The UE uses the new security context #1 to check the integrity of the security mode command message, and if the integrity check of the security mode command message passes, the UE sends a security mode completion message to the target AMF.
408,UE维护旧的安全上下文和新的安全上下文#1。408. The UE maintains the old security context and the new security context #1.
在一种实现方式中,UE使用新的安全上下文#1对该安全模式命令消息验证成功之后,保存旧的安全上下文,然后设置新的安全上下文#1为当前安全上下文;或者,在另一种实现方式中,UE通过新的安全上下文#1对该安全模型命令消息验证成功之后,保存新的安全上下文#1,同时UE继续维护旧的安全上下文为当前安全上下文。In one implementation, after successfully verifying the security mode command message using the new security context #1, the UE saves the old security context, and then sets the new security context #1 as the current security context; or, in another In the implementation manner, after the UE successfully verifies the security model command message through the new security context #1, it saves the new security context #1, and at the same time, the UE continues to maintain the old security context as the current security context.
在408之后,若UE接收到来自目标AMF的注册接受消息,如果UE在408保存了旧的安全上下文,并设置新的安全上下文#1为当前安全上下文,则根据该注册接受消息,UE删除旧的安全上下文;如果UE在408保存了新的安全上下文#1,同时维护旧的安全上下文为当前安全上下文,则根据该注册接受消息,UE设置第二安全上下文为当前安全上下文,并删除第一安全上下文,即,当第二安全上下文用于当前接入时,UE删除存储的旧的安全上下文(以及Kamf)。After 408, if the UE receives a registration acceptance message from the target AMF, if the UE saves the old security context at 408 and sets the new security context #1 as the current security context, then according to the registration acceptance message, the UE deletes the old security context If the UE saves the new security context #1 in 408 and maintains the old security context as the current security context, according to the registration acceptance message, the UE sets the second security context as the current security context and deletes the first Security context, that is, when the second security context is used for the current access, the UE deletes the stored old security context (and Kamf).
409,UE向目标AMF发送注册请求消息。409, the UE sends a registration request message to the target AMF.
示例性地,若UE在408保存了旧的安全上下文,并设置新的安全上下文#1为当前安全上下文,在这种情况下,如果注册流程没有成功完成,或者说,如果注册流程失败,或者说,如果安全模式完成消息发送失败,则UE设置旧的安全上下文为当前安全上下文(或者说UE维护Kamf以及Kamf关联的NAS安全上下文),或者说,UE使用旧的安全上下文为当前安全上下文,或者说,UE使旧的安全上下文成为当前安全上下文,并且UE删除新的安全上下文#1。应理解,这里的旧的安全上下文也可以称为以前的安全上下文,或者水平推演前的安全上下文,或者注册前使用的安全上下文;若UE在408保存新的安全上下文#1并维护旧的安全上下文为当前安全上下文,在这种情况下,如果注册流程没有成功完成,或者说,如果注册流程失败,或者安全模式完成消息发送失败,则UE删除新的安全上下文#1。Exemplarily, if the UE saves the old security context at 408, and sets the new security context #1 as the current security context, in this case, if the registration process is not successfully completed, or if the registration process fails, or That is, if the security mode completion message fails to be sent, the UE sets the old security context as the current security context (or the UE maintains Kamf and the NAS security context associated with Kamf), or the UE uses the old security context as the current security context, In other words, the UE makes the old security context the current security context, and the UE deletes the new security context #1. It should be understood that the old security context here can also be referred to as the previous security context, or the security context before horizontal deduction, or the security context used before registration; if the UE saves the new security context #1 at 408 and maintains the old security context The context is the current security context. In this case, if the registration process is not successfully completed, or if the registration process fails, or the security mode completion message fails to be sent, the UE deletes the new security context #1.
若注册流程或者说,如果注册流程失败,,则UE可以重新发起注册流程,例如,UE发送注册请求消息给目标AMF。应理解,UE通过旧的安全上下文对该注册请求消息进行了完整性保护。还应理解,这里的目标AMF可能与步骤401中接收注册请求消息的目标AMF可能不同,即UE可能又移动到了其他目标AMF的区域。If the registration procedure or in other words, if the registration procedure fails, the UE may re-initiate the registration procedure, for example, the UE sends a registration request message to the target AMF. It should be understood that the UE performs integrity protection on the registration request message through the old security context. It should also be understood that the target AMF here may be different from the target AMF receiving the registration request message in step 401, that is, the UE may have moved to the area of another target AMF.
实际通信过程,可能会有各种原因导致UE的注册流程没有成功完成。本申请对UE注册流程没有成功完成的原因不做限定。下面对几种可能的情况作示例性说明。In the actual communication process, there may be various reasons that cause the registration process of the UE to fail to complete successfully. This application does not limit the reason why the UE registration process is not successfully completed. Several possible situations are described as examples below.
一示例,UE在收到注册接受消息之前,链路释放,则UE删除新的安全上下文#1,设置旧的安全上下文为当前安全上下文;For example, before the UE receives the registration acceptance message, the link is released, then the UE deletes the new security context #1, and sets the old security context as the current security context;
另一示例,UE收到网络下发的注册拒绝消息,如果该注册拒绝消息造成安全上下文删除,则UE删除新的安全上下文#1和旧的安全上下文;如果该注册拒绝消息没有造成安全上下文删除,则UE删除新的安全上下文#1,设置旧的安全上下文为当前安全上下文;In another example, the UE receives a registration rejection message from the network. If the registration rejection message causes the security context to be deleted, the UE deletes the new security context #1 and the old security context; if the registration rejection message does not cause the security context to be deleted , the UE deletes the new security context #1, and sets the old security context as the current security context;
又一示例,UE的安全模式完成消息传输失败,则UE删除新的安全上下文#1,设置旧的安全上下文为当前安全上下文。In another example, if the transmission of the security mode complete message of the UE fails, the UE deletes the new security context #1 and sets the old security context as the current security context.
410,目标AMF向源AMF发送UE上下文传输请求消息。410. The target AMF sends a UE context transfer request message to the source AMF.
示例性地,目标AMF接收来自UE的注册请求消息,根据该消息中携带的GUTI,确定上一次为UE提供服务的AMF(记为源AMF)。然后目标AMF调用源AMF提供的UE上下文传输服务(Namf_Communication_UEContextTransfer)操作,以请求UE的上下文信息。该Namf_Communication_UEContextTransfer中包括目标AMF接收到的完整的RR消息,即目标AMF在Namf_Communication_UEContextTransfer中发送在409接收到的RR消息。Exemplarily, the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE. The Namf_Communication_UEContextTransfer includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 409 in the Namf_Communication_UEContextTransfer.
411,源AMF根据本地策略进行水平推演,生成新的安全上下文#2。411. The source AMF performs horizontal deduction according to the local policy to generate a new security context #2.
示例性地,源AMF在接收到UE上下文传输请求消息之后,源AMF利用旧的安全上下文对该UE上下文传输请求消息中的RR消息进行完整性验证。如果RR消息的完整性验证通过,源AMF根据本地策略,决定是否推演新的安全上下文。如果源AMF决定进行推演新的安全上下文,则源AMF进行水平K AMF推演,得到新的安全上下文#2。 Exemplarily, after the source AMF receives the UE context transfer request message, the source AMF uses the old security context to verify the integrity of the RR message in the UE context transfer request message. If the integrity verification of the RR message passes, the source AMF decides whether to derive a new security context according to the local policy. If the source AMF decides to deduce a new security context, the source AMF performs horizontal K AMF deduction to obtain a new security context #2.
412,源AMF向目标AMF发送UE上下文传输响应消息。412. The source AMF sends a UE context transfer response message to the target AMF.
示例性地,响应于UE上下文传输请求消息,源AMF向目标AMF发送UE上下文传输响应(Namf_Communication_UEContextTransfer Response)消息,该UE上下文传输响应消息中携带UE上下文、SUPI、水平K AMF推演指示(keyAmfHDerivationInd指示)。该UE上下文中包括安全上下文。如果源AMF根据本地策略进行了水平K AMF推演,则该响应消息中携带的UE上下文为源AMF在411推演得到的新的安全上下文#2。 Exemplarily, in response to the UE context transfer request message, the source AMF sends a UE context transfer response (Namf_Communication_UEContextTransfer Response) message to the target AMF, and the UE context transfer response message carries the UE context, SUPI, and horizontal K AMF derivation indication (keyAmfHDerivationInd indication) . The UE context includes a security context. If the source AMF has deduced the horizontal K AMF according to the local policy, the UE context carried in the response message is the new security context #2 derived by the source AMF in step 411 .
413,目标AMF向UE发送安全模式命令消息。413. The target AMF sends a security mode command message to the UE.
示例性地,目标AMF接收来自源AMF的UE上下文传输响应消息,如果该UE上下文传输响应消息中携带了UE的SUPI,则目标AMF保存该UE上下文传输响应消息中携带的新的NAS安全上下文#2。如果目标AMF根据本地策略,启用该响应消息中携带的安全上下文,即源AMF推演得到的新的安全上下文#2,则目标AMF发起非接入层安全模式命令消息给UE,用于建立UE和目标AMF之间的NAS安全上下文。该安全模式命令消息中携带水平推演参数(horizontal derivation parameter,HDP),该HDP可以是值为1的K_AMF_change_flag,其中值为1的K_AMF_change_flag用于指示UE进行水平K AMF推演。应理解,目标AMF通过新的安全上下文#2对该安全模式命令消息进行完整性保护。 Exemplarily, the target AMF receives the UE context transfer response message from the source AMF, and if the UE context transfer response message carries the SUPI of the UE, the target AMF saves the new NAS security context# carried in the UE context transfer response message 2. If the target AMF activates the security context carried in the response message according to the local policy, that is, the new security context #2 deduced by the source AMF, the target AMF initiates a non-access stratum security mode command message to the UE to establish UE and NAS security context between target AMFs. The security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP). The HDP may be K_AMF_change_flag with a value of 1, wherein the K_AMF_change_flag with a value of 1 is used to instruct the UE to perform horizontal K AMF derivation. It should be understood that the target AMF performs integrity protection on the security mode command message through the new security context #2.
414,UE水平推演得到新的安全上下文。414. The UE horizontally deduces to obtain a new security context.
示例性地,UE接收来自目标AMF的安全模式命令消息,根据该安全模式命令消息中携带的水平K AMF推演指示,进行K AMF推演,生成新的安全上下文#2。UE使用新的安全上下文#2对该安全模式命令消息进行完整性校验。 Exemplarily, the UE receives a security mode command message from the target AMF, performs K AMF derivation according to the horizontal K AMF derivation indication carried in the security mode command message, and generates a new security context #2. The UE uses the new security context #2 to check the integrity of the security mode command message.
415,UE向目标AMF发送安全模式完成消息。415. The UE sends a security mode completion message to the target AMF.
示例性地,如果UE利用的安全上下文#2对该安全模式命令消息的完整性校验通过,则UE向目标AMF发送安全模式完成消息。Exemplarily, if the security context #2 used by the UE passes the integrity check of the security mode command message, the UE sends a security mode completion message to the target AMF.
416,UE设置新的安全上下文#2为当前安全上下文。416. The UE sets new security context #2 as the current security context.
示例性地,UE使用新的安全上下文#2对该安全模式命令消息的完整性校验通过之后,保存旧的安全上下文,然后将新的安全上下文#2设置为当前安全上下文。应理解,416可以在415之前执行,也可以在415之后执行,本申请不做限定。Exemplarily, after the UE passes the integrity check of the security mode command message using the new security context #2, it saves the old security context, and then sets the new security context #2 as the current security context. It should be understood that 416 may be performed before 415 or after 415, which is not limited in this application.
417,目标AMF向UE发送注册接受消息给UE。417. The target AMF sends a registration acceptance message to the UE.
示例性地,目标AMF向UE发送注册接受消息,应理解,目标AMF利用在414推演得到的新的安全上下文#2对该注册接受消息进行了完整性保护。Exemplarily, the target AMF sends a registration acceptance message to the UE. It should be understood that the target AMF uses the new security context #2 deduced at 414 to perform integrity protection on the registration acceptance message.
418,UE删除旧的安全上下文。418. The UE deletes the old security context.
示例性地,UE接收到来自目标AMF的注册接受消息后,确定注册成功,则UE删除旧的安全上下文。Exemplarily, after receiving the registration acceptance message from the target AMF, the UE determines that the registration is successful, and then the UE deletes the old security context.
或者在另一种可能的实现方式中,在416,UE维护旧的安全上下文为当前安全上下文,并保存新的安全上下文#2。当UE接收到来自目标移动管理网元的注册接受消息之后,UE设置新的安全上下文#2为当前安全上下文,并删除旧的安全上下文。Or in another possible implementation manner, at 416, the UE maintains the old security context as the current security context, and saves the new security context #2. After the UE receives the registration acceptance message from the target mobility management network element, the UE sets the new security context #2 as the current security context, and deletes the old security context.
基于上述技术方案,源移动管理网元在进行水平密钥推演之后,维护第一安全上下文为当前安全上下文,终端设备在进行水平密钥推演之后,且在注册流程没有成功完成时,维护或设置第一安全上下文为当前安全上下文,从而可以避免终端侧和网络侧维护的安全上下文不一致,导致后续可能的注册流程失败的问题。Based on the above technical solution, the source mobility management network element maintains the first security context as the current security context after performing horizontal key derivation, and the terminal device maintains or sets The first security context is the current security context, thereby avoiding the problem that the security contexts maintained by the terminal side and the network side are inconsistent, which may lead to subsequent failure of the registration process.
图5示出了本申请实施例提供的管理安全上下文的方法500的示例性流程图。方法500包括:FIG. 5 shows an exemplary flow chart of a method 500 for managing security context provided by an embodiment of the present application. Method 500 includes:
501,UE向目标AMF发送注册请求消息。501. The UE sends a registration request message to a target AMF.
502,目标AMF向源AMF发送UE上下文传输请求消息。502. The target AMF sends a UE context transfer request message to the source AMF.
503,源AMF根据本地策略进行水平推演,生成新的安全上下文#1。503. The source AMF performs horizontal deduction according to the local policy to generate a new security context #1.
504,源AMF向目标AMF发送UE上下文传输响应消息。504. The source AMF sends a UE context transfer response message to the target AMF.
应理解,步骤501至步骤504与方法400的步骤401至步骤404类似,为了简洁,不再详细说明。It should be understood that steps 501 to 504 are similar to steps 401 to 404 of the method 400, and for the sake of brevity, no detailed description is given.
505,源AMF设置新的安全上下文#1为当前安全上下文。505. The source AMF sets new security context #1 as the current security context.
示例性地,源AMF通过推演得到新的密钥Kamf’之后,或者说源AMF得到新的安全上下文#1之后,将新的安全上下文#1设置为当前安全上下文。可选的,源AMF删除旧的安全上下文和非当前的安全上下文。Exemplarily, after the source AMF obtains the new key Kamf' through derivation, or after the source AMF obtains the new security context #1, it sets the new security context #1 as the current security context. Optionally, the source AMF deletes the old security context and the non-current security context.
应理解,505可以在504之前执行,也可以在504之后执行,也可以同时执行,本申请不做限定。It should be understood that 505 may be performed before 504, may be performed after 504, or may be performed at the same time, which is not limited in this application.
506,目标AMF向UE发送安全模式命令消息。506. The target AMF sends a security mode command message to the UE.
507,UE进行水平推演得到新的安全上下文#1。507. The UE performs horizontal derivation to obtain a new security context #1.
应理解,506至507与方法400中的步骤406至407类似,这里不再赘述。It should be understood that steps 506 to 507 are similar to steps 406 to 407 in the method 400 and will not be repeated here.
508,UE设置新的安全上下文#1为当前安全上下文。508. The UE sets new security context #1 as the current security context.
示例性地,UE水平推演得到新的安全上下文#1之后,将该新的安全上下文#1设置为当前安全上下文。可选的,UE删除旧的安全上下文和非当前的安全上下文。Exemplarily, after obtaining the new security context #1 through horizontal derivation, the UE sets the new security context #1 as the current security context. Optionally, the UE deletes the old security context and the non-current security context.
509,UE向目标AMF发送注册请求消息。509, the UE sends a registration request message to the target AMF.
示例性地,在注册流程没有成功完成之后,UE可以重新发起注册流程。例如,UE发送注册请求消息给目标AMF。应理解,UE通过新的安全上下文#1对该注册请求消息进行了完整性保护。还应理解,本申请对导致UE注册失败的原因不做限定。Exemplarily, after the registration procedure is not successfully completed, the UE may re-initiate the registration procedure. For example, the UE sends a registration request message to the target AMF. It should be understood that the UE performs integrity protection on the registration request message through the new security context #1. It should also be understood that the present application does not limit the reasons for UE registration failure.
510,目标AMF向源AMF发送UE上下文传输请求消息。510. The target AMF sends a UE context transfer request message to the source AMF.
示例性地,目标AMF接收来自UE的注册请求消息,根据该消息中携带的GUTI,确定上一次为UE提供服务的AMF(记为源AMF)。然后目标AMF调用源AMF提供的UE上下文传输服务(Namf_Communication_UEContextTransfer)操作,以请求UE的上下文信息。该Namf_Communication_UEContextTransfer中包括目标AMF接收到的完整的RR消息,即目标AMF在Namf_Communication_UEContextTransfer中发送在510接收到的RR 消息。Exemplarily, the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE. The Namf_Communication_UEContextTransfer includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received at 510 in the Namf_Communication_UEContextTransfer.
511,可选的,源AMF根据本地策略进行水平推演,生成新的安全上下文#2。511. Optionally, the source AMF performs horizontal deduction according to the local policy to generate a new security context #2.
示例性地,源AMF在接收到UE上下文的请求之后,源AMF利用旧的安全上下文验证接收到的RR消息的完整性。如果RR消息的完整性验证通过,源AMF根据本地策略,决定是否推演新的安全上下文。如果源AMF决定进行推演新的安全上下文,则源AMF进行水平K AMF推演,得到新的安全上下文#2。 Exemplarily, after the source AMF receives the UE context request, the source AMF uses the old security context to verify the integrity of the received RR message. If the integrity verification of the RR message passes, the source AMF decides whether to derive a new security context according to the local policy. If the source AMF decides to deduce a new security context, the source AMF performs horizontal K AMF deduction to obtain a new security context #2.
由于在该实施例中,源AMF在步骤503已经执行过水平K AMF推演得到了新的安全上下文#1,且在步骤505,源AMF设置新的安全上下文#1为当前安全上下文,因此,源AMF也可以不执行步骤511。 Since in this embodiment, the source AMF has obtained the new security context #1 by performing horizontal K AMF derivation in step 503, and in step 505, the source AMF sets the new security context #1 as the current security context, therefore, the source The AMF may also not perform step 511 .
512,源AMF向目标AMF发送UE上下文传输响应消息512. The source AMF sends a UE context transfer response message to the target AMF
示例性地,响应于UE上下文传输请求消息,源AMF向目标AMF发送UE上下文传输响应(Namf_Communication_UEContextTransfer Response)消息,该UE上下文传输响应消息中携带UE上下文、SUPI。该UE上下文中包括安全上下文。如果源AMF执行了步骤511,则该安全上下文为源AMF在步骤511通过水平推演得到的新的安全上下文#2,且该响应消息中还携带水平K AMF推演指示(keyAmfHDerivationInd指示);如果源AMF没有执行步骤511,则该安全上下文为源AMF在步骤503通过水平推演得到的新的安全上下文#1。 Exemplarily, in response to the UE context transfer request message, the source AMF sends a UE context transfer response (Namf_Communication_UEContextTransfer Response) message to the target AMF, and the UE context transfer response message carries UE context and SUPI. The UE context includes a security context. If the source AMF executes step 511, the security context is the new security context #2 obtained by the source AMF through horizontal derivation in step 511, and the response message also carries a horizontal K AMF derivation indication (keyAmfHDerivationInd indication); if the source AMF If step 511 is not executed, the security context is the new security context #1 obtained by the source AMF through horizontal derivation in step 503 .
513,目标AMF向UE发送安全模式命令消息。513. The target AMF sends a security mode command message to the UE.
示例性地,目标AMF接收来自源AMF的UE上下文传输响应消息,并从该响应消息中获取源AMF推演得到的新的安全上下文。如果源AMF执行了步骤511,则该新的安全上下文为新的安全上下文#2;如果源AMF没有执行步骤511,则该新的安全上下文为新的安全上下文#1。Exemplarily, the target AMF receives the UE context transmission response message from the source AMF, and obtains the new security context deduced by the source AMF from the response message. If the source AMF executes step 511, the new security context is new security context #2; if the source AMF does not execute step 511, then the new security context is new security context #1.
目标AMF发起非接入层安全模式命令消息给UE,用于建立UE和目标AMF之间的NAS安全上下文。可选地,该安全模式命令消息中携带水平推演参数(horizontal derivation parameter,HDP),该HDP中包括值为1的K_AMF_change_flag,用于指示UE进行水平K AMF推演。应理解,目标AMF通过响应消息中携带的新的安全上下文对该安全模式命令消息进行完整性保护。 The target AMF initiates a non-access stratum security mode command message to the UE for establishing a NAS security context between the UE and the target AMF. Optionally, the security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP), and the HDP includes K_AMF_change_flag with a value of 1, which is used to instruct the UE to perform horizontal K AMF derivation. It should be understood that the target AMF performs integrity protection on the security mode command message through the new security context carried in the response message.
514,可选地,UE水平推演生成新的安全上下文。514. Optionally, the UE performs horizontal deduction to generate a new security context.
示例性地,UE接收来自目标AMF的安全模式命令消息,如果该安全模式命令消息中携带了水平K AMF推演指示,则UE进行水平K AMF推演,生成新的安全上下文#2。 Exemplarily, the UE receives a security mode command message from the target AMF, and if the security mode command message carries a horizontal K AMF derivation indication, the UE performs horizontal K AMF derivation to generate a new security context #2.
515,UE向目标AMF发送安全模式完成消息。515. The UE sends a security mode completion message to the target AMF.
示例性地,如果UE执行了步骤514,则UE使用新的安全上下文#2对安全模式命令消息进行完整性验证;如果UE没有执行步骤514,则UE使用新的安全上下文#1对该安全模式命令消息进行完整性验证。如果验证通过,UE向目标AMF发送安全模式完成消息。Exemplarily, if the UE performs step 514, the UE uses the new security context #2 to perform integrity verification on the security mode command message; if the UE does not perform step 514, the UE uses the new security context #1 to verify the security mode command messages for integrity verification. If the verification is passed, the UE sends a security mode completion message to the target AMF.
如果UE通过新的安全上下文#2对该安全模式完成消息的完整性验证成功,则UE设置新的安全上下文#2为当前安全上下文。并且UE删除旧的安全上下文。If the UE successfully verifies the integrity of the security mode complete message through the new security context #2, the UE sets the new security context #2 as the current security context. And the UE deletes the old security context.
516,目标AMF使用新的安全上下文向UE发送注册接受消息。516. The target AMF uses the new security context to send a registration acceptance message to the UE.
基于上述技术方案,源移动管理网元在进行水平密钥推演之后,设置二安全上下文为当前安全上下文,终端设备在进行水平密钥推演之后,也设置第二安全上下文为当前安全 上下文,从而可以避免终端侧和网络侧维护的安全上下文不一致,导致后续可能的注册流程失败的问题。Based on the above technical solution, the source mobility management network element sets the second security context as the current security context after performing horizontal key derivation, and the terminal device also sets the second security context as the current security context after performing horizontal key derivation, so that To avoid the inconsistency of the security context maintained on the terminal side and the network side, resulting in the possible subsequent failure of the registration process.
图6示出了本申请实施例提供的管理完全上下文的方法600的示例性流程图。方法600包括:FIG. 6 shows an exemplary flowchart of a method 600 for managing a full context provided by an embodiment of the present application. Method 600 includes:
601,UE向目标AMF发送注册请求消息。601. The UE sends a registration request message to a target AMF.
602,目标AMF向源AMF发送UE上下文传输请求消息。602. The target AMF sends a UE context transfer request message to the source AMF.
603,源AMF根据本地策略进行水平推演,生成新的安全上下文#1。603. The source AMF performs horizontal deduction according to the local policy to generate a new security context #1.
604,源AMF向目标AMF发送UE上下文传输响应消息。604. The source AMF sends a UE context transfer response message to the target AMF.
应理解,步骤601至步骤604与方法400的步骤401至步骤404类似,为了简洁,不再详细说明。It should be understood that steps 601 to 604 are similar to steps 401 to 404 of the method 400, and for the sake of brevity, no detailed description is given.
605,源AMF保存旧的安全上下文和新的安全上下文#1。605. The source AMF saves the old security context and the new security context #1.
源AMF通过水平推演生成新的安全上下文#1之后,同时保存新的安全上下文#1和旧的安全上下文,或者说,同时维护新的安全上下文#1和旧的安全上下文,或者说,保存新的安全上下文#1,保留旧的安全上下文。一种示例,源AMF保存旧的安全上下文,并将新的安全上下文#1设置为当前安全上下文;另一示例,源AMF继续维护旧的安全上下文为当前安全上下文,同时保存新的安全上下文#1。After the source AMF generates the new security context #1 through horizontal deduction, it saves the new security context #1 and the old security context at the same time, or in other words, maintains the new security context #1 and the old security context at the same time, or in other words, saves the new security context #1, retaining the old security context. In one example, the source AMF saves the old security context and sets the new security context #1 as the current security context; in another example, the source AMF continues to maintain the old security context as the current security context while saving the new security context # 1.
606,目标AMF向UE发送安全模式命令消息。606. The target AMF sends a security mode command message to the UE.
607,UE进行水平推演得到新的安全上下文#1。607. The UE performs horizontal derivation to obtain a new security context #1.
应理解,606至607与方法400中的步骤406至407类似,这里不再赘述。It should be understood that steps 606 to 607 are similar to steps 406 to 407 in the method 400 and will not be repeated here.
608,UE设置新的安全上下文#1为当前安全上下文。608. The UE sets new security context #1 as the current security context.
示例性地,UE水平推演得到新的安全上下文#1之后,将该新的安全上下文#1设置为当前安全上下文。可选的,UE删除旧的安全上下文和非当前安全上下文。Exemplarily, after obtaining the new security context #1 through horizontal derivation, the UE sets the new security context #1 as the current security context. Optionally, the UE deletes the old security context and the non-current security context.
609,UE向目标AMF发送注册请求消息。609, the UE sends a registration request message to the target AMF.
示例性地,当UE注册失败,UE重新发起注册流程。例如,UE发送注册请求消息给目标AMF。应理解,UE通过新的安全上下文#1对注册请求消息进行完整性保护。本申请对导致UE注册失败的原因不做限定。Exemplarily, when the UE fails to register, the UE re-initiates the registration procedure. For example, the UE sends a registration request message to the target AMF. It should be understood that the UE performs integrity protection on the registration request message through the new security context #1. This application does not limit the reasons for UE registration failure.
610,目标AMF向源AMF发送UE上下文传输请求消息。610. The target AMF sends a UE context transfer request message to the source AMF.
示例性地,目标AMF接收来自UE的注册请求消息,根据该消息中携带的GUTI,确定上一次为UE提供服务的AMF(记为源AMF)。然后目标AMF调用源AMF提供的UE上下文传输服务(Namf_Communication_UEContextTransfer)操作,以请求UE的上下文信息。该Namf_Communication_UEContextTransfer中包括目标AMF接收到的完整的RR消息,即目标AMF在Namf_Communication_UEContextTransfer中发送在609接收到的RR消息。Exemplarily, the target AMF receives the registration request message from the UE, and according to the GUTI carried in the message, determines the AMF that served the UE last time (referred to as the source AMF). Then the target AMF calls the UE context transfer service (Namf_Communication_UEContextTransfer) operation provided by the source AMF to request the context information of the UE. The Namf_Communication_UEContextTransfer includes the complete RR message received by the target AMF, that is, the target AMF sends the RR message received in 609 in the Namf_Communication_UEContextTransfer.
611,源AMF分别使用新的安全上下文和旧的安全上下文对注册请求消息进行完整性校验。611. The source AMF uses the new security context and the old security context to check the integrity of the registration request message.
示例性地,源AMF接收来自目标AMF的UE上下文传输请求消息之后,分别使用新的安全上下文#1和旧的安全上下文对该UE上下文传输请求消息中的注册请求消息进行完整性验证。Exemplarily, after receiving the UE context transfer request message from the target AMF, the source AMF uses the new security context #1 and the old security context to verify the integrity of the registration request message in the UE context transfer request message.
如果源AMF使用新的安全上下文#1对该注册请求消息的完整性校验成功,则源AMF删除旧的安全上下文。如果在步骤605源AMF设置旧的安全上下文为当前安全上下文, 则此时源AMF删除旧的安全上下文并设置新的安全上下文#1为当前安全上下文;If the source AMF successfully checks the integrity of the registration request message using the new security context #1, the source AMF deletes the old security context. If the source AMF sets the old security context as the current security context in step 605, then the source AMF deletes the old security context and sets the new security context #1 as the current security context;
如果源AMF使用新的安全上下文#1对该注册请求消息的完整性校验失败,则源AMF使用旧的安全上下文对该注册请求消息的完整性进行校验,如果校验成功,则源AMF删除新的安全上下文#1,并且如果在步骤605源AMF设置新的安全上下文#1为当前安全上下文,则此时源AMF设置旧的安全上下文为当前安全上下文;If the source AMF fails to verify the integrity of the registration request message using the new security context #1, the source AMF uses the old security context to verify the integrity of the registration request message. If the verification is successful, the source AMF Delete the new security context #1, and if the source AMF sets the new security context #1 as the current security context in step 605, then the source AMF sets the old security context as the current security context at this time;
如果源AMF使用新的安全上下文#1和旧的安全上下文对该注册请求消息的完整性校验均失败,则源AMF可以将新的安全上下文#1和旧的安全上下文均删除。或者,源AMF向目标AMF返回UE上下文传输响应消息,该响应消息用于指示无法获取临时标识5G-GUTI。If the source AMF fails to check the integrity of the registration request message using the new security context #1 and the old security context, the source AMF can delete both the new security context #1 and the old security context. Alternatively, the source AMF returns a UE context transmission response message to the target AMF, where the response message is used to indicate that the temporary identifier 5G-GUTI cannot be obtained.
应理解,本申请对使用新的安全上下文#1和旧的安全上下文进行完整性校验的顺序不做限定。也就是说,源AMF可以先使用新的安全上下文#1对注册请求消息的完整性进行校验,也可以先使用旧的安全上下文对注册请求消息的完整性进行校验,本申请不做限定。It should be understood that the present application does not limit the sequence of integrity verification using the new security context #1 and the old security context. That is to say, the source AMF can first use the new security context #1 to verify the integrity of the registration request message, or use the old security context to first verify the integrity of the registration request message, which is not limited in this application .
612,可选地,源AMF根据本地策略进行水平推演,生成新的安全上下文#2。612. Optionally, the source AMF performs horizontal deduction according to the local policy to generate a new security context #2.
示例性地,源AMF通过新的安全上下文#1或旧的安全上下文对注册请求消息的完整性校验成功之后,若源AMF根据本地策略决定推演新的安全上下文,则源AMF进行水平K AMF推演,得到新的安全上下文#2。 Exemplarily, after the source AMF successfully checks the integrity of the registration request message through the new security context #1 or the old security context, if the source AMF decides to deduce a new security context according to the local policy, the source AMF performs level K AMF Deduction, get the new security context #2.
如果在611,源AMF使用新的安全上下文#1对注册请求消息的完整性校验成功,则可以不执行步骤612。If at 611, the source AMF successfully checks the integrity of the registration request message using the new security context #1, step 612 may not be executed.
613,源AMF向目标AMF发送UE上下文传输响应消息。613. The source AMF sends a UE context transfer response message to the target AMF.
示例性地,响应于UE上下文传输请求消息,源AMF向目标AMF发送UE上下文传输响应消息,该响应消息中携带UE上下文、SUPI。该UE上下文中包括安全上下文。如果源AMF执行了步骤612,则该安全上下文为源AMF在步骤612通过水平推演得到的新的安全上下文#2,且该响应消息中携带水平K AMF推演指示(keyAmfHDerivationInd指示);如果源AMF没有执行步骤612,则该安全上下文为源AMF在步骤603通过水平推演得到的新的安全上下文#1。 Exemplarily, in response to the UE context transfer request message, the source AMF sends a UE context transfer response message to the target AMF, and the response message carries the UE context and SUPI. The UE context includes a security context. If the source AMF executes step 612, the security context is the new security context #2 obtained by the source AMF through horizontal derivation in step 612, and the response message carries the level K AMF derivation indication (keyAmfHDerivationInd indication); if the source AMF does not Step 612 is executed, and the security context is the new security context #1 obtained by the source AMF through horizontal derivation in step 603 .
614,目标AMF向UE发送安全模式命令消息。614. The target AMF sends a security mode command message to the UE.
示例性地,目标AMF接收来自源AMF的UE上下文传输响应消息,并从该响应消息中获取源AMF推演得到的新的安全上下文。如果源AMF执行了612,则该新的安全上下文为新的安全上下文#2;如果源AMF没有执行612,则该新的安全上下文为新的安全上下文#1。Exemplarily, the target AMF receives the UE context transmission response message from the source AMF, and obtains the new security context deduced by the source AMF from the response message. If the source AMF executes 612, the new security context is new security context #2; if the source AMF does not execute 612, then the new security context is new security context #1.
目标AMF发起非接入层安全模式命令消息给UE,用于建立UE和目标AMF之间的NAS安全上下文。可选地,该安全模式命令消息中携带水平推演参数(horizontal derivation parameter,HDP),该HDP中包括值为1的K_AMF_change_flag,用于指示UE进行水平K AMF推演。应理解,目标AMF通过新的安全上下文对该安全模式命令消息进行完整性保护。 The target AMF initiates a non-access stratum security mode command message to the UE for establishing a NAS security context between the UE and the target AMF. Optionally, the security mode command message carries a horizontal derivation parameter (horizontal derivation parameter, HDP), and the HDP includes K_AMF_change_flag with a value of 1, which is used to instruct the UE to perform horizontal K AMF derivation. It should be understood that the target AMF performs integrity protection on the security mode command message through the new security context.
615,可选地,UE水平推演得到生成新的安全上下文。615. Optionally, a new security context is generated through UE horizontal deduction.
示例性地,UE接收来自目标AMF的安全模式命令消息,如果该安全模式命令消息中携带了水平K AMF推演指示,则UE进行水平K AMF推演,生成新的安全上下文#2。 Exemplarily, the UE receives a security mode command message from the target AMF, and if the security mode command message carries a horizontal K AMF derivation indication, the UE performs horizontal K AMF derivation to generate a new security context #2.
616,UE向目标AMF发送安全模式完成消息。616. The UE sends a security mode completion message to the target AMF.
示例性地,如果UE执行了步骤615,则UE使用新的安全上下文#2对安全模式命令消息进行完整性验证;如果UE没有执行步骤615,则UE使用新的安全上下文#1对该安全模式命令消息进行完整性验证。如果验证通过,UE向目标AMF发送安全模式完成消息。Exemplarily, if the UE performs step 615, the UE uses the new security context #2 to verify the integrity of the security mode command message; if the UE does not perform step 615, the UE uses the new security context #1 to verify the security mode command messages for integrity verification. If the verification is passed, the UE sends a security mode complete message to the target AMF.
示例性地,如果UE通过新的安全上下文#2对于该安全模式命令消息的完整性验证成功,则UE设置新的安全上下文#2为当前安全上下文。并且UE删除旧的安全上下文。Exemplarily, if the UE successfully verifies the integrity of the security mode command message through the new security context #2, the UE sets the new security context #2 as the current security context. And the UE deletes the old security context.
617,目标AMF使用新的安全上下文向UE发送注册接受消息。617. The target AMF uses the new security context to send a registration acceptance message to the UE.
基于上述技术方案,源移动管理网元在进行水平密钥推演之后,同时维护第一安全上下文和第二安全上下文,这样无论终端设备侧将第一安全上下文还是第二安全上下文设置为当前安全上下文,都可以避免终端侧和网络侧维护的安全上下文不一致的问题。Based on the above technical solution, the source mobility management network element maintains the first security context and the second security context at the same time after performing horizontal key derivation, so that no matter whether the terminal device side sets the first security context or the second security context as the current security context , can avoid the problem of inconsistency of the security context maintained by the terminal side and the network side.
应理解,本申请实施例提供的管理安全上下文的方法以应用在终端设备的注册流程为例进行说明的,但应理解,该方法同样适用于其他网络设备进行了水平密钥推演的场景,例如在未来的其他流程中,网络设备根据本地策略进行了水平密钥推演,均可以采用本申请实施例提供的管理安全上下文的方法,来解决网络侧和终端侧维护的安全上下文不一致的问题。It should be understood that the method for managing the security context provided by the embodiment of the present application is described by taking the registration process applied to the terminal device as an example, but it should be understood that the method is also applicable to scenarios where other network devices perform horizontal key derivation, for example In other processes in the future, the network device performs horizontal key derivation according to the local policy, and the method for managing the security context provided by the embodiment of the present application can be used to solve the problem of inconsistency between the security context maintained by the network side and the terminal side.
以上,结合图3至图6详细说明了本申请实施例提供的方法。以下,结合图7至图10详细说明本申请实施例提供的装置。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的内容可以参见上文方法实施例,为了简洁,这里不再赘述。Above, the method provided by the embodiment of the present application is described in detail with reference to FIG. 3 to FIG. 6 . Hereinafter, the device provided by the embodiment of the present application will be described in detail with reference to FIG. 7 to FIG. 10 . It should be understood that the descriptions of the device embodiments correspond to the descriptions of the method embodiments. Therefore, for details that are not described in detail, reference may be made to the method embodiments above. For brevity, details are not repeated here.
图7是本申请实施例提供的管理安全上下文的装置10的示意性框图。该装置10包括收发模块11和处理模块12。收发模块11可以实现相应的通信功能,处理模块12用于进行数据处理,或者说该收发模块11用于执行接收和发送相关的操作,该处理模块12用于执行除了接收和发送以外的其他操作。收发模块11还可以称为通信接口或通信单元。FIG. 7 is a schematic block diagram of an apparatus 10 for managing a security context provided by an embodiment of the present application. The device 10 includes a transceiver module 11 and a processing module 12 . The transceiver module 11 can realize corresponding communication functions, the processing module 12 is used for data processing, or the transceiver module 11 is used for performing receiving and sending related operations, and the processing module 12 is used for performing other operations except receiving and sending . The transceiver module 11 can also be called a communication interface or a communication unit.
在一种可能的设计中,该装置10可对应于上文方法实施例中的移动管理网元,例如源移动管理网元,或者目标移动管理网元(包括第一目标移动管理网元或第二目标移动管理网元),或者源AMF,或者目标AMF。In a possible design, the device 10 may correspond to the mobility management network element in the above method embodiment, for example, the source mobility management network element, or the target mobility management network element (including the first target mobility management network element or the second 2. The target mobility management network element), or the source AMF, or the target AMF.
示例性地,该装置10可对应于本申请实施例的方法300中的目标移动管理网元20或源移动管理网元30,或者方法400至方法600中的目标AMF或源AMF。该装置10可以包括用于执行图3至图6中的目标移动管理网元20或源移动管理网元30(目标AMF或源AMF)所执行的方法的模块。并且,该装置10中的各单元和上述其他操作和/或功能分别为了实现图3至图6所示方法的相应流程。Exemplarily, the apparatus 10 may correspond to the target mobility management network element 20 or the source mobility management network element 30 in the method 300 of the embodiment of the present application, or the target AMF or the source AMF in the methods 400 to 600 . The apparatus 10 may include a module for executing the method performed by the target mobility management network element 20 or the source mobility management network element 30 (target AMF or source AMF) in FIGS. 3 to 6 . Moreover, each unit in the device 10 and the above-mentioned other operations and/or functions are respectively for realizing the corresponding flow of the method shown in FIG. 3 to FIG. 6 .
该装置10中的该收发模块11执行上述各方法实施例中的目标移动管理网元20或源移动管理网元30(目标AMF或源AMF)所执行的接收和发送操作,该处理模块12则执行除了该接收和发送操作之外的操作。The transceiver module 11 in the device 10 executes the receiving and sending operations performed by the target mobility management network element 20 or the source mobility management network element 30 (target AMF or source AMF) in the above method embodiments, and the processing module 12 then Perform operations other than this receive and send operation.
在另一种可能的设计中,该装置10可对应于上文方法实施例中的终端设备30(或者UE)。In another possible design, the apparatus 10 may correspond to the terminal device 30 (or UE) in the above method embodiments.
示例性地,该装置10可对应于本申请实施例的方法300中的终端设备30,或者方法400至方法600中的UE。该装置10可以包括用于执行图3至图6中的终端设备30(或者UE)所执行的方法的模块。并且,该装置10中的各单元和上述其他操作和/或功能分别为了实现图3至图6所示方法的相应流程。Exemplarily, the apparatus 10 may correspond to the terminal device 30 in the method 300 of the embodiment of the present application, or the UE in the methods 400 to 600. The apparatus 10 may include modules for executing the methods performed by the terminal device 30 (or UE) in FIG. 3 to FIG. 6 . Moreover, each unit in the device 10 and the above-mentioned other operations and/or functions are respectively for realizing the corresponding flow of the method shown in FIG. 3 to FIG. 6 .
该装置10中的该收发模块11执行上述各方法实施例中的终端设备30(或者UE)所 执行的接收和发送操作,该处理模块12则执行除了该接收和发送操作之外的操作。The transceiver module 11 in the apparatus 10 executes the receiving and sending operations performed by the terminal equipment 30 (or UE) in the above method embodiments, and the processing module 12 executes operations other than the receiving and sending operations.
根据前述方法,图8为本申请实施例提供的管理安全上下文的装置20的示意图。在一种可能的设计中,该装置20可对应于上文方法实施例中的目标移动管理网元20或源移动管理网元30(目标AMF或源AMF);在另一种可能的设计中,该装置10可对应于上文方法实施例中的终端设备30(或者UE)。According to the foregoing method, FIG. 8 is a schematic diagram of an apparatus 20 for managing a security context provided by an embodiment of the present application. In a possible design, the device 20 may correspond to the target mobility management network element 20 or the source mobility management network element 30 (target AMF or source AMF) in the above method embodiment; in another possible design , the apparatus 10 may correspond to the terminal device 30 (or UE) in the above method embodiments.
该装置20可以包括处理器21(即,处理模块的一例)和存储器22。该存储器22用于存储指令,该处理器21用于执行该存储器22存储的指令,以使该装置20实现如图3至图6对应的方法中终端设备或网络设备执行的步骤,该网络设备可以是方法300至方法600中的目标移动管理网元,或者源移动管理网元,或者目标AMF,或者源AMF。The device 20 may include a processor 21 (ie, an example of a processing module) and a memory 22 . The memory 22 is used to store instructions, and the processor 21 is used to execute the instructions stored in the memory 22, so that the device 20 implements the steps performed by the terminal device or the network device in the method corresponding to FIG. 3 to FIG. 6 , the network device It may be the target mobility management network element in methods 300 to 600, or the source mobility management network element, or the target AMF, or the source AMF.
进一步地,该装置20还可以包括输入口23(即,收发模块的一例)和输出口24(即,收发模块的另一例)。进一步地,该处理器21、存储器22、输入口23和输出口24可以通过内部连接通路互相通信,传递控制和/或数据信号。该存储器22用于存储计算机程序,该处理器21可以用于从该存储器22中调用并运行该计算机程序,以控制输入口23接收信号,控制输出口24发送信号,完成上述方法中终端设备或网络设备的步骤。该存储器22可以集成在处理器21中,也可以与处理器21分开设置。Further, the device 20 may also include an input port 23 (ie, an example of a transceiver module) and an output port 24 (ie, another example of a transceiver module). Further, the processor 21 , the memory 22 , the input port 23 and the output port 24 can communicate with each other through internal connection paths, and transmit control and/or data signals. The memory 22 is used to store a computer program, and the processor 21 can be used to call and run the computer program from the memory 22, to control the input port 23 to receive signals, and to control the output port 24 to send signals, so as to complete the terminal equipment or Steps for network devices. The memory 22 can be integrated in the processor 21 or can be set separately from the processor 21 .
可选地,若该通信装置20为通信设备,该输入口23为接收器,该输出口24为发送器。其中,接收器和发送器可以为相同或者不同的物理实体。为相同的物理实体时,可以统称为收发器。Optionally, if the communication device 20 is a communication device, the input port 23 is a receiver, and the output port 24 is a transmitter. Wherein, the receiver and the transmitter may be the same or different physical entities. When they are the same physical entity, they can be collectively referred to as transceivers.
可选地,若该通信装置20为芯片或电路,该输入口23为输入接口,该输出口24为输出接口。Optionally, if the communication device 20 is a chip or a circuit, the input port 23 is an input interface, and the output port 24 is an output interface.
作为一种实现方式,输入口23和输出口24的功能可以考虑通过收发电路或者收发的专用芯片实现。处理器21可以考虑通过专用处理芯片、处理电路、处理器或者通用芯片实现。As an implementation, the functions of the input port 23 and the output port 24 may be realized by a transceiver circuit or a dedicated chip for transceiver. The processor 21 may be realized by a dedicated processing chip, a processing circuit, a processor or a general-purpose chip.
作为另一种实现方式,可以考虑使用通用计算机的方式来实现本申请实施例提供的通信设备。即将实现处理器21、输入口23和输出口24功能的程序代码存储在存储器22中,通用处理器通过执行存储器22中的代码来实现处理器21、输入口23和输出口24的功能。As another implementation manner, it may be considered to use a general-purpose computer to implement the communication device provided in the embodiment of the present application. The program codes to realize the functions of the processor 21 , the input port 23 and the output port 24 are stored in the memory 22 , and the general processor realizes the functions of the processor 21 , the input port 23 and the output port 24 by executing the codes in the memory 22 .
该装置20所涉及的与本申请实施例提供的技术方案相关的概念,解释和详细说明及其他步骤请参见前述方法或其他实施例中关于这些内容的描述,此处不做赘述。For the concepts, explanations, detailed descriptions and other steps involved in the device 20 related to the technical solutions provided by the embodiments of the present application, please refer to the foregoing methods or descriptions of these contents in other embodiments, and details are not repeated here.
图9示出了一种简化的网络设备30的结构示意图。网络设备包括31部分以及32部分。31部分主要用于射频信号的收发以及射频信号与基带信号的转换;32部分主要用于基带处理,对网络设备进行控制等。31部分通常可以称为收发模块、收发机、收发电路、或者收发器等。32部分通常是网络设备的控制中心,通常可以称为处理模块,用于控制网络设备执行上述方法实施例中网络设备侧的处理操作。FIG. 9 shows a schematic structural diagram of a simplified network device 30 . The network equipment includes 31 parts and 32 parts. Part 31 is mainly used for the transmission and reception of radio frequency signals and the conversion of radio frequency signals and baseband signals; part 32 is mainly used for baseband processing and control of network equipment. Part 31 may generally be referred to as a transceiver module, a transceiver, a transceiver circuit, or a transceiver. The part 32 is usually the control center of the network device, which can be generally referred to as a processing module, and is used to control the network device to perform the processing operations on the network device side in the foregoing method embodiments.
31部分的收发模块,也可以称为收发机或收发器等,其包括天线和射频电路,其中射频电路主要用于进行射频处理。例如,可以将31部分中用于实现接收功能的器件视为接收模块,将用于实现发送功能的器件视为发送模块,即31部分包括接收模块和发送模块。接收模块也可以称为接收机、接收器、或接收电路等,发送模块可以称为发射机、发射器或者发射电路等。The transceiver module of Part 31, which may also be referred to as a transceiver or transceiver, etc., includes an antenna and a radio frequency circuit, wherein the radio frequency circuit is mainly used for radio frequency processing. For example, the device used to realize the receiving function in Part 31 can be regarded as a receiving module, and the device used to realize the sending function can be regarded as a sending module, that is, Part 31 includes a receiving module and a sending module. The receiving module may also be called a receiver, receiver, or receiving circuit, etc., and the sending module may be called a transmitter, transmitter, or transmitting circuit, etc.
32部分可以包括一个或多个单板,每个单板可以包括一个或多个处理器和一个或多个存储器。处理器用于读取和执行存储器中的程序以实现基带处理功能以及对网络设备的 控制。若存在多个单板,各个单板之间可以互联以增强处理能力。作为一种可选的实施方式,也可以是多个单板共用一个或多个处理器,或者是多个单板共用一个或多个存储器,或者是多个单板同时共用一个或多个处理器。 Section 32 may include one or more single boards, and each single board may include one or more processors and one or more memories. The processor is used to read and execute programs in the memory to realize baseband processing functions and control of network devices. If there are multiple single boards, each single board can be interconnected to enhance the processing capability. As an optional implementation, it is also possible that multiple single boards share one or more processors, or that multiple single boards share one or more memories, or that multiple single boards share one or more processors at the same time. device.
例如,在一种实现方式中,图9所示的网络设备可以是图3至图6所示的方法中所示的任意网络设备,例如源移动管理网元(20)、目标移动管理网元(10)等。For example, in an implementation manner, the network device shown in FIG. 9 may be any network device shown in the methods shown in FIGS. 3 to 6, such as the source mobility management network element (20), the target mobility management network element (10) etc.
31部分的收发模块用于执行图3至图6所示的方法中任意网络设备的收发相关的步骤;32部分用于执行图3至图6所示的方法中的任意网络设备的处理相关的步骤。The transceiver module of part 31 is used to execute the steps related to the sending and receiving of any network device in the methods shown in Figures 3 to 6; the part 32 is used to execute the steps related to the processing of any network device in the methods shown in Figures 3 to 6 step.
应理解,图9仅为示例而非限定,上述包括收发模块和处理模块的网络设备可以不依赖于图9所示的结构。It should be understood that FIG. 9 is only an example rather than a limitation, and the foregoing network device including a transceiver module and a processing module may not depend on the structure shown in FIG. 9 .
当该装置40为芯片时,该芯片包括收发模块和处理模块。其中,收发模块可以是输入输出电路、通信接口;处理模块为该芯片上集成的处理器或者微处理器或者集成电路。When the device 40 is a chip, the chip includes a transceiver module and a processing module. Wherein, the transceiver module may be an input-output circuit or a communication interface; the processing module is a processor or a microprocessor or an integrated circuit integrated on the chip.
图10为本申请提供的一种终端设备40的结构示意图。为了便于说明,图10仅示出了通信装置的主要部件。如图10所示,终端设备40包括处理器、存储器、控制电路、天线以及输入输出装置。FIG. 10 is a schematic structural diagram of a terminal device 40 provided in the present application. For ease of illustration, FIG. 10 only shows the main components of the communication device. As shown in FIG. 10 , the terminal device 40 includes a processor, a memory, a control circuit, an antenna, and an input and output device.
处理器主要用于对通信协议以及通信数据进行处理,以及对整个终端设备进行控制,执行软件程序,处理软件程序的数据,例如用于支持终端设备执行上述传输预编码矩阵的指示方法实施例中所描述的动作。存储器主要用于存储软件程序和数据,例如存储上述实施例中所描述的码本。控制电路主要用于基带信号与射频信号的转换以及对射频信号的处理。控制电路和天线一起也可以叫做收发器,主要用于收发电磁波形式的射频信号。输入输出装置,例如触摸屏、显示屏,键盘等主要用于接收用户输入的数据以及对用户输出数据。The processor is mainly used to process the communication protocol and communication data, and to control the entire terminal device, execute the software program, and process the data of the software program. described action. The memory is mainly used for storing software programs and data, such as storing the codebook described in the above embodiments. The control circuit is mainly used for conversion of baseband signal and radio frequency signal and processing of radio frequency signal. The control circuit and the antenna can also be called a transceiver, which is mainly used to send and receive radio frequency signals in the form of electromagnetic waves. Input and output devices, such as touch screens, display screens, and keyboards, are mainly used to receive data input by users and output data to users.
当通信装置开机后,处理器可以读取存储单元中的软件程序,解释并执行软件程序的指令,处理软件程序的数据。当需要通过无线发送数据时,处理器对待发送的数据进行基带处理后,输出基带信号至射频电路,射频电路将基带信号进行射频处理后将射频信号通过天线以电磁波的形式向外发送。当有数据发送到终端设备时,射频电路通过天线接收到射频信号,将射频信号转换为基带信号,并将基带信号输出至处理器,处理器将基带信号转换为数据并对该数据进行处理。When the communication device is turned on, the processor can read the software program in the storage unit, interpret and execute the instructions of the software program, and process the data of the software program. When data needs to be sent wirelessly, the processor performs baseband processing on the data to be sent, and then outputs the baseband signal to the radio frequency circuit. When data is sent to the terminal device, the radio frequency circuit receives the radio frequency signal through the antenna, converts the radio frequency signal into a baseband signal, and outputs the baseband signal to the processor, and the processor converts the baseband signal into data and processes the data.
本领域技术人员可以理解,为了便于说明,图10仅示出了一个存储器和处理器。在实际的终端设备中,可以存在多个处理器和存储器。存储器也可以称为存储介质或者存储设备等,本申请实施例对此不做限制。Those skilled in the art can understand that, for ease of illustration, FIG. 10 only shows a memory and a processor. In an actual terminal device, there may be multiple processors and memories. A storage may also be called a storage medium or a storage device, etc., which is not limited in this embodiment of the present application.
作为一种可选的实现方式,处理器可以包括基带处理器和中央处理器,基带处理器主要用于对通信协议以及通信数据进行处理,中央处理器主要用于对整个终端设备进行控制,执行软件程序,处理软件程序的数据。图10中的处理器集成了基带处理器和中央处理器的功能,本领域技术人员可以理解,基带处理器和中央处理器也可以是各自独立的处理器,通过总线等技术互联。本领域技术人员可以理解,终端设备可以包括多个基带处理器以适应不同的网络制式,终端设备可以包括多个中央处理器以增强其处理能力,终端设备的各个部件可以通过各种总线连接。所述基带处理器也可以表述为基带处理电路或者基带处理芯片。所述中央处理器也可以表述为中央处理电路或者中央处理芯片。对通信协议以及通信数据进行处理的功能可以内置在处理器中,也可以以软件程序的形式存储在存储单元中,由处理器执行软件程序以实现基带处理功能。As an optional implementation, the processor may include a baseband processor and a central processing unit, the baseband processor is mainly used to process communication protocols and communication data, and the central processor is mainly used to control the entire terminal device, execute A software program that processes data for a software program. The processor in FIG. 10 integrates the functions of the baseband processor and the central processing unit. Those skilled in the art can understand that the baseband processor and the central processing unit may also be independent processors, interconnected through technologies such as a bus. Those skilled in the art can understand that a terminal device may include multiple baseband processors to adapt to different network standards, a terminal device may include multiple central processors to enhance its processing capability, and various components of the terminal device may be connected through various buses. The baseband processor may also be expressed as a baseband processing circuit or a baseband processing chip. The central processing unit may also be expressed as a central processing circuit or a central processing chip. The function of processing the communication protocol and communication data can be built in the processor, or can be stored in the storage unit in the form of a software program, and the processor executes the software program to realize the baseband processing function.
如图10所示,终端设备40包括收发单元41和处理单元42。收发单元也可以称为收发器、收发机、收发装置等。可选的,可以将收发单元41中用于实现接收功能的器件视为接收单元,将收发单元41中用于实现发送功能的器件视为发送单元,即收发单元41包括接收单元和发送单元。示例性的,接收单元也可以称为接收机、接收器、接收电路等,发送单元可以称为发射机、发射器或者发射电路等。As shown in FIG. 10 , the terminal device 40 includes a transceiver unit 41 and a processing unit 42 . The transceiver unit may also be referred to as a transceiver, a transceiver, a transceiver device, and the like. Optionally, the device in the transceiver unit 41 for realizing the receiving function can be regarded as a receiving unit, and the device in the transceiver unit 41 for realizing the sending function can be regarded as a sending unit, that is, the transceiver unit 41 includes a receiving unit and a sending unit. Exemplarily, the receiving unit may also be called a receiver, receiver, receiving circuit, etc., and the sending unit may be called a transmitter, transmitter, or transmitting circuit, etc.
图10所示的终端设备可以执行图3至图6所示的方法中终端设备所执行的各动作,这里,为了避免赘述,省略其详细说明。The terminal device shown in FIG. 10 may perform the actions performed by the terminal device in the methods shown in FIGS. 3 to 6 . Here, to avoid redundant descriptions, detailed descriptions thereof are omitted.
本申请实施例还提供一种计算机可读存储介质,其上存储有用于实现上述方法实施例中由第网络设备执行的方法的计算机指令。The embodiment of the present application further provides a computer-readable storage medium, on which computer instructions for implementing the method executed by the first network device in the above method embodiment are stored.
例如,该计算机程序被计算机执行时,使得该计算机可以实现上述方法实施例中由网络设备执行的方法。For example, when the computer program is executed by a computer, the computer can implement the method performed by the network device in the foregoing method embodiments.
本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得该计算机实现上述方法实施例中由第一设备执行的方法,或由第二设备执行的方法。The embodiments of the present application also provide a computer program product including instructions, which, when executed by a computer, enable the computer to implement the method executed by the first device or the method executed by the second device in the above method embodiments.
本申请实施例还提供一种通信系统,该通信系统包括上文实施例中的网络设备。An embodiment of the present application further provides a communication system, where the communication system includes the network device in the foregoing embodiments.
上述提供的任一种装置中相关内容的解释及有益效果均可参考上文提供的对应的方法实施例,此处不再赘述。For explanations and beneficial effects of relevant content in any of the devices provided above, reference may be made to the corresponding method embodiments provided above, and details are not repeated here.
在本申请实施例中,网络设备可以包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。其中,硬件层可以包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。操作系统层的操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。应用层可以包含浏览器、通讯录、文字处理软件、即时通信软件等应用。In the embodiment of the present application, the network device may include a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. Wherein, the hardware layer may include hardware such as a central processing unit (central processing unit, CPU), a memory management unit (memory management unit, MMU), and memory (also called main memory). The operating system of the operating system layer can be any one or more computer operating systems that realize business processing through processes, for example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system. The application layer may include applications such as browsers, address books, word processing software, and instant messaging software.
本申请实施例并未对本申请实施例提供的方法的执行主体的具体结构进行特别限定,只要能够通过运行记录有本申请实施例提供的方法的代码的程序,以根据本申请实施例提供的方法进行通信即可。例如,本申请实施例提供的方法的执行主体可以是网络设备,或者,是网络设备中能够调用程序并执行程序的功能模块。The embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application, as long as the program that records the code of the method provided in the embodiment of the present application can be executed according to the method provided in the embodiment of the present application Just communicate. For example, the execution subject of the method provided by the embodiment of the present application may be a network device, or a functional module in the network device that can call a program and execute the program.
本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本文中使用的术语“制品”可以涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。Various aspects or features of the present application can be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques. The term "article of manufacture" as used herein may encompass a computer program accessible from any computer readable device, carrier or media. For example, computer-readable media may include, but are not limited to, magnetic storage devices (such as hard disks, floppy disks, or tapes, etc.), optical disks (such as compact discs (compact disc, CD), digital versatile discs (digital versatile disc, DVD), etc. ), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.).
本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可以包括但不限于:无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。Various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
应理解,本申请实施例中提及的处理器可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、 分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the processor mentioned in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and may also be other general processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits ( application specific integrated circuit (ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
还应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM)。例如,RAM可以用作外部高速缓存。作为示例而非限定,RAM可以包括如下多种形式:静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (RAM). For example, RAM can be used as an external cache. As an example and not limitation, RAM may include the following forms: static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM) , double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and Direct memory bus random access memory (direct rambus RAM, DR RAM).
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, the memory (storage module) may be integrated in the processor.
还需要说明的是,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should also be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的保护范围。Those skilled in the art can appreciate that the units and steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Professionals may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the protection scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述方便和简洁,上述描述的装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described devices and units can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。此外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元实现本申请提供的方案。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to implement the solutions provided in this application.
另外,在本申请各个实施例中的各功能单元可以集成在一个单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。例如,所述计算机可以是个人计算机,服务器, 或者网络设备等。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,(SSD))等。例如,前述的可用介质可以包括但不限于:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. For example, the computer may be a personal computer, a server, or a network device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium, (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a solid state disk (SSD)). For example, the aforementioned available The medium may include but not limited to: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求和说明书的保护范围为准。The above is only a specific embodiment of the application, but the scope of protection of the application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. All should be covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims and the specification.

Claims (45)

  1. 一种管理安全上下文的方法,其特征在于,包括:A method for managing a security context, comprising:
    终端设备向目标移动管理网元发送注册请求消息,所述注册请求消息包括所述终端设备的标识;The terminal device sends a registration request message to the target mobility management network element, where the registration request message includes the identifier of the terminal device;
    所述终端设备接收来自所述目标移动管理网元的非接入层NAS安全模式命令消息,所述NAS安全模式命令消息包括水平推演指示信息;The terminal device receives a non-access stratum NAS security mode command message from the target mobility management network element, and the NAS security mode command message includes horizontal derivation indication information;
    根据所述水平推演指示信息,所述终端设备根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,所述第一安全上下文为所述终端设备当前的安全上下文;According to the horizontal derivation instruction information, the terminal device generates a new key Kamf' according to the key Kamf in the first security context; wherein, the first security context is the current security context of the terminal device;
    在注册流程没有成功完成的情况下,所述终端设备使用所述第一安全上下文为当前安全上下文。If the registration process is not successfully completed, the terminal device uses the first security context as the current security context.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    所述终端设备在生成所述新的密钥Kamf’之后,维护所述第一安全上下文和第二安全上下文;其中,所述第二安全上下文包括所述Kamf’和NAS密钥,所述NAS密钥根据所述Kamf’生成。After generating the new key Kamf', the terminal device maintains the first security context and the second security context; wherein the second security context includes the Kamf' and the NAS key, and the NAS Keys are generated according to the Kamf'.
  3. 根据权利要求2所述的方法,其特征在于,所述维护所述第一安全上下文和第二安全上下文,包括:The method according to claim 2, wherein the maintaining the first security context and the second security context comprises:
    所述终端设备继续将所述第一安全上下文作为当前安全上下文,且保存所述第二安全上下文。The terminal device continues to use the first security context as the current security context, and saves the second security context.
  4. 根据权利要求3所述的方法,其特征在于,所述在注册流程没有成功完成的情况下,所述终端设备使用所述第一安全上下文为当前安全上下文,包括:The method according to claim 3, wherein when the registration process is not successfully completed, the terminal device uses the first security context as the current security context, including:
    所述终端设备继续将所述第一安全上下文作为当前安全上下文,以及删除所述第二安全上下文。The terminal device continues to use the first security context as the current security context, and deletes the second security context.
  5. 根据权利要求2所述的方法,其特征在于,所述维护所述第一安全上下文和第二安全上下文,包括:The method according to claim 2, wherein the maintaining the first security context and the second security context comprises:
    所述终端设备保存所述第一安全上下文,并将所述第二安全上下文作为当前安全上下文。The terminal device saves the first security context, and uses the second security context as a current security context.
  6. 根据权利要求5所述的方法,其特征在于,所述在注册流程没有成功完成的情况下,所述终端设备使用所述第一安全上下文为当前安全上下文,包括:The method according to claim 5, wherein when the registration process is not successfully completed, the terminal device uses the first security context as the current security context, comprising:
    所述终端设备将所述第一安全上下文设置为当前安全上下文,以及删除所述第二安全上下文。The terminal device sets the first security context as the current security context, and deletes the second security context.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 6, further comprising:
    所述终端设备确定所述注册流程没有成功完成。The terminal device determines that the registration procedure has not been successfully completed.
  8. 根据权利要求7所述的方法,其特征在于,所述终端设备确定所述注册流程没有成功完成,包括:The method according to claim 7, wherein the terminal device determines that the registration process has not been successfully completed, comprising:
    在预设时间内,所述终端设备没有接收到注册接受消息,所述终端设备确定所述注册流程没有成功完成;或者,Within a preset time, the terminal device does not receive a registration acceptance message, and the terminal device determines that the registration process has not been successfully completed; or,
    所述终端设备接收到注册拒绝消息,所述终端设备根据所述注册确定消息确定所述注册流程没有成功完成,所述注册拒绝消息用于拒绝所述终端设备接入到网络;或者,The terminal device receives a registration rejection message, the terminal device determines that the registration process has not been successfully completed according to the registration determination message, and the registration rejection message is used to deny the terminal device access to the network; or,
    所述终端设备在接收到注册接受消息之前,确定需要重新发起注册流程;或者,Before receiving the registration acceptance message, the terminal device determines that the registration process needs to be re-initiated; or,
    所述终端设备接收到底层失败的指示信息;或者,The terminal device receives indication information of a bottom layer failure; or,
    所述终端设备在接收到注册接受消息之前,确定NAS安全模式完成消息发送失败;或者,Before receiving the registration acceptance message, the terminal device determines that the NAS security mode completion message fails to be sent; or,
    所述终端设备在接收到注册接受消息之前,确定自身与接入网设备之间的链接释放;或者,The terminal device determines that the link between itself and the access network device is released before receiving the registration acceptance message; or,
    所述终端设备在接收到注册接受消息之前,确定自身与接入网设备之间的RRC连接被挂起或者释放。Before receiving the registration acceptance message, the terminal device determines that the RRC connection between itself and the access network device is suspended or released.
  9. 一种管理安全上下文的方法,其特征在于,包括:A method for managing a security context, comprising:
    源移动管理网元接收来自目标移动管理网元的上下文请求消息,所述上下文请求消息用于请求获取终端设备的上下文;The source mobility management network element receives a context request message from the target mobility management network element, where the context request message is used to request to acquire the context of the terminal device;
    在需要进行水平密钥推演的情况下,所述源移动管理网元根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,所述第一安全上下文为所述源移动管理网元与所述终端设备之间当前的安全上下文;When horizontal key derivation is required, the source mobility management network element generates a new key Kamf' according to the key Kamf in the first security context; wherein, the first security context is the source mobility managing the current security context between the network element and the terminal device;
    响应于所述上下文请求消息,所述源移动管理网元向所述目标移动管理网元发送第二安全上下文;其中,所述第二安全上下文包括所述新的密钥Kamf’;In response to the context request message, the source mobility management network element sends a second security context to the target mobility management network element; wherein the second security context includes the new key Kamf';
    所述源移动管理网元维护所述第一安全上下文和/或所述第二安全上下文。The source mobility management network element maintains the first security context and/or the second security context.
  10. 根据权利要求9所述的方法,其特征在于,在所述源移动管理网元维护所述第一安全上下文和所述第二安全上下文的情况下,所述方法还包括:The method according to claim 9, wherein when the source mobility management network element maintains the first security context and the second security context, the method further comprises:
    所述源移动管理网元接收来自又一个目标移动管理网元的上下文请求消息,所述上下文请求消息用于请求终端设备的上下文,所述上下文请求消息包括受到了安全保护的注册请求消息,所述注册请求消息包括所述终端设备的标识;The source mobility management network element receives a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, the The registration request message includes the identifier of the terminal device;
    所述源移动管理网元利用所述第一安全上下文和所述第二安全上下文对所述注册请求消息进行安全验证;The source mobility management network element uses the first security context and the second security context to perform security verification on the registration request message;
    在利用所述第一安全上下文和所述第二安全上下文中的任一个对所述注册请求消息安全验证成功,且需要进行水平密钥推演的情况下,所述源移动管理网元根据验证成功的安全上下文中的密钥,生成新的密钥Kamf”,并向所述目标移动管理网元发送第三安全上下文,所述第三安全上下文包括所述新的密钥Kamf”。If the security verification of the registration request message is successful using any one of the first security context and the second security context, and horizontal key derivation is required, the source mobility management network element generate a new key Kamf", and send a third security context to the target mobility management network element, where the third security context includes the new key Kamf".
  11. 根据权利要求9所述的方法,其特征在于,在所述源移动管理网元维护所述第一安全上下文和所述第二安全上下文的情况下,所述方法还包括:The method according to claim 9, wherein when the source mobility management network element maintains the first security context and the second security context, the method further comprises:
    所述源移动管理网元接收来自又一个目标移动管理网元的上下文请求消息,所述上下文请求消息用于请求终端设备的上下文,所述上下文请求消息包括受到了安全保护的注册请求消息,所述注册请求消息包括所述终端设备的标识;The source mobility management network element receives a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, the The registration request message includes the identifier of the terminal device;
    所述源移动管理网元利用所述第一安全上下文和所述第二安全上下文对所述注册请求消息进行安全验证;The source mobility management network element uses the first security context and the second security context to perform security verification on the registration request message;
    在利用所述第一安全上下文和所述第二安全上下文中的任一个对所述注册请求消息安全验证成功,且不需要进行水平密钥推演的情况下,所述源移动管理网元向所述目标移动管理网元发送验证成功的安全上下文。If the security verification of the registration request message is successful using any one of the first security context and the second security context, and horizontal key derivation is not required, the source mobility management network element sends The target mobility management network element sends the security context of successful verification.
  12. 根据权利要求9至11中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9 to 11, further comprising:
    所述源移动管理网元接收来自所述目标移动管理网元的注册成功指示信息,所述注册 成功指示信息用于指示所述终端设备成功注册到了网络;The source mobility management network element receives registration success indication information from the target mobility management network element, where the registration success indication information is used to indicate that the terminal device has successfully registered to the network;
    所述源移动管理网元删除所述第一安全上下文和/或所述第二安全上下文。The source mobility management network element deletes the first security context and/or the second security context.
  13. 根据权利要求9至11中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9 to 11, further comprising:
    所述源移动管理网元接收去注册通知消息,所述去注册通知消息用于指示所述源移动管理网元执行所述终端设备的去注册;The source mobility management network element receives a de-registration notification message, where the de-registration notification message is used to instruct the source mobility management network element to perform de-registration of the terminal device;
    所述源移动管理网元删除所述第一安全上下文和/或所述第二安全上下文。The source mobility management network element deletes the first security context and/or the second security context.
  14. 根据权利要求9至11中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9 to 11, further comprising:
    在预设时间之后,所述源移动管理网元删除所述第一安全上下文和/或所述第二安全上下文。After a preset time, the source mobility management network element deletes the first security context and/or the second security context.
  15. 根据权利要求9至11中任一项所述的方法,其特征在于,所述源移动管理网元维护所述第一安全上下文的情况下,所述方法还包括:The method according to any one of claims 9 to 11, wherein when the source mobility management network element maintains the first security context, the method further comprises:
    所述源移动管理网元删除所述第二安全上下文。The source mobility management network element deletes the second security context.
  16. 一种管理安全上下文的方法,其特征在于,包括:A method for managing a security context, comprising:
    目标移动管理网元接收来自终端设备的注册请求消息,所述注册请求消息包括所述终端设备的标识;The target mobility management network element receives a registration request message from the terminal device, where the registration request message includes the identifier of the terminal device;
    所述目标移动管理网元根据所述注册请求消息,向源移动管理网元发送上下文请求消息,所述上下文请求消息用于请求获取所述终端设备的上下文;The target mobility management network element sends a context request message to the source mobility management network element according to the registration request message, where the context request message is used to request to obtain the context of the terminal device;
    所述源移动管理网元接收来自所述目标移动管理网元的所述上下文请求消息;The source mobility management network element receives the context request message from the target mobility management network element;
    在需要进行水平密钥推演的情况下,所述源移动管理网元根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,所述第一安全上下文为所述源移动管理网元与所述终端设备之间当前的安全上下文;When horizontal key derivation is required, the source mobility management network element generates a new key Kamf' according to the key Kamf in the first security context; wherein, the first security context is the source mobility managing the current security context between the network element and the terminal device;
    响应于所述上下文请求消息,所述源移动管理网元向所述目标移动管理网元发送第二安全上下文;其中,所述第二安全上下文包括所述新的密钥Kamf’;In response to the context request message, the source mobility management network element sends a second security context to the target mobility management network element; wherein the second security context includes the new key Kamf';
    所述目标移动管理网元接收来自所述源移动管理网元的所述第二安全上下文;receiving, by the target mobility management network element, the second security context from the source mobility management network element;
    所述目标移动管理网元向所述终端设备发送非接入层NAS安全模式命令消息,所述NAS安全模式命令消息包括水平推演指示信息,所述水平推演指示信息用于指示所述终端设备对所述第一安全上下文中的所述Kamf进行水平密钥推演;The target mobility management network element sends a non-access stratum NAS security mode command message to the terminal device, the NAS security mode command message includes horizontal derivation indication information, and the horizontal derivation indication information is used to instruct the terminal equipment to The Kamf in the first security context performs horizontal key derivation;
    所述源移动管理网元维护所述第一安全上下文。The source mobility management network element maintains the first security context.
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:The method according to claim 16, further comprising:
    所述源移动管理网元维护所述第二安全上下文。The source mobility management network element maintains the second security context.
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:The method according to claim 17, further comprising:
    所述源移动管理网元接收来自又一个目标移动管理网元的上下文请求消息,所述上下文请求消息用于请求终端设备的上下文,所述上下文请求消息包括受到了安全保护的注册请求消息,所述注册请求消息包括所述终端设备的标识;The source mobility management network element receives a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, the The registration request message includes the identifier of the terminal device;
    所述源移动管理网元利用所述第一安全上下文和所述第二安全上下文对所述注册请求消息进行安全验证;The source mobility management network element uses the first security context and the second security context to perform security verification on the registration request message;
    在利用所述第一安全上下文和所述第二安全上下文中的任一个对所述注册请求消息安全验证成功,且需要进行水平密钥推演的情况下,所述源移动管理网元根据验证成功的安全上下文中的密钥,生成新的密钥Kamf”,并向所述目标移动管理网元发送第三安全上下文,所述第三安全上下文包括所述新的密钥Kamf”。If the security verification of the registration request message is successful using any one of the first security context and the second security context, and horizontal key derivation is required, the source mobility management network element generate a new key Kamf", and send a third security context to the target mobility management network element, where the third security context includes the new key Kamf".
  19. 根据权利要求17所述的方法,其特征在于,所述方法还包括:The method according to claim 17, further comprising:
    所述源移动管理网元接收来自又一个目标移动管理网元的上下文请求消息,所述上下文请求消息用于请求终端设备的上下文,所述上下文请求消息包括受到了安全保护的注册请求消息,所述注册请求消息包括所述终端设备的标识;The source mobility management network element receives a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, the The registration request message includes the identifier of the terminal device;
    所述源移动管理网元利用所述第一安全上下文和所述第二安全上下文对所述注册请求消息进行安全验证;The source mobility management network element uses the first security context and the second security context to perform security verification on the registration request message;
    在利用所述第一安全上下文和所述第二安全上下文中的任一个对所述注册请求消息安全验证成功,且不需要进行水平密钥推演的情况下,所述源移动管理网元向所述目标移动管理网元发送验证成功的安全上下文。If the security verification of the registration request message is successful using any one of the first security context and the second security context, and horizontal key derivation is not required, the source mobility management network element sends The target mobility management network element sends the security context of successful verification.
  20. 根据权利要求16至19中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 16 to 19, further comprising:
    所述目标移动管理网元向所述源移管理网元发送注册成功指示信息,所述注册成功指示信息用于指示所述终端设备成功注册到了网络;The target mobility management network element sends registration success indication information to the source migration management network element, where the registration success indication information is used to indicate that the terminal device has successfully registered to the network;
    所述源移动管理网元接收来自所述目标移动管理网元的所述注册成功指示信息;The source mobility management network element receives the registration success indication information from the target mobility management network element;
    所述源移动管理网元删除所述第一安全上下文。The source mobility management network element deletes the first security context.
  21. 根据权利要求16至21所述的方法,其特征在于,所述终端设备接收来自所述目标移动管理网元的所述NAS安全模式命令消息;The method according to claims 16 to 21, wherein the terminal device receives the NAS security mode command message from the target mobility management network element;
    根据所述水平推演指示信息,所述终端设备根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,所述第一安全上下文为所述终端设备当前的安全上下文;According to the horizontal derivation instruction information, the terminal device generates a new key Kamf' according to the key Kamf in the first security context; wherein, the first security context is the current security context of the terminal device;
    在注册流程没有成功完成的情况下,所述终端设备使用所述第一安全上下文为当前安全上下文。If the registration process is not successfully completed, the terminal device uses the first security context as the current security context.
  22. 一种管理安全上下文的方法,其特征在于,包括:A method for managing a security context, comprising:
    目标移动管理网元接收来自终端设备的所述注册请求消息,所述注册请求消息包括所述终端设备的标识;The target mobility management network element receives the registration request message from the terminal device, where the registration request message includes the identifier of the terminal device;
    所述目标移动管理网元根据所述注册请求消息,向源移动管理网元发送上下文请求消息,所述上下文请求消息用于请求获取所述终端设备的上下文;The target mobility management network element sends a context request message to the source mobility management network element according to the registration request message, where the context request message is used to request to obtain the context of the terminal device;
    所述源移动管理网元接收来自所述目标移动管理网元的所述上下文请求消息;The source mobility management network element receives the context request message from the target mobility management network element;
    在需要进行水平密钥推演的情况下,所述源移动管理网元根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,所述第一安全上下文为所述源移动管理网元与所述终端设备之间当前的安全上下文;When horizontal key derivation is required, the source mobility management network element generates a new key Kamf' according to the key Kamf in the first security context; wherein, the first security context is the source mobility managing the current security context between the network element and the terminal device;
    响应于所述上下文请求消息,所述源移动管理网元向所述目标移动管理网元发送第二安全上下文;其中,所述第二安全上下文包括所述新的密钥Kamf’;In response to the context request message, the source mobility management network element sends a second security context to the target mobility management network element; wherein the second security context includes the new key Kamf';
    所述目标移动管理网元接收来自所述源移动管理网元的所述第二安全上下文;receiving, by the target mobility management network element, the second security context from the source mobility management network element;
    所述目标移动管理网元向所述终端设备发送非接入层NAS安全模式命令消息,所述NAS安全模式命令消息包括水平推演指示信息,所述水平推演指示信息用于指示所述终端设备对所述第一安全上下文中的所述Kamf进行水平密钥推演;The target mobility management network element sends a non-access stratum NAS security mode command message to the terminal device, the NAS security mode command message includes horizontal derivation indication information, and the horizontal derivation indication information is used to instruct the terminal equipment to The Kamf in the first security context performs horizontal key derivation;
    所述源移动管理网元维护所述第二安全上下文。The source mobility management network element maintains the second security context.
  23. 根据权利要求22所述的方法,其特征在于,所述方法还包括:The method according to claim 22, further comprising:
    所述目标移动管理网元向所述源移动管理网元发送注册成功指示信息,所述注册成功指示信息用于指示所述终端设备成功注册到了网络;The target mobility management network element sends registration success indication information to the source mobility management network element, where the registration success indication information is used to indicate that the terminal device has successfully registered to the network;
    所述源移动管理网元接收来自所述目标移动管理网元的所述注册成功指示信息;The source mobility management network element receives the registration success indication information from the target mobility management network element;
    所述源移动管理网元删除所述第二安全上下文。The source mobility management network element deletes the second security context.
  24. 根据权利要求20所述的方法,其特征在于,所述方法还包括:The method according to claim 20, further comprising:
    所述源移动管理网元接收去注册通知消息,所述去注册通知消息用于指示所述源移动管理网元执行所述终端设备的去注册;The source mobility management network element receives a de-registration notification message, where the de-registration notification message is used to instruct the source mobility management network element to perform de-registration of the terminal device;
    所述源移动管理网元删除所述第二安全上下文。The source mobility management network element deletes the second security context.
  25. 根据权利要求22所述的方法,其特征在于,所述方法还包括:The method according to claim 22, further comprising:
    在预设时间之后,所述源移动管理网元删除所述第二安全上下文。After a preset time, the source mobility management network element deletes the second security context.
  26. 根据权利要求22至25中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 22 to 25, further comprising:
    所述源移动管理网元删除所述第一安全上下文。The source mobility management network element deletes the first security context.
  27. 根据权利要求22至26所述的方法,其特征在于,所述方法还包括:The method according to claims 22 to 26, further comprising:
    所述终端设备接收来自所述目标移动管理网元的所述NAS安全模式命令消息;The terminal device receives the NAS security mode command message from the target mobility management network element;
    根据所述水平推演指示信息,所述终端设备根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,所述第一安全上下文为所述终端设备当前的安全上下文;According to the horizontal derivation instruction information, the terminal device generates a new key Kamf' according to the key Kamf in the first security context; wherein, the first security context is the current security context of the terminal device;
    在注册流程没有成功完成的情况下,所述终端设备设置所述第二安全上下文为当前安全上下文。If the registration process is not successfully completed, the terminal device sets the second security context as the current security context.
  28. 一种通信装置,其特征在于,包括:A communication device, characterized by comprising:
    收发模块,用于向目标移动管理网元发送注册请求消息,所述注册请求消息包括所述终端设备的身份标识;A transceiver module, configured to send a registration request message to a target mobility management network element, where the registration request message includes the identity of the terminal device;
    所述收发模块,还用于接收来自所述目标移动管理网元的非接入层NAS安全模式命令消息,所述NAS安全模式命令消息包括水平推演指示信息;The transceiver module is further configured to receive a non-access stratum NAS security mode command message from the target mobility management network element, where the NAS security mode command message includes horizontal derivation indication information;
    处理模块,用于根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,所述第一安全上下文为所述终端设备当前的安全上下文;所述处理模块还用于,在注册流程没有成功完成的情况下,使用所述第一安全上下文为当前安全上下文。The processing module is configured to generate a new key Kamf' according to the key Kamf in the first security context; wherein, the first security context is the current security context of the terminal device; the processing module is also configured to, If the registration process is not successfully completed, the first security context is used as the current security context.
  29. 根据权利要求28所述的装置,其特征在于,The apparatus according to claim 28, characterized in that,
    所述处理模块,还用于生成所述新的密钥Kamf’之后,维护所述第一安全上下文和第二安全上下文;其中,所述第二安全上下文包括所述Kamf’和NAS密钥,所述NAS密钥根据所述Kamf’生成。The processing module is further configured to maintain the first security context and the second security context after generating the new key Kamf'; wherein the second security context includes the Kamf' and the NAS key, The NAS key is generated according to the Kamf'.
  30. 根据权利要求29所述的装置,其特征在于,所述处理模块具体用于:继续将所述第一安全上下文作为当前安全上下文,且保存所述第二安全上下文。The device according to claim 29, wherein the processing module is specifically configured to: continue to use the first security context as the current security context, and save the second security context.
  31. 根据权利要求30所述的装置,其特征在于,所述处理模块具体用于:继续将所述第一安全上下文作为当前安全上下文,以及删除所述第二安全上下文。The device according to claim 30, wherein the processing module is specifically configured to: continue to use the first security context as the current security context, and delete the second security context.
  32. 根据权利要求29所述的装置,其特征在于,所述处理模块具体用于:保存所述第一安全上下文,并将所述第二安全上下文作为当前安全上下文。The device according to claim 29, wherein the processing module is specifically configured to: save the first security context, and use the second security context as the current security context.
  33. 根据权利要求32所述的装置,其特征在于,所述处理模块具体用于:将所述第一安全上下文设置为当前安全上下文,以及删除所述第二安全上下文。The device according to claim 32, wherein the processing module is specifically configured to: set the first security context as the current security context, and delete the second security context.
  34. 根据权利要求28至33中任一项所述的方法,其特征在于,所述处理模块还用于:所述终端设备确定所述注册流程没有成功完成。The method according to any one of claims 28 to 33, wherein the processing module is further configured to: the terminal device determines that the registration process has not been successfully completed.
  35. 根据权利要求34所述的装置,其特征在于,所述处理模块具体用于:在收发模块接收到注册接受消息之前,确定NAS安全模式完成消息发送失败;或者,在收发模块接收到注册接受消息之前,确定自身与接入网设备之间的链接释放;在收发模块接收到注 册接受消息之前,确定自身与接入网设备之间的RRC连接被挂起或者释放。The device according to claim 34, wherein the processing module is specifically configured to: determine that the NAS security mode completion message fails to be sent before the transceiver module receives the registration acceptance message; or, before the transceiver module receives the registration acceptance message Before, it is determined that the link between itself and the access network device is released; before the transceiver module receives the registration acceptance message, it is determined that the RRC connection between itself and the access network device is suspended or released.
  36. 一种通信装置,其特征在于,包括:A communication device, characterized by comprising:
    收发模块,用于接收来自目标移动管理网元的上下文请求消息,所述上下文请求消息用于请求获取终端设备的上下文;A transceiver module, configured to receive a context request message from a target mobility management network element, where the context request message is used to request to acquire the context of the terminal device;
    处理模块,用于在需要进行水平密钥推演的情况下,根据第一安全上下文中的密钥Kamf,生成新的密钥Kamf’;其中,所述第一安全上下文为所述源移动管理网元与所述装置之间当前的安全上下文;A processing module, configured to generate a new key Kamf' according to the key Kamf in the first security context when horizontal key derivation is required; wherein the first security context is the source mobile management network the current security context between the element and the device;
    所述收发模块,还用于向所述目标移动管理网元发送第二安全上下文;其中,所述第二安全上下文包括所述新的密钥Kamf’和NAS密钥,所述NAS密钥根据所述Kamf’生成;The transceiver module is further configured to send a second security context to the target mobility management network element; wherein the second security context includes the new key Kamf' and a NAS key, and the NAS key is based on the Kamf' generation;
    所述处理模块还用于维护所述第一安全上下文和/或所述第二安全上下文。The processing module is further configured to maintain the first security context and/or the second security context.
  37. 根据权利要求36所述的装置,其特征在于,所述收发模块还用于:The device according to claim 36, wherein the transceiver module is also used for:
    接收来自又一个目标移动管理网元的上下文请求消息,所述上下文请求消息用于请求终端设备的上下文,所述上下文请求消息包括受到了安全保护的注册请求消息,所述注册请求消息包括所述终端设备的身份标识;Receive a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, the registration request message includes the The identity of the terminal device;
    处理模块,用于利用所述第一安全上下文和所述第二安全上下文对所述注册请求消息进行安全验证;在利用所述第一安全上下文和所述第二安全上下文中的任一个对所述注册请求消息安全验证成功,且需要进行水平密钥推演的情况下,所述处理模块还用于根据验证成功的安全上下文中的密钥,生成新的密钥Kamf”,所述收发模块还用于向所述目标移动管理网元发送第三安全上下文,所述第三安全上下文包括所述新的密钥Kamf”。A processing module, configured to use the first security context and the second security context to perform security verification on the registration request message; If the security verification of the registration request message is successful and horizontal key derivation is required, the processing module is further configured to generate a new key Kamf" according to the key in the security context of the successful verification, and the transceiver module is also It is used to send a third security context to the target mobility management network element, where the third security context includes the new key Kamf".
  38. 根据权利要求36所述的装置,其特征在于,Apparatus according to claim 36, characterized in that,
    所述收发模块,还用于接收来自又一个目标移动管理网元的上下文请求消息,所述上下文请求消息用于请求终端设备的上下文,所述上下文请求消息包括受到了安全保护的注册请求消息,所述注册请求消息包括所述终端设备的身份标识;The transceiver module is further configured to receive a context request message from another target mobility management network element, the context request message is used to request the context of the terminal device, the context request message includes a security-protected registration request message, The registration request message includes the identity of the terminal device;
    所述处理模块,还用于利用所述第一安全上下文和所述第二安全上下文对所述注册请求消息进行安全验证;在利用所述第一安全上下文和所述第二安全上下文中的任一个对所述注册请求消息安全验证成功,且不需要进行水平密钥推演的情况下,所述收发模块还用于向所述目标移动管理网元发送验证成功的安全上下文。The processing module is further configured to use the first security context and the second security context to perform security verification on the registration request message; using any of the first security context and the second security context In a case where the security verification of the registration request message is successful and horizontal key derivation is not required, the transceiver module is further configured to send a security context of successful verification to the target mobility management network element.
  39. 根据权利要求36至38中任一项所述的装置,其特征在于,Apparatus according to any one of claims 36 to 38 wherein,
    所述收发模块还用于,接收来自所述目标移动管理网元的注册成功指示信息,所述注册成功指示信息用于指示所述终端设备成功注册到了网络;The transceiver module is further configured to receive registration success indication information from the target mobility management network element, where the registration success indication information is used to indicate that the terminal device has successfully registered to the network;
    所述处理模块还用于:删除所述第一安全上下文和/或所述第二安全上下文。The processing module is further configured to: delete the first security context and/or the second security context.
  40. 根据权利要求36至38中任一项所述的装置,其特征在于,Apparatus according to any one of claims 36 to 38 wherein,
    所述收发模块还用于,接收去注册通知消息,所述去注册通知消息用于指示所述源移动管理网元执行所述终端设备的去注册;The transceiver module is further configured to receive a de-registration notification message, where the de-registration notification message is used to instruct the source mobility management network element to perform de-registration of the terminal device;
    所述处理模块,还用于删除所述第一安全上下文和/或所述第二安全上下文。The processing module is further configured to delete the first security context and/or the second security context.
  41. 根据权利要求36至38中任一项所述的装置,其特征在于,所述处理模块还用于:在预设时间之后,删除所述第一安全上下文和/或所述第二安全上下文。The device according to any one of claims 36 to 38, wherein the processing module is further configured to: delete the first security context and/or the second security context after a preset time.
  42. 根据权利要求36至38中任一项所述的装置,其特征在于,在所述处理模块用于维护所述第一安全上下文的情况下,所述处理模块还用于:删除所述第二安全上下文。The device according to any one of claims 36 to 38, wherein when the processing module is used to maintain the first security context, the processing module is further used to: delete the second security context.
  43. 一种通信装置,其特征在于,该装置用于执行如权利要求1至15中任一项所述的方法。A communication device, characterized in that the device is used to execute the method according to any one of claims 1-15.
  44. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在计算机上运行时,使得计算机执行如权利要求1至15中任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is run on a computer, the computer executes the computer program described in any one of claims 1 to 15. Methods.
  45. 一种计算机程序产品,其特征在于,包括计算机程序指令,所述计算机程序指令在计算机上运行时,使得计算机执行如权利要求1至15中任一项所述的方法。A computer program product, characterized by comprising computer program instructions, which, when run on a computer, cause the computer to execute the method according to any one of claims 1 to 15.
PCT/CN2022/128421 2021-10-30 2022-10-28 Method and apparatus for managing security context WO2023072271A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111278501.2 2021-10-30
CN202111278501.2A CN116074828A (en) 2021-10-30 2021-10-30 Method and device for managing security context

Publications (1)

Publication Number Publication Date
WO2023072271A1 true WO2023072271A1 (en) 2023-05-04

Family

ID=86159094

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/128421 WO2023072271A1 (en) 2021-10-30 2022-10-28 Method and apparatus for managing security context

Country Status (2)

Country Link
CN (1) CN116074828A (en)
WO (1) WO2023072271A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866967A (en) * 2019-04-29 2020-10-30 华为技术有限公司 Switching processing method and device
WO2020221067A1 (en) * 2019-04-29 2020-11-05 华为技术有限公司 Method and device for mobile registration
CN112020067A (en) * 2019-05-31 2020-12-01 华为技术有限公司 Method, device and communication system for acquiring security context
US20200396650A1 (en) * 2017-09-15 2020-12-17 Telefonaktiebolaget Lm Ericsson (Publ) Security Context In A Wireless Communication System
CN112738881A (en) * 2020-12-30 2021-04-30 展讯通信(上海)有限公司 Network registration method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200396650A1 (en) * 2017-09-15 2020-12-17 Telefonaktiebolaget Lm Ericsson (Publ) Security Context In A Wireless Communication System
CN111866967A (en) * 2019-04-29 2020-10-30 华为技术有限公司 Switching processing method and device
WO2020221067A1 (en) * 2019-04-29 2020-11-05 华为技术有限公司 Method and device for mobile registration
CN112020067A (en) * 2019-05-31 2020-12-01 华为技术有限公司 Method, device and communication system for acquiring security context
CN112738881A (en) * 2020-12-30 2021-04-30 展讯通信(上海)有限公司 Network registration method and device

Also Published As

Publication number Publication date
CN116074828A (en) 2023-05-05

Similar Documents

Publication Publication Date Title
US11089480B2 (en) Provisioning electronic subscriber identity modules to mobile wireless devices
CN109587688B (en) Security in inter-system mobility
US20200296142A1 (en) User Group Establishment Method and Apparatus
US11812496B2 (en) User group session management method and apparatus
WO2021136211A1 (en) Method and device for determining authorization result
US11470674B2 (en) Communication method and communications apparatus
US20190253403A1 (en) Network Authentication Triggering Method and Related Device
WO2020135850A1 (en) Communication method and apparatus
EP3860176B1 (en) Method, apparatus, and system for obtaining capability information of terminal
US20220174482A1 (en) Establishing a protocol data unit session
US20210045050A1 (en) Communications method and apparatus
US20210168139A1 (en) Network Slice Authentication Method and Communications Apparatus
WO2021233340A1 (en) Network registration method and apparatus
WO2021180209A1 (en) Method for transmitting paging information and communication apparatus
CN116723507B (en) Terminal security method and device for edge network
WO2023213301A1 (en) Authentication method, communication apparatus, and computer-readable storage medium
WO2023016160A1 (en) Session establishment method and related apparatus
US20220330010A1 (en) Online Signup Method and Apparatus
WO2022148469A1 (en) Security protection method, apparatus and system
WO2023072271A1 (en) Method and apparatus for managing security context
WO2021134719A1 (en) Communication method and device
US20230354028A1 (en) Method, system, and apparatus for generating key for inter-device communication
WO2023041054A1 (en) Network verification method and apparatus
US20230188519A1 (en) Method and system for invoking application programming interface, and apparatus
US20220272533A1 (en) Identity authentication method and communications apparatus

Legal Events

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

Ref document number: 22886146

Country of ref document: EP

Kind code of ref document: A1