Communication method and apparatus

By using the key transfer and generation mechanism in the dual 3GPP access scenario, security and performance problems in the dual 3GPP access scenario are solved, and a more efficient security protection and authentication process is achieved.

WO2025066797A1PCT designated stage expired Publication Date: 2025-04-03HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/116299
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-26
Filing Date
2024-09-02
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

In dual 3GPP access scenarios, the prior art is difficult to effectively ensure security, especially when the terminal device needs to perform primary authentication based on two different identity credentials, resulting in redundant authentication process and poor performance.

Method used

By passing the key between the first mobility management network element and the second mobility management network element to generate and use the second mobility management network element key, the messages transmitted on the second non-access layer connection are securely protected, thereby reducing unnecessary authentication processes.

Benefits of technology

Improves security in dual 3GPP scenarios, avoids unnecessary authentication processes, and improves network performance, so that terminal devices only need to perform master authentication during the first access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024116299_03042025_PF_FP_ABST
    Figure CN2024116299_03042025_PF_FP_ABST
Patent Text Reader

Abstract

A communication method and apparatus, used for avoiding unnecessary authentication processes in a dual 3GPP access type scenario. The method comprises: a terminal device sends a registration request to a second AMF, wherein the registration request comprises instruction information, and the instruction information is used for instructing dual 3GPP access. The second AMF sends a first message to a first AMF, the first message comprising the registration request. A 3GPP access type-based first NAS connection exists between the terminal device and the first AMF. The first AMF, according to a first AMF key corresponding to the first NAS connection, generates a second AMF key corresponding to a second NAS connection. The second NAS connection is a 3GPP access type-based connection between the terminal device and the second AMF. The first AMF sends a second message to the second AMF, the second message comprising the second AMF key.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method and device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on September 26, 2023, with application number 202311268332.3 and application name “A Communication Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The embodiments of the present application relate to the field of wireless communications, and in particular to a communication method and apparatus. Background Art

[0004] In the 3rd generation partnership project (3GPP), a terminal device can access two different public land mobile networks (PLMN) based on a 3GPP access type and a non-3GPP access type, and maintain two different security contexts for the service networks of the two PLMNs. Specifically, the security context corresponding to the 3GPP access type is established after the terminal device performs primary authentication in the home public land mobile network (HPLMN) based on the identity credential 1 of the 3GPP access type, and the security context corresponding to the non-3GPP access type is established after the terminal device performs primary authentication in the HPLMN based on the identity credential 2 of the non-3GPP access type. That is, in a multi-registration scenario including 3GPP access type and non-3GPP access type, the terminal device needs to perform two primary authentications in the HPLMN based on two different identity credentials.

[0005] Currently, 3GPP has further introduced dual 3GPP access scenarios, which allow terminal devices to access two PLMNs based on their 3GPP access type. Ensuring the security of dual 3GPP access scenarios is a pressing technical issue.

[0006] Summary of the Invention

[0007] The present application provides a communication method and apparatus for avoiding unnecessary authentication processes in a dual 3GPP access type scenario.

[0008] In a first aspect, the present application provides a communication method that can be performed by a first mobility management network element. The first mobility management network element can be a network element in a hardware device, a software function running on dedicated hardware, or a virtualized function instantiated on a platform (e.g., a cloud platform). Optionally, the first mobility management network element can be implemented by a single device, by multiple devices, or as a functional module within a single device.

[0009] Communication methods include:

[0010] A first mobility management network element receives a first message from a second mobility management network element. The first message includes a registration request from a terminal device. The registration request includes indication information, and the indication information is used to indicate dual 3GPP access. A first non-access stratum connection based on a 3GPP access type exists between the terminal device and the first mobility management network element. The first mobility management network element generates a second mobility management network element key based on the first mobility management network element key. The first mobility management network element sends a second message to the second mobility management network element. The second message includes the second mobility management network element key. The first mobility management network element key is used to derive a first security protection key, which is used to securely protect messages transmitted on the first non-access stratum connection. The second mobility management network element key is used to derive a second security protection key, which is used to securely protect messages transmitted on the second non-access stratum connection. The second non-access stratum connection is a connection based on a 3GPP access type between the terminal device and the second mobility management network element. The second message may be a response message to the first message.

[0011] In the above technical solution, when the first mobility management network element determines that the registration request indicates dual 3GPP access, that is, when it determines that the terminal device requests to establish a second non-access stratum connection with the second mobility management network element based on the 3GPP access type, the first mobility management network element generates a second mobility management network element key based on the first mobility management network element key, and sends the second mobility management network element key to the second mobility management network element to achieve security protection of messages transmitted on the second non-access stratum connection, thereby improving security in the dual 3GPP scenario. That is, after receiving the second mobility management network element key, the second mobility management network element generates a second security protection key based on the second mobility management network element key, and performs security protection on messages transmitted on the second non-access stratum connection based on the second security protection key to improve security.

[0012] In addition, if the registration request indicates dual 3GPP access, the second mobility management network element may send the registration request to the first mobility management network element to obtain the second mobility management network element key after receiving the registration request from the terminal device, and may no longer instruct the terminal device to perform a second primary authentication in the HPLMN based on the identity credentials of the 3GPP access type. In this way, the terminal device only needs to perform a primary authentication in the HPLMN based on the identity credentials of the 3GPP access type when accessing the PLMN for the first time based on the 3GPP access type, and does not need to perform a primary authentication in the HPLMN based on the identity credentials of the 3GPP access type when accessing the second PLMN for the second time based on the 3GPP access type, and generates a second mobility management network element key after the primary authentication, which helps to avoid unnecessary processes and improve network performance.

[0013] In one possible implementation, the first message also includes a message authentication code. Before the first mobility management network element sends the second message to the second mobility management network element, that is, after receiving the first message, the first mobility management network element may further successfully verify the registration request in the first message based on the first security protection key and the message authentication code in the first message.

[0014] In the above technical solution, the first mobility management network element verifies the registration request in the first message using the first security protection key. If the verification is successful, the first mobility management network element can determine that the terminal device is legitimate. This eliminates the need for the terminal device to perform a second primary authentication with the HPLMN based on the 3GPP access type identity credentials, helping to avoid unnecessary procedures and improve network performance.

[0015] In one possible implementation, after the first mobility management network element generates the second mobility management network element key based on the first mobility management network element key, the first security context of the first non-access layer connection is retained (i.e., not deleted), where the first security context includes the first mobility management network element key and the first security protection key.

[0016] In the above technical solution, the first mobility management network element determines, based on the indication information, that the network supports the simultaneous existence of the first non-access stratum connection and the second non-access stratum connection. Therefore, after generating the second mobility management network element key, the first security context is still retained. In this way, the first mobility management network element can continue to perform security protection on messages transmitted on the first non-access stratum connection based on the first security context.

[0017] In one possible implementation, the first mobility management network element further generates a second key set identifier based on the first key set identifier, where the first key set identifier is used to identify a first security context of the first non-access stratum connection, and the second key set identifier is used to identify a second security context of the second non-access stratum connection, where the second security context includes a second mobility management network element key and a second security protection key. Subsequently, the first mobility management network element may further send the second key set identifier to the second mobility management network element via a second message.

[0018] In the above technical solution, the first mobility management network element generates a second key set identifier based on the first key set identifier, and sends the second key set identifier to the second mobility management network element. In this way, the second mobility management network element can perform security protection on the message transmitted on the second non-access layer connection based on the second security context associated with the second key set identifier, thereby improving the security in the dual 3GPP scenario. Furthermore, when the terminal device does not need to index the first security context based on the first key set identifier from the second mobility management network element (such as when only one set of security context (i.e., the first security context) is maintained in the terminal device), the first mobility management network element does not need to send the first key set identifier to the second mobility management network element, which helps to reduce the length of the transmitted message.

[0019] In one possible implementation, the second message also includes the first key set identifier, that is, the first mobility management network element may further send the first key set identifier to the second mobility management network element via the second message. The first key set identifier may be used by the second mobility management network element to generate a second key set identifier based on the first key set identifier, and then associate the second key set identifier with the second security context.

[0020] In the above technical solution, the second mobility management network element generates the second key set identifier by itself, which can prevent the first mobility management network element from obtaining other security information about the second non-access layer connection other than the second mobility management network element key, thereby preventing the first mobility management network element from obtaining the second security context of the second non-access layer connection, which helps to achieve security isolation.

[0021] In one possible implementation, the value of the type field included in the second key set identifier is the same as the value of the type field included in the first key set identifier, and the value of the value field included in the second key set identifier is different from the value field included in the first key set identifier.

[0022] In one possible implementation, the first message is a context transfer request (such as a Namf_Communication_UEContextTransfer message), and the second message is a context transfer response (such as a Namf_Communication_UEContextTransfer response message); or, the first message is an N1 message notification (such as a Namf_Communication_N1MessageNotify message), and the second message is a create context response (such as a Namf_Communication_CreateUEContext message); or, the first message is a dual 3GPP access security context transfer request (such as a Namf_Dual3GPPaccessSecurityContextTransfer message), and the second message is a dual 3GPP access security context transfer response (such as a Namf_Dual3GPPaccessSecurityContextTransfer response message).

[0023] In a possible implementation, when the first mobility management network element generates the second mobility management network element key based on the first mobility management network element key, specifically, the first mobility management network element generates the second mobility management network element key based on the first mobility management network element key and first information; wherein the first information includes one or more of the following: an identifier of a key generation function; a count value of message transmissions on the first non-access stratum connection; a direction of message transmissions on the first non-access stratum connection; an identifier of a 3GPP access type; an identifier of a public land mobile network to which the first mobility management network element belongs; an identifier of a public land mobile network to which the second mobility management network element belongs. In one example, the direction of message transmission on the first non-access stratum connection is downlink, and the count value of message transmissions on the first non-access stratum connection is equal to the number of times the first mobility management network element sends downlink messages to the terminal device on the first non-access stratum connection based on the first security protection key. In another example, the direction of message transmission on the first non-access layer connection is uplink, and the count value of message transmission on the first non-access layer connection is equal to the number of times the first mobility management network element receives uplink messages from the terminal device on the first non-access layer connection based on the first security protection key.

[0024] In the above technical solution, specific input parameters are provided when the first mobility management network element generates the second mobility management network element key based on the first mobility management network element key. These specific input parameters are the same input parameters maintained by the first mobility management network element and the terminal device respectively. In this way, the first mobility management network element and the terminal device can each generate the same second mobility management network element key based on these input parameters.

[0025] On the second aspect, the present application provides a communication method, which can be executed by a terminal device or a module (such as a chip) in the terminal device. For the convenience of description below, the execution of the terminal device is used as an example.

[0026] The communication method includes: a terminal device sends a registration request to a second mobility management network element, the registration request includes indication information, the indication information is used to indicate dual 3GPP access, and a first non-access layer connection based on a 3GPP access type exists between the terminal device and the first mobility management network element. The terminal device generates a second mobility management network element key based on the first mobility management network element key, wherein the first mobility management network element key is used to derive a first security protection key, and the first security protection key is used to securely protect messages transmitted on the first non-access layer connection, and the second mobility management network element key is used to derive a second security protection key, and the second security protection key is used to securely protect messages transmitted on the second non-access layer connection, and the second non-access layer connection is a connection based on a 3GPP access type between the terminal device and the second mobility management network element. Optionally, the terminal device also receives a registration response from the second mobility management network element, and the registration response is a response corresponding to the registration request, and the registration response is, for example, a registration accept message.

[0027] In the above technical solution, when the terminal device establishes a second non-access layer connection with the second mobility management network element based on the 3GPP access type request, the terminal device sends a registration request to the second mobility management network element, and the registration request indicates dual 3GPP access. Accordingly, the second mobility management network element requests the second mobility management network element key from the first mobility management network element. The terminal device also generates a second mobility management network element key based on the first mobility management network element key. In this way, security protection of messages transmitted on the second non-access layer connection is achieved, thereby improving the security in the dual 3GPP scenario. That is, the terminal device generates a second security protection key based on the second mobility management network element key, and performs security protection on messages transmitted on the second non-access layer connection based on the second security protection key to improve security.

[0028] In addition, if the registration request indicates dual 3GPP access, the second mobility management element may send the registration request to the first mobility management element to obtain the second mobility management element key from the first mobility management element. The terminal device generates the second mobility management element key based on the first mobility management element key. This allows the terminal device to perform primary authentication in the HPLMN based on the 3GPP access type identity credentials only when accessing the PLMN for the first time based on the 3GPP access type, helping to avoid unnecessary procedures and improve network performance.

[0029] In one possible implementation, when the terminal device sends the registration request to the second mobility management network element, the terminal device may generate a message authentication code for verifying the registration request based on the first security protection key and the registration request. The terminal device sends the registration request and the message authentication code to the second mobility management network element.

[0030] In the above technical solution, the terminal device generates a message authentication code based on the first security protection key and the registration request, and sends the message authentication code and the registration request together to the second mobility management network element. Accordingly, the second mobility management network element can send the message authentication code and the registration request together to the first mobility management network element, and the message authentication code can be used by the first mobility management network element to verify the registration request. This eliminates the need for the terminal device to perform a second primary authentication in the HPLMN based on the 3GPP access type identity credentials, which helps improve network performance.

[0031] In one possible implementation, the terminal device further receives a second key set identifier from a second mobility management network element, where the second key set identifier is used to identify a second security context for the second non-access stratum connection, and the second security context includes a second mobility management network element key and a second security protection key. Exemplarily, the second key set identifier is carried in a non-access stratum security mode command.

