Handover processing method and device
By saving and restoring the NAS security context of the user equipment in the 5G communication scenario, the first AMF solves the problem of key inconsistency during N2 interface switching, realizes the connection recovery between the user equipment and the first AMF, and ensures business continuity.
Patent Information
- Application Number
- CN201910356843.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-29
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2039-04-29
AI Technical Summary
In the 5G communication scenario, when the N2 interface is switched, the keys of the user equipment and the first AMF are inconsistent, causing the access network equipment to fail to switch and the user equipment cannot re-establish a connection with the first AMF.
The first AMF saves and restores the use of the first NAS security context to ensure that the keys on the user equipment and the first AMF are consistent, thereby achieving business continuity when access network equipment switching fails.
This effectively solves the problem of key inconsistency between the user equipment and the first AMF, ensures that the user equipment can re-establish a secure connection with the first AMF after the access network equipment switching fails, and ensures business continuity.
Smart Images

Figure CN111866967B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and more particularly, to a method and device for processing handover. Background Art
[0002] In the fifth generation (5G) communication scenario, due to the movement of user equipment, there will be access network equipment switching scenarios. For example, the location of the user equipment changes, resulting in a change in the access network equipment providing services to the user equipment. Currently, two types of access network equipment switching are defined in the communication protocol, one is the Xn interface switching, and the other is the N2 interface switching. Xn interface switching refers to the existence of an Xn interface between the access network equipment before and after the access network equipment switching occurs, and the switching between access network equipment is based on this interface. N2 switching refers to the access network equipment switching based on the N2 interface between the access network equipment and the core network element access and mobility management function (AMF).
[0003] In the existing N2 interface switching scenario, when the access network device fails to switch, there may be a situation in the switching process that causes the key on the user device and the first AMF to be inconsistent, resulting in the user device being unable to re-establish a connection with the first AMF after the access network device fails to switch. Summary of the invention
[0004] The present invention discloses a switching processing method and device, which saves and restores a first NAS security context through a first AMF, thereby ensuring that when an access network device fails to switch, the security context on the user device is consistent with that on the first AMF, thereby ensuring that the key on the user device is consistent with that on the first AMF.
[0005] In a first aspect, a switching processing method is provided, including: a first access management function AMF receives a switching request message sent by a first access network device; when it is determined that key derivation is required, the first AMF saves a first non-access layer NAS security context, and the first NAS security context is a NAS security context generated by negotiation between the first AMF and a user equipment UE; the first AMF resumes using the first NAS security context.
[0006] The switching processing method provided in the embodiment of the present application is to save the first NAS security context by the first AMF when key derivation is required, and restore the first NAS security context after the key derivation, so as to achieve the purpose of consistency of the key between the user equipment and the first AMF when the access network device fails to switch.
[0007] It should be understood that the first NAS security context in the embodiment of the present application may also be referred to as the NAS security context currently used by the UE.
[0008] In combination with the first aspect, in certain implementations of the first aspect, the first NAS security context includes a first NAS security algorithm, a first AMF key Kamf1, a first non-access stratum NAS key, and a first non-access stratum counter NASCOUNT.
[0009] The switching processing method provided in the embodiment of the present application, the first NAS security context includes the AMF key Kamf1 negotiated by the first AMF and the user equipment UE, the NAS key generated by the first AMF and the user equipment UE through negotiation, and the non-access layer counter NAS COUNT.
[0010] In combination with the first aspect, in some implementations of the first aspect, the first AMF resuming use of the first NAS security context includes: after the first AMF initiates a user context creation service request to the second AMF, the first AMF resuming use of the first NAS security context.
[0011] In the switching processing method provided in the embodiment of the present application, the first AMF resumes using the first NAS security context after the first AMF initiates a user context creation service request to the second AMF; or, before the first AMF initiates a user context creation service request to the second AMF; or, when the first AMF initiates a user context creation service request to the second AMF.
[0012] In a second aspect, a switching processing method is provided, including: a user equipment UE receives a switching command message sent by a first access network device, the switching command message carrying a second NAS security algorithm and an AMF key change indication selected by a second access management function AMF; when the second NAS security algorithm is inconsistent with the first NAS security algorithm currently used by the UE and / or the AMF key change indication is a preset value, the UE saves a first non-access layer NAS security context, the first NAS security context is a NAS security context generated by negotiation between the UE and the first AMF, and when the UE user equipment fails to switch, the first NAS security context is used to perform non-access layer NAS protection with the first AMF; or, when the UE fails to check the integrity of the non-access layer container NASC, the UE continues to use the first NAS security context, wherein the NASC is carried in the switching command message.
[0013] The switching processing method provided in the embodiment of the present application is such that when the second NAS security algorithm and / or AMF key change indication carried in the switching command message received by the UE is 1, the UE saves the first NAS security context, and uses the first NAS security context to perform non-access layer NAS protection with the first AMF when the UE user equipment fails to switch; or, when the UE fails to check the integrity of the NASC, the UE continues to use the current first NAS security context, so that the key on the user equipment and the first AMF is consistent.
[0014] In combination with the second aspect, in certain implementations of the second aspect, the first NAS security context includes a first NAS security algorithm, a first AMF key Kamf1, a first non-access stratum NAS key, and a first non-access stratum counter NASCOUNT.
[0015] The switching processing method provided in the embodiment of the present application, the first NAS security context includes the AMF key Kamf1 negotiated by the first AMF and the user equipment UE, the NAS key generated by the first AMF and the user equipment UE through negotiation, and the non-access layer counter NAS COUNT.
[0016] In combination with the second aspect, in some implementations of the second aspect, the AMF key change indication is a preset value, including: the AMF key change indication is 1.
[0017] The switching processing method provided in the embodiment of the present application indicates that key deduction is to be performed when the AMF key change indication is 1.
[0018] In a third aspect, a switching processing method is provided, including: a first access management function AMF receives a switching request message sent by a first access network device; the first AMF performs key derivation according to a local policy to obtain a second AMF key; the first AMF generates a second NAS security context based on the second AMF key and a first NAS security algorithm, wherein the first NAS security algorithm is a NAS security algorithm negotiated by the first AMF and a user equipment UE; the first AMF uses the second NAS security context to perform non-access layer NAS protection with the UE.
[0019] In the switching processing method provided in an embodiment of the present application, when the first AMF performs key derivation to generate a second AMF key, the first AMF can generate a second NAS security context based on the second AMF key and the first NAS security algorithm negotiated with the user equipment UE.
[0020] In combination with the third aspect, in certain implementations of the third aspect, the second NAS security context includes the first NAS security algorithm, the second AMF key, a second non-access layer NAS key, and a second non-access layer counter NAS COUNT.
[0021] In a fourth aspect, a switching processing method is provided, including: a user equipment UE receives a switching command message sent by a first access network device, the switching command message carrying a second NAS security algorithm and an AMF key change indication selected by a second access management function AMF; when the second NAS security algorithm is inconsistent with the first NAS security algorithm and the AMF key change indication is a preset value, the UE saves the first NAS security algorithm, and performs key derivation to obtain a second AMF key; wherein the first NAS security algorithm is a NAS security algorithm negotiated by the UE and the first access management function AMF.
[0022] The handover processing method provided in the embodiment of the present application is such that when the second NAS security algorithm and the AMF key change indication carried in the handover command message received by the UE are 1, the UE saves the first NAS security algorithm and performs key derivation based on the AMF key change indication to obtain the second AMF key. In conjunction with the fourth aspect, in some implementations of the fourth aspect, the UE generates a second NAS security context using the second AMF key and the first NAS security algorithm.
[0023] In the switching processing method provided in the embodiment of the present application, the UE can use the newly generated second AMF key and the saved first NAS security algorithm to generate a second NAS security context.
[0024] In combination with the fourth aspect, in certain implementations of the fourth aspect, when the UE switching fails, the UE uses the second NAS security context to perform non-access layer NAS security protection with the first AMF.
[0025] In the switching processing method provided in the embodiment of the present application, when the UE switching fails, the UE uses the second NAS security context to perform non-access layer NAS security protection with the first AMF.
[0026] In combination with the fourth aspect, in certain implementations of the fourth aspect, when the UE switching fails, the UE generates a second NAS security context using the second AMF key and the first NAS security algorithm; the UE uses the second NAS security context to perform non-access layer NAS security protection with the first AMF.
[0027] In the switching processing method provided in the embodiment of the present application, when the UE switching fails, the UE first generates a second NAS security context using the newly generated second AMF key and the saved first NAS security algorithm, and then uses the second NAS security context to perform non-access layer NAS security protection with the first AMF.
[0028] In combination with the fourth aspect, in certain implementations of the fourth aspect, the AMF key change indication is a preset value, including: the AMF key change indication is 1.
[0029] The switching processing method provided in the embodiment of the present application indicates that key deduction is to be performed when the AMF key change indication is 1.
[0030] In a fifth aspect, a switching processing device is provided, which can be used to perform the operation of the user equipment in the first aspect and the third aspect and any possible implementation of the first aspect and the third aspect. Specifically, the switching processing device may include a component (means) for performing the steps or functions described in the first aspect and the third aspect and any possible implementation of the first aspect and the third aspect, which may be the user equipment of the first aspect and the third aspect or a chip or functional module inside the user equipment. The steps or functions can be implemented by software, or hardware, or by a combination of hardware and software.
[0031] In a sixth aspect, a switching processing device is provided, which can be used to perform the operations of the first AMF in the second aspect and the fourth aspect and any possible implementation of the second aspect and the fourth aspect. Specifically, the switching processing device may include a component (means) for performing the steps or functions described in the second aspect and the fourth aspect and any possible implementation of the second aspect and the fourth aspect, which may be the first AMF in the second aspect and the fourth aspect or a chip or functional module inside the first AMF. The steps or functions may be implemented by software, or by hardware, or by a combination of hardware and software.
[0032] The seventh aspect provides a communication device, including a processor, a transceiver, and a memory, wherein the memory is used to store a computer program, the transceiver is used to execute the sending and receiving steps in the switching processing device method in any possible implementation manner of the first to fourth aspects, and the processor is used to call and run the computer program from the memory, so that the communication device executes the switching processing device method in any possible implementation manner of the first to fourth aspects.
[0033] Optionally, there are one or more processors and one or more memories.
[0034] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0035] Optionally, the transceiver includes a transmitter (transmitter) and a receiver (receiver).
[0036] In an eighth aspect, a system is provided, the system comprising the switching processing device provided in the fifth to sixth aspects.
[0037] In the ninth aspect, a computer program product is provided, which includes: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first to fourth aspects above.
[0038] In the tenth aspect, a computer-readable medium is provided, which stores a computer program (also referred to as code, or instruction) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first to fourth aspects above.
[0039] In the eleventh aspect, a chip system is provided, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a communication device equipped with the chip system executes a method in any possible implementation of the first to fourth aspects above. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a network architecture suitable for the embodiments of the present application.
[0041] Figure 2 It is a schematic diagram of a switching failure process.
[0042] Figure 3 This is another diagram of a switching failure process.
[0043] Figure 4 It is a flowchart of a switching processing method provided in an embodiment of the present application.
[0044] Figure 5 It is a flowchart of another switching processing method provided in an embodiment of the present application.
[0045] Figure 6 A schematic diagram of a switching processing device 10 provided in an embodiment of the present application.
[0046] Figure 7 It is a structural diagram of a user equipment 20 applicable to an embodiment of the present application.
[0047] Figure 8A schematic diagram of a switching processing device 30 provided in an embodiment of the present application.
[0048] Fig. 9 4 is a schematic diagram of the structure of the first AMF 40 applicable to the embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0050] Figure 1 This is a network architecture suitable for the embodiments of the present application. Figure 1 As shown, each part involved in the network architecture is described below.
[0051] 1. User equipment 110: may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, as well as various forms of terminals, mobile stations (MS), terminals, user equipment (UE), soft terminals, etc. For example, water meters, electric meters, sensors, etc.
[0052] 2. (Radio) access network (R)AN) network element 120: used to provide network access function for authorized user equipment in a specific area, and can use transmission tunnels of different qualities according to the level of user equipment, service requirements, etc.
[0053] (R)AN network elements can manage wireless resources, provide access services for user equipment, and then complete the forwarding of control signals and user equipment data between user equipment and the core network. (R)AN network elements can also be understood as base stations in traditional networks.
[0054] 3. User plane network element 130: used for packet routing and forwarding and quality of service (QoS) processing of user plane data.
[0055] In a 5G communication system, the user plane network element may be a user plane function (UPF) network element. In future communication systems, the user plane network element may still be a UPF network element, or may have other names, which are not limited in this application.
[0056] 4. Data network element 140: used to provide a network for transmitting data.
[0057] In a 5G communication system, the data network element may be a data network (DN) element. In future communication systems, the data network element may still be a DN element, or may have other names, which are not limited in this application.
[0058] 5. Access management network element 150: mainly used for mobility management and access management, etc., and can be used to implement other functions of the mobility management entity (MME) except session management, such as lawful interception and access authorization / authentication.
[0059] In the 5G communication system, the access management network element may be an access management function (AMF) network element. In future communication systems, the access management network element may still be AMF, or may have other names, which are not limited in this application.
[0060] 6. Session management network element 160: mainly used for session management, allocation and management of Internet protocol (IP) addresses of user equipment, selection of endpoints of manageable user plane functions, policy control and charging function interfaces, and downlink data notification.
[0061] In a 5G communication system, the session management network element may be a session management function (SMF) network element. In future communication systems, the session management network element may still be an SMF network element, or may have other names, which are not limited in this application.
[0062] 7. Policy control network element 170: A unified policy framework used to guide network behavior and provide policy rule information to control plane functional network elements (such as AMF, SMF network elements, etc.).
[0063] In a 4G communication system, the policy control network element may be a 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 future communication systems, the policy control network element may still be a PCF network element, or may have other names, which are not limited in this application.
[0064] 8. Authentication server 180: used for authentication services, generating keys to implement two-way authentication of user devices, and supporting a unified authentication framework.
[0065] In a 5G communication system, the authentication server may be an authentication server function (AUSF) network element. In future communication systems, the authentication server function network element may still be an AUSF network element, or may have other names, which are not limited in this application.
[0066] 9. Data management network element 190: used to process user equipment identification, access authentication, registration and mobility management, etc.
[0067] In a 5G communication system, the data management network element may be a unified data management (UDM) 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 it may have other names, which are not limited in this application.
[0068] 10. Application network element 1100: used for data routing affected by applications, accessing network open function network elements, interacting with the policy framework for policy control, etc.
[0069] In a 5G communication system, the application network element may be an application function (AF) network element. In future communication systems, the application network element may still be an AF network element, or may have other names, which are not limited in this application.
[0070] 11. Network storage element: used to maintain real-time information of all network function services in the network.
[0071] In the 5G communication system, the network storage network element may be a network repository function (NRF) network element. In future communication systems, the network storage network element may still be an NRF network element, or may have other names, which are not limited in this application.
[0072] It is understandable that the above network elements or functions can be network elements in hardware devices, software functions running on dedicated hardware, or virtualized functions instantiated on a platform (e.g., a cloud platform). For the convenience of explanation, this application will be described later by taking the access management network element as AMF, the data management network element as UDM, the session management network element as SMF, and the user plane network element as UPF as an example.
[0073] Further, AMF is referred to as AMF, UDM network element is referred to as UDM, SMF network element is referred to as SMF, and UPF network element is referred to as UPF. That is, the AMF described later in this application can be replaced by an access management network element, UDM can be replaced by a data management network element, SMF can be replaced by a session management network element, and UPF can be replaced by a user plane network element.
[0074] For the convenience of explanation, in the embodiment of the present application, the method for establishing a session is explained by taking the device as an AMF entity and a UDM entity as an example. For the implementation method of the device being a chip in an AMF entity and a chip in a UDM entity, please refer to the specific description of the device being an AMF entity and a UDM entity, and no repetition will be given.
[0075] exist Figure 1 In the network architecture shown, the user equipment is connected to the AMF through the N1 interface, the (R)AN is connected to the AMF through the N2 interface, and the (R)AN is connected to the UPF through the N3 interface. The UPFs are connected through the N9 interface, and the UPFs are interconnected through the N6 interface DN. The SMF controls the UPF through the N4 interface. The AMF interfaces with the SMF through the N11 interface. The AMF obtains the user equipment subscription data from the UDM unit through the N8 interface, and the SMF obtains the user equipment subscription data from the UDM unit through the N10 interface.
[0076] 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 to this. Any network architecture that can realize the functions of the above-mentioned network elements is applicable to the embodiment of the present application.
[0077] For example, in some network architectures, network function network element entities such as AMF, SMF network elements, PCF network elements, BSF network elements and UDM network elements are all called network function (NF) network elements; or, in other network architectures, the collection of AMF, SMF network elements, PCF network elements, BSF network elements, UDM network elements and other network elements can be called control plane function network elements.
[0078] The technical solutions of the embodiments of the present application can be applied to various communication systems, for example: global system for mobile communications (GSM) system, code division multiple access (CDMA) system, wideband code division multiple access (WCDMA) system, general packet radio service (GPRS), long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD), universal mobile telecommunication system (UMTS), worldwide interoperability for microwave access (WiMAX) communication system, future fifth generation (5G) system or new radio (NR), etc.
[0079] The user equipment in the embodiments of the present application may refer to user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. The user equipment may also be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a user equipment in a future 5G network or a user equipment in a future evolved public land mobile communication network (PLMN), etc., and the embodiments of the present application are not limited to this.
[0080] The network device in the embodiment of the present application can be a device for communicating with a user device. The network device can be a base station (base t(R)ANsceiver station, BTS) in a global system for mobile communications (GSM) system or code division multiple access (CDMA), or a base station (NodeB, NB) in a wideband code division multiple access (WCDMA) system, or an evolved base station (evolved NodeB, eNB or eNodeB) in an LTE system, or a wireless controller in a cloud radio access network (C(R)AN) scenario, or the network device can be a relay station, an access point, a vehicle-mounted device, a wearable device, a network device in a future 5G network, or a network device in a future evolved PLMN network, etc., and the embodiment of the present application is not limited.
[0081] In an embodiment of the present application, a user device or a network device includes 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 includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. The application layer includes applications such as a browser, an address book, a word processing software, and an instant messaging software. In addition, 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 it can communicate according to the method provided in the embodiment of the present application by running a program that records the code of the method provided in the embodiment of the present application, for example, the execution subject of the method provided in the embodiment of the present application can be a user device or a network device, or a functional module in a user device or a network device that can call a program and execute a program.
[0082] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" used in this application covers computer programs that can be accessed from any computer-readable device, carrier or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). In addition, the various storage media described herein may 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.
[0083] The embodiments of this application mainly involve Figure 1 The AMF, UE and (R)AN in the network architecture shown. Among them, for AMF, this application involves a first AMF (or source AMF) and a second AMF (or target AMF); for (R)AN network elements, this application involves a first (R)AN (or source (R)AN) network element and a second (R)AN (or target (R)AN) network element.
[0084] Specifically, the first AMF involved in this application refers to the AMF that provides core network services to the UE before the switching occurs; the second AMF involved in this application refers to the AMF that is selected to provide core network services to the UE after the switching occurs. The first (R)AN network element involved in this application refers to the (R)AN network element that provides access network services to the UE before the first AMF switches; the second (R)AN network element involved in this application refers to the (R)AN network element that is selected to provide access network services to the UE after the second AMF switches. Furthermore, AUSF / UDM may also be involved in this application. AUSF / UDM is mainly used for authentication. For example, authentication between the UE and the network device is implemented. It should be understood that this application mainly involves the switching process, and does not limit the authentication process. The authentication between the UE and the network device will not be described below.
[0085] Specifically, in the embodiment of the present application, for the convenience of description, the first (R)AN network element may be referred to as the first (R)AN, and the second (R)AN network element may be referred to as the second (R)AN. The switching involved in the embodiment of the present application refers to the switching of the (R)AN network element providing access network services for the UE from the first (R)AN to the second (R)AN, and the first (R)AN and the second (R)AN cannot directly establish a connection for signaling interaction, the first (R)AN is managed by the first AMF, and the second (R)AN is managed by the second AMF. In the process of switching the (R)AN network element providing access network services for the UE from the first (R)AN to the second (R)AN, the relevant signaling needs to be transmitted via the first AMF and the second AMF. When the (R)AN network element providing access network services for the UE fails to switch from the first (R)AN to the second (R)AN, in general, the first (R)AN will continue to provide access network services for the UE. In this application, the switching of the (R)AN network element providing access network services for the UE from the first (R)AN to the second (R)AN is referred to as switching, and the failure of switching the (R)AN network element providing access network services for the UE from the first (R)AN to the second (R)AN is referred to as switching failure.
[0086] Furthermore, before switching, after the UE completes authentication with the network device, the UE and the first AMF obtain the same AMF key. In the embodiment of the present application, for the convenience of description, the AMF key obtained by the UE and the first AMF is recorded as Kamf, and Kamf can also be called the first AMF key or Kamf1. Then, the UE and the first AMF respectively generate an integrity protection key for NAS message protection based on the Kamf and the non-access stratum (NAS) integrity protection algorithm negotiated between the UE and the first AMF; the UE and the first AMF generate a confidentiality protection key for NAS message protection based on the Kamf and the non-access stratum (NAS) confidentiality protection algorithm negotiated between the UE and the first AMF, wherein the integrity protection key and confidentiality protection key used for NAS message protection can be collectively referred to as NAS Key. For the convenience of description in the embodiment of the present application, the integrity protection key generated by the UE and the first AMF for NAS message protection is recorded as Knasint; the confidentiality protection key generated by the UE and the first AMF for NAS message protection is recorded as Knasenc, and the integrity protection key and confidentiality protection key generated by the UE and the first AMF for NAS message protection based on Kamf and the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the UE and the first AMF are called the first NAS Key; the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the UE and the first AMF may be called the first NAS security algorithm.
[0087] It should be understood that the present application does not limit how the UE and the first AMF negotiate the NAS integrity protection algorithm and the confidentiality protection algorithm, which may be a negotiation scheme specified in the existing protocol.
[0088] In order to ensure the business continuity of the switch, when the above-mentioned switch occurs, the first AMF will transfer the security context of the UE between the first AMF and the UE to the second AMF. The security context of the UE includes the above-mentioned Kamf or Kamf' after the above-mentioned Kamf is deduced through key (also called Kamf2 or the second AMF key), the first NAS security algorithm negotiated between the first AMF and the UE, the downlink non-access stratum count (DL NAS COUNT), and the list of NAS security algorithms supported by the UE. It should be understood that the first AMF transfers the security context of the UE between the first AMF and the UE to the second AMF, which is a step specified in the switching process in the existing protocol. The present application does not make any improvements to this step. That is to say, the content included in the security context of the UE sent by the first AMF to the second AMF can refer to the provisions of the existing protocol, and only a brief description is given here.
[0089] The second AMF generates a third NAS security context using the AMF key included in the security context of the UE transmitted by the first AMF and the second NAS security algorithm negotiated between the second AMF and the UE. The third NAS security context includes Kamf2, Knasint2, Knasenc2, and DL NAS COUNT2, etc. Specifically, the negotiation of the second NAS security algorithm between the second AMF and the UE includes the second AMF selecting a second NAS security algorithm from the list of NAS security algorithms supported by the UE included in the security context of the UE received by the first AMF, and generating the above-mentioned new NAS security context based on the selected second NAS security algorithm and the key Kamf or Kamf' included in the received security context of the UE. Unless otherwise specified, the second NAS security algorithm involved in this application is different from the above-mentioned first NAS security algorithm.
[0090] It should be understood that, similar to the first NAS security algorithm mentioned above, the second NAS security algorithm includes a second NAS integrity protection algorithm and a second NAS confidentiality protection algorithm, the NAS integrity protection algorithm is used to generate a second integrity protection key, and the NAS confidentiality protection algorithm is used to generate a second confidentiality protection key.
[0091] Specifically, it can be seen from the above that the security context of the UE sent by the first AMF to the second AMF includes the following two possible forms:
[0092] Form 1: The first AMF does not deduce Kamf. The security context of the UE includes: Kamf, DL NAS COUNT, the first NAS security algorithm negotiated between the first AMF and the UE, and the list of NAS security algorithms supported by the UE;
[0093] Form 2: The first AMF performs key derivation on Kamf and generates the second AMF key Kamf'. The security context of the UE includes: Kamf', DL NAS COUNT, the first NAS security algorithm negotiated between the first AMF and the UE, the list of NAS security algorithms supported by the UE, and derivation indication information, which is used to indicate that the first AMF performs horizontal derivation of the AMF key.
[0094] In the second form, before the first AMF transfers the security context between the first AMF and the UE to the second AMF, the first AMF performs key derivation on the above Kamf according to the local policy of the first AMF to generate the key Kamf' after key derivation. It should be understood that the key derivation mechanism and parameters used for key derivation to generate the second key in the embodiment of the present application are not restricted, and only the generated second key cannot be key derivation to obtain the deduced key; or, it can be said that the second key and the deduced key are isolated.
[0095] As a possible implementation, the key derivation described in this application may be a horizontal key derivation defined in an existing protocol;
[0096] For example, Kamf is generated into Kamf' through horizontal key deduction as follows:
[0097] Kamf'=HMAC-SHA-256(Key,S);
[0098] FC = 0x72;
[0099] P0 = 0x01;
[0100] L0=length of P0(ie0x00 0x01);
[0101] P1 = DL NAS COUNT;
[0102] L1=length of P1(ie0x00 0x04);
[0103] KEY = Kamf;
[0104] S=FC||P0||L0||P1||L1.
[0105] As another possible implementation, the key derivation described in the present application may be a key derivation method agreed upon between different network elements. For example, the key derivation method agreed upon between the first AMF and the second AMF is a preset key derivation method. As long as the security context of the UE sent by the first AMF to the second AMF includes the above-mentioned derivation indication information, the second AMF can determine that the key in the received security context of the UE is obtained by the first AMF through key derivation using the preset key derivation method.
[0106] Specifically, it can be seen from the above that the second AMF uses the security context of the UE transmitted by the first AMF, and the second AMF and the UE negotiate the second NAS security algorithm to generate a new NAS security context, including the following two possible forms:
[0107] Form 1: Corresponding to the above-mentioned Form 1, the first AMF does not deduce Kamf. The new NAS security context includes: Kamf2, Knasint2, Knasenc2 and DL NAS COUNT2, where Kamf2 is the above-mentioned Kamf.
[0108] One possible implementation method is that the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the second AMF and the UE are consistent with the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the first AMF and the UE. The second AMF generates the integrity protection key and confidentiality protection key Knasint2 and Knasenc2 for NAS message protection based on Kamf and the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the UE and the second AMF, which are the above-mentioned Knasint and Knasenc;
[0109] Another possible implementation method is that the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the second AMF and the UE are inconsistent with the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the first AMF and the UE. The second AMF generates an integrity protection key and a confidentiality protection key Knasint2 and Knasenc2 for NAS message protection based on the Kamf and the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the UE and the second AMF, which are different from the above-mentioned Knasint and Knasenc.
[0110] Form 2: Corresponding to the above Form 2, the first AMF derives Kamf. The new NAS security context includes: Kamf', Knasint2, Knasenc2, DL NAS COUNT and derivation indication information, where the derivation indication information is used to indicate that Kamf' is the AMF key after derivation.
[0111] Among them, Knasint2 and Knasenc2 are the integrity protection key and confidentiality protection key for NAS message protection generated by the second AMF based on Kamf' and the NAS integrity protection algorithm and confidentiality protection algorithm negotiated between the UE and the second AMF.
[0112] In form 2, the second AMF receives the derivation indication information and also sends the derivation indication information to the UE. The derivation indication information is used to instruct the UE to derive Kamf to ensure that the Kamf' on the UE and the network side are consistent.
[0113] It should be understood that after receiving the Kamf or Kamf' sent by the first AMF, the second AMF generates the NAS Key (Knasenc2 and Knasint2) between the second AMF and the UE based on the NAS security algorithm (including the integrity protection algorithm and the confidentiality protection algorithm) selected by itself and the received Kamf or Kamf', in combination with the algorithm negotiation between the second AMF and the UE. The UE side will also perform the same calculation, and finally the AMF key and NAS Key on the UE side and the second AMF side will reach an agreement.
[0114] When the above handover fails, it can only ensure that the AMF key and NAS Key on the UE and the second AMF are consistent, but it cannot be guaranteed that the NAS Key on the UE and the first AMF are consistent when the handover fails. Figure 2 and Figure 3 The following briefly introduces the situations in which the first AMF deduce Kamf and the first AMF does not deduce Kamf during the switching failure process, but the NAS security algorithms supported by the first AMF and the second AMF are inconsistent, and the AMF keys and NAS Keys on the UE and the first AMF are inconsistent.
[0115] Figure 2 This is a handover failure process diagram. It includes UE, the first AMF, the second AMF, the first (R)AN, the second (R)AN and S1-S11. The following is a detailed description Figure 2 The method flow is shown.
[0116] Before the handover, the AMF keys and NAS Keys on the UE and the first AMF are Kamf, Knasenc and Knasint, and DL NAS COUNT = X.
[0117] S1. The first (R)AN sends a handover request message to the first AMF.
[0118] The handover request message is used to indicate that an access network device handover is required. The handover request message may be referred to as handover required. It should be understood that the handover request message sent by the first (R)AN to the first AMF in this application is not improved, and the provisions of the handover request message in the existing protocol can be referred to.
[0119] S2: The first AMF performs key derivation.
[0120] Figure 2 In the handover failure process shown, after receiving the handover request message sent by the first (R)AN, the first AMF determines that the access network device needs to be switched. The first AMF performs key derivation on the local first AMF key Kamf to obtain the second AMF key Kamf'.
[0121] It should be understood that after the first AMF executes S2, the AMF key and NAS Key on the first AMF are Kamf', Knasenc and Knasint.
[0122] S3: The first AMF sends the security context of the UE to the second AMF.
[0123] The security context of the UE includes the above-mentioned Kamf', Knasenc and Knasint and DL NAS COUNT=X+1. Among them, the first AMF sending the security context of the UE to the second AMF may be that the first AMF initiates a UE context creation service request to the second AMF, and the UE context creation service request may be called create UE context request. It should be understood that in this application, no improvement is made to the security context of the UE sent by the first AMF to the second AMF, and the provisions of the existing protocol for the first AMF to send the security context of the UE to the second AMF can be referred to.
[0124] S4: The second AMF generates a new NAS security context.
[0125] The new NAS security context includes Kamf' received by the second AMF mentioned above, and the second AMF combines the second NAS security algorithm negotiated between the second AMF and the UE to generate the NAS Key (Knasenc2 and Knasint2) and DL NAS COUNT=0 between the second AMF and the UE, where Knasenc2 and Knasint2 are different from Knasenc and Knasint.
[0126] S5. The second AMF sends a switching request to the second (R)AN.
[0127] The handover request is used to obtain relevant information of the second (R)AN. The handover request can be called a handover request. It should be understood that the present application does not make any improvements to the second AMF sending a handover request to the second (R)AN, and the provisions of the existing protocol for the second AMF sending a handover request to the second (R)AN can be referred to.
[0128] S6. The second (R)AN sends a handover request response to the second AMF.
[0129] The handover request response is used to notify the second AMF of the relevant information of the second (R)AN. The handover request response can be called a handover request acknowledgement. It should be understood that the present application does not make any improvements to the handover request response sent by the second (R)AN to the second AMF, and the provisions of the existing protocol for the handover request response sent by the second (R)AN to the second AMF can be referred to.
[0130] S7, the second AMF sends a UE context creation service request response to the first AMF.
[0131] The UE context creation service request response is used to notify the first AMF of relevant information of the second (R)AN. Among them, the UE context creation service request response can be called create UE context response. It should be understood that in this application, no improvement is made to the second AMF sending the UE context creation service request response to the first AMF, and the provisions of the existing protocol for the second AMF sending the UE context creation service request response to the first AMF can be referred to.
[0132] S8. The first AMF sends a switching command message to the first (R)AN.
[0133] The handover command message is used to notify the first (R)AN and the second (R)AN of relevant information. The handover command message can be called a handover command. It should be understood that the present application does not make any improvements to the handover command message sent by the first AMF to the first (R)AN, and the provisions of the existing protocol for the handover command message sent by the first AMF to the first (R)AN can be referred to.
[0134] S9, the first (R)AN sends a handover command message to the UE.
[0135] The handover command message is used to notify the UE of relevant information of the second (R)AN. The handover command message can be called a handover command. It should be understood that the present application does not make any improvements to the handover command message sent by the first (R)AN to the UE, and the provisions of the existing protocol for the handover command message sent by the first (R)AN to the UE can be referred to.
[0136] S10: The UE generates a new NAS security context.
[0137] The new NAS security context includes the above-mentioned Kamf', and the UE generates the NAS Key (Knasenc2 and Knasint2) between the second AMF and the UE in combination with the second NAS security algorithm negotiated between the second AMF and the UE, and DL NAS COUNT=0.
[0138] After the UE executes S10, the AMF key and NAS Key on the UE are Kamf', Knasenc2 and Knasint2.
[0139] When the UE fails to switch due to some reasons (such as the second (R)AN signal deteriorates, or the UE fails to check the integrity of the received NASC), S11 occurs, and the UE needs to return to the first AMF for service. However, if the first AMF performs Kamf deduction during the switching phase, the NAS Key on the UE and the NASKey on the first AMF are inconsistent, resulting in the subsequent NAS messages between the UE and the first AMF being unable to be securely protected.
[0140] Figure 3 This is another handover failure process diagram. It includes UE, the first AMF, the second AMF, the first (R)AN, the second (R)AN and S20-S29. The following is a detailed description Figure 3 The method flow is shown.
[0141] Before the handover, the AMF keys and NAS Keys on the UE and the first AMF are Kamf, Knasenc and Knasint, and DL NAS COUNT = X.
[0142] S20. The first (R)AN sends a handover request message to the first AMF.
[0143] The handover request message is used to indicate that a handover is required. Figure 2 The switching request message sent by the first (R)AN to the first AMF shown in is similar and will not be repeated here.
[0144] S21, the first AMF sends the security context of the UE to the second AMF.
[0145] The security context of the UE includes the above-mentioned Kamf, Knasenc and Knasint and DL NAS COUNT=X+1.
[0146] S22: The second AMF determines a new NAS security context.
[0147] The new NAS security context includes the Kamf received by the second AMF mentioned above, and the second AMF combines the second NAS security algorithm negotiated between the second AMF and the UE to generate the NAS Key (Knasenc2 and Knasint2) and DL NAS COUNT=X+1 between the second AMF and the UE, where Knasenc2 and Knasint2 are different from Knasenc and Knasint.
[0148] S23, the second AMF sends a switching request to the second (R)AN.
[0149] The handover request is used to obtain relevant information of the second (R)AN.
[0150] S24, the second (R)AN sends a handover request response to the second AMF.
[0151] The handover request response is used to notify the second AMF of relevant information of the second (R)AN.
[0152] S25, the second AMF sends a UE context creation service request response to the first AMF.
[0153] The UE context creation service request response is used to notify the first AMF of relevant information of the second (R)AN.
[0154] S26. The first AMF sends a switching command message to the first (R)AN.
[0155] The handover command message is used to notify the first (R)AN and the second (R)AN of relevant information.
[0156] S27: The first (R)AN sends a handover command message to the UE.
[0157] The handover command message is used to notify the UE of relevant information of the second (R)AN.
[0158] S28, UE generates a new NAS security context.
[0159] The new NAS security context includes the above-mentioned Kamf, and the UE generates the NAS Key (Knasenc2 and Knasint2) between the second AMF and the UE in combination with the second NAS security algorithm negotiated between the second AMF and the UE, and DL NAS COUNT = X+1.
[0160] After the UE executes S28, the AMF key and NAS Key on the UE are Kamf, Knasenc2 and Knasint2.
[0161] When the UE fails to switch due to some reasons (such as the second (R)AN signal deterioration), S29 occurs, and the switching failure occurs. At this time, the UE needs to return to the first AMF for service. However, if during the switching phase, the second (R)AN selects a second NAS security algorithm that is different from the above-mentioned first NAS security algorithm, and the Knasenc2 and Knasint2 generated by the UE based on Kamf and the second NAS security algorithm are different from the above-mentioned Knasenc and Knasint, the NAS Key on the UE is inconsistent with the NAS Key on the first AMF, resulting in the inability to perform security protection on subsequent NAS messages between the UE and the first AMF.
[0162] To avoid Figure 2 and Figure 3 The NAS Key on the UE and the NAS Key on the first AMF that appear in the method flow shown are inconsistent. This application proposes a switching processing method, which ensures that the NAS security context used by the UE and the first AMF is consistent, so that the NAS Key on the UE and the NAS Key on the first AMF are consistent. Figure 4 and Figure 5 The switching processing method provided in the embodiment of the present application is introduced in detail.
[0163] Figure 4 This is a flow chart of a handover processing method provided by an embodiment of the present application. The diagram includes a UE, a first AMF, a second AMF, a first (R) AN, a second (R) AN, and S110-S140. Figure 4 The method flow is shown.
[0164] Before the handover, the NAS security context on the UE and the first AMF includes the above-mentioned Kamf (first AMF key Kamf1), Knasenc, Knasint (Knasenc and Knasint are collectively referred to as the first non-access layer NAS key), DL NASCOUNT=X (first non-access layer counter NAS COUNT) and the NAS security algorithm negotiated between the UE and the first AMF (first NAS security algorithm), etc. Figure 4In the illustrated embodiment, the NAS security context between the UE and the first AMF before the handover is referred to as the first NAS security context.
[0165] S110: The first AMF determines that key derivation needs to be performed and saves the first NAS security context.
[0166] In a possible implementation manner, the first AMF saves the first NAS security context before performing key derivation;
[0167] In another possible implementation, the first AMF saves the first NAS security context after performing key derivation;
[0168] In this application, there is no strict restriction on the order of the first AMF performing key derivation and the first AMF saving the first NAS security context. Specifically, before the first AMF executes S110, Figure 4 The illustrated embodiment also includes S111, the first (R)AN sends a handover request message to the first AMF. Figure 4 In the embodiment shown, the first (R)AN sends a handover request message to the first AMF. Figure 2 It is similar to S1 and will not be described here.
[0169] Specifically, Figure 4 In the embodiment shown, after the first AMF receives the handover request message, saving the first NAS security context includes the following two possibilities:
[0170] Possibility 1: The first AMF does not perform key derivation on the key Kamf included in the first NAS security context, then the first AMF determines to save the first NAS security context, and Figure 2 The process shown is the same.
[0171] Possibility 2: The first AMF determines, according to the local policy, that key derivation needs to be performed on the key Kamf included in the first NAS security context. Figure 4 The illustrated embodiment also includes S112, where the first AMF performs key derivation.
[0172] Specifically, after the first AMF saves the first NAS security context, the first AMF performs key derivation to derive the first key Kamf to obtain the second key Kamf'. It should be understood that the process of the first AMF performing key derivation in the embodiment of the present application is not limited, and it can be the process of the first AMF performing key derivation specified in the existing protocol. The first AMF performs key derivation to generate Kamf' after derivation, Figure 4 In the embodiment shown, this is referred to as the first key. Figure 4The illustrated embodiment mainly introduces the possibility 2 which is inconsistent with the existing process, and briefly describes the possibility 1 which is consistent with the existing process.
[0173] S113, the first AMF sends the security context of the UE to the second AMF.
[0174] Specifically, the first AMF sending the security context of the UE to the second AMF may be that the first AMF initiates a UE context creation service request to the second AMF. Corresponding to possibility one and possibility two in S110, the security context of the UE sent by the first AMF to the second AMF also includes the following two possibilities:
[0175] Possibility 1: The first AMF does not perform key derivation on the first key Kamf included in the first NAS security context. The security context of the UE sent by the first AMF to the second AMF includes Kamf, DL NAS COUNT=X+1, the NAS security algorithm negotiated between the UE and the first AMF, and the list of NAS security algorithms supported by the UE;
[0176] Possibility 2: The first AMF performs key derivation on the first key Kamf included in the first NAS security context, and the security context of the UE sent by the first AMF to the second AMF includes Kamf', DL NAS COUNT=X+1, the NAS security algorithm negotiated between the UE and the first AMF, the list of NAS security algorithms supported by the UE, and a key derivation indication, which is used to indicate that the key in the security context of the UE sent by the first AMF to the second AMF is obtained by key derivation by the first AMF. Among them, the key derivation indication can be called K_AMF_change_flag, and specifically, the value of K_AMF_change_flag is 1, indicating that the key in the security context of the UE sent by the first AMF to the second AMF is obtained by key derivation by the first AMF.
[0177] Figure 4 In the illustrated embodiment, after the second AMF receives the UE security context sent by the first AMF, S114 is executed, and the second AMF generates a third NAS security context. Corresponding to the possibility one and the possibility two in S113, the second AMF generates the third NAS security context also including the following two possibilities:
[0178] Possibility 1: The key included in the security context of the UE sent by the first AMF to the second AMF is Kamf.
[0179] The second AMF generates the integrity protection key and confidentiality protection key Knasint2 and Knasenc2 for NAS message protection based on the key Kamf in the security context of the UE sent by the first AMF and selects a NAS security algorithm from the list of NAS security algorithms supported by the UE. The second AMF generates a third NAS security context including Kamf, Knasint2, Knasenc2, DL NAS COUNT=X+1, and the NAS security algorithm negotiated between the UE and the second AMF.
[0180] In a possible implementation, a NAS security algorithm selected by the second AMF from the list of NAS security algorithms supported by the UE is the same as the NAS security algorithm negotiated between the UE and the first AMF. Then Knasint2 and Knasenc2 are the same as the above-mentioned Knasint and Knasenc. In this implementation, the AMF key and NSA Key on the UE and the first AMF will not be inconsistent when the switching fails.
[0181] In another possible implementation, a NAS security algorithm selected by the second AMF from the list of NAS security algorithms supported by the UE is different from the NAS security algorithm negotiated between the UE and the first AMF, then Knasint2 and Knasenc2 are different from the above-mentioned Knasint and Knasenc. In this implementation, Figure 3 In the situation shown in , the NSA Key on the UE and the first AMF are inconsistent.
[0182] Possibility 2: The key included in the security context of the UE sent by the first AMF to the second AMF is Kamf'.
[0183] The second AMF generates the integrity protection key and confidentiality protection key Knasint2 and Knasenc2 for NAS message protection based on the key Kamf' received in the security context of the UE sent by the first AMF and selects a NAS security algorithm from the list of NAS security algorithms supported by the UE. The second AMF generates a third NAS security context including Kamf', Knasint2, Knasenc2, DL NAS COUNT = X + 1 or DL NAS COUNT = 0, the NAS security algorithm negotiated between the UE and the second AMF, and the above-mentioned key derivation indication.
[0184] In a possible implementation, a NAS security algorithm selected by the second AMF from the list of NAS security algorithms supported by the UE is the same as the NAS security algorithm negotiated between the UE and the first AMF. Due to the inconsistency of the keys, Knasint2 and Knasenc2 are still different from the above-mentioned Knasint and Knasenc. In this implementation, Figure 2 In the situation shown in , the AMF key and NSA Key on the UE and the first AMF are inconsistent.
[0185] Another possible implementation method is that a NAS security algorithm selected by the second AMF from the list of NAS security algorithms supported by the UE is different from the NAS security algorithm negotiated between the UE and the first AMF. Since the key and the NAS security algorithm are inconsistent, Knasint2 and Knasenc2 are different from the above-mentioned Knasint and Knasenc. In this implementation method, Figure 2 In the situation shown in , the AMF key and NSA Key on the UE and the first AMF are inconsistent.
[0186] Further, after the second AMF generates the third NAS security context, it determines the non-access stratum container NASC (non-access stratum container, NASC) based on the third NAS security context, that is, Figure 4 The illustrated embodiment further includes S115, the second AMF determines NASC. Corresponding to the possibility 1 and the possibility 2 in S114, the second AMF determines NASC also including the following two possibilities:
[0187] Possibility 1: The third NAS security context includes Kamf', Knasint2, Knasenc2, DL NAS COUNT=X+1, and the NAS security algorithm negotiated between the UE and the second AMF. Then NASC includes COUNT=X+1 and the NAS security algorithm negotiated between the UE and the second AMF.
[0188] Possibility 2: The third NAS security context includes Kamf', Knasint2, Knasenc2, DL NAS COUNT=X+1 or DL NAS COUNT=0, the NAS security algorithm negotiated between the UE and the second AMF, and the above-mentioned key derivation indication. Then NASC includes DL NAS COUNT=X+1 or DL NAS COUNT=0, the NAS security algorithm negotiated between the UE and the second AMF, and the above-mentioned key derivation indication.
[0189] It should be understood that the second AMF needs to send the above-mentioned NASC to the UE, and specifically, sending it to the UE needs to be forwarded via the second (R) AN, the first AMF, and the first (R) AN. In the embodiment of the present application, there is no restriction on how the above-mentioned NASC is sent to the UE, and the provisions in the existing protocol can be referred to. For example, Figure 4 The illustrated embodiment also includes:
[0190] S116: The second AMF sends a switching request to the second (R)AN.
[0191] The handover request is used to obtain relevant information of the second (R)AN.
[0192] S117, the second (R)AN sends a handover request response to the second AMF.
[0193] The handover request response is used to notify the second AMF of relevant information of the second (R)AN.
[0194] S118, the second AMF sends a UE context creation service request response to the first AMF.
[0195] The UE context creation service request response carries the above NASC.
[0196] S119, the first AMF sends a switching command message to the first (R)AN.
[0197] The handover command message carries the above-mentioned NASC.
[0198] S1191. The first (R)AN sends a handover command message to the UE.
[0199] The handover command message carries the above-mentioned NASC.
[0200] Optionally, Figure 4 The illustrated embodiment also includes S120, where the first AMF resumes using the first NAS security context.
[0201] In a possible implementation, after the first AMF receives the handover request message shown in S110, corresponding to the possibility 2 in S110, the first AMF performs key derivation, and at any time after the first AMF sends the horizontally deduced Kamf' to the second AMF for the context of the UE, the first AMF deletes the second Kamf' and resumes using the first NAS security context;
[0202] Another possible implementation method is that after the first AMF executes the above S110 to save the first NAS security context, and performs key derivation to generate a fourth NAS security context, the first AMF sets an identification bit to distinguish the first NAS security context from the fourth NAS security context, that is, the first AMF can restore the use of the first NAS security context before or at the same time as sending the context of the UE to the second AMF.
[0203] S130: The UE saves the first NAS security context.
[0204] After the UE receives the switching command message sent by the first (R)AN and obtains the NASC, the UE performs integrity verification on the NASC. After the integrity verification of the NASC is passed, if the NAS security algorithm negotiated between the UE and the second AMF in the NASC is inconsistent with the NAS security algorithm negotiated between the UE and the first AMF, and / or, the NASC carries K_AMF_change_flag=1, the UE saves the first NAS security context, and K_AMF_change_flag can be called an AMF key change indication or a key derivation indication.
[0205] After saving the first NAS security context, the UE updates the first NAS security context based on the information in the NASC to obtain a third NAS security context, and executes S131.
[0206] S140: The UE resumes using the first NAS security context.
[0207] When the UE finds that the handover fails, the UE restores the first NAS security context saved in S130.
[0208] Optionally, the UE deletes the third NAS security context.
[0209] As another possible implementation, the UE does not execute the above S130, S131 and S140, but executes S132 and continues to use the first NAS security context.
[0210] After the UE receives the handover command message sent by the first (R)AN and obtains the NASC, the UE performs integrity verification on the NASC. After the integrity verification of the NASC fails, the UE continues to use the currently used first NAS security context.
[0211] The NAS security context involved in the embodiment of the present application mainly includes: key identifier ngKSI, AMF key, NASKey, DL NAS count, UL NAS count and NAS security algorithm, etc. Among them, the key identifier is used to indicate the AMF key, and the DL NAS count and UL NAS count are downlink and uplink NAS counters respectively. The content included in the NAS security context described above is only a simple description and cannot be used to limit the protection scope of this application.
[0212] In summary, Figure 4 In the illustrated embodiment, in the event of a handover failure, both the UE and the first AMF fall back to using the first NAS security context for NAS security protection, thereby achieving the purpose of consistency between the AMF key and the NAS key used by the UE and the first AMF.
[0213] Figure 5 This is a flow chart of another switching processing method provided by an embodiment of the present application. The diagram includes a UE, a first AMF, a second AMF, a first (R) AN, a second (R) AN, and S210-S240. Figure 5 The method flow is shown.
[0214] Before the handover, the NAS security context between the UE and the first AMF includes the above-mentioned Kamf, Knasenc, Knasint, DL NAS COUNT=X, and the NAS security algorithm negotiated between the UE and the first AMF. Figure 4 In the illustrated embodiment, the NAS security context between the UE and the first AMF before the handover is referred to as the first NAS security context.
[0215] S211, the first (R)AN sends a handover request message to the first AMF.
[0216] Figure 5 In the embodiment shown, the first (R)AN sends a handover request message to the first AMF. Figure 2 It is similar to S1 and will not be described here.
[0217] S212, the first AMF sends the security context of the UE to the second AMF.
[0218] Specifically, the first AMF sending the UE's security context to the second AMF may be the first AMF initiating a UE context creation service request to the second AMF. There are two possibilities:
[0219] Possibility 1: The first AMF does not perform key derivation on the key Kamf included in the first NAS security context. The UE security context sent by the first AMF to the second AMF includes Kamf, DL NAS COUNT=X+1, the NAS security algorithm negotiated between the UE and the first AMF, and the list of NAS security algorithms supported by the UE;
[0220] Possibility 2: The first AMF performs key derivation on the key Kamf included in the first NAS security context, and the security context of the UE sent by the first AMF to the second AMF includes Kamf', DL NAS COUNT = X + 1, the NAS security algorithm negotiated between the UE and the first AMF, the list of NAS security algorithms supported by the UE, and a key derivation indication, which is used to indicate that the key in the security context of the UE sent by the first AMF to the second AMF is obtained by key derivation by the first AMF. Among them, the key derivation indication can be called K_AMF_change_flag, and specifically, the value of K_AMF_change_flag is 1, indicating that the key in the security context of the UE sent by the first AMF to the second AMF is obtained by key derivation by the first AMF.
[0221] Figure 5 In the illustrated embodiment, after the second AMF receives the UE security context sent by the first AMF, S213 is executed, and the second AMF generates a third NAS security context. Specifically, Figure 5 In the embodiment shown, the second AMF generates a third NAS security context Figure 4 In the embodiment shown, the second AMF generates the third NAS security context in a similar manner and will not be repeated here.
[0222] Further, after the second AMF generates the third NAS security context, it determines the NASC based on the new NAS security context, that is, Figure 5 The illustrated embodiment further includes S214, the second AMF determines NASC. Specifically, Figure 5 In the embodiment shown, the second AMF determines the NASC and Figure 4 In the illustrated embodiment, the second AMF determines NASC in a similar manner and will not be described in detail here.
[0223] It should be understood that the second AMF needs to send the above-mentioned NASC to the UE, and specifically, sending it to the UE needs to be forwarded via the second (R) AN, the first AMF, and the first (R) AN. In the embodiment of the present application, there is no restriction on how the above-mentioned NASC is sent to the UE, and the provisions in the existing protocol can be referred to. Figure 4 In the embodiment shown, the second AMF sends the above-mentioned NASC to the UE in a similar manner, which will not be repeated here.
[0224] S210: The UE saves the first NAS security context.
[0225] After the UE receives the handover command message sent by the first (R)AN and obtains the NASC, the UE first saves the first NAS security context, and then updates the first NAS security context based on the information in the NASC to obtain a third NAS security context, and executes S211.
[0226] S220: The UE generates a second NAS security context.
[0227] When the UE finds that the handover fails, the UE generates the third NAS security context in the following ways:
[0228] Possibility 1: The NAS security algorithm negotiated between the UE and the second AMF in the NASC is inconsistent with the NAS security algorithm negotiated between the UE and the first AMF, and the NASC carries K_AMF_change_flag = 1. The NASC carries K_AMF_change_flag = 1, which means that the UE needs to perform key derivation to obtain Kamf'.
[0229] The UE performs key derivation on Kamf to obtain Kamf'. Further, the UE generates a second NAS security context based on the second key Kamf' and the NAS security algorithm between the UE and the first AMF in the saved first NAS security context. Then, the first NAS security context and the third NAS security context generated in S211 are deleted, and the second NAS security context is used to perform NAS protection with the first AMF.
[0230] Possibility 2: The NAS security algorithm negotiated between the UE and the second AMF in the NASC is inconsistent with the NAS security algorithm negotiated between the UE and the first AMF.
[0231] The UE uses the first NAS security context to perform NAS protection with the first AMF. Figure 4 The embodiments shown are similar.
[0232] Possibility three: NASC carries K_AMF_change_flag=1.
[0233] The UE performs key derivation on Kamf to obtain Kamf'. Further, the UE generates a second NAS security context based on the second key Kamf' and the NAS security algorithm between the UE and the first AMF in the saved first NAS security context. Then, the first NAS security context and the third NAS security context generated in S211 are deleted, and the second NAS security context is used to perform NAS protection with the first AMF.
[0234] Further, after the UE finds that the handover fails, it needs to notify the first AMF to cancel the handover via the first (R)AN. Figure 5 The method flow shown also includes S221, where the first (R)AN sends a switching cancellation request to the first AMF.
[0235] S230: The first AMF generates a second NAS security context.
[0236] After receiving the handover cancellation request, the first AMF side generates a second NAS security context, including the following two possibilities:
[0237] Possibility 1: The first AMF performs key derivation on Kamf before S212 and obtains the second key Kamf'. Then, after receiving the handover cancellation request, the first AMF generates a second NAS security context based on Kamf' and the NAS security algorithm between the UE and the first AMF in the first NAS security context. Then, the second NAS security context is used to perform NAS security protection with the UE. Figure 5 The illustrated embodiment mainly considers possibility one, that the first AMF generates a second NAS security context.
[0238] Possibility 2: The first AMF did not perform key derivation on Kamf before S212. Then, after receiving the handover cancellation request, the first AMF uses the first NAS security context to perform NAS protection with the first AMF. Figure 4 The embodiments shown are similar.
[0239] In summary, Figure 5 In the illustrated embodiment, in the event of a handover failure, both the UE and the first AMF use the second NAS security context for NAS security protection, thereby achieving the purpose of consistent NAS keys used by the UE and the first AMF.
[0240] It should be understood that in the above-mentioned method embodiments, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0241] It should also be understood that the "first" and "second" in this application are only used for distinguishing explanations and should not constitute any limitation to this application. Among them, the first NAS security context and the second NAS security context are only used to distinguish different NAS security contexts.
[0242] Combined with the above Figure 4 and Figure 5 The handover processing method provided in the embodiment of the present application is described in detail. Figure 6-Figure 9 The switching processing device provided in the embodiment of the present application is introduced in detail.
[0243] See also Figure 6 , Figure 6 is a schematic diagram of the switching processing device 10 proposed in this application. Figure 6 As shown, the device 10 includes a receiving unit 110 and a processing unit 120 .
[0244] The receiving unit 110 is configured to receive a handover command message sent by the first access network device, where the handover command message carries a second NAS security algorithm and an AMF key change indication selected by the second access management function AMF;
[0245] The processing unit 120 is configured to, when the second NAS security algorithm is inconsistent with a first NAS security algorithm currently used by the UE and / or the AMF key change indication is 1, the UE saving a first non-access stratum NAS security context, where the first NAS security context is a NAS security context generated by negotiation between the UE and the first AMF;
[0246] The processing unit 120 is further configured to use the first NAS security context to perform non-access layer NAS protection with the first AMF when the switching fails.
[0247] The apparatus 10 completely corresponds to the user equipment in the method embodiment. The apparatus 10 may be the user equipment in the method embodiment, or a chip or functional module inside the user equipment in the method embodiment. The corresponding unit of the apparatus 10 is used to execute Figure 4 and Figure 5 The corresponding steps in the method embodiment shown are performed by the user equipment.
[0248] The receiving unit 110 in the device 10 executes the step of receiving by the user equipment in the method embodiment. Figure 4 Step 1191 of receiving a handover command message sent by the first (R)AN, executing Figure 5 In step 219 of receiving a handover command message sent by the first (R)AN.
[0249] The processing unit 120 executes the steps implemented or processed in the user equipment in the method embodiment. For example, Figure 4 Step 130 of saving the first NAS security context, executing Figure 4 Step 131 of generating the third NAS security context, executing Figure 4 or executing step 140 of resuming use of the first NAS security context; Figure 4 Step 132 of continuing to use the first NAS security context, executing Figure 5 Step 210 of saving the first NAS security context, executing Figure 5Step 211 of generating a third NAS security context, executing Figure 5 Step 220 of generating a second NAS security context.
[0250] The switching processing device shown in the device 10 may also include a sending unit ( Figure 6 The sending unit is used to execute the function of sending messages to other devices, and the receiving unit 110 and the sending unit can form a transceiver unit, which has the functions of receiving and sending. Among them, the processing unit 120 can be a processor. The sending unit can be a receiver. The receiving unit 110 can be a transmitter. The receiver and the transmitter can be integrated together to form a transceiver.
[0251] See also Figure 7 , Figure 7 2 is a schematic diagram of the structure of a user device 20 applicable to an embodiment of the present application. The user device 20 can be applied to Figure 1 In the system shown. For ease of explanation, Figure 7 Only the main components of the user equipment are shown. Figure 7 As shown, the user equipment 20 includes a processor, a memory, a control circuit, an antenna, and an input-output device. The processor is used to control the antenna and the input-output device to send and receive signals, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the corresponding process and / or operation performed by the user equipment in the handover processing method proposed in the present application. No further description is given here.
[0252] Those skilled in the art will appreciate that for ease of description, Figure 7 Only one memory and processor are shown. In an actual user device, there may be multiple processors and memories. The memory may also be referred to as a storage medium or a storage device, etc., which is not limited in the embodiments of the present application.
[0253] See also Figure 8 , Figure 8 is a schematic diagram of the switching processing device 30 proposed in this application. Figure 8 As shown, the device 30 includes a receiving unit 310 , a processing unit 320 and a sending unit 330 .
[0254] The receiving unit 310 is configured to receive a handover request message sent by the first access network device;
[0255] A processing unit 320, configured to determine that key derivation needs to be performed according to a local policy;
[0256] The processing unit 320 is further configured to save a first non-access layer NAS security context, where the first NAS security context is a NAS security context generated by negotiation between the first AMF and the user equipment UE;
[0257] A sending unit 330 is configured to send a security context of a user equipment UE to a second AMF;
[0258] The processing unit 320 is further configured to resume using the first NAS security context.
[0259] The device 30 completely corresponds to the first AMF in the method embodiment. The device 30 may be the first AMF in the method embodiment, or a chip or functional module inside the first AMF in the method embodiment. The corresponding unit of the device 30 is used to execute Figure 4 and Figure 5 The corresponding steps in the method embodiment shown are performed by the first AMF.
[0260] The receiving unit 310 in the device 30 performs the step of receiving the first AMF in the method embodiment. For example, Figure 4 Step 111 of receiving a handover request message sent by the first (R)AN, executing Figure 4 Step 118 of receiving a UE context creation service request response from the second AMF, executing Figure 5 Step 211 of receiving a handover request message sent by the first (R)AN, and step 217 of executing step 5 of receiving a UE context creation service request response sent by the second AMF.
[0261] The processing unit 320 executes the steps implemented or processed within the first AMF in the method embodiment. For example, Figure 4 Step 110 of saving the first NAS security context, executing Figure 4 Step 112 of key derivation, execution Figure 4 Step 120 of resuming use of the first NAS security context, executing Figure 5 Step 230 of generating a second NAS security context.
[0262] The sending unit 330 executes the step of sending the first AMF in the method embodiment. For example, Figure 4 Step 113 of sending the security context of the UE to the second AMF, executing Figure 4 Step 119 of sending a handover command message to the first (R)AN, executing Figure 5 Step 212 of sending the security context of the UE to the second AMF, executing Figure 5 Step 218 of sending a handover command message to the first (R)AN.
[0263] The receiving unit 310 and the sending unit 330 may form a transceiver unit, which has both receiving and sending functions. Among them, the processing unit 320 may be a processor. The sending unit 330 may be a receiver. The receiving unit 310 may be a transmitter. The receiver and the transmitter may be integrated together to form a transceiver.
[0264] like Fig. 9 As shown, the embodiment of the present application further provides a first AMF 40, the first AMF 40 includes a processor 410, a memory 420 and a transceiver 430, wherein the memory 420 stores instructions or programs, and the processor 430 is used to execute the instructions or programs stored in the memory 420. When the instructions or programs stored in the memory 420 are executed, the transceiver 430 is used to execute Figure 8 The operations performed by the receiving unit 310 and the sending unit 330 in the device 30 are shown.
[0265] An embodiment of the present application further provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the above-mentioned Figure 4 and Figure 5 The various steps performed by the first AMF in the method shown.
[0266] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned Figure 4 and Figure 5 The method shown includes steps performed by a user equipment.
[0267] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute Figure 4 and Figure 5 The various steps performed by the first AMF in the method shown.
[0268] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute Figure 4 and Figure 5 The method shown includes steps performed by a user equipment.
[0269] An embodiment of the present application also provides a chip, including a processor. The processor is used to read and run a computer program stored in a memory to execute the corresponding operations and / or processes performed by a user device in the switching processing method provided in the present application. Optionally, the chip also includes a memory, which is connected to the processor through a circuit or wire, and the processor is used to read and execute the computer program in the memory. Further optionally, the chip also includes a communication interface, and the processor is connected to the communication interface. The communication interface is used to receive data and / or information to be processed, and the processor obtains the data and / or information from the communication interface and processes the data and / or information. The communication interface can be an input and output interface.
[0270] The present application also provides a chip, including a processor. The processor is used to call and run a computer program stored in a memory to execute the corresponding operations and / or processes performed by the first AMF in the switching processing method provided in the present application. Optionally, the chip also includes a memory, which is connected to the processor through a circuit or wire, and the processor is used to read and execute the computer program in the memory. Further optionally, the chip also includes a communication interface, and the processor is connected to the communication interface. The communication interface is used to receive data and / or information to be processed, and the processor obtains the data and / or information from the communication interface and processes the data and / or information. The communication interface can be an input and output interface.
[0271] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0272] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0273] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0274] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0275] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0276] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0277] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for processing a handover, characterized in that: The method is applied to a scenario in which a user equipment UE switches from a first access management function AMF to a second AMF, including: The user equipment UE receives a handover command message sent by the first access network device, where the handover command message carries a non-access layer container NASC, and the NASC is determined by the second AMF according to the third NAS security context; When the NASC includes an AMF key change indication and the value of the AMF key change indication is 1, the UE obtains the third NAS security context based on the first non-access stratum NAS security context, where the first NAS security context is a NAS security context generated by negotiation between the UE and the first AMF, and the third NAS security context is a NAS security context generated by negotiation between the UE and the second AMF; The UE performs integrity check on the NASC; When the UE fails to perform integrity check on the NASC, the UE continues to use the first NAS security context to perform NAS protection with the first AMF.
2. The method according to claim 1, characterized in that The first NAS security context includes a first NAS security algorithm, a first AMF key Kamf1, a first non-access layer NAS key and a first non-access layer counter NAS COUNT.
3. The method according to claim 1, characterized in that: The method further comprises: When the NASC includes an AMF key change indication and a value of the AMF key change indication is 1, the UE saves the first NAS security context.
4. The method according to claim 1, characterized in that: The method further comprises: When the UE fails to check the integrity of the NASC, the UE sends a switching cancellation request to the first AMF via the first access network device.
5. A switching processing device, characterized in that: The scenario applied to the user equipment UE switching from the first access management function AMF to the second AMF includes: A receiving unit, configured to receive a handover command message sent by a first access network device, where the handover command message carries a non-access layer container NASC, and the NASC is determined by the second AMF according to a third NAS security context; a processing unit, configured to, when the NASC includes an AMF key change indication and the value of the AMF key change indication is 1, obtain the third NAS security context based on a first non-access stratum NAS security context, where the first NAS security context is a NAS security context generated by negotiation between the UE and the first AMF, and the third NAS security context is a NAS security context generated by negotiation between the UE and the second AMF; The processing unit is further used to perform integrity check on the NASC; When the processing unit fails to perform integrity check on the NASC, the processing unit continues to use the first NAS security context to perform NAS protection with the first AMF.
6. The device according to claim 5, characterized in that The first NAS security context includes a first NAS security algorithm, a first AMF key Kamf1, a first non-access layer NAS key and a first non-access layer counter NAS COUNT.
7. The device according to claim 5, characterized in that The processing unit is further configured to, when the NASC includes an AMF key change indication and a value of the AMF key change indication is 1, cause the UE to save the first NAS security context.
8. The device according to claim 5, characterized in that The device also includes: a sending unit, and the sending unit is used to send a switching cancellation request to the first AMF via the first access network device when the UE fails to check the integrity of the NASC.
9. A communication device, characterized in that: include: A memory, the memory being used to store a computer program; A transceiver, the transceiver is used to perform the transceiver step; A processor, wherein the processor is configured to call and run the computer program from the memory, so that the communication device executes the method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: include: The computer-readable medium stores a computer program; when the computer program is executed on a computer, the computer executes the method according to any one of claims 1 to 4.
11. A communication system, characterized in that: include: A switching processing device as claimed in any one of claims 5 to 8.