[0032] Alternatively, the terminal device further receives a first key set identifier and a second key set identifier from a second mobility management network element. The first key set identifier is used to identify a first security context of a first non-access stratum connection, where the first security context includes a first mobility management network element key and a first security protection key. Exemplarily, the first key set identifier and the second key set identifier are carried in a non-access stratum security mode command.

[0033] In a possible implementation, the terminal device further initializes a count value for transmitting messages on the second non-access stratum connection. In this way, the terminal device can transmit messages with the second mobility management network element on the second non-access stratum connection according to the initialized count value.

[0034] In one possible implementation, when a terminal device generates a second mobility management network element key based on a first mobility management network element key, the terminal device may specifically generate the second mobility management network element key based on the first mobility management network element key and first information. The first information includes one or more of the following: an identifier of a key generation function; a count value of message transmissions on a first non-access stratum connection; a direction of message transmissions on the first non-access stratum connection; an identifier of a 3GPP access type; an identifier of a public land mobile network to which the first mobility management network element belongs; and an identifier of a public land mobile network to which the second mobility management network element belongs. In one example, the direction of message transmissions on the first non-access stratum connection is downlink, and the count value of message transmissions on the first non-access stratum connection is equal to the number of downlink messages received by the terminal device from the first mobility management network element on the first non-access stratum connection based on the first security protection key. In another example, the direction of message transmissions on the first non-access stratum connection is uplink, and the count value of message transmissions on the first non-access stratum connection is equal to the number of uplink messages sent by the terminal device to the first mobility management network element on the first non-access stratum connection based on the first security protection key.

[0035] In the above technical solution, specific input parameters are provided when the terminal device generates the second mobility management network element key based on the first mobility management network element key. These specific input parameters are the same input parameters maintained by the terminal device and the first mobility management network element respectively. In this way, the terminal device and the first mobility management network element can each generate the same second mobility management network element key based on these input parameters.

[0036] In a third aspect, the present application provides a communication method that can be performed by a second mobility management network element. The second mobility management network element can be a network element in a hardware device, a software function running on dedicated hardware, or a virtualized function instantiated on a platform (e.g., a cloud platform). Optionally, the second mobility management network element can be implemented by a single device, by multiple devices, or as a functional module within a single device.

[0037] The communication method includes: a second mobility management network element receives a registration request from a terminal device, the registration request includes indication information, and the indication information is used to indicate dual 3GPP access; the second mobility management network element sends a first message to the first mobility management network element, the first message includes the registration request, and a first non-access stratum connection based on a 3GPP access type exists between the terminal device and the first mobility management network element. The second mobility management network element receives a second message from the first mobility management network element, the second message is used to respond to the first message, and the second message includes a second mobility management network element key. The second mobility management network element generates a second security protection key based on the second mobility management network element key, and the second security protection key is used to securely protect messages transmitted on a second non-access stratum connection, where the second non-access stratum connection is a connection based on a 3GPP access type between the terminal device and the second mobility management network element. Optionally, the second mobility management network element sends a registration response to the terminal device, the registration response being a response corresponding to the registration request, such as a registration accept message.

[0038] In the above technical solution, when the second mobility management network element determines that the registration request indicates dual 3GPP access, that is, when it determines that the terminal device requests to establish a second non-access stratum connection with the second mobility management network element based on the 3GPP access type, it sends the registration request to the first mobility management network element, and then obtains the second mobility management network element key from the first mobility management network element. In this way, security protection of messages transmitted on the second non-access stratum connection is achieved, thereby improving security in the dual 3GPP scenario. That is, after receiving the second mobility management network element key, the second mobility management network element generates a second security protection key based on the second mobility management network element key, and performs security protection on messages transmitted on the second non-access stratum connection based on the second security protection key to improve security.

[0039] In addition, if the registration request indicates dual 3GPP access, the second mobility management network element, after receiving the registration request from the terminal device, can send the registration request to the first mobility management network element to obtain the second mobility management network element key, and no longer instruct the terminal device to perform a second primary authentication in the HPLMN based on the identity credentials of the 3GPP access type. This helps avoid unnecessary processes and improves network performance.

[0040] In one possible implementation, the second mobility management network element key is generated based on the first mobility management network element key, the first mobility management network element key is used to derive a first security protection key, the first security protection key is used to securely protect messages transmitted on the first non-access layer connection, and the second mobility management network element key is used to derive a second security protection key.

[0041] In a possible implementation, the second mobility management network element further receives a message authentication code from the terminal device, and sends the message authentication code to the first mobility management network element through the first message. The message authentication code is used by the first mobility management network element to verify the registration request.

[0042] In one possible implementation, the second message also includes a second key set identifier, which is used to identify the second security context of the second non-access stratum connection. The second security context includes a second mobility management network element key and a second security protection key. The second key set identifier is generated based on the first key set identifier. The first key set identifier is used to identify the first security context of the first non-access stratum connection. The first security context includes a first mobility management network element key and a first security protection key. The second mobility management network element also sends the second key set identifier to the terminal device. In one possible implementation, the second message also includes the first key set identifier, and the second mobility management network element also sends the first key set identifier to the terminal device.

[0043] In one possible implementation, the second message also includes a first key set identifier, where the first key set identifier is used to identify the first security context of the first non-access stratum connection. The second mobility management network element further generates a second key set identifier based on the first key set identifier, where the second key set identifier is used to identify the second security context of the second non-access stratum connection. The second mobility management network element sends the second key set identifier to the terminal device, or sends the first key set identifier and the second key set identifier to the terminal device.

[0044] In one possible implementation, the value of the type field included in the second key set identifier is the same as the value of the type field included in the first key set identifier; the value of the value field included in the second key set identifier is different from the value of the value field included in the first key set identifier.

[0045] In a possible implementation manner, the second key set identifier is carried in the non-access stratum security mode command, or the first key set identifier and the second key set identifier are carried in the non-access stratum security mode command.

[0046] In a possible implementation, the second mobility management network element initializes a count value for transmitting messages on the second non-access stratum connection. In this way, the second mobility management network element can transmit messages with the terminal device on the second non-access stratum connection based on the initialized count value.

[0047] In a fourth aspect, an embodiment of the present application provides a communication device,

[0048] The apparatus has the function of implementing the first mobility management network element in the above-mentioned first aspect or any possible implementation manner of the first aspect. The apparatus may be a device, or include multiple devices, or be a functional module within a device.

[0049] The apparatus may also have the function of implementing the terminal device in the above-mentioned second aspect or any possible implementation manner of the second aspect. The apparatus may be a terminal device or a chip included in the terminal device.

[0050] The apparatus may also have the function of implementing the second mobility management network element in the third aspect or any possible implementation of the third aspect. The apparatus may be a device, or include multiple devices, or be a functional module within a device.

[0051] The functions of the above-mentioned communication device can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules, units or means corresponding to the above-mentioned functions.

[0052] In a possible implementation, the structure of the device includes a processing module and a transceiver module.

[0053] In which, the processing module is configured to support the device to perform the corresponding functions of the first mobility management network element in the above-mentioned first aspect or any one of the implementation methods of the first aspect, or the processing module is configured to support the device to perform the corresponding functions of the terminal device in the above-mentioned second aspect or any one of the implementation methods of the second aspect, or to perform the corresponding functions of the second mobility management network element in the above-mentioned third aspect or any one of the implementation methods of the third aspect. The transceiver module is used to support communication between the device and other communication devices. For example, when the device is a terminal device, it can send a registration request to the second mobility management network element. The communication device may also include a storage module, which is coupled to the processing module and stores program instructions and data necessary for the device. As an example, the processing module may be a processor, the communication module may be a transceiver, and the storage module may be a memory. The memory may be integrated with the processor or may be set separately from the processor.

[0054] In another possible implementation, the structure of the device includes a processor and may also include a memory. The processor is coupled to the memory and can be used to execute computer program instructions stored in the memory, so that the device performs the method in the above-mentioned first aspect or any possible implementation of the first aspect, or performs the method in the above-mentioned second aspect or any possible implementation of the second aspect, or performs the method in the above-mentioned third aspect or any possible implementation of the third aspect. Optionally, the device also includes a communication interface, and the processor is coupled to the communication interface. When the device is a network device or a terminal device, the communication interface can be a transceiver or an input / output interface; when the device is a chip included in the network device or a chip included in the terminal device, the communication interface can be the input / output interface of the chip. Optionally, the transceiver can be a transceiver circuit, and the input / output interface can be an input / output circuit.

[0055] In a fifth aspect, an embodiment of the present application provides a chip system comprising: a processor and a memory, the processor being coupled to the memory, the memory being used to store programs or instructions, and when the programs or instructions are executed by the processor, the chip system implements the method of the above-mentioned first aspect or any possible implementation of the first aspect, or implements the method of the above-mentioned second aspect or any possible implementation of the second aspect, or executes the method of the above-mentioned third aspect or any possible implementation of the third aspect.

[0056] Optionally, the chip system further includes an interface circuit for transmitting interactive code instructions to the processor.

[0057] Optionally, there may be one or more processors in the chip system, and the processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0058] Optionally, the chip system may include one or more memories. The memory may be integrated with the processor or provided separately from the processor. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on separate chips.

[0059] In a sixth aspect, the present application provides a computer-readable storage medium, which stores a computer program or instruction. When the computer program or instruction is executed by a communication device, the communication device executes the method in the above-mentioned first aspect or any possible implementation of the first aspect, or the communication device executes the method in the second aspect or any possible implementation of the second aspect, or the communication device executes the method in the third aspect or any possible implementation of the third aspect.

[0060] In the seventh aspect, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a communication device, it implements the method in the above-mentioned first aspect or any possible implementation of the first aspect, or implements the method in the above-mentioned second aspect or any possible implementation of the second aspect, or implements the above-mentioned third aspect or any possible implementation of the third aspect.

[0061] In an eighth aspect, the present application provides a communication method, including: a second mobility management network element receives a registration request from a terminal device, and sends a first message to a first mobility management network element, where the first message includes a registration request, and the registration request includes indication information, where the indication information is used to indicate dual 3GPP access, and a first non-access layer connection based on a 3GPP access type exists between the terminal device and the first mobility management network element; the first mobility management network element generates a second mobility management network element key based on the first mobility management network element key, and sends a second message to the second mobility management network element, where the first mobility management network element key is used to derive a first security protection key, and the first security protection key is used to securely protect messages transmitted on the first non-access layer connection; the second mobility management network element generates a second security protection key based on the second mobility management network element key included in the second message, and the second security protection key is used to securely protect messages transmitted on the second non-access layer connection, where the second non-access layer connection is a connection based on a 3GPP access type between the terminal device and the second mobility management network element.

[0062] In a possible implementation, before the second mobility management network element receives the registration request from the terminal device, the method further includes: the terminal device sending the registration request to the second mobility management network element;

[0063] After the second mobility management network element generates the second security protection key according to the second mobility management network element key included in the second message, the method further includes: the terminal device generates the second mobility management network element key according to the first mobility management network element key.

[0064] In a ninth aspect, the present application provides a communications system comprising a first mobility management network element and a second mobility management network element. The first mobility management network element is configured to implement the method of the first aspect or any possible implementation of the first aspect; and the second mobility management network element is configured to implement the method of the third aspect or any possible implementation of the third aspect. In one possible implementation, the communications system further comprises a terminal device, configured to implement the method of the second aspect or any possible implementation of the second aspect.

[0065] The specific implementations of the above aspects can be referenced to each other, and the technical effects that can be achieved by the above aspects can also be referenced to each other, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] FIG1 is a schematic diagram of a 5G network architecture provided by this application;

[0067] FIG2 is a schematic diagram of a terminal device provided by the present application accessing a core network through a 3GPP access type and a non-3GPP access type;

[0068] FIG3 is a schematic diagram of a 5G key derivation architecture provided by this application;

[0069] FIG4 is a schematic diagram of a terminal device provided by the present application accessing a core network through a dual 3GPP access type;

[0070] FIG5 is a flow chart of the first communication method provided by the present application;

[0071] FIG6 is a flow chart of a second communication method provided by the present application;

[0072] FIG7 is a flow chart of a third communication method provided by this application;

[0073] FIG8 is a schematic structural diagram of a communication device provided by the present application;

[0074] FIG9 is a schematic structural diagram of yet another communication device provided in this application. DETAILED DESCRIPTION

[0075] The following first explains the relevant technical features involved in the embodiments of the present application. It should be noted that these explanations are intended to make the embodiments of the present application easier to understand and should not be regarded as limiting the scope of protection claimed by the present application.

[0076] 1. 5G Network Architecture

[0077] Figure 1 is a schematic diagram of a 5G network architecture. The 5G network architecture shown in Figure 1 includes three components: the terminal device component, the data network (DN), and the operator network component. The following briefly describes the functions of some of these network elements.

[0078] Among them, the operator network may include one or more of the following network elements: authentication server function (AUSF), network exposure function (NEF), policy control function (PCF), unified data management (UDM), unified data repository (UDR), network repository function (NRF), access and mobility management function (AMF), session management function (SMF), access network and user plane function (UPF), etc. In the above-mentioned operator network, the part other than the radio access network part can be called the core network part. In a possible implementation method, the operator network also includes an application function (AF). Alternatively, the AF may not belong to the operator network, but to a third party.

[0079] A terminal device, also known as user equipment (UE), is a device with wireless transceiver capabilities. It can be deployed on land, indoors or outdoors, handheld or in a vehicle; on water (such as ships); or in the air (such as on airplanes, balloons, and satellites). Terminal devices can be mobile phones, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminals, augmented reality (AR) terminals, wireless terminals used in industrial control, wireless terminals used in self-driving cars, wireless terminals used in remote medical care, wireless terminals used in smart grids, wireless terminals used in transportation safety, wireless terminals used in smart cities, and wireless terminals used in smart homes.

[0080] The above-mentioned terminal device can establish a connection with the operator network through the interface provided by the operator network (such as N1, etc.), and use the data and / or voice services provided by the operator network. The terminal device can also access the DN through the operator network, use the operator services deployed on the DN, and / or services provided by a third party. Among them, the above-mentioned third party may be a service provider other than the operator network and the terminal device, and can provide data and / or voice services to the terminal device. Among them, the specific form of the above-mentioned third party can be determined according to the actual application scenario and is not limited here.

[0081] The core network part includes user plane functions and control plane functions.

[0082] User plane functions include UPF. As the interface with the data network, UPF performs functions such as user plane data (such as packet data) forwarding, quality of service (QoS) control, session / flow-level billing and statistics, and bandwidth limiting.

[0083] The control plane functions mainly carry out user registration and authentication, mobility management, and delivery of data packet forwarding policies and QoS control policies to the user plane functions. The control plane functions can be further refined to include other network elements besides the UPF, such as the AMF and SMF.

[0084] The AMF primarily handles user registration, location management, and access authentication / authorization during user mobility. It is also responsible for communicating user policies between the terminal device and the PCF. The connection between the terminal device and the AMF is called a non-access stratum (NAS) connection, and the messages transmitted between the terminal device and the AMF are NAS messages.

[0085] SMF is mainly responsible for establishing corresponding session connections when users initiate services and providing specific services to users, such as sending data packet forwarding strategies and QoS strategies to UPF based on the NG4 interface between SMF and UPF.

[0086] AUSF is mainly responsible for authenticating users and determining the legitimacy of terminal devices to determine whether the terminal devices are allowed to access the network.

[0087] UDM is mainly responsible for storing the contract data of terminal devices, user access authorization and other functions.

[0088] UDR is mainly responsible for the storage and access of contract data, policy data, application data and other types of data.

[0089] PCF is mainly responsible for issuing business-related policies to AMF or SMF.

[0090] NEF is mainly used to support the opening of capabilities and events.

[0091] The AF primarily communicates application-side requirements for the network to the PCF, enabling the PCF to generate corresponding policies. The AF can be a third-party functional entity or an application service deployed by an operator, such as the Internet Protocol (IP) Multimedia Subsystem (IMS) voice call service.

[0092] NRF can be used to provide network element discovery capabilities, providing network element information corresponding to the network element type based on requests from other network elements. NRF also provides network element management services such as network element registration, update, and deregistration, as well as network element status subscription and push.

[0093] A DN is a network located outside of a carrier network. A carrier network can connect to multiple DNs, and a variety of services can be deployed on the DN, providing data and / or voice services to terminal devices. For example, a DN is the private network of a smart factory. Sensors installed in the workshop can be terminal devices. The DN houses a sensor control server, which provides services to the sensors. Sensors can communicate with the control server, receive instructions from the control server, and transmit collected sensor data to the control server based on the instructions. Another example is a DN that is a company's internal office network. An employee's mobile phone or computer can be a terminal device, allowing them to access information and data resources on the company's internal office network.

[0094] In Figure 1, Nnssf, Nausf, Nnef, Nnrf, Npcf, Nudm, Naf, Namf, Nsmf, N1, N2, N3, N4, and N6 are interface sequence numbers. The meanings of these interface sequence numbers can be found in the 3GPP protocol and are not limited here.

[0095] It is understood that the above-mentioned network element or function can be a network element in a hardware device, a software function running on dedicated hardware, or a virtualized function instantiated on a platform (e.g., a cloud platform). Optionally, the above-mentioned network element or function can be implemented by a single device, or by multiple devices, or can be a functional module within a single device, and this is not specifically limited in the embodiments of the present application.

[0096] The access and mobility management function (also referred to as the mobility management function), the authentication server function, and the unified data management in the embodiment of the present application can be the AMF, AUSF, and UDM in Figure 1, respectively, or they can be network elements with the above-mentioned AMF, AUSF, and UDM functions in future communications such as the sixth generation (6G) network. The embodiment of the present application is not limited to this.

[0097] The access network is a subnetwork of the operator's network and serves as the implementation system between service nodes and terminal devices within the operator's network. To access the operator's network, terminal devices first pass through the access network, and then connect to the operator's network's service nodes through the access network.

[0098] The access network may include a 3GPP access network and / or a non-3GPP access network, that is, the terminal device may access the core network through a 3GPP access network and / or a non-3GPP access network. A non-3GPP access network refers to an access network other than 3GPP, such as wireless local area networks (WLAN), wireless fidelity (Wi-Fi) networks, worldwide interoperability for microwave access (WiMAX), fixed networks, etc. The access type of a terminal device in a 3GPP access network may be referred to as a 3GPP access type, and the access type of a terminal device in a non-3GPP access network may be referred to as a non-3GPP access type.

[0099] Access equipment in a 3GPP access network can be equipment that provides wireless communication capabilities for terminal devices. Access equipment in a 3GPP access network can also be referred to as access network equipment, base stations, etc. Access equipment in a 3GPP access network includes, but is not limited to, the following: next-generation base stations (gNBs) in 5G, evolved node Bs (eNBs), radio network controllers (RNCs), node Bs (NBs), base station controllers (BSCs), base transceiver stations (BTSs), home base stations (e.g., home evolved node Bs or HNBs), baseband units (BBUs), transmission points (TRPs), transmitting points (TPs), mobile switching centers, etc. Messages transmitted between terminal devices and access equipment in a 3GPP access network can be radio resource control (RRC) messages, user plane (UP) messages, etc. For ease of description, the following uses a gNB as an example in which the access equipment in the 3GPP access network is an example.

[0100] The access equipment of the non-3GPP access network can be called a non-3GPP interworking function (N3IWF) device or a next generation packet data gateway (ngPDG). N3IWF is similar to the evolved packet data gateway (ePDG) in long term evolution (LTE). In 5G, it is used to establish an Internet Protocol security (IPsec) tunnel with the terminal device when the terminal device accesses the core network through a non-3GPP access network. In the future 5G definition, the name of N3IWF may change. This application only uses the non-3GPP network access gateway as an example of the N3IWF device. For example, the N3IWF device may include a router, etc.

[0101] FIG2 is a schematic diagram showing a terminal device accessing a core network through 3GPP access type and non-3GPP access type, wherein the description of each network element can refer to the description of the embodiment related to FIG1.

[0102] 2. 5G Key Derivation Architecture

[0103] The key hierarchy includes the following keys: K, CK, IK, AUSF key (K AUSF ), SEAF key (K SEAF ), AMF key (K AMF ), NAS integrity key (K NASint ), NAS encryption key (K NASenc ), N3IWF key (K N3IWF ), gNB key (K gNB ), RRC integrity key (K RRCint ), RRC encryption key (K RRCenc ), UP integrity key (K UPint ), UP encryption key (K UPenc ).

[0104] Combined with the schematic diagram of a 5G key derivation architecture shown in Figure 3, the following is explained:

[0105] Take the network side as an example:

[0106] In the HPLMN, after primary authentication, the UDM derives the AUSF key from the CK and IK and provides the AUSF key to the AUSF. The AUSF derives the SEAF key from the AUSF key and provides the SEAF key to the SEAF in the serving network.

[0107] In the service network, SEAF derives the AMF key based on the SEAF key and provides the AMF key to AMF.

[0108] The AMF derives the NAS integrity key and NAS cipher key from the AMF key. These keys are used to protect NAS messages transmitted over the NAS connection between the AMF and the terminal device. Furthermore, the AMF derives the N3IWF key and gNB key from the AMF key and provides the N3IWF with the key to protect subsequent non-3GPP access data traffic. The AMF also provides the gNB key and next hop (NH) parameters to the gNB.

[0109] The gNB generates the RRC integrity key, RRC encryption key, UP integrity key, and UP encryption key based on the gNB key and NH parameters. The RRC integrity key and RRC encryption key are used to protect RRC messages transmitted between the gNB and the terminal device; the UP integrity key and UP encryption key are used to protect user plane data transmitted between the gNB and the terminal device.

[0110] Furthermore, the NAS integrity key, RRC integrity key, and UP integrity key are all used to protect the integrity of messages. The NAS encryption key, RRC encryption key, and UP encryption key are all used to encrypt and protect messages.

[0111] Take the NAS integrity key and NAS encryption key as an example:

[0112] When the AMF sends a downlink NAS message to a terminal device, the AMF and the terminal device may perform integrity protection on the downlink NAS message based on the NAS integrity key. Specifically, the AMF may generate a message authentication code (MAC) based on the NAS message and the NAS integrity key for integrity protection of the NAS message, and then send the NAS message and MAC together to the terminal device. Accordingly, the terminal device receives the MAC and NAS message from the AMF and performs integrity verification on the NAS message based on the MAC and the locally stored NAS integrity key. Furthermore, the AMF and the terminal device may also perform encryption protection on the downlink NAS message based on the NAS encryption key. Specifically, the AMF may encrypt the NAS message based on the NAS encryption key to obtain an encrypted NAS message, and then the AMF sends the encrypted NAS message to the terminal device. Accordingly, the terminal device receives the encrypted NAS message from the AMF and decrypts the encrypted NAS message based on the locally stored NAS encryption key.

[0113] Similarly, when the terminal device sends an uplink NAS message to the AMF, the terminal device and the AMF may perform integrity protection on the uplink NAS message based on the NAS integrity key, and perform encryption protection on the uplink NAS message based on the NAS encryption key. For details, please refer to the description of the AMF sending a downlink NAS message to the terminal device above.

[0114] It is understood that when transmitting NAS messages between the AMF and the terminal device, both integrity protection and encryption protection can be performed, or one of the two protections can be performed. In this application, integrity protection and encryption protection can be collectively referred to as security protection.

[0115] 3. Key Set Identifier for Next Generation Radio Access Network (NAS key set identifier, ngKSI)

[0116] ngKSI is used to identify the security context of a NAS connection. ngKSI can be assigned by the AMF during primary authentication and key agreement, or by the AMF during inter-system change. ngKSI consists of a value and a security context parameter type, where the security context parameter type is used to indicate whether the security context is a native security context or a mapped security context. When the security context is a native security context, the value of ngKSI is KSI AMF When the security context is type mapping, the value of ngKSI is KSI ASME .

[0117] Exemplarily, the ngKSI occupies 8 bits. The lower three bits represent the NAS key set identifier (value), which can take seven values: 000 to 110, with 111 indicating no key is available. The fourth bit represents the type, with a value of 0 for a native security context and 1 for a mapped security context. The upper four bits indicate that the ngKSI belongs to the NAS key set identifier and is a Type 1 information element.

[0118] 4. Access traffic steering, switching, splitting (ATSSS)

[0119] ATSSS technology supports multipath transmission control protocol (MPTCP), multipath quick UDP internet connections (MPQUIC), and ATSSS low layer (ATSSS-LL).

[0120] Among them, the MPTCP function is for the multiplexing of transmission control protocol (TCP) service traffic, the MPQUIC function is for the multiplexing of user datagram protocol (UDP) service traffic, and the ATSSS-LL function is for the multiplexing of Internet protocol (IP) packets. The ATSSS-LL function can be used by terminal devices or UPFs to select transmission paths for data packets based on the diversion mode and link status, and can support the multiplexing of TCP and UDP services.

[0121] ATSSS technology supports the following steering modes: active-standby, smallest delay, load balancing, priority-based, redundancy, and other possible future steering modes.

[0122] The active-standby traffic splitting mode uses only one data channel for data transmission at a time. Specifically, in the active-standby traffic splitting mode, one transmission path (3GPP access or non-3GPP access) can be designated as active, while the other transmission path is designated as standby. When the active transmission path is available, all data for the service flow is transmitted to the peer end via the active transmission path. When the active path is unavailable, all data for the service flow is switched to the standby transmission path for transmission.

[0123] In minimum delay offload mode, the transmission path with the shortest latency can be selected to transmit service flow data. In this mode, the terminal device or UPF can monitor the transmission latency of the path in real time. For example, the monitoring path can be implemented by the transport layer protocol (such as the MPTCP layer has the function of detecting round trip time (RTT)), or by the performance measurement function (PMF) module in the UPF.

[0124] In load balancing and traffic distribution mode, traffic flows are distributed proportionally across different transmission paths. The distribution ratio is determined by the load on the two transmission paths. For example, a heavier path will receive a smaller distribution ratio, while a lighter path will receive a larger distribution ratio.

[0125] In priority splitting mode, you can designate one transmission path as a high-priority path and the other as a low-priority path. When the high-priority path is uncongested, all data for the service flow is transmitted over the high-priority path. If congestion occurs on the high-priority path, part of the service flow's data is transferred over the low-priority path. If the high-priority path is unavailable, all data for that service flow is transferred over the low-priority path.

[0126] Possible diversion modes in the future may include diversion modes based on user preferences, diversion modes independently selected by terminal devices or UPFs, diversion modes based on QoS requirements, etc. The embodiments of this application do not make specific limitations on this.

[0127] In combination with the above explanations of the technologies and terms involved in this application, the following explains the embodiments of this application.

[0128] In 3GPP, a terminal device can access two different PLMNs based on a 3GPP access type and a non-3GPP access type, that is, the terminal device can establish NAS connections with two different AMFs in the two different PLMNs and maintain the respective security contexts of the two NAS connections. Specifically, after the terminal device performs primary authentication in the HPLMN based on the identity credential 1 of the 3GPP access type, it establishes NAS connection 1 with AMF1 and maintains the security context of NAS connection 1; after the terminal device performs primary authentication in the HPLMN based on the identity credential 2 of the non-3GPP access type, it establishes NAS connection 2 with AMF2 and maintains the security context of NAS connection 2. Since the identity credentials used by the terminal device to access the two PLMNs through the 3GPP access type and the non-3GPP access type are different, the terminal device needs to perform two primary authentications with the HPLMN based on two different identity credentials.

[0129] Based on ATSSS technology, 3GPP further introduced dual 3GPP access type scenarios.

[0130] Exemplarily, the terminal device can access two PLMNs based on the 3GPP access type, that is, the terminal device can access two PLMNs based on two 3GPP access types. Figure 4 is a schematic diagram of a terminal device accessing two PLMNs provided by the present application. Specifically, when the terminal device accesses the HPLMN based on the 3GPP access type, it establishes a NAS connection with the AMF1 in the HPLMN; when the terminal device accesses the VPLMN based on the 3GPP access type, it establishes a NAS connection with the AMF2 in the VPLMN. Furthermore, UPF1 in the HPLMN can be called the anchor UPF, and UPF2 in the VPLMN is connected to the anchor UPF to enable the terminal device to access the DN through the user plane connection between the terminal device and UPF2. The description of each network element can also be found in the description of the relevant embodiment of Figure 1.

[0131] In addition, the terminal device can also access the same PLMN through two 3GPP accesses, and the same PLMN includes AMF1 and AMF2. The terminal device can establish a NAS connection with AMF1 based on the 3GPP access type, and establish a NAS connection with AMF2 based on the 3GPP access type. The HPLMN and VPLMN in Figure 4 can be regarded as the same PLMN to understand this scenario. The same PLMN can be HPLMN or VPLMN. The embodiments of the present application can also be applied to other scenarios, and no further examples will be given.

[0132] How to improve the security of dual 3GPP access scenarios is a technical problem that needs to be solved urgently.

[0133] Furthermore, if the dual 3GPP access type scenario adopts the above method of accessing two different PLMNs based on one 3GPP access type and one non-3GPP access type, then when the terminal device accesses the first PLMN based on the 3GPP access type, it needs to use the 3GPP access type identity credential 1 to perform primary authentication in the HPLMN; and when the terminal device accesses the second PLMN based on the 3GPP access type, it also needs to use the 3GPP access type identity credential 1 to perform primary authentication in the HPLMN. As above, the terminal device uses the same identity credential to perform the same primary authentication twice in the HPLMN, and the process is relatively redundant.

[0134] To this end, the present application provides a possible communication method. In a dual 3GPP access type scenario, a first NAS connection established based on the 3GPP access type exists between a terminal device and a first AMF. Furthermore, when the terminal device needs to establish a second NAS connection with a second AMF based on the 3GPP access type, it may send a registration request to the second AMF. The registration request is used to indicate dual 3GPP access. Accordingly, the second AMF requests a second AMF key from the first AMF, generates a second security protection key based on the second AMF key, and then securely protects messages transmitted on the second NAS connection based on the second security protection key, thereby improving security in the dual 3GPP scenario.

[0135] Exemplarily, the first AMF may be AMF1 in Figure 4 , and the second AMF may be AMF2 in Figure 4 ; alternatively, the first AMF may be AMF2 in Figure 4 , and the second AMF may be AMF1 in Figure 4 . The terminal device may be the terminal device in Figure 4 .

[0136] The first AMF may also be referred to as a first access and mobility management network element (function), a first mobility management network element (function), etc., and the second AMF may also be referred to as a second access and mobility management network element (function), a second mobility management network element (function), etc. The PLMN to which the first AMF belongs is referred to as a first PLMN, which may be a HPLMN or a visited public land mobile network (VPLMN). The PLMN to which the second AMF belongs is referred to as a second PLMN, which may be a HPLMN or a VPLMN. The first PLMN and the second PLMN may be the same or different.

[0137] The first NAS connection is a NAS connection based on the 3GPP access type between the terminal device and the first AMF. The first NAS connection can also be called a first non-access stratum connection. The uplink NAS message sent by the terminal device to the first AMF over the first NAS connection can be called a first uplink message, and the downlink NAS message sent by the first AMF to the terminal device over the first NAS connection can be called a first downlink message.

[0138] The second NAS connection is a 3GPP access-type NAS connection between the terminal device and the second AMF. The second NAS connection can also be called a second non-access stratum connection. The uplink NAS message sent by the terminal device to the second AMF over the second NAS connection can be called a second uplink message, and the downlink NAS message sent by the second AMF to the terminal device over the second NAS connection can be called a second downlink message.

[0139] The first NAS connection is established before the second NAS connection, and the network supports the simultaneous existence of the two NAS connections.

[0140] The first key set identifier may also be referred to as a first ngKSI, and the second key set identifier may also be referred to as a second ngKSI.

[0141] The following describes possible applicable scenarios of the embodiments of the present application:

[0142] The terminal device has accessed the first PLMN using a 3GPP access type. That is, the terminal device has performed primary authentication in the HPLMN based on the terminal device's 3GPP access type identity credentials. After primary authentication, a first NAS connection is established with the first AMF in the first PLMN. The terminal device and the first AMF each maintain a first security context for the first NAS connection.

[0143] The identity credential of the 3GPP access type is, for example, a credential included in a universal subscriber identity module (USIM) card of a terminal device.

[0144] The first security context may include at least one or more of the following parameters (1) to (7):

[0145] (1) A first ngKSI, used to identify the first security context, or used to identify the key set in the first security context (such as the first AMF key, the first security protection key, etc.).

[0146] (2) The first AMF key is derived from the SEAF key after the primary authentication.

[0147] (3) A first security protection key derived from the first AMF key. Exemplarily, the first security protection key may be a first NAS integrity key, or the first security protection key may be a first NAS encryption key, or the first security protection key may include the first NAS integrity key and the first NAS encryption key. The first security protection key may also be referred to as a first NAS key.

[0148] (4) A first NAS count value, i.e., a count value of messages transmitted on the first NAS connection, wherein the first NAS count value includes a first uplink NAS count value and / or a first downlink NAS count value.

[0149] For the terminal device, the first uplink NAS count value is the number of times the terminal device uses the first security protection key to securely protect the first uplink message on the first NAS connection; the first downlink NAS count value is the number of times the terminal device uses the first security protection key to securely protect the first downlink message on the first NAS connection.

[0150] For the first AMF, the first uplink NAS count value is the number of times the first AMF uses the first security protection key to securely protect the first uplink message on the first NAS connection; the first downlink NAS count value is the number of times the first AMF uses the first security protection key to securely protect the first downlink message on the first NAS connection.

[0151] (5) A first NAS connection identifier, used to identify the first NAS connection.

[0152] (6) The terminal device identifier, wherein the terminal device identifier may include at least one or more of the following: a globally unique temporary identity (GUTI), a temporary mobile subscriber identity (TMSI), and a subscription permanent identifier (SUPI).

[0153] (7) Security capabilities of terminal devices: integrity protection algorithms and encryption algorithms supported by terminal devices.

[0154] Subsequently, when the terminal device needs to establish a second NAS connection (i.e., a second NAS connection) through the 3GPP access type, it sends a registration request to the second AMF in the second PLMN. At this time, the second NAS connection has not yet been established between the terminal device and the second AMF, nor has a second security context for the second NAS connection been maintained.

[0155] As shown in Figure 5, a flow chart of the first communication method exemplarily provided in this application describes that after the second AMF receives a registration request from the terminal device, it obtains the second AMF key from the first AMF.

[0156] Step 501: The second AMF sends a first message to the first AMF.

[0157] Correspondingly, the first AMF receives the first message from the second AMF.

[0158] The first message includes a registration request from the terminal device. The registration request indicates dual 3GPP access.

[0159] As an optional method, the registration request includes indication information, which is used to indicate dual 3GPP access. Alternatively, it can be understood that the registration request includes a registration type (registration request), which is used to indicate dual 3GPP access, that is, the registration type is the indication information. Optionally, the indication information has one or more of the following functions: indicating that two NAS connections established based on the 3GPP access type can exist in the network; indicating that the registration request is used to request a second NAS connection established based on the 3GPP access type; and instructing the second AMF to forward the registration request to the first AMF. Exemplarily, the indication information is a dual 3GPP access indication.

[0160] In one possible approach, after receiving the registration request from the terminal device, the second AMF determines that the terminal device is requesting a second NAS connection based on the 3GPP access type, and then sends a first message to the first AMF, where the first message includes the registration request. Specifically, the second AMF may determine, based on the registration request, that the terminal device is requesting a second NAS connection based on the 3GPP access type. For example, the second AMF obtains indication information from the registration request and makes the above determination based on the indication information.

[0161] Optionally, the registration request may also include an identifier of the terminal device, and the identifier of the terminal device may be used by the second AMF to determine the first AMF before sending the first message to the first AMF. In one possible manner, the identifier of the terminal device is specifically GUTI. GUTI may include a globally unique AMF identifier (GUAMI) and TMSI. After receiving the registration request from the terminal device, the second AMF may determine the GUAMI based on the GUTI in the registration request, and then determine the PLMN where the terminal device is registered based on the mobile country code (MCC), mobile network code (MNC) and other information in the GUAMI, and then determine the first AMF from the PLMN where the terminal device is registered based on the identifier of the AMF in the GUAMI.

[0162] Optionally, the terminal device identifier may also be used by the first AMF to index the first security context. Alternatively, the registration request may also include a first ngKSI, and the terminal device identifier and the first ngKSI may be used by the first AMF to index the first security context. Alternatively, the first ngKSI may be used by the first AMF to index the first security context. For details, see the description in step 502 below.

[0163] In one possible approach, the first security protection key is a first NAS integrity key. The terminal device may generate a first MAC for verifying the registration request based on the first NAS integrity key maintained by the terminal device and the registration request, and send the first MAC to the second AMF. Exemplarily, the first MAC and the registration request may be sent by the terminal device to the second AMF in a single message.

[0164] Correspondingly, the second AMF sends a first message to the first AMF, where the first message includes a first MAC and a registration request. The first AMF obtains the first MAC and the registration request from the first message, performs an integrity check on the registration request based on the first NAS integrity key and the first MAC maintained by the first AMF, and after determining that the received registration request passes the integrity check, executes the following step 502.

[0165] Furthermore, the terminal device can not only generate the first MAC based on the first NAS integrity key and the registration request, but also generate the first MAC in combination with one or more of the following parameters: the first NAS count value, the transmission direction (specifically uplink), and the first NAS connection identifier. Exemplarily, the terminal device inputs the first NAS integrity key, the registration request, the first NAS count value, the transmission direction (specifically uplink), and the first NAS connection identifier into the integrity protection algorithm, and then the integrity protection algorithm generates the first MAC. Similarly, the first AMF can input these parameters used by the terminal device to generate the first MAC, as well as the received registration request and the first MAC, into the integrity protection algorithm to verify the integrity of the registration request.

[0166] It should be noted that a local policy may be pre-set in the second AMF, which may be used to indicate whether the second AMF can use the AMF key generated by another AMF. For example, after receiving a registration request from a terminal device, if the second AMF determines, according to the local policy, that the second AMF can use the AMF key generated by another AMF, it sends a first message to the first AMF, which includes the registration request; if the second AMF determines, according to the local policy, that the second AMF cannot use the AMF key generated by another AMF, it instructs the terminal device to perform primary authentication in the HPLMN based on the identity credentials.

[0167] In step 502, the first AMF generates a second AMF key based on the first AMF key. The second AMF key is used to derive a second security protection key, which is used to securely protect messages transmitted on the second NAS connection.

[0168] The first AMF may obtain the first security context, obtain the first AMF key from the first security context, and then generate the second AMF key based on the first AMF key.

[0169] The process in which the first AMF obtains the first security context may specifically include the following examples:

[0170] Example (1): The first AMF obtains a registration request from the first message, and determines, based on the identifier of the terminal device in the registration request, a first security context corresponding to the identifier of the terminal device from multiple security contexts maintained by the first AMF.

[0171] In example (2), the first AMF obtains a registration request from the first message, determines multiple security contexts corresponding to the identifier of the terminal device from multiple security contexts maintained by the first AMF based on the identifier of the terminal device in the registration request, and then determines the first security context corresponding to the first ngKSI from the multiple security contexts corresponding to the identifier of the terminal device based on the first ngKSI in the registration request.

[0172] In example (3), the first AMF obtains the registration request from the first message, and determines, based on the first ngKSI in the registration request, the first security context corresponding to the first ngKSI from multiple security contexts maintained by the first AMF.

[0173] In the process of the first AMF generating the second AMF key based on the first AMF key, specifically, the first AMF generates the second AMF key based on the first AMF key and the first information.

[0174] Exemplarily, the first AMF inputs the first AMF key and the first information into an AMF key derivation function (KDF), and the AMF key derivation function outputs the second AMF key.

[0175] The AMF key derivation function is also called a key generation function. The AMF key derivation function is a key derivation function defined by the 3GPP protocol for deriving another AMF key from one AMF key (denoted as AMF key derivation function 1), or is a key derivation function redefined by this application for deriving another AMF key (ie, the second AMF key) from one AMF key (ie, the first AMF key) in a dual 3GPP access scenario (denoted as AMF key derivation function 2).

[0176] The first information includes at least one or more of the following parameters (a) to (f):

[0177] (a) AMF Key Derivation Function Identifier. For example, the identifier of AMF Key Derivation Function 1 defined in the 3GPP protocol is 0x72. The identifier of AMF Key Derivation Function 2 redefined in this application is 0x85.

[0178] (b) A count value of messages transmitted on the first NAS connection (equivalent to the first NAS count value in (4) above).

[0179] (c) The direction of message transmission on the first NAS connection, which may be referred to as transmission direction.

[0180] Exemplarily, in the AMF handover scenario, the direction of the NAS connection transmission message input into the AMF key derivation function is downlink; in the idle state mobility registration update scenario, the direction of the NAS connection transmission message input into the AMF key derivation function is uplink; in the dual 3GPP access scenario, the direction of the NAS connection transmission message input into the AMF key derivation function is uplink.

[0181] Exemplarily, in the AMF handover scenario, the direction of the NAS connection transmission message input into the AMF key derivation function is downlink; in the idle state mobility registration update scenario, the direction of the NAS connection transmission message input into the AMF key derivation function is uplink; in the dual 3GPP access scenario, the direction of the NAS connection transmission message input into the AMF key derivation function is downlink.

[0182] For example, the value of the upstream is 0x00 and the value of the downstream is 0x11

[0183] (d) 3GPP access type identifier: The value is, for example, 0x01.

[0184] (e) The identifier of the first PLMN to which the first AMF belongs.

[0185] (f) The identifier of the second PLMN to which the second AMF belongs.

[0186] In one possible embodiment, the first information includes a transmission direction and a first NAS count value. Exemplarily, if the transmission direction is downlink, the first NAS count value is specifically a first downlink NAS count value. Furthermore, exemplary, if the transmission direction is uplink, the first NAS count value is specifically a first uplink NAS count value.

[0187] In one possible approach, the first information includes not only the value of the parameter but also the length of each parameter. For example, the length of the identifier of the AMF key derivation function, the length of the first NAS count value, the length of the transmission direction, the length of the identifier of the 3GPP access type, the length of the identifier of the first PLMN to which the first AMF belongs, and the length of the identifier of the second PLMN to which the second AMF belongs.

[0188] In combination with the parameters in the first information, the following example provides a method for multiple first AMFs to generate a second AMF key:

[0189] In Example 1, the first message includes the AMF Key Derivation Function 1 identifier "0x72", the uplink value "0x00", and the first uplink NAS count value "100". The first AMF inputs the parameters "0x72", "0x00", "100", and the first AMF key into AMF Key Derivation Function 1, obtaining the output of AMF Key Derivation Function 1, i.e., the second AMF key.

[0190] In Example 2, the first message includes the AMF Key Derivation Function 1 identifier "0x72", the downlink value "0x11", and the first downlink NAS count value "100". The first AMF inputs the parameters "0x72", "0x11", and "100", as well as the first AMF key, into AMF Key Derivation Function 1 to obtain the output of AMF Key Derivation Function 1, i.e., the second AMF key.

[0191] In Example 3, the first message includes the AMF Key Derivation Function 2 identifier (0x85), the first downlink NAS count value (100), and the length (L1) of the first downlink NAS count value. The first AMF inputs the parameters (0x85), (100), (L1), and the first AMF key) into AMF Key Derivation Function 2 to obtain the output of AMF Key Derivation Function 2, i.e., the second AMF key.

[0192] In Example 4, the first information includes: the identifier of AMF Key Derivation Function 2 (0x85), the identifier of the 3GPP access type (0x11), the identifier of the first PLMN (PLMN1) to which the first AMF belongs, the length (L2) of the identifier of the first PLMN (PLMN) to which the first AMF belongs, the first downlink NAS count (100), and the length (L1) of the first downlink NAS count. The first AMF inputs the parameters (0x85), (0x11), (PLMN1), (L2), (100), (L1), and the first AMF key) into AMF Key Derivation Function 2, obtaining the output of AMF Key Derivation Function 2, i.e., the second AMF key.

[0193] In Example 5, the first information includes: the AMF Key Derivation Function 2 identifier "0x85", the 3GPP Access Type identifier "0x11", the 3GPP Access Type identifier length "L0", the first downlink NAS count value "100", and the first downlink NAS count value length "L1". The first AMF inputs the parameters "0x85", "0x11", "L0", "100", "L1", and the first AMF key into AMF Key Derivation Function 2, obtaining the output of AMF Key Derivation Function 2, i.e., the second AMF key.

[0194] It will be understood that the above are merely a few specific examples for explaining the embodiments of the present application and do not constitute a limitation of the present application. In the present application, the first AMF may also use other methods to generate the second AMF key.

[0195] It should be noted that the first AMF may also generate a second ngKSI based on the first ngKSI. The second ngKSI is used to identify the second security context, or to identify the key set in the second security context (such as the second AMF key, the second security protection key, etc.). For an explanation of the second security context, please refer to the description of the embodiment related to Figure 6 below.

[0196] When the first AMF generates the second ngKSI based on the first ngKSI, it may specifically determine that the value of the type field in the second ngKSI is the same as the value of the type field in the first ngKSI, and determine that the value of the value field in the second ngKSI is different from the value of the value field in the first ngKSI. The value of the type field in the first ngKSI (or the second ngKSI) may specifically be 0, indicating that the security context identified by the first ngKSI (or the second ngKSI) is a local security context.

[0197] When determining the value of the value field in the second ngKSI, the first AMF:

[0198] In a possible example, when the first AMF determines that the value in the value field of the first ngKSI is less than 110, if it is determined that the value after adding 1 to the value field of the first ngKSI has not been used, the value after adding 1 is used as the value in the value field of the second ngKSI; if it is determined that the value after adding 1 to the value field of the first ngKSI has been used, 1 will continue to be added, and it will be determined whether the value after adding 1 is used, until an unused value is determined as the value in the value field of the second ngKSI.

[0199] When the first AMF determines that the value in the Value field of the first ngKSI is equal to 110, that is, when it determines that the value in the Value field of the ngKSI is the maximum value (where 111 represents that no key is available), the first AMF further determines whether the minimum value 000 has been used. If it is determined that the minimum value 000 has not been used, the minimum value 000 is used as the value in the Value field of the second ngKSI; if it is determined that the minimum value 000 has been used, it is determined that the value after adding 1 to the minimum value 000 has not been used, and the value after adding 1 is used as the value in the Value field of the second ngKSI; if it is determined that the value after adding 1 to the minimum value 000 has been used, it continues to add 1 and determines whether the value after adding 1 is used, until an unused value is determined to be the value in the Value field of the second ngKSI.

[0200] In another possible example, the first AMF randomly selects an unused value as the value in the value field of the second ngKSI.

[0201] The first AMF determines whether the value is used. Specifically, the first AMF determines whether the value is used by the terminal device, or determines whether the value already corresponds to the identifier of the terminal device (such as GUTI).

[0202] Optionally, the first AMF may also determine the SUPI of the terminal device based on the GUTI of the terminal device.

[0203] Step 503: The first AMF sends a second message to the second AMF.

[0204] Correspondingly, the second AMF receives the second message from the first AMF.

[0205] The second message includes the second AMF key. The second message may be a response to the first message.

[0206] Optionally, when the first AMF further generates a second ngKSI based on the first ngKSI, the second message also includes the second ngKSI. In addition, the first AMF may not generate the second ngKSI based on the first ngKSI, but may send the first ngKSI to the second AMF through the second message.

[0207] Optionally, the second message also includes one or more of the following: a key derivation indication, the SUPI of the terminal device, the security capabilities of the terminal device, and an identifier of the AMF key derivation function. The key derivation indication is used to inform the second AMF that the second AMF key is derived from the first AMF. Accordingly, the second AMF may retain the second AMF key based on the key derivation indication and use the second AMF key as the AMF key corresponding to the second NAS connection. Exemplarily, the key derivation indication is a horizontal key derivation indication, such as keyAmfHDerivationInd.

[0208] In a specific implementation, the first message may be a context transfer request, and the corresponding second message may be a context transfer response. Exemplarily, the context transfer request is a Namf_Communication_UEContextTransfer message, and the context transfer response is a Namf_Communication_UEContextTransferResponse message. Alternatively, the first message may be an N1 message notification, and the corresponding second message may be a create context response. Exemplarily, the N1 message notification is a Namf_Communication_N1MessageNotify message, and the create context response is a Namf_Communication_CreateUEContext message. Alternatively, the first message may be a dual 3GPP access security context transfer request, and the corresponding second message may be a dual 3GPP access security context transfer response. Exemplarily, the dual 3GPP access security context transfer request is a Namf_Dual3GPPaccessSecurityContextTransfer message, and the dual 3GPP access security context transfer response is a Namf_Dual3GPPaccessSecurityContextTransferResponse message.

[0209] It is worth noting that since the first NAS connection still exists in the network, the first AMF still needs to maintain the first security context. Exemplarily, after sending the second message to the second AMF, the first AMF determines to continue maintaining the first security context according to the indication information (i.e., the registration type of dual 3GPP access), that is, to retain / not delete the first security context.

[0210] FIG6 is a flow chart illustrating a second communication method exemplarily provided herein, which further describes the process of establishing a second NAS connection between a terminal device and a second AMF. Any details not fully described may be referred to the description of the embodiment related to FIG5 .

[0211] In step 601, the terminal device sends a registration request to the second AMF. In response, the second AMF receives the registration request from the terminal device. For details about the registration request, see the description in step 501.

[0212] In step 602, the second AMF sends a first message to the first AMF. In response, the first AMF receives the first message from the second AMF. The first message includes a registration request from the terminal device. For details about the first message, see the description in step 501.

[0213] In step 603, the first AMF generates a second AMF key based on the first AMF key. For details, see the description in step 502.

[0214] In step 604, the first AMF sends a second message to the second AMF. In response, the second AMF receives the second message from the first AMF. The second message includes the second AMF key. For details on this implementation, see the description in step 503.

[0215] Step 605: The second AMF generates a second security protection key based on the second AMF key.

[0216] Specifically, the second AMF obtains the second AMF key from the second message and generates a second security protection key based on the NAS key derivation function and the second AMF key. Exemplarily, the second security protection key may be a second NAS integrity key, or the second security protection key may be a second NAS encryption key, or the second security protection key includes the second NAS integrity key and the second NAS encryption key. The second security protection key may also be referred to as a second NAS key.

[0217] The second AMF may also initialize the count value for transmitting messages on the second NAS connection (i.e., the second NAS count value). Exemplarily, the second AMF determines that the second NAS count value is 0. Specifically, the second NAS count value includes a second NAS uplink count value and a second NAS downlink count value, and the second AMF determines that the second NAS uplink count value and the second NAS downlink count value are both 0. After the second AMF establishes a second NAS connection with the terminal device based on the 3GPP access type, each time the second AMF receives a second uplink message according to the second security protection key, that is, each time the second AMF performs security protection on the second uplink message according to the second security protection key, the second AMF determines that the second NAS uplink count value is +1; each time the second AMF sends a second downlink message according to the second security protection key, that is, each time the second AMF performs security protection on the second downlink message according to the second security protection key, the second AMF determines that the second NAS downlink count value is +1.

[0218] Optionally, the second AMF further obtains the first ngKSI from the second message, and generates a second ngKSI based on the first ngKSI, wherein the second AMF generates the second ngKSI in a manner similar to the manner in which the first AMF generates the second ngKSI.

[0219] It can also be understood that after receiving the second message, the second AMF generates a second security context for the second NAS connection, where the second security context includes one or more of the following parameters: a second AMF key, a second security protection key, a second ngKSI, a count value of messages transmitted on the second NAS connection, the SUPI of the terminal device, the security capabilities of the terminal device, and an identifier of the NAS key derivation function.

[0220] Step 606: The second AMF sends a third message to the terminal device.

[0221] Correspondingly, the terminal device receives a third message from the second AMF.

[0222] The third message is, for example, a non-access stratum security mode command (NAS SMC).

[0223] The third message includes a second ngKSI. The second ngKSI is used by the terminal device to associate multiple keys generated by the terminal device (such as a second AMF key, a second security protection key, etc.), or the second ngKSI is used to identify a second security context generated by the terminal device, which is the same as the second security context generated by the second AMF.

[0224] The third message may also include one or more of the following: a key update indication, a first ngKSI, an identifier of a NAS key derivation function, and an identifier of an AMF key derivation function. The key update indication is used to inform the terminal device that the terminal device needs to generate a new AMF key. The key update indication is, for example, K_AMF_change_flag=1. The first ngKSI can be used by the terminal device to index the first security context from multiple security contexts maintained locally, and then obtain the first AMF key from the first security context. The identifier of the AMF key derivation function is used by the terminal device to determine the AMF key derivation function used to generate the second AMF key. The identifier of the NAS key derivation function is used by the terminal device to determine the NAS key derivation function used to generate the second security protection key.

[0225] Step 607: The terminal device generates a second AMF key based on the first AMF key.

[0226] The terminal device can obtain the first security context, obtain the first AMF key from the first security context, and then generate the second AMF key based on the first AMF key.

[0227] In a specific implementation of the terminal device obtaining the first security context, the terminal device obtains the first ngKSI from the third message, and then determines the first security context corresponding to the first ngKSI from multiple security contexts maintained by the terminal device based on the first ngKSI.

[0228] When the terminal device generates the second AMF key based on the first AMF key and the AMF key derivation function, it may specifically input the first AMF key and the first information into the AMF key derivation function, which then outputs the second AMF key. The first information and derivation method may refer to the description of the key derivation performed by the first AMF in step 502. When the first information includes the first NAS count value, that is, when the first NAS count value serves as an input parameter to the AMF key derivation function, to ensure that the first NAS count value input by the first AMF and the terminal device is the same, the terminal device may also include the first NAS count value recorded when sending the registration request in the registration request. Accordingly, the first AMF may obtain the first NAS count value from the registration request and input it into the AMF key derivation function to obtain the second AMF key. Similarly, the terminal device may also input the first NAS count value included in the registration request into the AMF key derivation function to obtain the second AMF key.

[0229] In one specific implementation, the terminal device obtains the key update indication, the first ngKSI, and the identifier of the AMF key derivation function from the third message. Furthermore, the terminal device determines that a new AMF key needs to be generated based on the key update indication, determines the first security context based on the first ngKSI, and obtains the first AMF key from the first security context. The terminal device determines the AMF key derivation function based on the identifier of the AMF key derivation function, and then generates the second AMF key based on the first AMF key and the AMF key derivation function.

[0230] Step 608: The terminal device generates a second security protection key based on the second AMF key.

[0231] In a specific implementation, the terminal device obtains the identifier of the NAS key derivation function from the third message, determines the NAS key derivation function based on the identifier of the NAS key derivation function, and then generates a second security protection key based on the second AMF key and the NAS key derivation function.

[0232] The terminal device can also initialize the count value (i.e., the second NAS count value) for transmitting messages on the second NAS connection. Exemplarily, the terminal device determines that the second NAS count value is 0. Specifically, the second NAS count value includes a second NAS uplink count value and a second NAS downlink count value, and the terminal device determines that the second NAS uplink count value and the second NAS downlink count value are both 0. After the terminal device establishes a second NAS connection with the second AMF based on the 3GPP access type, the terminal device sends a second uplink message once according to the second security protection key, that is, each time the terminal device performs security protection on the second uplink message according to the second security protection key, the terminal device determines the second NAS uplink count value +1; each time the terminal device receives a second downlink message once according to the second security protection key, that is, each time the terminal device performs security protection on the second downlink message according to the second security protection key, the terminal device determines the second NAS downlink count value +1.

[0233] It should be noted that the AMF key derivation function can be pre-agreed or pre-configured between the first AMF and the terminal device, without the first AMF sending the AMF key derivation function identifier to the second AMF, and without the second AMF sending the AMF key derivation function identifier to the terminal device. Similarly, the NAS key derivation function can be pre-agreed or pre-configured between the second AMF and the terminal device, without the second AMF sending the NAS key derivation function identifier to the terminal device.

[0234] When the terminal device sends a registration request to the second AMF, it can record the key set identifier (i.e., the first ngKSI) corresponding to the first security protection key used to securely protect the registration request. Accordingly, after receiving the third message, the terminal device can determine the first security context based on the first ngKSI recorded by itself and obtain the first AMF key from the first security context. Alternatively, only one set of security context (i.e., the first security context) is maintained in the terminal device. Accordingly, after receiving the third message, the terminal device can directly obtain the first AMF key from the first security context. Subsequently, the terminal device can generate the second AMF key based on the first AMF key. That is, in this case, the third message does not need to carry the first ngKSI.

[0235] Optionally, in order to ensure the integrity of the third message transmitted between the second AMF and the terminal device, the second AMF also generates a second MAC for verifying the third message based on the second NAS integrity key maintained by the second AMF and the third message, and sends the second MAC and the third message to the terminal device. Accordingly, the terminal device obtains the first ngKSI from the third message, generates a second AMF key based on the first AMF key indicated by the first ngKSI, generates a second NAS integrity key based on the second AMF key, and then performs integrity verification on the third message based on the second NAS integrity key and the second MAC. The manner in which the second AMF and the terminal device perform integrity protection on the third message based on the second NAS integrity key can be specifically referred to the manner in which the first AMF and the terminal device perform integrity protection on the registration message based on the first NAS integrity key, and will not be repeated here.

[0236] Optionally, after the second AMF sends the second MAC and the third message to the terminal device, it activates the second NAS encryption key. Accordingly, upon receiving the second MAC and the third message, the terminal device, after determining that the third message passes the integrity check based on the second NAS integrity key and the second MAC, activates the second NAS encryption key. In this manner, the terminal device and the second AMF can further encrypt and protect NAS messages on the second NAS connection based on the second NAS encryption key.

[0237] The terminal device assembles a second security context for the second NAS connection using the second ngKSI, the second AMF key, the second security protection key, and the count of messages transmitted on the second NAS connection (i.e., the second NAS count). Optionally, the second security context also includes the terminal device's SUPI, the terminal device's security capabilities, the AMF key derivation function identifier, and the NAS key derivation function identifier.

[0238] Furthermore, the terminal device includes a USIM card and a non-volatile memory. When the terminal device determines that the USIM card supports storage of the security context, the second security context is stored on the USIM card. When the terminal device determines that the USIM card does not support storage of the security context, the second security context is stored on the non-volatile memory.

[0239] Step 609: The terminal device sends a fourth message to the second AMF.

[0240] Correspondingly, the second AMF receives the fourth message from the terminal device.

[0241] The fourth message is a message sent by the terminal device in response to the third message. Exemplarily, when the third message is NAS SMC, the fourth message may be NAS SMC completed.

[0242] Exemplarily, when the terminal device sends the fourth message to the second AMF:

[0243] The terminal device may not only perform integrity protection on the fourth message based on the second NAS integrity key, but may also encrypt the fourth message based on the second NAS encryption key. Specifically, the terminal device encrypts the fourth message based on the second NAS encryption key to obtain an encrypted fourth message, and sends the encrypted fourth message to the second AMF. Accordingly, the second AMF receives the encrypted fourth message and decrypts the encrypted fourth message based on the second NAS encryption key maintained by the second AMF to obtain the fourth message.

[0244] Furthermore, the terminal device may not only encrypt the fourth message according to the second NAS encryption key, but may also encrypt the fourth message in combination with one or more of the following parameters: the second NAS count value, the transmission direction (specifically uplink), the second NAS connection identifier, and the length of the key stream generated by the encryption algorithm. Exemplarily, the terminal device inputs the second NAS encryption key, the fourth message, the second NAS count value, the transmission direction (specifically uplink), the second NAS connection identifier, and the length of the key stream generated by the encryption algorithm into the encryption protection algorithm, and then the encryption protection algorithm outputs the key stream parameters, and then encrypts the fourth message according to the key stream parameters to obtain the encrypted fourth message. Similarly, the second AMF can input these parameters used by the terminal device to encrypt the fourth message, as well as the received encrypted fourth message, into the encryption protection algorithm, and the encryption protection algorithm outputs the decrypted fourth message (i.e., the original fourth message).

[0245] It is understandable that the terminal device may first generate a second MAC based on the second NAS integrity key maintained by the terminal device and the fourth message, and encrypt the fourth message based on the second NAS encryption key maintained by the terminal device to obtain an encrypted fourth message. Correspondingly, the second AMF decrypts the encrypted fourth message based on the second NAS encryption key maintained by the second AMF to obtain the fourth message, and then performs an integrity check on the fourth message based on the second NAS integrity key and the second MAC maintained by the second AMF.

[0246] Of course, here the terminal device can also first encrypt the fourth message according to the second NAS encryption key maintained by the terminal device, and then generate a second MAC based on the second NAS integrity key maintained by the terminal device and the encrypted fourth message. Accordingly, the second AMF can first perform an integrity check on the encrypted fourth message according to the second NAS integrity key and the second MAC maintained by the second AMF. After determining that the encrypted fourth message passes the integrity check, the encrypted fourth message is decrypted according to the second NAS encryption key maintained by the second AMF.

[0247] Step 610: The second AMF sends a registration response to the terminal device.

[0248] Accordingly, the terminal device receives a registration response from the second AMF.

[0249] The registration response is a response to the registration request, and may be a registration accept message.

[0250] When the second AMF successfully sends a registration response to the terminal device, it can be considered that a second NAS connection based on the 3GPP access type is successfully established between the second AMF and the terminal device. After that, messages can be transmitted between the second AMF and the terminal device through the second NAS connection, and the second security protection key is used to securely protect the messages transmitted on the second NAS connection to improve security in the dual 3GPP scenario.

[0251] In combination with the above-mentioned first communication method and the second communication method, Figure 7 is a flow chart of the third communication method provided as an example in the application. The third communication method is a relatively complete and detailed process starting from the terminal device initiating a registration request to the terminal device establishing a second NAS connection with the second AMF.

[0252] In the third communication method described below, the context transfer request is an example of the first message, the context transfer response is an example of the second message, the NAS SMC is an example of the third message, the NAS SMC completion is an example of the fourth message, the registration accept message is an example of the registration response, and the dual 3GPP access indication is an example of indication information.

[0253] In step 701, the terminal device generates a first MAC according to the registration request and the first NAS integrity key in the terminal device. The first MAC is used to verify the integrity of the registration request.

[0254] It is understood that before step 701, the terminal device has been registered with the first AMF, and the terminal device and the first AMF each maintain a first security context for the first NAS connection. The terminal device and the HPLMN complete the primary authentication process.

[0255] Step 702: The terminal device sends a registration request and a first MAC to the second AMF. Correspondingly, the first AMF receives the registration request and the first MAC from the terminal device.

[0256] The registration request includes the GUTI of the terminal device, the dual 3GPP access indication (as the value of the registration type) and the first ngKSI.

[0257] In step 703, the second AMF sends a context transfer request to the first AMF. In response, the first AMF receives the context transfer request from the second AMF. The context transfer request includes the registration request and the first MAC address.

[0258] In step 704, the first AMF determines a first security context based on the GUTI and the first ngKSI. The first security context includes the first AMF key, the first NAS integrity key, the first ngKSI, and the security capabilities of the terminal device.

[0259] Step 705: The first AMF successfully verifies the registration request based on the first NAS integrity key and the first MAC.

[0260] In step 706, the first AMF generates a second AMF key based on the first AMF key, and generates a second ngKSI based on the first ngKSI.

[0261] In step 707, the first AMF retains the first security context (ie, does not delete the first security context).

[0262] In step 708, the first AMF sends a context transfer response to the second AMF. In response, the second AMF receives the context transfer response from the first AMF. The context transfer response includes the horizontal key derivation indication, the second AMF key, the first ngKSI, the second ngKSI, and the SUPI of the terminal device. The horizontal key derivation indication indicates that the second AMF key was derived by the first AMF.

[0263] In step 709, the second AMF generates a second NAS integrity key based on the second AMF key and the NAS key derivation algorithm, initializes a count of messages transmitted on the second NAS connection, and generates a second security context.

[0264] In step 710, the second AMF generates a second MAC based on the NAS SMC and the second NAS integrity key in the second AMF. The second MAC is used to verify the integrity of the NAS SMC.

[0265] In step 711, the second AMF sends a NAS SMC and a second MAC to the terminal device. In response, the terminal device receives the NAS SMC and the second MAC from the second AMF. The NAS SMC includes the first ngKSI, the second ngKSI, the identifier of the NAS key derivation algorithm, and a key update indication. The key update indication instructs the terminal device to regenerate the AMF key.

[0266] In step 712, the terminal device indexes the first security context based on the first ngKSI, obtains the first AMF key from the first security context, generates a second AMF key based on the first AMF key, and then generates a second NAS integrity key based on the second AMF key.

[0267] Step 713: The terminal device successfully verifies the NAS SMC based on the second NAS integrity key and the second MAC.

[0268] In step 714, the terminal device sends a NAS SMC end message to the second AMF. Correspondingly, the second AMF receives the NAS SMC end message from the terminal device.

[0269] Optionally, the terminal device performs integrity protection on the NAS SMC end message according to the second NAS integrity key in the terminal device. Optionally, the terminal device further performs encryption protection on the NAS SMC end message according to the second NAS encryption key in the terminal device.

[0270] In step 715, the second AMF sends a Registration Accept message to the terminal device. In response, the terminal device receives the Registration Accept message from the second AMF. Optionally, the second AMF performs integrity protection on the Registration Accept message using the second NAS integrity key in the second AMF. Optionally, the second AMF performs encryption protection on the Registration Accept message using the second NAS encryption key in the second AMF.

[0271] Step 716: The terminal device stores the second security context in the USIM or non-volatile memory.

[0272] It is understood that any content not fully described in the embodiment related to FIG7 can be referred to the description of the embodiments related to FIG5 and FIG6 . Specifically, steps 701 to 703 can refer to the description of steps 501, 601, and 602. Steps 704 to 707 can refer to the description of steps 502 and 603. Step 708 can refer to the description of steps 503 and 604. Step 709 can refer to the description of step 605. Steps 710 and 711 can refer to the description of step 606. Steps 712 and 716 can refer to the description of steps 607 and 608. Steps 713 and 714 can refer to the description of step 609. Step 715 can refer to the description of step 610.

[0273] In the above technical solution, when the terminal device requests to establish a second NAS connection with the second AMF based on the 3GPP access type, it can send a registration request to the second AMF. The registration request is used to indicate dual 3GPP access. Accordingly, the second AMF can forward the registration request to the first AMF, so that the first AMF can generate a second AMF key corresponding to the second NAS connection based on the first AMF key corresponding to the already established first NAS connection, and send the second AMF key to the second AMF. Subsequently, the second AMF can generate a second security protection key based on the second AMF key, and securely protect the messages transmitted on the second NAS connection based on the second security protection key, thereby improving security in the dual 3GPP scenario. In addition, compared to the method of accessing two different PLMNs based on one 3GPP access type and one non-3GPP access type, the registration request indicates dual 3GPP access. After receiving the registration request, the second AMF no longer instructs the terminal device to perform a second primary authentication in the HPLMN based on the identity credentials of the 3GPP access type. In this way, the terminal device only needs to perform primary authentication in the HPLMN based on the identity credentials of the 3GPP access type when accessing the PLMN for the first time based on the 3GPP access type. When accessing the second PLMN based on the 3GPP access type for the second time, there is no need to perform primary authentication in the HPLMN based on the identity credentials of the 3GPP access type. In addition, the second AMF key is generated after the primary authentication, which helps to avoid unnecessary processes and improve network performance.

[0274] This application also requires the following three points:

[0275] Supplement 1: The step numbers of the various flow charts described in the relevant embodiments of Figure 5 to Figure 7 are only an example of the execution process and do not constitute a restriction on the order of execution of the steps. In the embodiments of the present application, there is no strict execution order between the steps that have no temporal dependency on each other. Not all the steps shown in the various flow charts are steps that must be executed. Some steps can be deleted based on actual needs on the basis of each flow chart, or other possible steps can be added based on actual needs on the basis of each flow chart. Each of the three embodiments focuses on describing the differences from other embodiments. Except for the differences, the two can refer to each other; in addition, in the same embodiment, different implementation methods or different examples can also refer to each other.

[0276] Supplement 2: Dual 3GPP access not only means that the terminal device accesses two PLMNs respectively through two 3GPP access types, but also means that the terminal device accesses two independently networked non-public networks (standalone non-public networks, SNPN) respectively through two 3GPP access types, or the terminal device accesses one PLMN through one 3GPP access type and accesses to the SNPN through another 3GPP access type.

[0277] When the first AMF belongs to the PLMN and the second AMF belongs to the SNPN, the present application can also implement that the terminal device only needs to use the identity credentials of the 3GPP access type to perform primary authentication in the HPLMN when accessing the PLMN for the first time based on the 3GPP access type, that is, when establishing the first NAS connection with the first AMF, to generate the security context corresponding to the first NAS connection. Then, when accessing the SNPN again based on the 3GPP access type, that is, when establishing the second NAS connection with the second AMF, the security context corresponding to the first NAS connection is used to protect and authenticate this access process, and to deduce the security key corresponding to the second NAS connection.

[0278] When the first AMF belongs to an SNPN and the second AMF belongs to a PLMN, the present application can also implement that the terminal device only needs to use the identity credentials of the 3GPP access type to perform primary authentication in the HPLMN when accessing the SNPN for the first time based on the 3GPP access type, that is, when establishing the first NAS connection with the first AMF, to generate a security context corresponding to the first NAS connection. Then, when accessing the PLMN again based on the 3GPP access type, that is, when establishing the second NAS connection with the second AMF, the security context corresponding to the first NAS connection is used to protect and authenticate this access process, and to deduce the security key corresponding to the second NAS connection.

[0279] When the first AMF belongs to the first SNPN and the second AMF belongs to the second SNPN, the present application can also realize that the terminal device only needs to use the identity certificate of the 3GPP access type to perform primary authentication in the HPLMN when accessing the first SNPN based on the 3GPP access type for the first time, that is, when establishing the first NAS connection with the first AMF, to generate a security context corresponding to the first NAS connection. Then, when accessing the second SNPN based on the 3GPP access type again, that is, when establishing the second NAS connection with the second AMF, the security context corresponding to the first NAS connection is used to protect and authenticate this access process, and deduce the security key corresponding to the second NAS connection. Furthermore, the first SNPN and the second SNPN are the same SNPN or different SNPNs.

[0280] Furthermore, the two 3GPP access types use the same or different standards, such as both 3GPP access types use the terrestrial new radio (NR); or, the two 3GPP access types use the terrestrial NR and the terrestrial UMTS evolved terrestrial radio access network (E-UTRAN), respectively, where UMTS is specifically a universal mobile telecommunications system, for example, using an evolved packet core (EPC) and a 5G core network (5GC / 5GCN) combination; or, the two 3GPP access types use terrestrial NR and non-terrestrial NR, respectively; or, both 3GPP access types use non-terrestrial NR, for example, using the same or different non-terrestrial networks (NTN) orbits, where the NTN orbits are, for example, earth observation / medium orbit / low orbit.

[0281] Supplement 3: The embodiments of the present application are applicable not only to dual-3GPP access scenarios, but also to multi-3GPP access scenarios. The implementation of the multi-3GPP access scenario is similar to that of the dual-3GPP access scenario. The first AMF can be considered to be an AMF that has already established a NAS connection with the terminal device, while the second AMF is an AMF that has not yet established a NAS connection with the terminal device. For example, a NAS connection 1 established based on the 3GPP access type exists between the terminal device and AMF1, and a NAS connection 2 established based on the 3GPP access type exists between the terminal device and AMF2. Furthermore, when the terminal device needs to establish a NAS connection 3 with AMF3 based on the 3GPP access type, it can send a registration request to AMF3. The registration request includes indication information for indicating multi-3GPP access. Accordingly, AMF3 sends a first request including the registration request to AMF1. AMF1 generates an AMF key corresponding to NAS connection 3 based on the first request and sends the generated AMF key to AMF3. Here, AMF3 and AMF1 are the second AMF and the first AMF, respectively, in this application. In addition, AMF3 may also send the first request to AMF2. AMF3 and AMF2 are respectively the second AMF and the first AMF in this application. The "dual 3GPP access" in the relevant embodiments of Figures 5 to 7 can be replaced with "multi-3GPP access" to understand the communication method corresponding to this scenario.

[0282] The various embodiments described herein may be independent solutions or may be combined according to internal logic, and all of these solutions fall within the scope of protection of this application. It is understood that in the various method embodiments described above, the methods and operations implemented by the terminal device may also be implemented by components (such as chips or circuits) that can be used in the terminal device.

[0283] Based on the above content and the same concept, Figures 8 and 9 are schematic diagrams of the structures of possible communication devices provided by this application. These communication devices can be used to implement the functions of the terminal device or AMF in the above method embodiments, thereby also achieving the beneficial effects of the above method embodiments. In this application, the communication device can be a terminal device as shown in Figure 1 or Figure 4, or it can be an AMF as shown in Figure 1 or Figure 4.

[0284] As shown in FIG8 , the communication device 800 includes a processing module 801 and a transceiver module 802 .

[0285] When the communication device 800 is used to implement the functions of the first AMF in the method embodiments shown in FIG. 5 to FIG. 7 :

[0286] The transceiver module 802 is used to receive a first message from the second AMF, where the first message includes a registration request from the terminal device, where the registration request includes indication information, where the indication information is used to indicate dual 3GPP access, and where a first NAS connection based on the 3GPP access type exists between the terminal device and the first AMF. The processing module 801 is used to generate a second AMF key based on the first AMF key. The transceiver module 802 is also used to send a second message to the second AMF, where the second message is used to respond to the first message, and where the second message includes a second AMF key. The first AMF key is used to derive a first security protection key, where the first security protection key is used to securely protect messages transmitted on the first NAS connection, and the second AMF key is used to derive a second security protection key, where the second security protection key is used to securely protect messages transmitted on the second NAS connection. The second NAS connection is a connection based on the 3GPP access type between the terminal device and the second AMF.

[0287] In one possible implementation, the first message also includes a first MAC. Before the transceiver module 802 sends the second message to the second AMF, the processing module 801 is further used to successfully verify the registration request based on the first security protection key and the first MAC.

[0288] In a possible implementation, the processing module 801 is further configured to retain a first security context of the first NAS connection, where the first security context includes a first AMF key and a first security protection key.

[0289] In one possible implementation, the second message also includes a second key set identifier, which is used to identify a second security context of the second NAS connection. The second security context includes a second AMF key and a second security protection key. Processing module 801 is further configured to generate a second key set identifier based on the first key set identifier, where the first key set identifier is used to identify the first security context of the first NAS connection. In one possible implementation, the second message also includes the first key set identifier.

[0290] In one possible implementation, when the processing module 801 generates the second AMF key based on the first AMF key, it is specifically used to: generate the second AMF key based on the first AMF key and the first information; wherein the first information includes one or more of the following: an identifier of the key generation function; a count value of message transmission on the first NAS connection; a direction of message transmission on the first NAS connection; an identifier of the 3GPP access type; an identifier of the public land mobile network to which the first AMF belongs; and an identifier of the public land mobile network to which the second AMF belongs.

[0291] When the communication device 800 is used to implement the functions of the terminal device in the method embodiments shown in FIG. 5 to FIG. 7 :

[0292] The transceiver module 802 is configured to send a registration request to the second AMF, the registration request including indication information indicating dual 3GPP access and a first NAS connection based on a 3GPP access type between the terminal device and the first AMF. The processing module 801 is configured to generate a second AMF key based on the first AMF key, the first AMF key being used to derive a first security protection key, the first security protection key being used to securely protect messages transmitted over the first NAS connection, and the second AMF key being used to derive a second security protection key, the second security protection key being used to securely protect messages transmitted over the second NAS connection, the second NAS connection being a connection based on a 3GPP access type between the terminal device and the second AMF.

[0293] In one possible implementation, when the transceiver module 802 sends a registration request to the second AMF, it is specifically used to: generate a first MAC for verifying the registration request based on the first security protection key and the registration request, and send the registration request and the first MAC to the second AMF.

[0294] In one possible implementation, the transceiver module 802 is further used to: receive a second key set identifier from the second AMF, or receive a first key set identifier and a second key set identifier from the second AMF; wherein the first key set identifier is used to identify the first security context of the first NAS connection, and the first security context includes the first AMF key and the first security protection key; and the second key set identifier is used to identify the second security context of the second NAS connection, and the second security context includes the second AMF key and the second security protection key.

[0295] In a possible implementation, the processing module 801 is configured to initialize a count value for transmitting messages on the second NAS connection.

[0296] In one possible implementation, when the processing module 801 generates the second AMF key based on the first AMF key, it is specifically used to: generate the second AMF key based on the first AMF key and the first information; wherein the first information includes one or more of the following: an identifier of the key generation function; a count value of message transmission on the first NAS connection; a direction of message transmission on the first NAS connection; an identifier of the 3GPP access type; an identifier of the public land mobile network to which the first AMF belongs; and an identifier of the public land mobile network to which the second AMF belongs.

[0297] When the communication device 800 is used to implement the functions of the second AMF in the method embodiments shown in FIG. 5 to FIG. 7 :

[0298] The transceiver module 802 is used to: receive a registration request from a terminal device, the registration request including indication information, the indication information being used to indicate dual 3GPP access; and send a first message to a first AMF, the first message including a registration request from the terminal device, and a first NAS connection based on a 3GPP access type existing between the terminal device and the first AMF. The transceiver module 802 is also used to: receive a second message from the first AMF, the second message including a second AMF key. The processing module 801 is also used to: generate a second security protection key based on the second AMF key, the second security protection key being used to securely protect messages transmitted on a second non-access layer connection, the second non-access layer connection being a connection based on a 3GPP access type between the terminal device and the second AMF.

[0299] In one possible implementation, the second AMF key is generated based on the first AMF key, the first AMF key is used to derive a first security protection key, and the first security protection key is used to securely protect messages transmitted on the first NAS connection.

[0300] In a possible implementation, the first message further includes a first MAC, and the first MAC is used to verify the registration request. The transceiver module 802 is further used to receive the first MAC from the terminal device.

[0301] In one possible implementation, the second message also includes a second key set identifier, which is used to identify a second security context for the second NAS connection, the second security context including a second AMF key and a second security protection key, and the second key set identifier is generated based on the first key set identifier; the first key set identifier is used to identify a first security context for the first NAS connection, the first security context including a first AMF key and a first security protection key; the transceiver module 802 is further configured to send the second key set identifier to the terminal device. Exemplarily, the second message also includes the first key set identifier; the transceiver module 802 is further configured to send the first key set identifier to the terminal device.

[0302] In one possible implementation, the second message also includes the first key set identifier. The processing module 801 is further configured to generate a second key set identifier based on the first key set identifier, where the second key set identifier is used to identify a second security context of the second NAS connection, where the second security context includes a second AMF key and a second security protection key. The transceiver module 802 is further configured to send the second key set identifier to the terminal device, or send the first key set identifier and the second key set identifier to the terminal device.

[0303] In a possible implementation, the processing module 801 is further configured to initialize a count value for transmitting messages on the second NAS connection.

[0304] FIG9 shows an apparatus 900 provided in an embodiment of the present application. The apparatus shown in FIG9 may be a hardware circuit implementation of the apparatus shown in FIG8 . The apparatus may be applied to the flowcharts shown above to perform the functions of the first AMF, terminal device, or second AMF in the above-described method embodiments. For ease of illustration, FIG9 only shows the main components of the apparatus.

[0305] The device 900 shown in FIG9 includes a communication interface 910, a processor 920, and a memory 930, wherein the memory 930 is used to store program instructions and / or data. The processor 920 may operate in conjunction with the memory 930. The processor 920 may execute program instructions stored in the memory 930. When the instructions or program stored in the memory 930 are executed, the processor 920 is used to perform the operations performed by the processing module 801 in the above embodiment, and the communication interface 910 is used to perform the operations performed by the transceiver module 802 in the above embodiment.

[0306] The memory 930 is coupled to the processor 920. In the embodiments of the present application, coupling refers to an indirect coupling or communication connection between devices, units, or modules, which can be electrical, mechanical, or other forms, and is used for information exchange between the devices, units, or modules. At least one of the memories 930 may be included in the processor 920.

[0307] In the embodiments of the present application, the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface. In the embodiments of the present application, when the communication interface is a transceiver, the transceiver may include an independent receiver or an independent transmitter; or a transceiver or communication interface that integrates transceiver functions.

[0308] Device 900 may also include a communication line 940. Communication interface 910, processor 920, and memory 930 may be interconnected via communication line 940; communication line 940 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, for example. Communication line 940 may be classified as an address bus, a data bus, a control bus, and the like. For ease of illustration, FIG9 shows only one thick line, but this does not imply that there is only one bus or only one type of bus.

[0309] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a CD-ROM or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a base station or a terminal. Of course, the processor and the storage medium can also exist in a base station or a terminal as discrete components.

[0310] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, all or part of the processes or functions of the embodiments of the present application are performed. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, or other programmable device. The computer program or instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions may be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media, such as floppy disks, hard disks, or magnetic tapes; optical media, such as digital video disks; or semiconductor media, such as solid-state drives. Computer-readable storage media may be volatile or nonvolatile storage media, or may include both volatile and nonvolatile types of storage media.

[0311] In the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

[0312] Depending on whether it is used in the specification, it is optional: In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of this application, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "Including at least one of A, B and C" can mean: including A; including B; including C; including A and B; including A and C; including B and C; including A, B and C.

[0313] It is understood that the various numbers used in the embodiments of this application are merely for ease of description and are not intended to limit the scope of the embodiments of this application. The order of the sequence numbers of the above-mentioned processes does not necessarily imply a specific order of execution; the order of execution of the processes should be determined by their functions and inherent logic.

Claims

1. A communication method, characterized in that: include: The first mobility management network element receives a first message from the second mobility management network element, where the first message includes a registration request from a terminal device, the registration request includes indication information, the indication information is used to indicate dual 3GPP access, and a first non-access layer connection based on a 3GPP access type exists between the terminal device and the first mobility management network element; The first mobility management network element generates a second mobility management network element key according to the first mobility management network element key; The first mobility management network element sends a second message to the second mobility management network element, where the second message includes the second mobility management network element key; Among them, the first mobility management network element key is used to derive a first security protection key, and the first security protection key is used to securely protect messages transmitted on the first non-access layer connection; the second mobility management network element key is used to derive a second security protection key, and the second security protection key is used to securely protect messages transmitted on the second non-access layer connection; the second non-access layer connection is a connection based on a 3GPP access type between the terminal device and the second mobility management network element.

2. The method according to claim 1, characterized in that The first message also includes a message authentication code. Before the first mobility management network element sends the second message to the second mobility management network element, the method further includes: The first mobility management network element successfully verifies the registration request according to the first security protection key and the message authentication code.

3. The method according to claim 1 or 2, characterized in that Also includes: The first mobility management network element retains a first security context of the first non-access layer connection, where the first security context includes the first mobility management network element key and the first security protection key.

4. The method according to any one of claims 1 to 3, characterized in that The second message also includes a second key set identifier, where the second key set identifier is used to identify a second security context of the second non-access layer connection, and the second security context includes the second mobility management network element key and the second security protection key; The method further comprises: The first mobility management network element generates the second key set identifier according to the first key set identifier, wherein the first key set identifier is used to identify a first security context of the first non-access stratum connection.

5. The method according to any one of claims 1 to 4, characterized in that The second message also includes a first key set identifier, where the first key set identifier is used to identify a first security context of the first non-access layer connection.

6. The method according to claim 4 or 5, characterized in that A value of the type field included in the second key set identifier is the same as a value of the type field included in the first key set identifier; The value of the value field included in the second key set identifier is different from the value of the value field included in the first key set identifier.

7. The method according to any one of claims 1 to 6, characterized in that The first message is a context transfer request, and the second message is a context transfer response; or, the first message is an N1 message notification, and the second message is a create context response; or, the first message is a dual 3GPP access security context transfer request, and the second message is a dual 3GPP access security context transfer response.

8. The method according to any one of claims 1 to 7, characterized in that The first mobility management network element generates a second mobility management network element key according to the first mobility management network element key, including: The first mobility management network element generates the second mobility management network element key according to the first mobility management network element key and first information; wherein the first information includes one or more of the following: The identifier of the key generation function; a count value of messages transmitted over the first non-access stratum connection; a direction of transmitting messages on said first non-access stratum connection; An identifier of the 3GPP access type; an identifier of a public land mobile network to which the first mobility management network element belongs; An identifier of the public land mobile network to which the second mobility management network element belongs.

9. The method according to claim 8, characterized in that The direction of transmitting the message on the first non-access layer connection is downlink; The count value of transmitting messages on the first non-access layer connection is equal to the number of times the first mobility management network element sends downlink messages to the terminal device on the first non-access layer connection according to the first security protection key.

10. The method according to claim 8, characterized in that The direction of transmitting the message on the first non-access layer connection is uplink; The count value of transmitting messages on the first non-access layer connection is equal to the number of times the first mobility management network element receives uplink messages from the terminal device on the first non-access layer connection according to the first security protection key.

11. A communication method, characterized in that: include: Sending a registration request to the second mobility management network element, where the registration request includes indication information, where the indication information is used to indicate dual 3GPP access, and a first non-access layer connection based on the 3GPP access type exists between the terminal device and the first mobility management network element; A second mobility management network element key is generated according to the first mobility management network element key, wherein the first mobility management network element key is used to derive a first security protection key, and the first security protection key is used to securely protect messages transmitted on the first non-access layer connection; the second mobility management network element key is used to derive a second security protection key, and the second security protection key is used to securely protect messages transmitted on the second non-access layer connection, and the second non-access layer connection is a connection based on a 3GPP access type between the terminal device and the second mobility management network element.

12. The method according to claim 11, characterized in that Sending a registration request to the second mobility management network element includes: generating a message authentication code for verifying the registration request according to the first security protection key and the registration request; Sending the registration request and the message authentication code to the second mobility management network element.

13. The method according to claim 11 or 12, characterized in that Also includes: receiving a second key set identifier from the second mobility management network element, or, receiving a first key set identifier and a second key set identifier from the second mobility management network element; The first key set identifier is used to identify a first security context of the first non-access layer connection, and the first security context includes the first mobility management network element key and the first security protection key; The second key set identifier is used to identify a second security context of the second non-access layer connection, and the second security context includes the second mobility management network element key and the second security protection key.

14. The method according to claim 13, characterized in that The second key set identifier is carried in a non-access layer security mode command, or the first key set identifier and the second key set identifier are carried in a non-access layer security mode command.

15. The method according to any one of claims 11 to 14, characterized in that Also includes: Initialize a count value for transmitting messages on the second non-access layer connection.

16. The method according to any one of claims 11 to 15, characterized in that The generating the second mobility management network element key according to the first mobility management network element key includes: Generate the second mobility management network element key according to the first mobility management network element key and the first information; wherein the first information includes one or more of the following: The identifier of the key generation function; a count value of messages transmitted over the first non-access stratum connection; a direction of transmitting messages on said first non-access stratum connection; An identifier of the 3GPP access type; an identifier of a public land mobile network to which the first mobility management network element belongs; An identifier of the public land mobile network to which the second mobility management network element belongs.

17. The method according to claim 16, characterized in that The direction of transmitting the message on the first non-access layer connection is downlink; The count value of transmitting messages on the first non-access layer connection is equal to the number of times the terminal device receives downlink messages from the first mobility management network element on the first non-access layer connection according to the first security protection key.

18. The method according to claim 16, characterized in that The direction of transmitting the message on the first non-access layer connection is uplink; The count value of transmitting messages on the first non-access layer connection is equal to the number of times the terminal device sends an uplink message to the first mobility management network element on the first non-access layer connection according to the first security protection key.

19. A communication method, characterized in that: include: The second mobility management network element receives a registration request from the terminal device, where the registration request includes indication information, where the indication information is used to indicate dual 3GPP access; The second mobility management network element sends a first message to the first mobility management network element, where the first message includes the registration request, and a first non-access layer connection based on a 3GPP access type exists between the terminal device and the first mobility management network element; The second mobility management network element receives a second message from the first mobility management network element, where the second message includes a second mobility management network element key; The second mobility management network element generates a second security protection key based on the second mobility management network element key, and the second security protection key is used to securely protect messages transmitted on the second non-access layer connection. The second non-access layer connection is a connection based on a 3GPP access type between the terminal device and the second mobility management network element.

20. The method of claim 19, wherein: The second mobility management network element key is generated based on the first mobility management network element key, the first mobility management network element key is used to derive a first security protection key, and the first security protection key is used to perform security protection on a message transmitted on the first non-access layer connection.

21. The method according to claim 19 or 20, characterized in that The first message also includes a message authentication code, and the message authentication code is used to verify the registration request. The method further includes: The second mobility management network element receives the message authentication code from the terminal device.

22. The method according to any one of claims 19 to 21, characterized in that The second message also includes a second key set identifier, where the second key set identifier is used to identify a second security context of the second non-access layer connection, where the second security context includes the second mobility management network element key and the second security protection key, and the second key set identifier is generated based on the first key set identifier; The first key set identifier is used to identify a first security context of the first non-access layer connection, and the first security context includes the first mobility management network element key and the first security protection key; The method further comprises: The second mobility management network element sends a second key set identifier to the terminal device.

23. The method of claim 22, wherein: The second message also includes a first key set identifier; The method further comprises: The second mobility management network element sends the first key set identifier to the terminal device.

24. The method according to any one of claims 19 to 21, characterized in that The second message also includes a first key set identifier, where the first key set identifier is used to identify a first security context of the first non-access layer connection, where the first security context includes the first mobility management network element key and the first security protection key; The method further comprises: The second mobility management network element generates a second key set identifier according to the first key set identifier, where the second key set identifier is used to identify a second security context of the second non-access layer connection, and the second security context includes the second mobility management network element key and the second security protection key; The second mobility management network element sends the second key set identifier to the terminal device, or sends the first key set identifier and the second key set identifier to the terminal device.

25. The method according to any one of claims 22 to 24, characterized in that A value of the type field included in the second key set identifier is the same as a value of the type field included in the first key set identifier; The value of the value field included in the second key set identifier is different from the value of the value field included in the first key set identifier.

26. The method according to any one of claims 22 to 25, characterized in that The second key set identifier is carried in a non-access layer security mode command, or the first key set identifier and the second key set identifier are carried in a non-access layer security mode command.

27. The method according to any one of claims 19 to 26, characterized in that The first message is a context transfer request, and the second message is a context transfer request response; or, the first message is an N1 message notification, and the second message is a create context response; or, the first message is a dual 3GPP access security context transfer request, and the second message is a dual 3GPP access security context transfer response.

28. The method according to any one of claims 19 to 27, characterized in that The second mobility management network element initializes a count value for transmitting messages on the second non-access layer connection.

29. A communication device, characterized in that: Comprising a module for executing the method as claimed in any one of claims 1 to 10, or a module for executing the method as claimed in any one of claims 11 to 18, or a module for executing the method as claimed in any one of claims 19 to 28.

30. A communication device, characterized in that: The invention comprises a processor and an interface circuit, wherein the interface circuit is used to receive signals from other communication devices outside the communication device and transmit them to the processor or send signals from the processor to other communication devices outside the communication device, and the processor is used to implement the method as claimed in any one of claims 1 to 10, or implement the method as claimed in any one of claims 11 to 18, or implement the method as claimed in any one of claims 19 to 28 through a logic circuit or executing code instructions.

31. A computer-readable storage medium, characterized in that: The storage medium stores a computer program or instruction. When the computer program or instruction is executed by the communication device, it implements the method as described in any one of claims 1 to 10, or implements the method as described in any one of claims 11 to 18, or implements the method as described in any one of claims 19 to 28.

32. A computer program product, characterized in that The computer program product comprises a computer program or instructions, and when the computer program or instructions are executed by a communication device, the method according to any one of claims 1 to 10 is implemented, or the method according to any one of claims 11 to 18 is implemented, or the method according to any one of claims 19 to 28 is implemented.

33. A communication method, characterized in that: include: The second mobility management network element receives a registration request from the terminal device, and sends a first message to the first mobility management network element, where the first message includes the registration request, and the registration request includes indication information, where the indication information is used to indicate dual 3GPP access, and a first non-access layer connection based on the 3GPP access type exists between the terminal device and the first mobility management network element; The first mobility management network element generates a second mobility management network element key according to the first mobility management network element key, and sends a second message to the second mobility management network element, wherein the first mobility management network element key is used to derive a first security protection key, and the first security protection key is used to perform security protection on a message transmitted on the first non-access layer connection; The second mobility management network element generates a second security protection key based on the second mobility management network element key included in the second message, where the second security protection key is used to perform security protection on messages transmitted on the second non-access layer connection, and the second non-access layer connection is a connection based on a 3GPP access type between the terminal device and the second mobility management network element.

34. The method of claim 33, wherein: Before the second mobility management network element receives the registration request from the terminal device, the method further includes: the terminal device sending the registration request to the second mobility management network element; After the second mobility management network element generates the second security protection key according to the second mobility management network element key included in the second message, the method further includes: the terminal device generates the second mobility management network element key according to the first mobility management network element key.

35. A communication system, characterized in that: include: A first mobility management network element and a second mobility management network element; The first mobility management network element is used to implement the method according to any one of claims 1 to 10; The second mobility management network element is used to implement the method according to any one of claims 19 to 28.

36. The system of claim 35, wherein: Also includes: A terminal device, wherein the terminal device is used to implement the method according to any one of claims 11 to 18.

37. A chip, characterized in that: The chip is used to read and execute a computer program or instruction in a memory to implement the method as claimed in any one of claims 1 to 10, or to implement the method as claimed in any one of claims 11 to 18, or to implement the method as claimed in any one of claims 19 to 28.

Citation Information

Patent Citations

  • Communication method and device

    CN119729469A

  • Registration method and device, storage medium and chip

    CN115606265A

  • Method and device for managing security context

    CN116074828A

  • Multi-access PDU sessions for multi-USIM devices

    US20230144323A1