Communication method and device

By deriving new keys based on access frequency, the solution addresses security key reuse in dual-connectivity scenarios, ensuring secure communication in terminal devices.

JP2025532194APending Publication Date: 2025-09-29HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025517747
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-04
Filing Date
2023-08-11
Publication Date
2025-09-29

AI Technical Summary

Technical Problem

In dual-connectivity or multi-radio dual connectivity scenarios, terminal devices face security key reuse issues during candidate cell addition or modification processes, leading to insecure communication between the terminal device and the candidate cell.

Method used

Derive new keys based on parameter values that are updated or determined by the number of times the cell or secondary node is accessed, ensuring each candidate cell access uses a different key to prevent reuse and maintain secure communication.

Benefits of technology

Prevents security key reuse by deriving new keys for each candidate cell access, ensuring secure communication and avoiding key inconsistency or regression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025532194000001_ABST
    Figure 2025532194000001_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a communication method and device. The method includes: deriving a first key and deriving a third key based on the first key, where the first key is determined based on a second key by using a first parameter value, the second key is a master key or the first parameter value is obtained through updating based on the second parameter value, the first parameter value is determined based on the number of times the first cell or a secondary node to which the first cell belongs is accessed, and the third key is a user plane key and / or a control plane key, and the third key is used to perform encryption or data integrity protection on data and / or signaling to and from the first cell. This solution can avoid key reuse.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to Chinese Patent Application No. 202211214503.X, entitled "Communication Method and Apparatus," filed with the State Intellectual Property Office of China on September 30, 2022, the entire contents of which are incorporated herein by reference.

[0002] This application further claims priority to Chinese Patent Application No. 202310409631.8, entitled "Communication Method and Apparatus," filed with the State Intellectual Property Office of China on April 7, 2023, the entire contents of which are incorporated herein by reference.

[0003] This application also claims priority to Patent Application No. PCT / CN2023 / 111239, entitled "Communication Method and Apparatus," filed with the State Intellectual Property Office of China on August 4, 2023, the entire contents of which are incorporated herein by reference.

[0004] TECHNICAL FIELD Embodiments of the present application relate to the field of communications, and more particularly to communication methods and apparatus. [Background technology]

[0005] In a dual-connectivity (DC) or multi-radio dual connectivity (MR-DC) scenario, a terminal device may perform a conditional primary secondary cell group cell (PSCell) addition or modification process. When the terminal device evaluates that the execution conditions for the candidate cell are met, the terminal device may perform the PSCell addition or modification process.

[0006] To prevent data from being intercepted and / or tampered with, encryption and / or integrity protection may be performed on the communication between the terminal device and the cell based on the security key. However, in the process in which the terminal device performs a subsequent candidate cell addition or change, a security key reuse problem may occur. As a result, the communication process between the terminal device and the candidate cell served by the secondary node is not secure.

[0007] Therefore, how to avoid security key reuse in the process of a terminal device adding or changing a candidate cell has become an urgent technical problem to be solved. Summary of the Invention

[0008] The embodiments of the present application provide a communication method and apparatus for avoiding key reuse in the process of a terminal device adding or changing a candidate cell.

[0009] According to a first aspect, there is provided a method, which may be performed by a terminal device or by a chip or circuit configured in the terminal device, although this is not a limitation in the present application.

[0010] The method comprises the steps of: deriving a first key and deriving a third key based on the first key, wherein the first key is determined based on a second key by using a first parameter value, the second key being a master key, and the first parameter value being obtained through updating based on the second parameter value, or the first parameter value being determined based on a number of times of accessing the first cell or a secondary node to which the first cell belongs, and the third key being a user plane key and / or a control plane key, and the third key being used to perform encryption or data integrity protection on data and / or signaling to and from the first cell.

[0011] For example, the second key may be a master key between the terminal device and the MN, e.g., K gNBor K eNB The master key may be used to derive control plane keys and / or user plane keys. The control plane keys and / or user plane keys are used to perform encryption and / or data integrity protection on data and / or signaling between the terminal device and the MN. For example, the control plane keys are used to perform encryption and / or data integrity protection on signaling between the terminal device and the MN. In another example, the user plane keys are used to perform encryption and / or data integrity protection on data between the terminal device and the MN.

[0012] For example, the first key is a secondary key, e.g., K SN , S.K. gNB or SK eNB The first key may be used to derive a control plane key and / or a user plane key. The control plane key and / or the user plane key may be used to perform encryption and / or data integrity protection on data and / or signaling between the terminal device and the SN, in other words, the third key. For example, the control plane key may be used to perform encryption and / or data integrity protection on signaling between the terminal device and the SN. In another example, the user plane key may be used to perform encryption and / or data integrity protection on data between the terminal device and the SN. For example, the third key may be an integrity protection key (K RRCint or K UPint ) and / or encryption / decryption key (K RRCenc or K UPenc )

[0013] It should be understood that key derivation may also be referred to as key inference, key deduction, key determination, key acquisition, or the like.

[0014] It should be noted that before deriving the first key, the terminal device may evaluate whether the execution condition of the first cell is met, and the first cell is a candidate cell for conditional cell addition or modification. When the terminal device evaluates that the execution condition of the first cell is met, the terminal device may derive the first key, and the first key may be used for security of the first cell.

[0015] It should be understood that the terminal device does not necessarily derive the first key immediately upon detecting a cell that satisfies the conditions, for example, the terminal device may derive the first key when or after performing an access process (e.g., a random access process).

[0016] According to the above solution, a new first parameter value can be obtained by updating the second parameter value, or the new first parameter value can be determined based on the number of times the first cell or the secondary node to which the first cell belongs, so that a new parameter value can be determined each time the candidate cell is accessed, and the derivation of a new key is determined based on the new parameter value, thereby avoiding the key reuse problem in the candidate cell handover process.

[0017] Referring to the first aspect, in some implementations of the first aspect, the second parameter value is a parameter value last used for the first cell or a secondary node to which the first cell belongs, or the second parameter value is a parameter value used for a previous access.

[0018] Referring to the first aspect, in some implementations of the first aspect, the second parameter value is a parameter value last used to access a third cell, and the third cell has the same second parameter as the first cell.

[0019] Referring to the first aspect, in some implementations of the first aspect, the first key is derived in the case of a handover from a cell having a different second parameter value to the first cell.

[0020] Referring to the first aspect, in some implementations of the first aspect, the second parameter value is a parameter value last used for a cell in a first cell set, the first cell set including the first cell.

[0021] Referring to the first aspect, in some implementations of the first aspect, the first key is derived in the case of a handover from a cell outside the first cell set to the first cell.

[0022] Referring to the first aspect, in some implementations of the first aspect, the first parameter value is the second parameter value + N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for conditional cell addition or modification.

[0023] Referring to the first aspect, in some implementations of the first aspect, the first parameter value is determined based on the third parameter value and the number of times the first cell or the secondary node to which the first cell belongs is accessed, and the third parameter value is a starting parameter value associated with the first cell or the secondary node to which the first cell belongs; or the first parameter value is determined based on the third parameter value and the number of times a cell in the first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set.

[0024] Referring to the first aspect, in some implementations of the first aspect, the first parameter value is a P-th value in a first set, where P is related to the number of times the first cell or the secondary node to which the first cell belongs is accessed, and the first set includes multiple parameter values ​​associated with the first cell or the secondary node to which the first cell belongs.

[0025] Referring to the first aspect, in some implementations of the first aspect, the method further includes: sending a first message to the master node, wherein the first message indicates a first cell that satisfies an execution condition or a secondary node to which the first cell belongs, and the first message includes a first parameter value.

[0026] According to a second aspect, there is provided a communication method, which may be performed by a terminal device or by a chip or circuit configured in the terminal device, although this is not a limitation in the present application.

[0027] The method includes the steps of: deriving a first key, where the first key is determined based on a second key by using a first parameter value, the second key being a master key, the first parameter value belonging to a third set, the third set including a plurality of parameter values ​​associated with a first cell set, the first cell set including the first cell; and deriving a third key based on the first key, where the third key is a user plane key and / or a control plane key, and the third key is used to perform encryption or data integrity protection on data and / or signaling to and from the first cell.

[0028] Referring to the second aspect, in some implementations of the second aspect, the first parameter value is randomly selected from the plurality of parameter values ​​included in the third set.

[0029] Referring to the second aspect, in some implementations of the second aspect, the first parameter value is a P-th value in the third set, where P is related to the number of times the first cell set is accessed.

[0030] Referring to the second aspect, in some implementations of the second aspect, the first parameter value is deleted from the third set.

[0031] Referring to the second aspect, in some implementations of the second aspect, the first key is derived in the case of a handover from a cell outside the first cell set to the first cell.

[0032] According to a third aspect, there is provided a communication method, which may be performed by a network device or by a chip or circuit configured in the network device, although this is not a limitation in the present application.

[0033] The method comprises the steps of deriving a first key and transmitting the first key to the first cell or a secondary node to which the first cell belongs, wherein the first key is used for security of the first cell, and the first cell is a candidate cell for conditional cell addition or modification CPAC, and the first key is determined based on a second key by using a first parameter value, the second key being a master key, and the first parameter value is received from a terminal device, or the first parameter value is obtained through an update based on the second parameter value, or the first parameter value is determined based on the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs.

[0034] Referring to the third aspect, in some implementations of the third aspect, the second set is transmitted to the first cell or a secondary node to which the first cell belongs, wherein the second set includes a plurality of keys associated with the first cell or a secondary node to which the first cell belongs, and the plurality of keys includes the first key.

[0035] Referring to the third aspect, in some implementations of the third aspect, the method further includes: receiving a first message from a terminal device, where the first message includes a first parameter value, and the first message indicates a first cell that satisfies an execution condition or a secondary node to which the first cell belongs.

[0036] Referring to the third aspect, in some implementations of the third aspect, the second parameter value is a parameter value last used for the first cell or a secondary node to which the first cell belongs, or the second parameter value is a parameter value used by the terminal device for a previous access.

[0037] Referring to the third aspect, in some implementations of the third aspect, the second parameter value is a parameter value last used to access the third cell, and the third cell has the same second parameter as the first cell.

[0038] Referring to the third aspect, in some implementations of the third aspect, the first key is derived in the case of a handover from a cell having a different second parameter value to the first cell.

[0039] Referring to the third aspect, in some implementations of the third aspect, the second parameter value is a parameter value last used for a cell in a first cell set, the first cell set including the first cell.

[0040] Referring to the third aspect, in some implementations of the third aspect, the first key is derived in the case of a handover from a cell outside the first cell set to the first cell.

[0041] Referring to the third aspect, in some implementations of the third aspect, the first parameter value is the second parameter value + N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for conditional cell addition or modification.

[0042] Referring to the third aspect, in some implementations of the third aspect, the first parameter value is determined based on the third parameter value and the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, and the third parameter value is a starting parameter value associated with the first cell or the secondary node to which the first cell belongs; or the first parameter value is determined based on the third parameter value and the number of times the terminal device accesses a cell in the first cell set, and the third parameter value is a starting parameter value associated with the first cell set.

[0043] Referring to the third aspect, in some implementations of the third aspect, the first parameter value is a P-th value in a first set, where P is related to the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, and the first set includes multiple parameter values ​​associated with the first cell or the secondary node to which the first cell belongs.

[0044] It should be understood that the beneficial effects of the third aspect and implementations of the third aspect refer to the first aspect and implementations of the first aspect.

[0045] According to a fourth aspect, there is provided a communication method, which may be performed by a network device or by a chip or circuit configured in the network device, although this is not a limitation in the present application.

[0046] The method comprises: receiving a second set and determining a first key from the second set based on the first identifier or the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, wherein the second set includes a plurality of keys associated with the first cell or the secondary node to which the first cell belongs, the plurality of keys including a first key, and the first identifier indicating the first key in the second set.

[0047] In the above technical solutions, the corresponding K SN The set is provided in advance for each candidate cell or the secondary node to which the candidate cell belongs, so that the candidate cell or the secondary node to which the candidate cell belongs may only perform secure communication with the terminal device after receiving the reconfiguration complete message of the MN. SN The set K can be used during the initial cell addition or change and subsequent cell changes. SN Includes.

[0048] Referring to the fourth aspect, in some implementations of the fourth aspect, the method further comprises: receiving a second message, where the second message includes the first identifier.

[0049] In the above technical solution, a first identifier of the terminal device is received and it is determined to use a first key in the second set, so that the terminal device and the secondary node agree on the key to use, thereby ensuring secure synchronization between the terminal device and the secondary node and avoiding the problem of security parameter inconsistency or security parameter regression caused by failed access attempted by the terminal device.

[0050] According to a fifth aspect, there is provided a communication method, which may be performed by a terminal device or by a chip or circuit configured in the terminal device, although this is not a limitation in the present application.

[0051] The method comprises the steps of: deriving a fourth key and deriving a sixth key based on the fourth key, wherein the fourth key is determined based on a fifth key, and the fifth key is a key for a previously accessed cell, or the fifth key is a key last used to access the second cell or a secondary node to which the second cell belongs, or the fifth key is a key last used for a cell in the second cell set, and the first cell set includes the second cell, or the fifth key is a key used when last accessing the fourth cell, and the fourth cell has the same key or the same counter as the second cell, and the sixth key is a user plane key and / or a control plane key, and the sixth key is used to perform encryption and / or data integrity protection on data and / or signaling between the second cell and the fourth cell.

[0052] Note that before deriving the fourth key, the terminal device may evaluate whether the execution condition of the second cell is met, and the second cell is a candidate cell for conditional cell addition or modification. When the terminal device evaluates that the execution condition of the second cell is met, the terminal device may derive the fourth key, and the fourth key may be used for security of the second cell.

[0053] For example, the fourth and fifth keys are secondary keys, e.g., KSN , S.K. gNB , or SK eNB is.

[0054] For example, the sixth key is the integrity protection key (K RRCint or K UPint ) and / or encryption / decryption key (K RRCenc or K UPenc )

[0055] In the above technical solutions, each time the terminal device selects a candidate cell, a different fifth key is used to derive the fourth key, or a different input key K SN But the new K SN Therefore, each time a candidate cell is accessed, a different fifth key is used and a different sixth key is derived by using the fifth key, thereby avoiding the key reuse problem.

[0056] Referring to the fifth aspect, in some implementations of the fifth aspect, the fourth key is derived in the case of a handover from a cell outside the second cell set to the second cell, or in the case of a handover from a cell having a different counter to the second cell.

[0057] Referring to the fifth aspect, in some implementations of the fifth aspect, the fourth key is derived based on the fifth key by using a fourth parameter value.

[0058] Referring to the fifth aspect, in some implementations of the fifth aspect, the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set, or the fourth parameter value is obtained through an update based on the fifth parameter value, or the fourth parameter value is determined based on the number of times the second cell or the secondary node to which the second cell belongs is accessed.

[0059] Referring to the fifth aspect, in some implementations of the fifth aspect, the fifth parameter value is a parameter value last used for the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is a parameter value last used for a previous access, or the fifth parameter value is a parameter value last used for a cell in the second cell set.

[0060] According to a sixth aspect, there is provided a communication method, which may be performed by a network device, or may be performed by a chip or circuit configured in the network device, although this is not a limitation in the present application.

[0061] The method comprises: deriving a fourth key and transmitting the fourth key to the second cell or a secondary node to which the second cell belongs, wherein the fourth key is used for security of the second cell, and the fourth key is determined based on a fifth key, and the fifth key is a key used for a previously accessed cell, or the fifth key is a key previously used to access the second cell or a secondary node to which the second cell belongs.

[0062] Referring to the sixth aspect, in some implementations of the sixth aspect, the fourth key is derived based on the fifth key by using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set.

[0063] Referring to the sixth aspect, in some implementations of the sixth aspect, the fifth key is determined based on the sixth key by using a fifth parameter value, where the sixth key is a master key, and the fifth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is obtained through an update based on the sixth parameter value, or the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is a parameter value last used for a cell in the second cell set.

[0064] Referring to the sixth aspect, in some implementations of the sixth aspect, the sixth parameter value is a parameter value last used for the second cell or a secondary node to which the second cell belongs, or the sixth parameter value is a parameter value used by the terminal device for a previous access.

[0065] It should be understood that the beneficial effects of the sixth aspect and implementations of the sixth aspect refer to the fifth aspect and implementations of the fifth aspect.

[0066] According to a seventh aspect, there is provided a communication method, which may be performed by a network device, or may be performed by a chip or circuit configured in the network device, although this is not a limitation in the present application.

[0067] The method comprises the steps of: deriving a fourth key and deriving a sixth key based on the fourth key, wherein the fourth key is used for security of the second cell, the fourth key is determined based on a fifth key, the fifth key is a key last used to access the second cell or a secondary node to which the second cell belongs, or the fifth key is a key last used for a cell in the second cell set, and the first cell set includes the second cell, or the fifth key is a key last used when accessing the fourth cell, the fourth cell has the same key or the same counter as the second cell, the sixth key is a user plane key and / or a control plane key, and the sixth key is used to perform encryption or data integrity protection on data and / or signaling between the terminal device.

[0068] Referring to the seventh aspect, in some implementations of the seventh aspect, the fourth key is derived based on the fifth key by using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set.

[0069] Referring to the seventh aspect, in some implementations of the seventh aspect, the fifth key is determined based on the sixth key by using a fifth parameter value, where the sixth key is a master key, and the fifth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is obtained through an update based on the sixth parameter value, or the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is a parameter value last used for a cell in the second cell set.

[0070] Referring to the seventh aspect, in some implementations of the seventh aspect, the sixth parameter value is a parameter value last used for the second cell or a secondary node to which the second cell belongs, or the sixth parameter value is a parameter value used by the terminal device for a previous access.

[0071] It should be understood that the beneficial effects of the seventh aspect and implementations of the seventh aspect refer to the fifth aspect and implementations of the fifth aspect.

[0072] According to an eighth aspect, there is provided a communication device, which may be a terminal device, or may be a chip or circuit configured in a terminal device, although this is not limited in the present application.

[0073] The apparatus comprises: a processing unit configured to derive a first key and derive a third key based on the first key, wherein the first key is determined based on a second key by using a first parameter value, the second key being a master key, the first parameter value being obtained through updating based on the second parameter value, or the first parameter value being determined based on the number of times the first cell or a secondary node to which the first cell belongs is accessed, the third key being a user plane key and / or a control plane key, and the third key being used to perform encryption or data integrity protection on data and / or signaling between the first cell and the second key.

[0074] Referring to the eighth aspect, in some implementations of the eighth aspect, the second parameter value is a parameter value last used for the first cell or a secondary node to which the first cell belongs, or the second parameter value is a parameter value used for a previous access.

[0075] Referring to the eighth aspect, in some implementations of the eighth aspect, the second parameter value is a parameter value last used to access a third cell, and the third cell has the same second parameter as the first cell.

[0076] Referring to the eighth aspect, in some implementations of the eighth aspect, the first key is derived in the case of a handover from a cell having a different second parameter value to the first cell.

[0077] Referring to the eighth aspect, in some implementations of the eighth aspect, the second parameter value is a parameter value last used for a cell in a first cell set, the first cell set including the first cell.

[0078] Referring to the eighth aspect, in some implementations of the eighth aspect, the first key is derived in the case of a handover from a cell outside the first cell set to the first cell.

[0079] Referring to the eighth aspect, in some implementations of the eighth aspect, the first parameter value is the second parameter value + N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for conditional cell addition or modification.

[0080] Referring to the eighth aspect, in some implementations of the eighth aspect, the first parameter value is determined based on the third parameter value and the number of times the first cell or the secondary node to which the first cell belongs is accessed, and the third parameter value is a starting parameter value associated with the first cell or the secondary node to which the first cell belongs; or the first parameter value is determined based on the third parameter value and the number of times a cell in the first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set.

[0081] Referring to the eighth aspect, in some implementations of the eighth aspect, the first parameter value is a Pth value in a first set, where P is related to the number of times the first cell or the secondary node to which the first cell belongs is accessed, and the first set includes multiple parameter values ​​associated with the first cell or the secondary node to which the first cell belongs.

[0082] Referring to the eighth aspect, in some implementations of the eighth aspect, the apparatus comprises: a transceiver unit configured to transmit a first message to a master node, where the first message indicates a first cell that satisfies an execution condition or a secondary node to which the first cell belongs, and the first message includes a first parameter value.

[0083] It should be understood that the beneficial effects of the eighth aspect and the implementation of the eighth aspect refer to the first aspect and the implementation of the first aspect.

[0084] According to a ninth aspect, there is provided a communication device, which may be a terminal device, or may be a chip or circuit configured in a terminal device, although this is not limited in the present application.

[0085] The apparatus comprises: a processing unit configured to derive a fourth key and derive a sixth key based on the fourth key, wherein the fourth key is determined based on a fifth key, and the fifth key is a key for a previously accessed cell, or the fifth key is a key last used to access the second cell or a secondary node to which the second cell belongs, or the fifth key is a key last used for a cell in the second cell set, and the first cell set includes the second cell, or the fifth key is a key used when last accessing the fourth cell, and the fourth cell has the same key or the same counter as the second cell, and the sixth key is a user plane key and / or a control plane key, and the sixth key is used to perform encryption or data integrity protection on data and / or signaling between the second cell and the fourth cell.

[0086] Referring to the ninth aspect, in some implementations of the ninth aspect, the processing unit is specifically configured to derive the fourth key in the case of a handover from a cell outside the second cell set to the second cell, or in the case of a handover from a cell having a different counter to the second cell.

[0087] Referring to the ninth aspect, in some implementations of the ninth aspect, the processing unit is specifically configured to derive a fourth key based on the fifth key by using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs.

[0088] Referring to the ninth aspect, in some implementations of the ninth aspect, the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set, or the fourth parameter value is obtained through an update based on the fifth parameter value, or the fourth parameter value is determined based on the number of times the second cell or the secondary node to which the second cell belongs is accessed.

[0089] Referring to the ninth aspect, in some implementations of the ninth aspect, the fifth parameter value is a parameter value last used for the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is a parameter value last used for a previous access, or the fifth parameter value is a parameter value last used for a cell in the second cell set.

[0090] It should be understood that the beneficial effects of the ninth aspect and implementations of the ninth aspect refer to the fifth aspect and implementations of the fifth aspect.

[0091] In the eighth and ninth aspects, when the communication device is a terminal device, the processing unit may be a processor and the transceiver unit may be a transceiver. When the communication device is a chip or circuit configured in the terminal device, the processing unit may be a processor and the transceiver unit may be an input / output interface, pin, circuit, or the like.

[0092] According to a tenth aspect, there is provided a communication device, which may be a network device, or may be a chip or circuit configured in a network device, although this is not a limitation in the present application.

[0093] The apparatus includes a processing unit and a transceiver unit. The processing unit is configured to derive a first key, where the first key is used for security of the first cell, the first cell being a candidate cell for conditional cell addition or modification CPAC, the first key being determined based on a second key by using a first parameter value, the second key being a master key, the first parameter value being received from a terminal device, or the first parameter value being obtained through updating based on the second parameter value, or the first parameter value being determined based on the number of times the terminal device accesses the first cell or a secondary node to which the first cell belongs. The transceiver unit is configured to transmit the first key to the first cell or the secondary node to which the first cell belongs.

[0094] Referring to the tenth aspect, in some implementations of the tenth aspect, the transceiver unit is specifically configured to transmit the second set to the first cell or a secondary node to which the first cell belongs, where the second set includes a plurality of keys associated with the first cell or a secondary node to which the first cell belongs, and the plurality of keys includes the first key.

[0095] Referring to the tenth aspect, in some implementations of the tenth aspect, the transceiver unit is further configured to receive a first message from the terminal device, where the first message includes a first parameter value, and the first message indicates a first cell that satisfies the execution condition or a secondary node to which the first cell belongs.

[0096] Referring to the tenth aspect, in some implementations of the tenth aspect, the second parameter value is a parameter value last used for the first cell or a secondary node to which the first cell belongs, or the second parameter value is a parameter value used by the terminal device for a previous access.

[0097] Referring to the tenth aspect, in some implementations of the tenth aspect, the second parameter value is a parameter value last used to access a third cell, and the third cell has the same second parameter as the first cell.

[0098] Referring to the tenth aspect, in some implementations of the tenth aspect, the processing unit is specifically configured to derive the first key in the case of a handover from a cell having a different second parameter value to the first cell.

[0099] Referring to the tenth aspect, in some implementations of the tenth aspect, the second parameter value is a parameter value last used for a cell in a first cell set, the first cell set including the first cell.

[0100] Referring to the tenth aspect, in some implementations of the tenth aspect, the processing unit is specifically configured to derive the first key in the case of a handover from a cell outside the first cell set to the first cell.

[0101] Referring to the tenth aspect, in some implementations of the tenth aspect, the first parameter value is the second parameter value + N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for conditional cell addition or modification.

[0102] Referring to the tenth aspect, in some implementations of the tenth aspect, the first parameter value is determined based on the third parameter value and the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, and the third parameter value is a starting parameter value associated with the first cell or the secondary node to which the first cell belongs; or the first parameter value is determined based on the third parameter value and the number of times the terminal device accesses a cell in the first cell set, and the third parameter value is a starting parameter value associated with the first cell set.

[0103] Referring to the tenth aspect, in some implementations of the tenth aspect, the first parameter value is a Pth value in a first set, where P is related to the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, and the first set includes multiple parameter values ​​associated with the first cell or the secondary node to which the first cell belongs.

[0104] It should be understood that the beneficial effects of the tenth aspect and the implementation of the tenth aspect refer to the third aspect and the implementation of the third aspect.

[0105] According to an eleventh aspect, there is provided a communication device, which may be a network device, or may be a chip or circuit configured in a network device, although this is not a limitation in the present application.

[0106] The device includes a processing unit and a transceiver unit. The processing unit is configured to derive a fourth key, where the fourth key is used for security of the second cell, and the fourth key is determined based on a fifth key, where the fifth key is a key used for a previously accessed cell, or the fifth key is a key previously used to access the second cell or a secondary node to which the second cell belongs; and the transceiver unit is configured to send the fourth key to the second cell or the secondary node to which the second cell belongs.

[0107] Referring to the eleventh aspect, in some implementations of the eleventh aspect, the processing unit is specifically configured to derive a fourth key based on the fifth key by using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set.

[0108] Referring to the eleventh aspect, in some implementations of the eleventh aspect, the fifth key is determined based on the sixth key by using a fifth parameter value, where the sixth key is a master key, and the fifth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is obtained through an update based on the sixth parameter value, or the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is a parameter value last used for a cell in the second cell set.

[0109] Referring to the eleventh aspect, in some implementations of the eleventh aspect, the sixth parameter value is a parameter value last used for the second cell or a secondary node to which the second cell belongs, or the sixth parameter value is a parameter value used by the terminal device for a previous access.

[0110] It should be understood that the beneficial effects of the eleventh aspect and the implementation of the eleventh aspect refer to the sixth aspect and the implementation of the sixth aspect.

[0111] According to a twelfth aspect, there is provided a communication device, which may be a network device, or may be a chip or circuit configured in a network device, although this is not a limitation in the present application.

[0112] The apparatus includes a processing unit and a transceiver unit. The transceiver unit is configured to receive a second set, where the second set includes a plurality of keys associated with the first cell or a secondary node to which the first cell belongs, the plurality of keys including a first key; and the processing unit is configured to determine the first key from the second set based on a first identifier or a number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, where the first identifier indicates a position of the first key in the second set.

[0113] Referring to the twelfth aspect, in some implementations of the twelfth aspect, the transceiver unit is further configured to receive a second message, where the second message includes the first identifier.

[0114] It should be understood that the beneficial effects of the twelfth aspect and implementations of the twelfth aspect refer to the fourth aspect and implementations of the fourth aspect.

[0115] According to a thirteenth aspect, there is provided a communication device, which may be a network device, or may be a chip or circuit configured in a network device, although this is not a limitation in the present application.

[0116] The apparatus comprises: a processing unit configured to derive a fourth key and derive a sixth key based on the fourth key, wherein the fourth key is used for security of the second cell, the fourth key is determined based on a fifth key, the fifth key is a key last used to access the second cell or a secondary node to which the second cell belongs, or the fifth key is a key last used for a cell in the second cell set, and the first cell set includes the second cell, or the fifth key is a key last used when accessing the fourth cell, the fourth cell has the same key or the same counter as the second cell, the sixth key is a user plane key and / or a control plane key, and the sixth key is used to perform encryption or data integrity protection on data and / or signaling between the terminal device.

[0117] Referring to the thirteenth aspect, in some implementations of the thirteenth aspect, the processing unit is specifically configured to derive the fourth key in the case of a handover from a cell outside the second cell set to the second cell, or in the case of a handover from a cell having a different counter to the second cell.

[0118] Referring to the thirteenth aspect, in some implementations of the thirteenth aspect, the processing unit is further configured to derive a fourth key based on the fifth key by using the fourth parameter value.

[0119] Referring to the thirteenth aspect, in some implementations of the thirteenth aspect, the fifth key is determined based on the sixth key by using a fifth parameter value, where the sixth key is a master key, and the fifth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs, or the fifth parameter value is obtained through an update based on the sixth parameter value, or the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary node to which the second cell belongs.

[0120] Referring to the thirteenth aspect, in some implementations of the thirteenth aspect, the sixth parameter value is a parameter value last used for the second cell or a secondary node to which the second cell belongs, or the sixth parameter value is a parameter value used by the terminal device for a previous access.

[0121] It should be understood that the beneficial effects of the thirteenth aspect and implementations of the thirteenth aspect refer to the fifth aspect and implementations of the fifth aspect.

[0122] In the tenth to thirteenth aspects, when the communication device is a network device, the processing unit may be a processor and the transceiver unit may be a transceiver. When the communication device is a chip or circuit configured in the network device, the processing unit may be a processor and the transceiver unit may be an input / output interface, pin, circuit, or the like.

[0123] According to a fourteenth aspect, there is provided a communications device comprising a processor and a storage medium. The storage medium stores instructions that, when executed by the processor, implement a method according to the first aspect or any one of its possible implementations, or a method according to the fifth aspect or any one of its possible implementations. The communications device may be a terminal device, or may be a chip or circuit configured in a terminal device.

[0124] Optionally, the communication device may further comprise a communication interface configured to receive data and / or information and to transmit the received data and / or information to the processor. Optionally, the communication interface is further configured to output data and / or information to be processed by the processor.

[0125] According to a fifteenth aspect, there is provided a communications device comprising a processor and a storage medium. The storage medium stores instructions that, when executed by the processor, implement a method according to the third aspect or any one of its possible implementations, or a method according to the fourth aspect or any one of its possible implementations, or a method according to the sixth aspect or any one of its possible implementations, or a method according to the seventh aspect or any one of its possible implementations. The communications device may be a network device, or a chip or circuit configured in a network device.

[0126] Optionally, the communication device may further comprise a communication interface configured to receive data and / or information and to transmit the received data and / or information to the processor. Optionally, the communication interface is further configured to output data and / or information to be processed by the processor.

[0127] According to a sixteenth aspect, there is provided a computer-readable storage medium comprising instructions which, when executed by a processor, implement a method according to the first aspect or any one of its possible implementations, or a method according to the fifth aspect or any one of its possible implementations.

[0128] According to a seventeenth aspect, there is provided a computer-readable storage medium comprising instructions that, when executed by a processor, implement a method according to the third aspect or any one of its possible implementations, or a method according to the fourth aspect or any one of its possible implementations, or a method according to the sixth aspect or any one of its possible implementations, or a method according to the seventh aspect or any one of its possible implementations.

[0129] According to an eighteenth aspect, there is provided a computer program product comprising computer program code or instructions which, when executed, implement a method according to the first aspect or any one of its possible implementations, or a method according to the fifth aspect or any one of its possible implementations.

[0130] According to a nineteenth aspect, there is provided a computer program product comprising computer program code or instructions which, when executed, implement a method according to the third aspect or any one of its possible implementations, or a method according to the fourth aspect or any one of its possible implementations, or a method according to the sixth aspect or any one of its possible implementations, or a method according to the seventh aspect or any one of its possible implementations.

[0131] According to a twentieth aspect, there is provided a communication method comprising a method according to the first aspect or any one of the possible implementations of the first aspect, a method according to the third aspect or any one of the possible implementations of the third aspect, and a method according to the fourth aspect or any one of the possible implementations of the fourth aspect.

[0132] According to a 21st aspect, there is provided a communication method including a method according to the 4th aspect or any one of the possible implementations of the 4th aspect, a method according to the 5th aspect or any one of the possible implementations of the 5th aspect, and a method according to the 6th aspect or any one of the possible implementations of the 6th aspect.

[0133] According to a 22nd aspect, there is provided a communication system comprising a communication device according to the 8th aspect or any one of the possible implementations of the 8th aspect, a communication device according to the 10th aspect or any one of the possible implementations of the 10th aspect, and a communication device according to the 12th aspect or any one of the possible implementations of the 12th aspect.

[0134] According to a 23rd aspect, there is provided a communication system comprising a communication device according to the 9th aspect or any one of the possible implementations of the 9th aspect, a communication device according to the 11th aspect or any one of the possible implementations of the 11th aspect, and a communication device according to the 13th aspect or any one of the possible implementations of the 13th aspect.

[0135] According to a 24th aspect, there is provided a communication system comprising a communication device according to the 14th aspect or any one of the possible implementations of the 14th aspect, and a communication device according to the 15th aspect or any one of the possible implementations of the 15th aspect. [Brief explanation of the drawings]

[0136] [Figure 1] 1 is a diagram of a communication system applicable to embodiments of the present application; [Figure 2] FIG. 1 is a diagram of a dual connectivity scenario applicable to embodiments of the present application. [Figure 3] FIG. 1 is a diagram of key reuse in the prior art. [Figure 4] FIG. 2 is another diagram of key reuse in the prior art. [Figure 5] 1 is a schematic flowchart of a communication method according to an embodiment of the present application; [Figure 6] 4 is another schematic flowchart of a communication method according to an embodiment of the present application; [Figure 7]4 is another schematic flowchart of a communication method according to an embodiment of the present application; [Figure 8] 4 is another schematic flowchart of a communication method according to an embodiment of the present application; [Figure 9] 4 is another schematic flowchart of a communication method according to an embodiment of the present application; [Figure 10] 4 is another schematic flowchart of a communication method according to an embodiment of the present application; [Figure 11] 4 is another schematic flowchart of a communication method according to an embodiment of the present application; [Figure 12] 1 is a block diagram of a communication device according to an embodiment of the present application; [Figure 13] FIG. 2 is another diagram of the structure of a communication device according to an embodiment of the present application. [Figure 14] FIG. 2 is another diagram of the structure of a communication device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION

[0137] The technical solutions of the present application are described below with reference to the accompanying drawings.

[0138] The technical solutions in the embodiments of the present application may be applied to various communication systems, such as Global System for Mobile communications (GSM), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), General Packet Radio Service (GPRS), Long Term Evolution (LTE), LTE frequency division duplex (FDD), LTE time division duplex (TDD), Universal Mobile Telecommunications System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX), and 5th Generation (5G) mobile communication systems or new radio (NR). A 5G mobile communication system can be a non-standalone (NSA) networking or a standalone (SA) networking.

[0139] The technical solutions provided in this application may further be applied to machine type communication (MTC), long term evolution-machine (LTE-M), device-to-device (D2D) networks, machine-to-machine (M2M) networks, Internet of Things (IoT) networks, or other networks. IoT networks may include, for example, the Internet of Vehicles. Communication modes in Internet of Vehicle systems may be collectively referred to as vehicle-to-X (V2X, where X may represent anything). For example, V2X may include vehicle-to-vehicle (V2V) communication, vehicle-to-infrastructure (V2I) communication, vehicle-to-pedestrian (V2P) communication, or vehicle-to-network (V2N) communication.

[0140] The technical solutions provided in this application may further be applied to future communication systems, such as 6th Generation (6G) mobile communication systems, which are not limited in this application.

[0141] In embodiments of the present application, a terminal device may also be referred to as user equipment (UE), access terminal, subscriber unit, subscriber station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user equipment.

[0142] The terminal device may be a device that provides voice and data connectivity to a user, for example, a handheld device or an in-vehicle device with wireless connectivity capabilities. Currently, some examples of terminals are mobile phones, tablet computers (pads), computers with wireless transmission and reception capabilities (e.g., notebook computers or palmtop computers), mobile internet devices (MIDs), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes (e.g., home appliances such as televisions, smart boxes, or game consoles), cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), and so on. The device may be a PDA (registered trademark), a handheld device with wireless communication capabilities, a computing device, another processing device connected to a wireless modem, an in-vehicle device, a wearable device, a terminal device in a 5G network, or a terminal device in a future evolved public land mobile network (PLMN).

[0143] A wearable device, which may also be referred to as a wearable intelligent device or the like, is a general term for wearable devices, such as glasses, gloves, watches, clothes, and shoes, that are intelligently designed and developed for everyday wear by using wearable technology. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. A wearable device is not only a hardware device, but also implements powerful functions through software support, data exchange, and cloud interaction. Typical wearable intelligent devices include full-featured and large devices that can implement full or partial functions without relying on a smartphone, such as smart watches or smart glasses, and devices that are specialized in only one type of application function and need to cooperate with another device, such as a smartphone, such as various smart bands or smart jewelry for monitoring physical symptoms.

[0144] Additionally, the terminal device may alternatively be a terminal device in an Internet of Things (IoT) system. IoT is an important part of the future development of information technology. The main technical feature of IoT is that items are connected to a network by using communication technology, implementing an intelligent network of human-machine interaction and interconnection between things. IoT technology can implement massive connectivity, deep coverage, and terminal power saving by using, for example, narrow band (NB) technology.

[0145] In embodiments of the present application, the terminal device may alternatively be a vehicle or an entire vehicle, may implement communication via the Internet of Vehicles, or may be a component located within the vehicle (e.g., disposed within or installed within the vehicle), i.e., an on-board terminal device, on-board module, or on-board unit (OBU).

[0146] Additionally, terminal devices may alternatively include sensors such as intelligent printers, train detectors, or gas stations, etc. Main functions include collecting data (some terminal devices), receiving control information and downlink data from network devices, transmitting electromagnetic waves, and transmitting uplink data to network devices.

[0147] In the embodiments of the present application, a network device may be any device that has wireless receiving and transmitting capabilities. The device may include: an evolved NodeB (eNB), a radio network controller (RNC), a NodeB (NB), a base station controller (BSC), a base transceiver station (BTS), a home base station (e.g., home evolved NodeB or home NodeB, HNB), a baseband unit (BBU), an access point (AP), a wireless relay node, a wireless backhaul node, a transmission point (TP), a transmission and reception point (TRP), or the like in a wireless fidelity (Wi-Fi) system, or may be a gNB or transmission point (TRP or TP) in a 5G system such as an NR system, or one antenna panel or a group of antenna panels (including multiple antenna panels) of a base station in a 5G system, or a network node forming a gNB or transmission point, e.g., a baseband unit (BBU) or a distributed unit (DBU). The wireless communication device may be, but is not limited to, a wireless unit (DU) or a base station in a next-generation 6G communication system.

[0148] In some deployments, a gNB may include a central unit (CU) and a DU. The gNB may further include an active antenna unit (AAU). The CU implements some gNB functions, and the DU implements some gNB functions. For example, the CU is responsible for processing non-real-time protocols and services and implements radio resource control (RRC) layer and packet data convergence protocol (PDCP) layer functions. The DU is responsible for processing physical layer protocols and real-time services and implementing radio link control (RLC) layer, medium access control (MAC) layer, and physical (PHY) layer functions. The AAU implements some physical layer processing functions, radio frequency processing, and active antenna-related functions. Information at the RRC layer is ultimately converted to or from information at the PHY layer. Therefore, in this architecture, higher layer signaling, such as RRC layer signaling, may also be considered to be transmitted by the DU, or transmitted by the DU and the CU. It may be understood that a network device may be a device including one or more of a CU node, a DU node, and an AAU node. In addition, a CU may be classified as a network device in an access network (radio access network, RAN), or a CU may be classified as a network device in a core network (CN). This is not a limitation in the present application.

[0149] A network device provides services to a cell, and a terminal device communicates with the cell through transmission resources (e.g., frequency domain resources or spectrum resources) allocated by the network device. The cell may belong to a macro base station (e.g., a macro eNB or a macro gNB) or may belong to a base station corresponding to a small cell. Here, the small cell may include a metro cell, a micro cell, a pico cell, a femto cell, or the like. These small cells have characteristics of small coverage and low transmission power and are applicable for providing high-rate data transmission services.

[0150] FIG. 1 is a diagram of a communication system 100 applicable to an embodiment of the present application. As shown in FIG. 1, the communication system 100 may include at least one terminal device, for example, the terminal device 110 shown in FIG. 1. The communication system 100 may further include at least two network devices, for example, the network device 120 and the network device 130 shown in FIG. 1. The terminal device 110 may simultaneously communicate with the network device 120 and the network device 130. For example, the terminal device 110 may communicate with the network device 120 through a wireless link, and the terminal device 110 may communicate with the network device 130 through a wireless link. Multiple antennas may be configured for each communication device, such as the terminal device 110, the network device 120, or the network device 130. For each communication device in the communication system, the multiple configured antennas may include at least one transmitting antenna configured to transmit a signal and at least one receiving antenna configured to receive a signal. Therefore, communications between communication devices in a communication system, between terminal device 110 and network device 120, and between terminal device 110 and network device 130 may be performed by using multi-antenna technology.

[0151] It should be understood that Figure 1 is merely a simplified diagram of an example for ease of understanding, and the communication system may further include other network devices or may further include other terminal devices not shown in Figure 1.

[0152] It should be further understood that the simultaneous communication of the terminal device 110 with the network device 120 and the network device 130 may also be referred to as dual-connectivity (DC) or multi-radio dual connectivity (MR-DC) of the terminal device. One network device communicating with the terminal device 110 may be referred to as a master node (MN), and another network device communicating with the terminal device 110 may be referred to as a secondary node (SN). For example, assume that the network device 120 is an MN and the network device 130 is an SN.

[0153] The MN and the SN may be the same type of network device or different types of network devices. This is not specifically limited in the embodiments of the present application. For specific descriptions of network devices, please refer to the above description. Details will not be described in this specification.

[0154] 2 is a diagram of a dual connectivity scenario applicable to an embodiment of the present application. As shown in FIG. 2, when dual connectivity is combined with carrier aggregation (CA), each network device may include one cell group (CG). The cell group served by the MN is a master cell group (MCG), and the cell group served by the SN is a secondary cell group (SCG). The master cell group may include one primary cell (PCell) and at least one secondary cell (SCell), and the secondary cell group may include one primary secondary cell (PSCell) and at least one secondary cell.

[0155] It should be understood that when dual connectivity is not combined with CA, there is only one primary cell served by the master node and one primary-secondary cell served by the secondary node, and this scenario is also applicable to embodiments of the present application.

[0156] It should be understood that for ease of description, FIG. 2 uses an example in which each cell group includes two SCells.

[0157] In a DC scenario, a terminal device may perform a PSCell addition or change process. A PSCell addition triggered by a terminal device is referred to as a conditional PSCell addition (CPA), and a PSCell change triggered by a terminal device is referred to as a conditional PSCell change (CPC). CPA may be understood as a conditional addition of a PSCell. When a terminal device meets a PSCell addition condition, the terminal device performs a PSCell addition process. CPC may be understood as a conditional change of a PSCell. When a terminal device meets a PSCell change condition, the terminal device performs a PSCell change process. Specifically, for example, CPA and CPC may also be collectively referred to as a conditional PSCell addition / change (CPAC). Specifically, multiple candidate PSCells are configured in a network configuration, and a CPAC configuration is sent to the terminal device. The CPAC configuration includes the configurations of multiple candidate PSCells and corresponding execution conditions. When the terminal device evaluates that the execution conditions of the candidate PSCell are met, the terminal device may perform a PSCell addition or modification process. The cell that meets the execution conditions may be referred to as a selected cell.

[0158] After the terminal device completes the CPA or CPC process and establishes a connection (e.g., a random access channel (RACH)) with a candidate PSCell that satisfies the conditions, the terminal device releases the CPA and / or CPC configuration. Therefore, before the network reconfiguration or network restart, the terminal device cannot continue to use the CPA and / or CPC configuration. In order to reduce the delay and signaling overhead of the secondary cell group change, the terminal device may not release the CPA and / or CPC configuration. Before the network reconfiguration or network restart, the terminal device continues to use the previously stored CPA or CPC configuration and continues to perform the CPA or CPC process.

[0159] For ease of explanation, a CPA or a CPC may be collectively referred to as a CPAC in this application. A CPA configuration or a CPC configuration is collectively referred to as a CPAC configuration.

[0160] For example, a terminal device executes a CPC process. Assume that the terminal device is currently communicating with cell 0 served by the MN and SN (there may be other SCells), i.e., in this case, cell 0 is the PSCell of the terminal device. Assume that the terminal device receives a CPC configuration, which includes configuration information of candidate cells 1 to 3 and execution conditions corresponding to each of candidate cells 1 to 3. When the terminal device detects that the execution condition for candidate cell 3 is satisfied, the terminal device may execute the CPC process to change the PSCell from cell 0 to candidate cell 3. After completing the connection with candidate cell 3, the terminal device does not release the CPC configuration, but maintains the CPC configuration and continues to execute the CPC process. The terminal device may further continue to evaluate another candidate cell based on the stored CPC configuration. When another candidate cell satisfies the execution condition, the terminal device should trigger the CPC process again. For example, the terminal device subsequently detects that candidate cell 1 satisfies the execution condition. Therefore, the terminal device further changes the PSCell from candidate cell 3 to candidate cell 1 and completes the connection with candidate cell 1.

[0161] To prevent data from being intercepted and / or tampered with, encryption and / or integrity protection may be performed on the communication between the terminal device and the network device based on a security key. In the above DC scenario, for example, the communication between the terminal device and the MN is performed using a master key (e.g., K gNB or K eNB ) based on the control plane key (radio resource control (RRC) key, e.g., integrity protection key K RRCint and encryption / decryption key K RRCenc , and / or a user plane key (UP key, e.g., an integrity protection key K UPint and encryption / decryption key K UPenc In another example, communication between the terminal device and the SN is based on a secondary key (e.g., K SN , S.K.gNB , or SK eNB , where K SN is used uniformly for the description below), SN is calculated by using the SN counter (or sk counter, hereinafter collectively referred to as the SN counter) gNB where SN counter is the SN counter associated with the current security context. SN Requires or K SN Each time the MN updates the master key, it generates or updates an SN counter and sends the SN counter to the UE. The MN and the UE use the same master key and SN counter to generate or update the same K SN In addition to the SN counter, K SN It should be understood that the input parameters for deriving K may include further parameters, for example, the length of the SN counter. SN to the secondary node to be added or accessed, resulting in a K SN In this way, the terminal device and the secondary node have the same K SN derive the same integrity key and / or the same encryption / decryption key by using the same key, thereby ensuring communication security between the terminal device and the secondary node.

[0162] In order to reduce change delay and signaling overhead, the terminal device does not release the CPAC configuration. Before network reconfiguration or network restart, the terminal device continues to use the previously stored CPAC configuration. In the above process, the delay and signaling overhead of secondary cell group change can be reduced. However, in the process in which the terminal device continues to perform CPAC based on the CPAC configuration, a key reuse problem exists when the terminal device communicates with a PSCell served by an SN. As a result, the communication process between the terminal device and the PSCell served by the SN is not secure.

[0163] Key reuse should be understood to mean that a terminal device uses the same key to encrypt / integrity protect a communication data packet more than once (e.g., twice). If an attacker obtains two or more ciphertexts that have been encrypted / integrity protected by using the same key, there is a risk that the plaintext will be exposed.

[0164] For example, assume that the CPAC configuration includes the configuration and running conditions of candidate cell 1, the configuration and running conditions of candidate cell 2, the configuration and running conditions of candidate cell 3, and an SN counter. Alternatively, the CPAC configuration includes the configuration, running conditions, and SN counter #1 of candidate cell 1; the configuration, running conditions, and SN counter #2 of candidate PSCell 2; and the configuration, running conditions, and SN counter #3 of candidate PSCell 3. All candidate cells are associated with the same SN counter, i.e., SN counter #1 = SN counter #2 = SN counter #3.

[0165] FIG. 3 is a diagram of key reuse in the prior art. As shown in FIG. 3, after the terminal device completes CPA or CPC for the first time (the K SN is K gNB and SN counter (or SN counter #1)), when the terminal device triggers the CPC again, K associated with each candidate cell in the CPAC configuration change gNBSince neither the SN counter (or SN counter #1) changes, the K SN remains unchanged and is still the K used by the terminal device to complete the CPA or CPC for the first time. SN Thus, the same K SN The user and control plane keys derived based on ? are also identical, posing a risk of keystream reuse.

[0166] In another example, the CPAC configuration is assumed to include the configuration, running conditions, and SN counter #1 of candidate cell 1; the configuration, running conditions, and SN counter #2 of candidate cell 2; and the configuration, running conditions, and SN counter #3 of candidate cell 3. Candidate cells served by different SNs or all candidate cells are associated with unequal SN counters, e.g., SN counter #1 ≠ SN counter #2 ≠ SN counter #3.

[0167] FIG. 4 is another diagram of key reuse in the prior art. As shown in FIG. 4, after the first CPA or CPC is completed between the terminal device and the candidate cell 1 (the K SN is K gNB and SN counter #1), when the terminal device subsequently triggers a change to candidate cell 1 again, K gNB and SN counter #1 is the same as that used to access candidate cell 1 last time, so K SN is still the K used to access candidate cell 1 last time. SN Thus, the same K SN The user and control plane keys derived based on ? are also identical, posing a risk of keystream reuse.

[0168] In the prior art, whether to reestablish the packet data convergence protocol (PDCP) is instructed by a network device. For example, the network device uses reestablish PDCP indication information to instruct the UE whether to perform the PDCP re-establishment process during a PSCell handover. It should be understood that if a key needs to be changed in the handover process, the network device needs to instruct the terminal device to perform PDCP re-establishment and complete the key change in the PDCP re-establishment process. Therefore, in the latter CPAC scenario, the network device may further indicate whether PDCP re-establishment needs to be performed or whether a key needs to be changed during each handover in the following manner:

[0169] Scheme 1: The instruction is performed in the form of a candidate cell group (or cell set): the network provides multiple cell sets to the UE, and each cell set includes one or more cells. Each cell set corresponds to the same SN counter. If the source cell and target cell of the UE belong to the same cell set, the UE does not perform PDCP re-establishment, i.e., does not derive a new key, during handover. If the source cell and target cell of the UE belong to different cell sets, the UE needs to perform PDCP re-establishment and derive a new key during handover. The SN counter values ​​of cells in a cell set are the same. A cell set may have one or more SN counters.

[0170] Scheme 2: The network configures an associated SN counter for each candidate cell. One or more associated SN counters (i.e., SN counter sets) can be configured for each cell. The SN counters associated with different candidate cells can be the same or different. If the SN counters of the source cell and target cell of the UE's handover are the same, the UE does not need to perform PDCP re-establishment, i.e., does not need to derive new keys. If the SN counters / SN counter sets of the source cell and target cell of the UE's handover are different, the UE needs to perform PDCP re-establishment, i.e., the UE needs to derive new keys.

[0171] Scheme 3: The network configures an associated SN counter for each candidate cell. One or more associated SN counters (i.e., an SN counter set) may be configured for each cell. The SN counters associated with different candidate cells may be the same or different. The network instructs the UE whether to perform PDCP re-establishment from one cell to another during handover. For example, there are three candidate cells in total (cell 1, cell 2, and cell 3). The network separately instructs the UE whether to perform PDCP re-establishment during handover from cell 1 to cell 2, from cell 2 to cell 1, from cell 1 to cell 3, from cell 3 to cell 1, from cell 2 to cell 3, and from cell 3 to cell 2. If the network indicates that PDCP re-establishment is necessary, the UE needs to perform PDCP re-establishment, i.e., the UE needs to derive a new key. If the network indicates that PDCP re-establishment is not necessary, the UE does not need to perform PDCP re-establishment, i.e., the UE does not need to derive new keys.

[0172] Manner 4: The network associates a third identifier with each candidate cell or candidate cell configuration. Optionally, the third identifier is used to control whether PDCP is re-established, or the third identifier is used to control whether a key change is performed, or the third identifier indicates security parameters associated with the candidate cell, or the third identifier indicates whether security parameters associated with the candidate cell are identical. If the source cell and target cell of the UE are associated with the same third identifier, the UE does not perform PDCP re-establishment or derive new keys during handover. If the source cell and target cell of the UE are associated with different third identifiers, the UE needs to perform PDCP re-establishment or derive new keys during handover. It may be understood that the SN counters of candidate cells associated with the same third identifier are also identical.

[0173] The above scheme 1 is used as an example: if the UE is handed over again to a cell included in the cell set, the SN counter used to derive the key is still the SN counter corresponding to the cell set, and there is also a risk of key stream reuse.

[0174] In view of this, embodiments of the present application provide a communication method, which can avoid the key reuse problem in CPAC scenarios.

[0175] 5 is a schematic flowchart of a communication method according to an embodiment of the present application. As shown in FIG. 5, the method may include steps 510 and 520. In the following, steps 510 and 520 will be described in detail separately.

[0176] Step 510: Derive a first key, where the first key is determined based on the second key by using the first parameter value.

[0177] For example, in this embodiment of the present application, a first key may be derived based on a second key by using a first parameter value. Specifically, a terminal device may derive the first key based on the second key by using a first parameter value. The first key may be a secondary key, for example, K SN , S.K. gNB , or SK eNB It should be understood that deriving the first key may also be referred to as inferring the first key, deducing the first key, determining the first key, obtaining the first key, or the like.

[0178] It should be noted that the terminal device may evaluate whether the execution condition of the first cell is satisfied, and the first cell may be a candidate cell for conditional cell addition or modification. When the terminal device evaluates that the execution condition of the first cell is satisfied or when the terminal device accesses a candidate cell that satisfies the execution condition, the terminal device may determine a first parameter value and derive a first key by using the first parameter value.

[0179] The second key may be a master key between the terminal device and the MN, e.g., K gNB or K eNB The master key may be used to derive control plane keys and / or user plane keys. The control plane keys and / or user plane keys are used to perform encryption or data integrity protection on data and / or signaling between the terminal device and the MN. For example, the control plane keys are used to perform encryption or data integrity protection on signaling between the terminal device and the MN. In another example, the user plane keys are used to perform encryption or data integrity protection on data between the terminal device and the MN.

[0180] The first key is a secondary key, e.g., K SN , S.K. gNB or SK eNBThe first key may be used to derive a control plane key and / or a user plane key. The control plane key and / or the user plane key may be used to perform encryption or data integrity protection on data and / or signaling between the terminal device and the SN. For example, the control plane key may be used to perform encryption or data integrity protection on signaling between the terminal device and the SN. In another example, the user plane key may be used to perform encryption or data integrity protection on data between the terminal device and the SN.

[0181] There are several ways to determine the first parameter value, which is not specifically limited in the embodiments of the present application, and the following describes several possible implementations by using examples.

[0182] In a possible implementation, the first parameter value may be obtained through updating based on the second parameter value. For example, the first parameter value is the second parameter value + N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for the conditional cell addition or modification. Before the terminal device derives the first key, for example, if the terminal device evaluates that the candidate cell satisfies the execution condition, the terminal device updates the second parameter value to the first parameter value. For example, when the terminal device detects that candidate cell 1 satisfies the corresponding execution condition, or before the terminal device accesses candidate cell 1, the terminal device updates the SN counter to SN counter + 1. This implementation will be described in detail below with reference to FIG. 6 and will not be described in detail here.

[0183] In an example, the second parameter value is a parameter value last used for the first cell or the secondary node to which the first cell belongs (or the second parameter value is a parameter value last used by the terminal device in the first cell or the secondary node to which the first cell belongs), or the second parameter value is a parameter value used for a previous access (or the second parameter value is a parameter value last used).

[0184] In another example, the second parameter value is a parameter value last used for a cell in the first cell set, where the first cell set includes the first cell. Specifically, the terminal device maintains an SN counter for the cell in the first cell set. In other words, the cells in the first cell set have the same second parameter value (e.g., SN counter). When the terminal device is handed over from a cell in another cell set to a cell in the first cell set, the terminal device derives a first key. The first key derived by the terminal device is determined based on the first parameter. The first parameter is updated based on a second parameter, where the second parameter is the SN counter last used for the cell in the first cell set. For example, the first cell set instructs the terminal device to perform PDCP re-establishment. For example, when the terminal device is handed over from a cell in the first cell set to another cell in the first cell set, PDCP re-establishment does not need to be performed; or, when the terminal device is handed over from a cell outside the first cell set to a cell in the first cell set, PDCP re-establishment needs to be performed. Optionally, the first set of cells is a set of cells associated with the same third identifier, or the first set of cells is a set of cells belonging to the same secondary node.

[0185] In another example, the second parameter value is a parameter value previously used for the third cell, and the same SN counter is configured for the third cell and the first cell. In other words, the terminal device maintains an SN counter for each candidate cell. The SN counters of different candidate cells may be the same or different. When the terminal device is handed over to the first cell from another cell, if the SN counters of the two cells are different, the terminal device derives a first key. The first key derived by the UE is implemented based on the first parameter value. The first parameter is updated based on the second parameter value, and the second parameter value is an SN counter value previously used for a cell having the same SN counter as the first cell. For example, the third cell may alternatively be the first cell.

[0186] In another possible implementation, the first parameter value is determined based on the third parameter value and the number of times the first cell or the secondary node to which the first cell belongs is accessed, and the third parameter value is a starting parameter value associated with the first cell or the secondary node to which the first cell belongs. Before the terminal device derives the first key, for example, when the terminal device evaluates that the candidate cell satisfies the execution condition, the terminal device updates the first parameter value based on the third parameter value and the number of times the first cell or the secondary node to which the first cell belongs is accessed. For example, when the terminal device detects that the candidate cell 2 satisfies the corresponding execution condition, or before the terminal device accesses the candidate cell 2, the terminal device updates the SN counter to the starting value of the SN counter of the candidate cell 2 or the secondary node to which the candidate cell belongs + (the number of times the terminal device accesses the candidate cell 2 or the secondary node to which the candidate cell 2 belongs - 1). This implementation will be described in detail below with reference to FIG. 7 and will not be described in detail here.

[0187] In another possible implementation, the first parameter value is determined based on the third parameter value and the number of times a cell in the first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set. The first cell set includes the first cell. Specifically, the terminal device maintains an SN counter for the first cell set. When the terminal device is handed over from a cell in another cell set to a cell in the first cell set, the terminal device derives the first key. Before the terminal device derives the first key, for example, if the terminal device evaluates that the candidate cell satisfies the execution condition, the terminal device updates the first parameter value based on the third parameter value and the number of times a cell in the first cell set is accessed. For example, when the terminal device detects that candidate cell 2 satisfies the corresponding execution condition, or before the terminal device accesses candidate cell 2, the terminal device updates the SN counter to the starting value of the SN counter of the cell set to which candidate cell 2 belongs + (the number of times the terminal device accesses the cell set - 1). Optionally, the available parameter values ​​associated with the first cell set are limited. For example, in addition to the starting parameter value associated with the first cell set, the network device further configures a maximum number of available parameter values ​​for the first cell set.

[0188] Optionally, the first cell set includes cells associated with the same third identifier, where the third identifier can be used to control whether PDCP is re-established, or the third identifier is used to control whether re-keying is performed, or the third identifier indicates security parameters (e.g., SN counters) associated with the candidate cells, or the third identifier indicates whether security parameters (e.g., SN counters) associated with the candidate cells are the same.

[0189] If all of the parameter values ​​associated with the first cell set are used, in a possible solution, when the terminal device performs a cell change to a cell outside the first cell set after the parameters have been used, the terminal device releases or suspends the configuration information of the cell in the first cell set. It can be understood that releasing or suspending the configuration information of a cell refers to excluding the cell from the candidate cells. In another possible solution, after the parameters have been used, the terminal device no longer selects the cell in the first cell set as a target cell. For example, the terminal device no longer evaluates the cell in the first cell set. This possible solution can ensure that the key reuse problem does not occur in the terminal device after all of the parameters associated with a cell have been used, enabling possible handover within the cell set without changing the key. In another possible solution, if all of the parameters associated with the first cell set are used, when the terminal device subsequently accesses a cell in the first cell set again, the terminal device does not use the secondary node-terminated (SN-terminated) radio bearer of the cell. In other words, it can be understood that the terminal device no longer uses the PDCP entity of the secondary node to which the cell belongs. The secondary node terminated radio bearers include radio bearers of the master cell group and radio bearers of the secondary cell group. According to this possible solution, the terminal device can continue to use cells in the first cell set as candidate or target cells, but the key reuse problem of the secondary node is avoided. Optionally, a prerequisite for the terminal device to re-access such a cell is that the signal quality of the terminal device's current serving cell is less than or equal to a certain threshold and / or the terminal device evaluates that another candidate cell does not fulfill the execution condition (e.g., within a certain time).

[0190] This implementation is described in detail below with reference to FIG. 7 and will not be described in detail here.

[0191] In another possible implementation, the first parameter value may be the P-th value in the first set, where P is related to the number of times the first cell or the secondary node to which the first cell belongs is accessed, and the first set includes multiple parameter values ​​associated with the first cell or the secondary node to which the first cell belongs. This implementation will be described in detail below with reference to Figure 8 and will not be described in detail here.

[0192] Optionally, the terminal device deletes the used first parameter value from the first set, for example, after setting the parameter value in the first set to the first parameter value, the terminal device deletes the parameter value from the first set.

[0193] When all of the parameter values ​​in the first set are used, in a possible solution, when the terminal device performs a cell change to a cell other than the first cell after the parameters have been used, the terminal device releases or suspends the configuration information of the first cell; or when the terminal device performs a cell change to a cell other than a cell served by the secondary node to which the first cell belongs after the parameters have been used, the terminal device releases or suspends the configuration information of the cell served by the secondary node to which the first cell belongs. It can be understood that releasing or suspending the configuration information of a cell refers to excluding the cell from the candidate cells. In another possible solution, after the parameters have been used, the terminal device no longer selects the first cell as a target cell. For example, the terminal device no longer evaluates the first cell. Alternatively, after the parameters have been used, the terminal device no longer selects the cell served by the secondary node to which the first cell belongs as a target cell. For example, the terminal device no longer evaluates the cell served by the secondary node to which the first cell belongs. According to the above possible solution, it is possible to ensure that the key reuse problem does not occur in the terminal device after all the parameters associated with the cell have been used, enabling possible intra-cell handover or intra-secondary node handover without key change. In another possible solution, if all the parameters associated with the first cell have been used, when the terminal device subsequently accesses the first cell again, the terminal device does not use the secondary node-terminated (SN-terminated) radio bearer of the cell. In other words, it can be understood that the terminal device no longer uses the PDCP entity of the secondary node. Alternatively, if all the parameters associated with the secondary node to which the first cell belongs have been used, when the terminal device subsequently accesses a cell served by the secondary node to which the first cell belongs, the terminal device does not use the secondary node-terminated (SN-terminated) radio bearer of the cell. In other words, it can be understood that the terminal device no longer uses the PDCP entity of the secondary node.The secondary node terminated radio bearers include radio bearers of the master cell group and radio bearers of the secondary cell group. According to this possible solution, the terminal device can continue to use the first cell or a cell served by the secondary node to which the first cell belongs as a candidate cell or target cell, while avoiding the key reuse problem of the secondary node. Optionally, a prerequisite for the terminal device to access such a cell again is that the signal quality of the terminal device's current serving cell is less than or equal to a certain threshold and / or the terminal device evaluates that another candidate cell does not fulfill the execution condition (e.g. within a certain time).

[0194] In another possible implementation, the first parameter value is selected from a third set, the third set including a plurality of parameter values ​​associated with the first cell set, the plurality of parameter values ​​including the first parameter value. In one example, the first parameter value is randomly selected from unused parameter values ​​in the plurality of parameter values ​​included in the third set. In another example, the first parameter value is selected sequentially in descending or ascending order of the parameter values ​​in the third set. In another example, the first parameter value is a P-th value in the third set, where P is related to the number of times the first cell or a secondary node to which the first cell belongs is accessed. In another example, the first parameter value is selected sequentially from front to back or back to front based on the parameter values ​​in the third set. Specifically, the terminal device maintains a group of SN counters for the first cell set. When the terminal device is handed over to the first cell from a cell other than the first cell set, the terminal device derives a first key. The terminal device selects an unused SN counter from the SN counter set for the first cell set to derive a new key. The selection rule may perform sequential selection based on the number of times the UE accesses the cell set, or may perform random selection (independent of the number of times the UE accesses the cell set), and must ensure that the SN counter selected each time is not repeated.

[0195] In another example, the terminal device deletes the used first parameter value from the third set. After the terminal device sets the first parameter value to the parameter value in the third set, the terminal device deletes the parameter value from the third set. When the terminal device hands over from a cell outside the first cell set to the first cell, the terminal device uses the first parameter value in the third set as the first parameter value and derives the first key by using the first parameter value.

[0196] In a possible solution, if all parameter values ​​in the third set are used, when the terminal device performs a cell change to a cell outside the first cell set after the parameters have been used, the terminal device releases or suspends the configuration information of the cell in the first cell set. In a possible solution, if all parameter values ​​in the third set are used, after the parameters have been used, the terminal device no longer selects a cell in the first cell set as a target cell. For example, the terminal device no longer evaluates a cell in the first cell set. According to the above possible solution, it is possible to ensure that a key reuse problem does not occur in the terminal device after all parameters associated with a cell have been used, enabling possible handover within the set where the key is not changed. In another possible solution, if all parameters associated with the first cell set are used, when the terminal device subsequently accesses a cell in the first cell set again, the terminal device does not use a secondary node-terminated (SN-terminated) radio bearer of the cell. In other words, it can be understood that the terminal device no longer uses a PDCP entity of the secondary node. A secondary node-terminated radio bearer includes a radio bearer of the master cell group and a radio bearer of the secondary cell group. According to this possible solution, the terminal device can continue to use cells in the first cell set as candidate or target cells, but the key reuse problem of secondary nodes is avoided. Optionally, a prerequisite for the terminal device to access such a cell again is that the signal quality of the terminal device's current serving cell is less than or equal to a certain threshold and / or the terminal device assesses that another candidate cell does not fulfill the execution condition (e.g. within a certain time).

[0197] For example, the first cell set may be configured by the network device, for example, by indicating identities of candidate cells included in the first cell set.

[0198] For example, the first cell set may be a set of implicitly associated cells, such as a set of cells associated with the same third identifier, or a set of cells configured with the same SN counter.

[0199] For example, the first cell set is not configured by the network device. The first cell set includes cells having the same second parameter value set (e.g., SN counter set). In this example, the first parameter value is selected from a third set, the third set includes multiple parameter values, and the multiple parameter values ​​include the first parameter value. Multiple candidate cells may be associated with the third set. When the terminal device is handed over from a cell not associated with the third set to a cell associated with the third set, the terminal device derives the first key. Alternatively, the first cell set includes cells associated with the same third identifier.

[0200] It should be understood that the first parameter value, the second parameter value, and the third parameter value may be different values ​​of the parameter SN counter.

[0201] Step 520: Derive a third key based on the first key, where the third key is a user plane key and / or a control plane key.

[0202] In this embodiment of the present application, the third key may be derived based on the first key, i.e., the third key is a user plane key and / or a control plane key derived based on the first key. The control plane key and / or the user plane key are used to perform ciphering or data integrity protection on data and / or signaling between the terminal device and the first cell. The user plane key is used to perform ciphering or data integrity protection on data between the terminal device and the first cell.

[0203] In the above technical solutions, the new first parameter value can be obtained by updating the second parameter value, or the new first parameter value can be determined based on the number of times the first cell or the secondary node to which the first cell belongs, or an unused parameter value can be selected from multiple parameter values, so that a new parameter value can be determined every time the terminal device accesses a cell, and the derivation of a new key is determined based on the new parameter value, thereby avoiding the key reuse problem in the candidate cell handover process.

[0204] It should be understood that the third key may be derived based on the first key by using another input parameter, such as one or more of the security algorithm type identifier, the security algorithm type identifier length, the security algorithm identifier, and the security algorithm identifier length.

[0205] Optionally, in some embodiments, the terminal device may further transmit the determined first parameter value to the MN. Specifically, the terminal device may transmit a first message to the master node MN, where the first message indicates the first cell that satisfies the execution condition or the secondary node to which the first cell belongs, and the first message may include the first parameter value. In other words, the first message includes not only indication information indicating the first cell that satisfies the execution condition or the secondary node to which the first cell belongs, but also the first parameter value. For example, the first message may be an RRC reconfiguration complete message. After receiving the first message sent by the UE, the MN may determine K based on the first parameter value included in the first message. SN Derive the derived K SN The SN may transmit the received K SNThe MN uses the SN counter for secure communication with the UE. In this implementation, if the MN considers that multiple SN counters configured for the UE are exhausted or all used, the MN may initiate an SN counter update process. For example, the MN configures a new SN counter for the UE by using an RRC reconfiguration message. Alternatively, when multiple SN counters are exhausted or all used, the UE requests the MN to update the SN counter. Optionally, the UE may indicate to the MN that the reason for the request is that the SN counter is exhausted or is being exhausted.

[0206] In some embodiments, M is a number of K SN to the candidate SN in an Xth message. The Xth message may be an SN addition request message. After receiving the first parameter value in the first message, the MN sends a third message to the SN, where the third message includes a plurality of K SN A specific K in SN In this implementation, all received K SN If SN considers that K will be or is being used, SN The request message may request the MN to update multiple K SN Alternatively, if the MN considers that multiple SN counters configured for the UE are exhausted or all used, the MN may initiate the SN counter update process. For example, the MN may configure a new SN counter for the UE by using an RRC reconfiguration message, and the MN may further request an update of the derived K corresponding to the new SN counter. SN to the SN. Alternatively, when multiple SN counters are exhausted or all used, the UE requests the MN to update the SN counter. Optionally, the UE may indicate to the MN that the reason for the request is that the SN counter is exhausted or is being exhausted.

[0207] It should be noted that the MN may obtain the first parameter value through updating based on the second parameter value, or determine the first parameter value based on the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, or determine the first parameter value from multiple parameters according to the above rule, in which case the first message sent by the terminal device to the MN does not include the first parameter value.

[0208] In a possible implementation, the implementation process by which the MN determines the first parameter value is the same as the process by which the terminal device obtains the first parameter value in step 510. For details, please refer to the description in step 510. The details will not be described again here. The MN may further derive a first key based on the second key by using the first parameter value. After obtaining the first key through derivation, the MN may further transmit the first key to the first cell or the secondary node to which the first cell belongs. In this implementation, if the MN considers that multiple SN counters configured for the UE are exhausted or all used, the MN may initiate an SN counter update process. For example, the MN may configure a new SN counter for the UE by using an RRC reconfiguration message, and the MN may further update the derived K corresponding to the new SN counter. SNto the SN. Alternatively, when multiple SN counters are exhausted or all are used, the UE requests the MN to update the SN counter. Optionally, the UE may instruct the MN that the reason for the request is that the SN counter is exhausted or has been exhausted. In this implementation, how to ensure consistency of the first parameter value used on the terminal device side and the MN side needs to be further considered, i.e., when the terminal device fails to access the first cell, how to ensure that the terminal device side and the MN side use the same first parameter value during a subsequent cell change needs to be further considered. In an example, the terminal device sends a first instruction to the MN, where the first instruction indicates whether the first parameter value is to be updated. When the first instruction indicates that the first parameter value is to be updated, the MN uses the new first parameter value and derives the first key based on the second key and the new first parameter value. When the first instruction indicates that the first parameter value is not to be updated, the MN uses the original first parameter value and derives the first key based on the second key and the original first parameter value. In another example, the UE should release the configuration information of the candidate cell. In another example, the terminal device and the MN should consider that the first parameter value has been used, or that the first parameter value is determined based on the number of attempts to access the first cell, the secondary node to which the first cell belongs, or a cell in the first cell set. As long as the MN successfully receives the RRC reconfiguration complete message, the corresponding first parameter value is considered to have been used. In another example, the SN sends a second indication to the MN, where the second indication indicates whether the terminal device's access was successful or whether the first key is valid. For example, when the terminal device fails to access the first cell, the SN to which the first cell belongs indicates to the MN that the access failed or that the first key cannot be validated. During subsequent cell changes, the terminal device and the MN consider that the first parameter value is not being used.

[0209] In a possible implementation, the MN transmits the second set to the first cell or the secondary node to which the first cell belongs, where the second set includes multiple keys associated with the first cell or the secondary node to which the first cell belongs, and the multiple keys include the first key. After receiving the second set, the secondary node may determine the first key from the second set based on the first identifier or the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs. The first identifier indicates the first key in the second set. Alternatively, the secondary node may determine the first key by using the rule for determining the first parameter value in step S501. For example, the first key is determined sequentially in the second set from front to back or back to front. This implementation will be described in detail below with reference to FIG. 8 and will not be described in detail here. In this implementation, all Ks in the received second set are SN If SN considers that K SN Alternatively, when multiple SN counters are exhausted or all used, the UE requests the MN to update the SN counter. Optionally, the UE may indicate to the MN that the request reason is that the SN counter is exhausted or is being exhausted. The request message may include multiple K SN The first identifier is used to request an update of the first parameter value used by the terminal device. In this implementation, it is necessary to further consider how to ensure the consistency of the first parameter value used by the terminal device and the first key used by the SN, i.e., if the terminal device fails to access the first cell, it is necessary to further consider how to ensure that the terminal device side and the SN side use the same first key during a subsequent cell change. In an example, the terminal device may use the first identifier to indicate the first key used for cell change. In another example, if the terminal device fails to access the first cell, the terminal device considers the corresponding first parameter value to be unused, i.e., the terminal device reverts to the previously used first parameter value. Correspondingly, the SN to which the first cell belongs considers the corresponding first key to be unused.

[0210] It should be understood that the number of candidate SNs and the number of candidate cells included in each candidate SN are not specifically limited in the embodiment of the present application. For ease of explanation, an example will be described below in which two candidate SNs (candidate SN1 and candidate SN2) are included, and candidate SN1 includes candidate cell 1, candidate cell 2, and candidate cell 3, and candidate SN2 includes candidate cell 4, candidate cell 5, and candidate cell 6.

[0211] Referring to Figure 6, the following describes in detail a specific implementation process of obtaining a first parameter value through updating in step 510. It should be understood that the example in Figure 6 is merely intended to help those skilled in the art understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to the specific values ​​or specific scenarios in the example. It is clear that those skilled in the art can make various equivalent modifications or variations based on the following example provided in Figure 6, and such modifications and variations also fall within the scope of the embodiments of the present application.

[0212] 6 is another schematic flowchart of a communication method according to an embodiment of the present application. As shown in FIG. 6, the method may include steps 610 to 699. In the following, steps 610 to 699 will be described in detail separately.

[0213] Step 610: The terminal device establishes an RRC connection with the MN.

[0214] Step 615: The terminal device establishes an RRC connection with the source SN.

[0215] Note that step 615 is optional.

[0216] For example, when a terminal device performs a CPC process, i.e., the terminal device has established a connection with a cell served by a source SN, i.e., the UE has a serving PSCell, the terminal device then needs to perform a PSCell change process based on the execution conditions. In this implementation, the terminal device may further establish an RRC connection with the source SN.

[0217] For example, when the terminal device performs the CPA process, i.e., when the terminal device performs the PSCell addition process based on the execution conditions, in this implementation, the terminal device may establish an RRC connection with only the MN, and does not need to perform step 615 to establish an RRC connection with the source SN.

[0218] Step 620: The MN sends an SN Addition Request Message 1 to the candidate SN1, where the SN Addition Request Message 1 is K SN1 Includes.

[0219] For example, in this embodiment, all candidate cells included in candidate SN1 correspond to one SN counter 1, that is, all candidate cells correspond to the same SN counter. gNB and SN counters are calculated based on SN1 The MN may further send an SN Addition Request Message 1 to a candidate SN1 or a candidate cell (e.g., candidate cell 1, candidate cell 2, or candidate cell 3) served by the candidate SN1, where the SN Addition Request Message 1 SN1 Includes: K gNB is the key that needs to be used for communication between the MN and the terminal device, and corresponds to the master key above. Optionally, the MN may alternatively use K gNB , SN counter, and the length of the SN counter. SN1 can be obtained.

[0220] It should be understood that SN counter 1 may correspond to the second parameter value described above.

[0221] Step 625: The candidate SN1 sends an SN addition request acknowledgement message 1 to the MN.

[0222] In this embodiment of the present application, after receiving the SN addition request message 1 sent by the MN, if the candidate SN1 determines that it can allocate resources to the candidate cell included in the candidate SN1, the candidate SN1 may send an SN addition request acknowledgement message 1 to the MN, and the SN addition request acknowledgement message 1 indicates that the candidate SN1 has determined that the candidate SN1 can be added as a candidate SN.

[0223] Step 630: The MN sends an SN addition request message 2 to the candidate SN2.

[0224] For example, in this embodiment, all candidate cells included in candidate SN2 correspond to one SN counter 1, that is, all candidate cells correspond to the same SN counter. gNB and SN counters are calculated based on SN1 The MN may further send an SN addition request message 2 to the candidate SN2 or a candidate cell (e.g., candidate cell 4, candidate cell 5, or candidate cell 6) served by the candidate SN2, where the SN addition request message 2 SN1 Includes:

[0225] Step 635: The candidate SN2 sends an SN addition request acknowledgement message 2 to the MN.

[0226] In this embodiment of the present application, after Candidate SN2 receives the SN addition request message 2 sent by the MN, if Candidate SN1 determines that it can allocate resources to the candidate cell included in Candidate SN1, Candidate SN2 may send an SN addition request acknowledgement message 2 to the MN, and the SN addition request acknowledgement message 2 indicates that Candidate SN2 has determined that Candidate SN2 can be added as a Candidate SN.

[0227] It should be understood that the order of execution between steps 620 and 630, and between steps 625 and 635 is not limited.

[0228] Step 640: The MN sends an RRC reconfiguration message to the terminal device.

[0229] The RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, and the CPAC configuration may include the configuration of each candidate cell included in candidate SN1 and candidate SN2, the corresponding execution condition, and an SN counter 1. Specifically, for example, the CPAC configuration includes the configurations of candidate cells 1 to 6, the corresponding execution condition, and an SN counter 1.

[0230] Step 645: The terminal device returns an RRC reconfiguration complete message 1 to the MN.

[0231] After receiving the RRC reconfiguration message of the MN and successfully completing the reconfiguration, the terminal device returns an RRC reconfiguration complete message 1 to the MN.

[0232] Step 650: The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0233] After receiving the CPAC configuration sent by the MN, the terminal device may begin to evaluate the execution conditions included in the CPAC configuration and determine whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0234] Step 655: The terminal device calculates K based on the SN counter 1 included in the CPAC configuration. SN1 Determine.

[0235] When the terminal device detects that the execution condition of the candidate cell is satisfied, or when the terminal device needs to access the candidate cell that satisfies the execution condition, the terminal device calculates K based on the master key by using the SN counter 1 included in the CPAC configuration.SN1 The terminal device can derive K SN1 Remember, K SN1 Based on the above, a user plane key for performing encryption or data integrity protection on data between candidate cell 1 and candidate cell 2 may be derived, and further, K SN1 Based on this, it may derive a control plane key for performing encryption or data integrity protection on signaling to and from candidate cell 1.

[0236] Step 660: The terminal device sends an RRC reconfiguration complete message 2 to the MN, where the RRC reconfiguration complete message 2 includes the RRC reconfiguration complete message sent to the candidate SN1.

[0237] If the terminal device determines that the execution condition for the candidate cell is met, the terminal device may send an RRC reconfiguration complete message to the MN. The RRC reconfiguration complete message may indicate the candidate cell selected by the terminal device. For example, assuming that the terminal device detects that the candidate cell that meets the execution condition is candidate cell 1, the terminal device may send an RRC reconfiguration complete message 2 to the MN, where the RRC reconfiguration complete message 2 includes an SN reconfiguration complete message sent to candidate SN 1 (the candidate SN to which candidate cell 1 belongs). The RRC reconfiguration complete message 2 may indicate that the candidate cell selected by the terminal device is candidate cell 1.

[0238] Step 665: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0239] In this embodiment of the present application, after receiving the RRC reconfiguration complete message 2 sent by the terminal device, the MN can determine based on the message that the terminal device selects candidate cell 1, and the MN forwards the SN reconfiguration complete message to the candidate SN 1 to which candidate cell 1 belongs.

[0240] It should be noted that the execution order of step 655, step 660, and step 665 is not specifically limited in this embodiment of the present application. Step 655 may be executed first, and then step 660 and step 665 may be executed; or step 660 and step 665 may be executed first, and then step 655 may be executed; or step 655, step 660, and step 665 may be executed simultaneously. In step 655, K SN1 Derive K SN1 The derivation of the integrity protection or encryption / decryption key based on K may be performed sequentially or separately. For example, the terminal device first SN1 derive K before or after performing step 670 below. SN1 Based on this, the integrity protection or encryption / decryption key is derived.

[0241] Step 667: The MN determines the K based on the updated SN counter. SN2 is derived.

[0242] Optionally, in some embodiments, the MN may further derive new keys for all candidate SNs (e.g., candidate SN1 and candidate SN2) or all candidate cells (e.g., candidate cell 1 to candidate cell 6) after each CPA or CPC is performed, and the new keys are used for the next triggered CPC process.

[0243] For example, the MN updates the SN counter 1 included in the CPAC configuration according to the SN counter update rule to obtain the SN counter 2, and then uses the SN counter 2 to obtain the K SN2 For example, in a possible implementation, the SN counter update rule is that the SN counter is updated to SN counter + N, where N is a positive integer greater than or equal to 1, or N is the maximum number of candidate cells for conditional cell addition or modification. The terminal device obtains SN counter 2 based on SN counter 1 + N according to the SN counter update rule, and derives K based on SN counter 2. SN2 can be derived.

[0244] Step 668: MN determines whether K SN2 to candidate SN1 and candidate SN2.

[0245] MN is the K for use in the next triggered CPC process derived in step 667. SN2 may be sent to all candidate cells or to the candidate SN to which all candidate cells belong.

[0246] In the above technical solutions, after one execution of CPA or CPC, the MN obtains the key K to be used in the next triggered CPC process. SN2 may be pre-distributed to all candidate SNs, so that the candidate SNs can receive the key K SN2 can be obtained in advance and need not communicate securely with the terminal device only after receiving the reconfiguration complete message of the MN.

[0247] Step 670: The terminal device performs synchronization with the candidate SN1.

[0248] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through RACH. Similarly, the candidate SN1 may synchronize with the received K SN1 derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on SN1 SN1 may derive a control plane key for performing encryption or data integrity protection on signaling to and from the terminal device based on K. SN1 from the MN, or before or after step 670, or when step 670 is performed.

[0249] It should be noted that the execution order of step 667, step 668, and step 670 is not specifically limited in this embodiment of the present application. Step 667 and step 668 may be executed first, and then step 670 may be executed; or step 670 may be executed first, and then step 667 and step 668 may be executed; or step 667, step 668, and step 670 may be executed simultaneously.

[0250] Step 673: The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0251] After completing CPA or CPC for the first time, the terminal device does not release the CPAC configuration. To support subsequent CPC processes, the terminal device maintains the CPAC configuration and continues to evaluate candidate cells that meet the execution conditions based on the configuration.

[0252] Step 675: The terminal device calculates K based on the updated SN counter. SN2 is derived.

[0253] If the terminal device finds a candidate cell that satisfies the execution condition through evaluation, in a possible implementation, the terminal device updates the SN counter based on the previously used SN counter and calculates a new K by using the updated SN counter. SN For example, assuming that the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, the terminal device may update the SN counter included in the CPAC configuration according to the SN counter update rule to obtain SN counter 2. In another possible implementation, the terminal device may further update the SN counter based on the SN counter previously used for a cell in the cell set to which the candidate cell that satisfies the execution condition belongs, and derive a new K by using the updated SN counter. SNFor example, assume that the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5 and that candidate cell 5 belongs to cell set 1. The terminal device may update the SN counter last used for the cell in cell set 1 included in the CPAC configuration according to the SN counter update rule to obtain SN counter 2. In another possible implementation, the terminal device may further update the SN counter based on the SN counter last used for the cell configured with the same SN counter as the candidate cell that satisfies the execution condition, and derive a new K by using the updated SN counter. SN For example, assume that the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, and the same SN counter is configured for candidate cell 5 and candidate cell 10. The terminal device may update the SN counter that was previously used for candidate cell 10 included in the CPAC configuration according to the SN counter update rule to obtain SN counter 2.

[0254] For example, in a possible implementation, the SN Counter is updated to SN Counter + N, where N is a positive integer greater than or equal to 1. The terminal device may obtain SN Counter 2 based on SN Counter 1 + 1 according to an SN Counter update rule, for example, updating the SN Counter to SN Counter + 1. The terminal device may further obtain K by using SN Counter 2. SN2 can be derived.

[0255] The terminal device is K SN2 and further, K SN2 Based on the above, a user plane key for performing encryption or data integrity protection on data between the candidate cell 5 can be derived, and further, K SN2 Based on this, it may derive a control plane key for performing encryption or data integrity protection on signaling to and from the candidate cell 5.

[0256] SN counter 1 may correspond to the second parameter value described above, SN counter 2 may correspond to the first parameter value described above, and K SN2It should be understood that the user plane key and / or the control plane key may correspond to the first key above.

[0257] After the terminal device finds a candidate cell that satisfies the execution condition through evaluation, it updates the SN counter to K SN It should be understood that the actions of deriving the key and the subsequent key are not necessarily performed immediately. For example, the terminal device may update the SN counter before or when accessing a candidate cell that satisfies the conditions, and may SN and the like can be derived.

[0258] Step 680: The terminal device sends an RRC reconfiguration complete message 3 to the MN, where the RRC reconfiguration complete message 3 includes the reconfiguration complete message sent to the candidate SN2. For example, if the terminal device detects the candidate cell 5 that satisfies the execution condition, the terminal device may send the RRC reconfiguration complete message 3 to the MN. The RRC reconfiguration complete message 3 may include the SN reconfiguration complete message sent to the candidate SN2 (the candidate SN to which the candidate cell 5 belongs). The RRC reconfiguration complete message 3 may indicate that the terminal device selects the candidate cell 5.

[0259] It should be understood that the RRC reconfiguration complete message 3 may correspond to the first message above.

[0260] Optionally, the RRC reconfiguration complete message 3 may further include an SN counter 2.

[0261] In the example, if the RRC reconfiguration complete message 3 includes the SN counter 2, in this embodiment of the present application, step 675 should be executed first, and then step 680 is executed.

[0262] In another example, if the RRC reconfiguration complete message 3 does not include the SN counter 2, the execution order of step 675 and step 680 is not specifically limited in this embodiment of the present application. Step 675 may be executed first, and then step 680 may be executed; or step 680 may be executed first, and then step 675 may be executed; or step 675 and step 680 may be executed simultaneously.

[0263] Step 685: The MN forwards the SN reconfiguration complete message to the candidate SN2.

[0264] In this embodiment of the present application, after receiving the RRC reconfiguration complete message 3 sent by the terminal device, the MN may forward the SN reconfiguration complete message to the candidate SN2 to which the candidate cell 5 belongs based on the message indicating that the candidate cell selected by the terminal device is the candidate cell 5.

[0265] For example, MN gets SN counter 2 and K gNB and SN counter 2, through calculation K SN2 It should be understood that in multiple implementations, the MN acquires the SN Counter 2. This is not specifically limited in the embodiments of the present application. In a possible implementation, the MN acquires the SN Counter 2 from the reconfiguration complete message 3 sent by the terminal device. In another possible implementation, the MN may update the SN Counter 1 to acquire the SN Counter 2 according to an SN Counter update rule, which is SN Counter + N, where SN Counter 2 is SN Counter 1 + N.

[0266] In this embodiment of the present application, the SN reconfiguration complete message forwarded by the MN to the candidate SN2 to which the candidate cell 5 belongs further includes: SN2 Alternatively, the MN may receive the SN reconfiguration complete message of SN2 and K SN2 to the candidate cell 5.

[0267] Step 687: The MN calculates K based on the updated SN counter.SN3 is derived.

[0268] Optionally, the MN further updates the SN Counter 2 according to the SN Counter update rule to obtain the SN Counter 3, and uses the SN Counter 3 to obtain the K SN3 For example, in a possible implementation, the SN counter update rule is that the SN counter is updated to SN counter + N, where N is a positive integer greater than or equal to 1, or N is the maximum number of candidate cells for the conditional cell addition or modification. The terminal device obtains SN counter 3 based on SN counter 2 + N according to the SN counter update rule, and derives K based on SN counter 3. SN3 can be derived.

[0269] Step 688: MN SN3 to candidate SN1 and candidate SN2.

[0270] MN is the K for use in the next triggered CPC process derived in step 687. SN3 may be sent to all candidate cells or to the candidate SN to which all candidate cells belong.

[0271] In the above technical solutions, after one execution of CPA or CPC, the MN obtains the key K to be used in the next triggered CPC process. SN3 may be pre-distributed to all candidate SNs, so that the candidate SNs can obtain the key K SN3 can be obtained in advance and need not communicate securely with the terminal device only after receiving the reconfiguration complete message of the MN.

[0272] Step 690: The terminal device performs synchronization with the candidate SN2.

[0273] The terminal device may perform synchronization with the candidate SN2 to which the candidate cell 5 belongs. For example, the synchronization process may be implemented via RACH. Similarly, the candidate SN2 may synchronize with the received K SN2derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on SN2 SN2 may derive a control plane key for performing encryption or data integrity protection on signaling to and from the terminal device based on K. SN2 from the MN, or after step 690, or when step 690 is performed, the user plane or control plane keys may be derived.

[0274] It should be noted that the execution order of step 687, step 688, and step 690 is not specifically limited in this embodiment of the present application. Step 687 and step 688 may be executed first, and then step 690 may be executed; or step 690 may be executed first, and then step 687 and step 688 may be executed; or step 687, step 688, and step 690 may be executed simultaneously.

[0275] Step 692: The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0276] After completing CPC, the terminal device does not release the CPAC configuration. To support subsequent CPC processes, the terminal device maintains the CPAC configuration and continues to evaluate candidate cells that meet the execution conditions based on the configuration. The terminal device may update or release the CPAC configuration based on a timer or number of CPA or CPC executions, or based on instructions from the network device.

[0277] Step 694: The terminal device calculates K based on the updated SN counter. SN3 is derived.

[0278] As with step 675, for ease of explanation, only one implementation is described below. For other implementations, please refer to the description in step 675. Details will not be repeated here.

[0279] If the terminal device finds more candidate cells that meet the execution condition through evaluation, the terminal device updates the SN counter based on the previously used SN counter and calculates a new K by using the updated SN counter. SN For example, assuming that the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device may update SN counter 2 according to the SN counter update rule to obtain SN counter 3. For example, the SN counter update rule is SN counter + N. The terminal device may obtain SN counter 3 based on SN counter 2 + N according to the SN counter update rule. The terminal device may further derive K by using SN counter 3. SN3 can be derived.

[0280] The terminal device is K SN3 and further, K SN3 Based on the above, a user plane key for performing encryption or data integrity protection on data between candidate cell 1 and candidate cell 2 may be derived, and further, K SN3 Based on this, it may derive a control plane key for performing encryption or data integrity protection on signaling to and from candidate cell 1.

[0281] In this case, it should be understood that SN counter 2 may correspond to the second parameter value mentioned above, i.e., the parameter value last used by the terminal device. SN counter 3 may correspond to the first parameter value mentioned above, and K SN3 may correspond to the first key above. The user plane key and / or the control plane key may correspond to the third key above.

[0282] Step 695: The terminal device sends an RRC reconfiguration complete message 4 to the MN, where the RRC reconfiguration complete message 4 includes the reconfiguration complete message sent to the candidate SN1.

[0283] For example, when the terminal device detects candidate cell 1 that satisfies the execution condition, the terminal device may send an RRC reconfiguration complete message 4 to the MN. The RRC reconfiguration complete message 4 includes an SN reconfiguration complete message sent to candidate SN 1 (the candidate SN to which candidate cell 1 belongs). The RRC reconfiguration complete message 4 may indicate that the terminal device selects candidate cell 1.

[0284] It should be understood that the RRC reconfiguration complete message 4 may correspond to the first message above.

[0285] Optionally, the RRC reconfiguration complete message 4 may further include an SN counter 3 .

[0286] In the example, if the RRC reconfiguration complete message 4 includes the SN counter 3, in this embodiment of the present application, step 675 should be performed first, and then step 680 is performed.

[0287] In another example, if the RRC reconfiguration complete message 4 does not include the SN counter 3, the execution order of step 694 and step 695 is not specifically limited in this embodiment of the present application. Step 694 may be executed first, and then step 695 may be executed; or step 695 may be executed first, and then step 694 may be executed; or step 694 and step 695 may be executed simultaneously.

[0288] Step 696: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0289] In this embodiment of the present application, after receiving the RRC reconfiguration complete message 4 sent by the terminal device, the MN may forward the SN reconfiguration complete message to the candidate SN 1 to which the candidate cell 1 belongs based on the message indicating that the candidate cell selected by the terminal device is the candidate cell 1.

[0290] For example, MN gets SN counter 3 and K gNBand SN counter 3, through calculation K SN3 It should be understood that in multiple implementations, the MN acquires the SN Counter 3. This is not specifically limited in the embodiments of the present application. In a possible implementation, the MN acquires the SN Counter 3 from the reconfiguration complete message 4 sent by the terminal device. In another possible implementation, the MN may update the SN Counter 2 according to an SN Counter update rule, which is SN Counter + N, to acquire the SN Counter 3, where SN Counter 3 is SN Counter 2 + N.

[0291] In this embodiment of the present application, the SN reconfiguration complete message forwarded by the MN to the candidate SN1 to which the candidate cell 1 belongs further includes K SN3 may include:

[0292] Step 697: The MN determines the K based on the updated SN counter. SN4 is derived.

[0293] Optionally, the MN further updates the SN Counter 3 according to the SN Counter update rule to obtain the SN Counter 4, and uses the SN Counter 4 to obtain the K SN4 For example, in a possible implementation, the SN counter update rule is that the SN counter is updated to SN counter + N, where N is a positive integer greater than or equal to 1, or N is the maximum number of candidate cells for the conditional cell addition or modification. The terminal device obtains SN counter 4 based on SN counter 3 + N according to the SN counter update rule, and derives K based on SN counter 4. SN4 can be derived.

[0294] Step 698: MN determines whether K SN4 to candidate SN1 and candidate SN2.

[0295] After performing one CPA or CPC, the MN obtains the key K to be used in the next triggered CPC process. SN4may be pre-distributed to all candidate SNs, so that the candidate SNs can receive the key K SN4 can be obtained in advance and need not communicate securely with the terminal device only after receiving the reconfiguration complete message of the MN.

[0296] Step 699: The terminal device performs synchronization with the candidate SN1.

[0297] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through RACH. Similarly, the candidate SN1 may synchronize with the received K SN3 derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on SN3 SN1 may derive a control plane key for performing encryption or data integrity protection on signaling to and from the terminal device based on K. SN3 from the MN, or after step 699, or when step 699 is performed, the user plane or control plane keys may be derived.

[0298] It should be noted that the execution order of step 697, step 698, and step 699 is not specifically limited in this embodiment of the present application. Step 697 and step 698 may be executed first, and then step 699 may be executed; or step 699 may be executed first, and then step 697 and step 698 may be executed; or step 697, step 698, and step 699 may be executed simultaneously.

[0299] In the above technical solution, the terminal device maintains the SN counter in the subsequent CPAC process, and updates the SN counter synchronously with the MN. The SN counter is updated in each subsequent CPC process, thereby obtaining a new K SN is derived later in the CPAC process, avoiding key reuse issues.

[0300] Referring to Figure 7, the following will describe in detail another specific implementation process of updating the first parameter value in step 510. It should be understood that the example in Figure 7 is merely intended to help those skilled in the art understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to the specific values ​​or specific scenarios in the example. It is clear that those skilled in the art can make various equivalent modifications or variations based on the following example provided in Figure 7, and such modifications and variations also fall within the scope of the embodiments of the present application. The description of some steps in Figure 7 is the same as Figure 6, and the details will not be described again here.

[0301] 7 is another schematic flowchart of a communication method according to an embodiment of the present application. As shown in FIG. 7, the method may include steps 710 to 795. Hereinafter, steps 710 to 795 will be described in detail separately.

[0302] Step 710: The terminal device establishes an RRC connection with the MN.

[0303] Step 715: The terminal device establishes an RRC connection with the source SN.

[0304] Note that step 715 is optional.

[0305] Step 720: The MN sends an SN addition request message to the candidate SN1.

[0306] In a possible implementation, the number of SN Add Request messages sent by the MN to the candidate SNs is equal to the number of candidate cells included in the candidate SNs. That is, the number of candidate cells included in the candidate SN1 is equal to the number of SN Add Request messages sent by the MN to the candidate SN1. Each SN Add Request message contains K candidate cells corresponding to the corresponding candidate cell. SN K SN is obtained by the MN through calculation based on the SN counter (which may be referred to as the starting SN counter) corresponding to each candidate cell.SN The inputs for deriving {overscore (R)} further include a master key.

[0307] In a possible implementation, the SN addition request message sent by the MN to the candidate SN includes a plurality of K corresponding to a plurality of candidate cells served by the candidate SN. SN That is, the number of candidate cells served by candidate SN1 is the K included in the SN addition request sent by the MN to the SN. SN The number of K SN is obtained by the MN through calculation based on the SN counter (which may be referred to as the starting SN counter) corresponding to each candidate cell. SN The inputs for deriving {overscore (R)} further include a master key.

[0308] The above two implementations, for example, K corresponding to candidate cell 1 SN 1 can be obtained by MN through calculation based on the SN counter corresponding to candidate cell 1; K corresponding to candidate cell 2 SN 2 can be obtained by MN through calculation based on the SN counter corresponding to candidate cell 2; K corresponding to candidate cell 5 SN 5 can be obtained by the MN through calculation based on the SN counter corresponding to candidate cell 5; and so on.

[0309] In another possible implementation, the SN addition request message sent by the MN to the candidate SN includes one K corresponding to one or more candidate cells served by the candidate SN. SN i.e., K corresponding to multiple candidate cells served by SN1. SN are consistent. K SN is obtained by the MN through calculation based on the SN counter (which may be referred to as the starting SN counter) corresponding to the candidate SN. SN The inputs for deriving {overscore (R)} further include a master key.

[0310] For example, K corresponding to candidate SN1 SN1 can be obtained by the MN through calculation based on the SN counter corresponding to the candidate SN1 and applicable to one or more candidate cells served by the candidate SN1; K corresponding to the candidate SN2 SN 2 may be obtained by the MN through calculation based on the SN counter corresponding to the candidate SN2, and is applicable to one or more candidate cells served by the candidate SN2; and so on.

[0311] It should be understood that an example is used in which the candidate cell 1 is the first cell described above, and the SN counter corresponding to the candidate cell 1 corresponds to the third parameter value described above, or the SN counter corresponding to the candidate SN1 to which the candidate cell 1 belongs corresponds to the third parameter value described above.

[0312] In the embodiment of the present application, the starting SN counter corresponding to each candidate cell or each candidate SN is not specifically limited. The following lists two possible implementations separately.

[0313] In an example, the starting SN counter corresponding to each candidate cell may be the starting value of the SN counter of each candidate cell (SN counter #x). For example, the starting value of the SN counter of candidate cell 1 is SN counter #1. In another example, the starting value of the SN counter of candidate cell 2 is SN counter #2. In another example, the starting value of the SN counter of candidate cell 3 is SN counter #3. In this implementation, the MN determines the starting SN counter corresponding to each candidate cell through calculation according to the above method based on the starting value of the SN counter (SN counter #x) corresponding to each candidate cell served by candidate SN1. SN can be obtained.

[0314] In another example, the starting SN counter corresponding to each candidate cell may be the first SN counter in the SN counter value set of each candidate cell. For example, the SN counter value set available for candidate cell 1 is 1 to 10, and the first SN counter in the value set is 1. In another example, the SN counter value set available for candidate cell 2 is 11 to 20, and the first SN counter in the value set is 11. In this implementation, the MN determines the starting SN counter corresponding to each candidate cell through calculation according to the above method based on the first SN counter in the SN counter value set corresponding to each candidate cell served by candidate SN1. SN can be obtained.

[0315] In another example, the starting SN counter corresponding to each candidate SN may be the starting value of the SN counter of each candidate SN (SN counter #y). For example, the starting value of the SN counter of candidate SN1 is SN counter #1. In another example, the starting value of the SN counter of candidate SN2 is SN counter #2. In another example, the starting value of the SN counter of candidate SN3 is SN counter #3. In this implementation, the MN determines the starting K of candidate SN1 through calculation according to the above method based on the starting value of the SN counter (SN counter #x) corresponding to candidate SN1. SN can be obtained.

[0316] In another example, the starting SN counter corresponding to each candidate SN may be the first SN counter in the SN counter value set for each candidate SN. For example, the set of SN counter values ​​available for candidate SN 1 is 1 to 10, and the first SN counter in the value set is 1. In another example, the set of SN counter values ​​available for candidate SN 2 is 11 to 20, and the first SN counter in the value set is 11. In this implementation, the MN determines the starting SN counter corresponding to candidate SN 1 through calculation according to the above method based on the first SN counter in the SN counter value set corresponding to candidate SN 1. SN can be obtained.

[0317] Step 725: The candidate SN1 sends an SN addition request acknowledgement message to the MN.

[0318] Step 730: The MN sends an SN addition request message to the candidate SN2.

[0319] In a possible implementation, the SN addition request message sent by the MN to the candidate SN2 includes K corresponding candidate cells served by the candidate SN2. SN Includes: K SN is obtained by the MN through calculation based on the starting SN counter corresponding to each candidate cell included in the candidate SN2. For the specific process, please refer to the description in step 720. The details will not be described again here.

[0320] In another possible implementation, the SN addition request message sent by the MN to the candidate SN2 includes the K corresponding to the candidate SN2. SN Includes: K SN is obtained by the MN through calculation based on the starting SN counter corresponding to the candidate SN2. For the specific process, please refer to the description in step 720. The details will not be described again here.

[0321] Step 735: The candidate SN2 sends an SN addition request acknowledgement message to the MN.

[0322] Step 740: The MN sends an RRC reconfiguration message to the terminal device.

[0323] In a possible implementation, the RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, which may include the configuration of each candidate cell, the corresponding execution conditions, and the SN counter corresponding to each candidate cell.

[0324] Example 1: The SN counter corresponding to each candidate cell is the starting value of the SN counter of each candidate cell, SN counter #x. Optionally, the CPAC configuration may further indicate M, where M is a positive integer (e.g., M is a positive integer greater than or equal to the number of candidate cells).

[0325] Example 2: The SN counter corresponding to each candidate cell is the starting value of the SN counter of each candidate cell, SN counter #x, and the CPAC configuration may further include the number P of available SN counters of each candidate cell. That is, the value range of the SN counter usable for each candidate cell is SN counter #x to SN counter #x+P.

[0326] Example 3: The SN counter corresponding to each candidate cell is the available SN counter value set for each candidate cell. For example, the available SN counter value set 1 for candidate cell 1 is 1 to 10, the available SN counter value set 2 for candidate cell 2 is 11 to 20, and the available SN counter value set 3 for candidate cell 3 is 21 to 30.

[0327] In another possible implementation, the RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, and the CPAC configuration may include a configuration of each candidate cell, a corresponding execution condition, and an SN counter corresponding to each candidate cell. The SN counters corresponding to multiple candidate cells belonging to the same SN are the same. In other words, the RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, and the CPAC configuration may include a configuration of each candidate cell, a corresponding execution condition, and an SN counter corresponding to each candidate SN.

[0328] Example 4: The SN counter corresponding to each candidate SN is the starting value of the SN counter of each candidate SN, SN counter #y. Optionally, the CPAC configuration may further indicate Q, where Q is a positive integer (e.g., Q is a positive integer greater than or equal to the number of candidate SNs).

[0329] Example 5: The SN counter corresponding to each candidate SN is SN counter #x, which is the starting value of the SN counter for each candidate SN, and the CPAC configuration may further include the number R of available SN counters for each candidate SN. That is, the value range of the SN counter that can be used for each candidate SN is SN counter #y to SN counter #y+R.

[0330] Example 6: The SN counter corresponding to each candidate SN is the available SN counter value set for each candidate SN. For example, available SN counter value set 1 for candidate SN1 is 1 to 10, available SN counter value set 2 for candidate SN2 is 11 to 20, and available SN counter value set 3 for candidate SN3 is 21 to 30.

[0331] Step 745: The terminal device returns an RRC reconfiguration complete message to the MN.

[0332] Step 750: The terminal device evaluates whether the candidate PSCells included in the CPAC configuration satisfy the execution conditions.

[0333] Step 755: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the SN reconfiguration complete message sent to the candidate SN that meets the execution condition.

[0334] For example, assuming that the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device may send an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes an SN reconfiguration complete message sent to candidate SN 1 (the candidate SN to which candidate cell 1 belongs). The RRC reconfiguration complete message may indicate that the terminal device selects candidate cell 1.

[0335] Step 758: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0336] Step 760: The terminal device calculates K based on the SN counter included in the CPAC configuration. SN Determine -1.

[0337] If the terminal device finds or accesses a candidate cell that satisfies the conditions through the evaluation, the terminal device updates the SN counter corresponding to the candidate cell or the candidate SN to which the candidate cell belongs, and calculates K by using the updated SN counter. SN For example, when the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device determines K by using the SN counter corresponding to candidate cell 1 or the SN to which candidate cell 1 belongs. SN -1 can be derived.

[0338] Example 1: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation, or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on the starting SN counter corresponding to the candidate cell, or the terminal device updates the SN counter based on the SN counter last used for the candidate cell, or the terminal device updates the SN counter based on the SN counter last used for a cell in the cell set to which the candidate cell that satisfies the execution condition belongs, or the terminal device updates the SN counter based on the SN counter last used for a cell configured with the same SN counter as the candidate cell that satisfies the execution condition, and uses the updated SN counter to SN For example, the CPAC configuration includes a starting value of the SN counter (SN counter #x) corresponding to the candidate cell x, and the SN counter of the selected cell is updated to SN counter = SN counter #x + n * M, where SN counter #x is the starting value of the SN counter corresponding to each candidate cell, and n is the number of candidate cells K. SN n is related to the number of times that the terminal device accesses the candidate cell (e.g., n is related to the number of times that the terminal device accesses the candidate cell) SNwhere n is the number of times the terminal device accesses the candidate cell minus 1, and n is an integer greater than or equal to 0), and M is a positive integer (e.g., M is an integer greater than or equal to the number of candidate cells). In this implementation, since the terminal device accesses candidate cell 1 for the first time, K SN is 0 (n=0), and the starting SN counter determined by the terminal device according to the above SN counter update rule corresponding to candidate cell 1 is SN counter #1. In another example, the CPAC configuration includes a starting value of the SN counter corresponding to candidate cell x (SN counter #x), and the SN counter of the selected candidate cell is updated to SN counter + M. That is, each time a candidate cell is accessed, the SN counter is obtained based on the SN counter + M previously used for the candidate cell. The SN counter used by the terminal device to access the candidate cell for the first time is the starting value of the SN counter of the candidate cell. In this implementation, since the terminal device accesses candidate cell 1 for the first time, the SN counter used is starting SN counter #1. By using SN counter #1, the terminal device calculates K SN M may be configured by the network or may be predefined.

[0339] Example 2: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation, or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on the starting SN counter corresponding to the candidate cell and (optionally) the number of times the candidate cell is accessed, or the terminal device updates the SN counter based on the SN counter previously used for the candidate SN, and uses the updated SN counter to SNFor example, if the CPAC configuration includes a starting value of the SN counter (SN counter #x) corresponding to the candidate cell x and (optionally) the number P of available SN counters for each candidate cell, the SN counter of the selected cell is updated to SN counter = SN counter #x + p, where p is the number of times the terminal device accesses the candidate cell, or K for the candidate cell. SN (e.g., p is the number of times the terminal device accesses the candidate cell minus 1, or p is the number of times K SN deriving the SN counter #1−1). In this implementation, the terminal device determines that the starting SN counter corresponding to candidate cell 1 is SN counter #1 according to the above update rule. In another example, the CPAC configuration includes a starting value of the SN counter corresponding to candidate cell x (SN counter #x) and (optionally) the number P of available SN counters for each candidate cell, and the SN counter of the selected candidate cell is updated to SN counter = SN counter + 1; that is, each time a candidate cell is accessed, the SN counter is obtained based on the SN counter + 1 previously used for the candidate cell. The SN counter used by the terminal device to access the candidate cell for the first time is the starting value of the SN counter of the candidate cell. In this implementation, the number of times the terminal device accesses the candidate cell is limited, that is, the maximum number of accesses is P. The values ​​of P corresponding to all candidate cells may be the same or different. When the number of accesses of the terminal device reaches P, the terminal device may release the configuration of the candidate cell or release the CPAC configuration. In a specific implementation of this implementation, it can be understood that the terminal device accesses the candidate cell and releases the CPAC configuration of the candidate cell. This is the case where P = 1. In the example, since the terminal device accesses the candidate cell 1 for the first time, the SN counter used is the starting SN counter #1. By using the SN counter #1, the terminal device calculates K SN It may take the value -1. P may be configured by the network or may be predefined.

[0340] Example 3: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on a plurality of SN counters corresponding to the candidate cell and (optionally) the number of times the candidate cell is accessed, and uses the updated SN counter to calculate K SN For example, the CPAC configuration includes an SN counter value set x corresponding to a candidate cell x, and the SN counter value set x includes multiple available SN counters corresponding to the candidate cell x. The SN counter of the selected candidate cell is updated to a corresponding SN counter obtained from the SN counter value set based on the number of times the terminal device accesses the candidate cell. In this implementation, since the terminal device accesses candidate cell 1 for the first time, the terminal device updates the SN counter to the first SN counter in SN counter value set 1 corresponding to candidate cell 1. The terminal device uses the first SN counter in the SN counter value set to calculate K SN You may get -1.

[0341] Example 4: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation, or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on the starting SN counter corresponding to the candidate SN to which the candidate cell belongs, or the terminal device updates the SN counter based on the SN counter previously used for the candidate SN, and uses the updated SN counter to SN For example, the CPAC configuration includes a starting value of the SN counter (SN counter #y) corresponding to candidate SN y, and the SN counter of the selected cell is updated to SN counter = SN counter #y + n * Q. SN counter #y is the starting value of the SN counter corresponding to each candidate SN, and n is the number of candidate SNs for K. SN n is related to the number of times that the terminal device accesses the candidate SN (e.g., n is related to the number of times that the terminal device accesses the candidate SN) SNn is the number of times that the terminal device accesses the candidate SN, and n is an integer greater than or equal to 0), and Q is a positive integer (e.g., Q is an integer greater than or equal to the number of candidate SNs). In this implementation, since the terminal device accesses candidate SN1 for the first time, K SN is 0 (n=0), and the starting SN counter determined by the terminal device according to the above SN counter update rule, which corresponds to SN1 to which candidate cell 1 belongs, is SN counter #1. In another example, the CPAC configuration includes a starting value of the SN counter (SN counter #y) corresponding to candidate SN y, and the SN counter of the selected candidate cell is updated to SN counter + Q. That is, each time a candidate cell is accessed, the SN counter is obtained based on the SN counter + Q previously used for the SN to which the candidate cell belongs. The SN counter used by the terminal device to access a candidate SN for the first time is the starting value of the SN counter of the candidate SN. In this implementation, since the terminal device accesses candidate SN1 to which candidate cell 1 belongs for the first time, the SN counter used is the starting SN counter #1 corresponding to candidate SN1. By using SN counter #1, the terminal device calculates K SN It may take the value -1. Q may be configured by the network or may be predefined.

[0342] Example 5: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation, or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on the starting SN counter corresponding to the candidate SN to which the candidate cell belongs and (optionally) the number of times the candidate SN is accessed, or the terminal device updates the SN counter based on the SN counter previously used for the candidate SN, and uses the updated SN counter to SNFor example, the CPAC configuration includes a starting value of the SN counter corresponding to candidate SN y (SN counter #y) and the number of available SN counters R for each candidate SN, and the SN counter of the selected candidate cell is updated to SN counter = SN counter #y + r, where r is the number of times the terminal device accesses the candidate SN, or K for the candidate SN. SN (e.g., r is the number of times the terminal device accesses the candidate SN minus 1, or r is the number of times K SN (The number of times to derive the SN counter is R minus 1). In this implementation, the terminal device determines that the starting SN counter corresponding to SN1 to which candidate cell 1 belongs is SN counter #1 according to the above update rule. In another example, the CPAC configuration includes a starting value (SN counter #y) of an SN counter corresponding to candidate SN y and (optionally) the number R of available SN counters for each candidate cell, and the SN counter of a selected candidate cell is updated to SN counter = SN counter + 1, i.e., each time a candidate cell is accessed, the SN counter is obtained based on the SN counter + 1 previously used for the SN to which the candidate cell belongs. The SN counter used by the terminal device to access a candidate SN for the first time is the starting value of the SN counter of the candidate SN. In this implementation, the number of times a terminal device accesses a candidate SN is limited, i.e., the maximum access number is R. The values ​​of R corresponding to all candidate cells may be the same or different. When the access number of the terminal device reaches R, the terminal device may release the configuration of the candidate cell served by the candidate SN, or may release the CPAC configuration. In a specific implementation of this implementation, it can be understood that the terminal device accesses a candidate cell and releases the CPAC configuration of the SN to which the candidate cell belongs. This is the case where R=1. In the example, since the terminal device accesses SN1 to which candidate cell 1 belongs for the first time, the SN counter used is the start SN counter #1. By using SN counter #1, the terminal device calculates K SN It may take the value -1. R may be configured by the network or may be predefined.

[0343] Example 6: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on a plurality of SN counters corresponding to the SNs to which the candidate cells belong and (optionally) the number of times the terminal device accesses the candidate SN, and calculates K by using the updated SN counters. SN For example, the CPAC configuration includes an SN counter value set y corresponding to a candidate SN y, and the SN counter value set y includes a plurality of available SN counters corresponding to the candidate SN y. The SN counter of the selected candidate cell is updated to a corresponding SN counter obtained from the SN counter value set based on the number of times the terminal device accesses the candidate SN. In this implementation, since the terminal device accesses candidate SN 1 to which candidate cell 1 belongs for the first time, the terminal device updates the SN counter to the first SN counter in SN counter value set 1 corresponding to candidate SN 1. The terminal device uses the first SN counter in the SN counter value set to calculate K SN You may get -1.

[0344] Example 7: When the terminal device finds or accesses a candidate cell that satisfies the execution condition through evaluation, the terminal device updates the SN counter based on a plurality of SN counters associated with the cell set to which the candidate cell belongs, and uses the updated SN counter to determine K SN For example, the SN counter value set included in the CPAC configuration associated with the cell set to which the candidate SN z belongs is value set z, and the SN counter value set z includes multiple available SN counters. In an example, an SN counter may be randomly selected from the SN counter value set z, and K SN -1 is obtained through calculation based on the selected SN counter. In another example, the SN counter is selected in descending or ascending order based on the values ​​of multiple available SN counters in the SN counter value set z, and K SN-1 is obtained through calculation based on the selected SN counter. In another example, the SN counter of the selected candidate cell is updated to a corresponding SN counter obtained from the SN counter value set z based on the number of times the terminal device accesses the candidate SN. In this implementation, since the terminal device accesses the candidate SN1 to which the candidate cell 1 belongs for the first time, the terminal device updates the SN counter to the first SN counter in the SN counter value set z. The terminal device obtains K through calculation by using the first SN counter in the SN counter value set z. SN You may get -1.

[0345] The terminal device is K SN -1, and K SN -1, and may further derive a user plane key for performing encryption or data integrity protection on data between candidate cell 1 and candidate cell 2, and further SN Based on candidate cell 1, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from candidate cell 1.

[0346] Step 763: The MN determines the K to be used in the next triggered CPC process based on the updated SN counter. SN is derived.

[0347] Optionally, in some embodiments, the MN may further derive new keys for all candidate SNs (e.g., candidate SN1 and candidate SN2) or all candidate cells (e.g., candidate cell 1 to candidate cell 9) after each CPA or CPC is performed, and the new keys are used for the next triggered CPC process.

[0348] In the example, each candidate cell corresponds to one SN counter. The MN updates the starting SN counter corresponding to each candidate cell to obtain an updated SN counter corresponding to each candidate cell, and calculates the K SN counters corresponding to each candidate cell based on the updated SN counters corresponding to each candidate cell. SNWhen the terminal device accesses the candidate cell in the next CPC process, the candidate cell may be determined by deriving K SN For example, candidate cell 1 is used as an example. The starting SN counter of candidate cell 1 is updated and the K used for candidate cell 1 in the next CPC process is SN (For example, K SN -1-1) is derived by using the updated SN counter of candidate cell 1. In another example, candidate cell 5 is used as an example. The starting SN counter of candidate cell 5 is updated and the K SN (For example, K SN -5-1) is derived by using the updated SN counter of candidate cell 5. For the specific process, please refer to the description in step 760. The details will not be described in this specification.

[0349] In another example, each candidate SN corresponds to one SN counter. The MN updates the SN counter corresponding to each candidate SN to obtain an updated SN counter corresponding to each candidate SN, and calculates the K corresponding to each candidate SN based on the updated SN counter corresponding to each candidate SN. SN When the terminal device accesses the candidate cell in the next CPC process, the candidate cell may be determined by deriving K corresponding to the SN to which the candidate cell belongs. SN By using the above, secure communication with the terminal device can be performed. For the specific process, please refer to the description in step 760. The details will not be described in this specification.

[0350] Step 764: MN determines the corresponding K SN to the candidate cell or the candidate SN to which the candidate cell belongs.

[0351] MN is the K for use in the next triggered CPC process derived in step 763. SNmay be sent to all candidate cells or to the candidate SN to which all candidate cells belong.

[0352] In the above technical solutions, after performing CPA or CPC once, the MN sends the key K to all candidate cells or the candidate SNs to which all candidate cells belong, which will be used in the next triggered CPC process. SN may be distributed in advance, so that the candidate cell or the candidate SN to which the candidate cell belongs will receive the key K SN can be obtained in advance and need not communicate securely with the terminal device only after receiving the reconfiguration complete message of the MN.

[0353] Step 765: The terminal device performs synchronization with the candidate SN1.

[0354] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through the RACH. Similarly, the candidate cell 1 may synchronize with the received K SN -1, a user plane key for performing encryption or data integrity protection on data between the terminal device and the device may be derived based on the SN Based on -1, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0355] It should be noted that the execution order of step 755, step 758, step 760 and step 765 is not specifically limited in this embodiment of the present application. The terminal device may first execute step 755 and step 758, then execute step 760, and then execute step 765; or may first execute step 760, then execute step 755 and step 758, and then execute step 765; or may simultaneously execute step 755, step 758, step 760 and step 765.

[0356] It should be noted that the execution order of step 763, step 764, and step 765 is not specifically limited in this embodiment of the present application. Step 763 and step 764 may be executed first, and then step 765 may be executed; or step 765 may be executed first, and then step 763 and step 764 may be executed; or step 763, step 764, and step 765 may be executed simultaneously.

[0357] Step 770: The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0358] Step 775: The terminal device calculates K based on the SN counter included in the CPAC configuration. SN Decide on -5.

[0359] If the terminal device further finds a candidate cell that satisfies the condition through evaluation, or if the terminal device subsequently accesses a candidate cell that satisfies the condition, the terminal device updates the SN counter corresponding to the candidate cell or the candidate SN to which the candidate cell belongs, and calculates K by using the updated SN counter. SN For example, when the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, the terminal device determines K by using the starting SN counter corresponding to candidate cell 5 or the SN to which candidate cell 5 belongs. SN -5 can be determined.

[0360] Example 1: When the terminal device finds a candidate cell that satisfies the conditions through evaluation, or when the terminal device accesses a candidate cell that satisfies the conditions, the terminal device updates the SN counter based on the starting SN counter corresponding to the candidate cell, or the terminal device updates the SN counter based on the SN counter previously used for the candidate cell, and uses the updated SN counter to SNFor example, the CPAC configuration includes a starting value of the SN counter (SN counter #5) corresponding to candidate cell 5, and the SN counter of candidate cell 5 is updated to SN counter #5+n*M. In this implementation, since the terminal device accesses candidate cell 5 for the first time, K SN is 0 (n=0), and the SN counter determined by the terminal device according to the above SN counter update rule corresponding to candidate cell 5 is SN counter #5. In another example, the CPAC configuration includes a starting value of the SN counter corresponding to candidate cell 5 (SN counter #5), and the SN counter of candidate cell 5 is updated to SN counter + M. That is, each time a candidate cell is accessed, the SN counter is obtained based on the SN counter + M previously used for the candidate cell. In this implementation, since the terminal device accesses candidate cell 5 for the first time, the SN counter used is the starting SN counter #5. By using SN counter #5, the terminal device calculates K SN You can get -5.

[0361] Example 2: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation, or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on the starting SN counter corresponding to the candidate cell and (optionally) the number of times the candidate cell is accessed, or the terminal device updates the SN counter based on the SN counter previously used for the candidate SN, and uses the updated SN counter to SN For example, the CPAC configuration includes a starting value of the SN counter corresponding to the candidate cell 5 (SN counter #5), and the SN counter of the candidate cell 5 is updated to SN counter = SN counter #5 + p, where p is the number of times the terminal device accesses the candidate cell 5, or K for the candidate cell 5. SN (e.g., p is the number of times the terminal device accesses the candidate cell 5 minus 1, or p is the number of times K SNIn this implementation, since the terminal device accesses the candidate cell 5 for the first time, K SN is 0 (n=0), and the SN counter determined by the terminal device according to the above update rule corresponding to candidate cell 5 is SN counter #5. In another example, the CPAC configuration includes a starting value (SN counter #5) of the SN counter corresponding to candidate cell 5 and (optionally) the number P of available SN counters for candidate cell 5. The SN counter of candidate cell 5 is updated to SN counter = SN counter + 1. That is, every time candidate cell 5 is accessed, the SN counter is obtained based on the SN counter + 1 previously used for candidate cell 5. In this implementation, the number of times the terminal device accesses candidate cell 5 is limited, that is, the maximum number of accesses is P. The values ​​of P corresponding to all candidate cells may be the same or different. When the number of accesses of the terminal device reaches P, the terminal device may release the configuration of the candidate cell or release the CPAC configuration. In a specific implementation of this implementation, it can be understood that the terminal device accesses the candidate cell and releases the CPAC configuration of the candidate cell. This is the case where P=1. In the example, since the terminal device accesses the candidate cell 5 for the first time, the SN counter used is the starting SN counter #5. By using the SN counter #5, the terminal device can calculate K SN You can get -5.

[0362] Example 3: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on a plurality of SN counters corresponding to the candidate cell and (optionally) the number of times the candidate cell is accessed, and uses the updated SN counter to calculate K SNFor example, the CPAC configuration includes an SN counter value set 5 corresponding to the candidate cell 5, and the value set 5 includes a plurality of available SN counters corresponding to the candidate cell 5. In this implementation, since the terminal device accesses the candidate cell 5 for the first time, the starting SN counter determined by the terminal device according to the above SN counter update rule corresponding to the candidate cell 5 is the first SN counter in the SN counter value set 5 of the candidate cell 5. By using the first SN counter, the terminal device calculates K SN You can get -5.

[0363] Example 4: When the terminal device finds a candidate cell that satisfies the conditions through evaluation, or when the terminal device accesses a candidate cell that satisfies the conditions, the terminal device updates the SN counter based on the starting SN counter corresponding to the candidate SN to which the candidate cell belongs, or the terminal device updates the SN counter based on the SN counter previously used for the candidate SN, and uses the updated SN counter to SN For example, the CPAC configuration includes a starting value (SN counter #2) of the SN counter corresponding to the SN2 to which the candidate cell 5 belongs, and the SN counter of the candidate SN to which the candidate cell 5 belongs is updated to SN counter #2+n*Q. In this implementation, since the terminal device accesses the SN2 to which the candidate cell 5 belongs for the first time, K is determined for the SN2 to which the candidate cell 5 belongs. SNis 0 (n=0), and the SN counter determined by the terminal device according to the above SN counter update rule, corresponding to the SN2 to which the candidate cell 5 belongs, is SN counter #2. In another example, the CPAC configuration includes a starting value of the SN counter (SN counter #2) corresponding to the SN2 to which the candidate cell 5 belongs, and the SN counter of the SN2 to which the candidate cell 5 belongs is updated to SN counter + Q. That is, each time a candidate cell is accessed, the SN counter is obtained based on the SN counter + Q previously used for the candidate SN to which the candidate cell belongs. The SN counter used by the terminal device to access the candidate SN for the first time is the starting value of the SN counter of the candidate SN. In this implementation, since this is the first time that the terminal device accesses the SN2 to which the candidate cell 5 belongs, the SN counter used is SN counter #2. By using SN counter #2, the terminal device calculates K SN You can get -5.

[0364] Example 5: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation, or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on the starting SN counter corresponding to the candidate SN to which the candidate cell belongs and (optionally) the number of times the candidate SN is accessed, or the terminal device updates the SN counter based on the SN counter previously used for the candidate SN, and uses the updated SN counter to SN For example, the CPAC configuration includes a starting value (SN counter #2) of the SN counter corresponding to the SN2 to which the candidate cell 5 belongs, and the SN counter of the SN2 to which the candidate cell 5 belongs is updated to SN counter = SN counter #2 + p, where p is the number of times the terminal device accesses the SN2 to which the candidate cell 5 belongs, or K for the SN2 to which the candidate cell 5 belongs. SN (e.g., p is the number of times the terminal device accesses the candidate SN2 minus 1, or p is the number of times K SNIn this implementation, since the terminal device accesses the SN2 to which the candidate cell 5 belongs for the first time, K SN is 0 (n=0), and the SN counter determined by the terminal device according to the above update rule, corresponding to candidate cell 5, is SN counter #2. In another example, the CPAC configuration includes a starting value (SN counter #5) of the SN counter corresponding to SN2 to which candidate cell 5 belongs and (optionally) the number P of available SN counters for candidate cell 5. The SN counter of SN2 to which candidate cell 5 belongs is updated to SN counter = SN counter + 1. That is, each time candidate cell 5 is accessed, the SN counter is obtained based on the SN counter + 1 previously used for SN2 to which candidate cell 5 belongs. In this implementation, the number of times the terminal device accesses SN2 is limited, that is, the maximum number of accesses is P. The values ​​of P corresponding to all candidate SNs may be the same or different. When the number of accesses of the terminal device reaches P, the terminal device may release the configuration of the candidate cell served by the SN, or may release the CPAC configuration. In the example, since the terminal device accesses SN2 to which candidate cell 5 belongs for the first time, the SN counter used is SN counter #2. The terminal device calculates K by using SN counter #2. SN You can get -5.

[0365] Example 6: When the terminal device finds a candidate cell that satisfies the execution condition through evaluation or accesses a candidate cell that satisfies the execution condition, the terminal device updates the SN counter based on a plurality of SN counters corresponding to the SNs to which the candidate cells belong and (optionally) the number of times the candidate cell is accessed, and uses the updated SN counters to calculate K SNFor example, the CPAC configuration includes an SN counter value set 2 corresponding to the SN2 to which the candidate cell 5 belongs, and the value set 2 includes a plurality of available SN counters corresponding to the SN2 to which the candidate cell 5 belongs. In this implementation, since the terminal device accesses the SN2 to which the candidate cell 5 belongs for the first time, the SN counter determined by the terminal device according to the above SN counter update rule, which corresponds to the SN2 to which the candidate cell 5 belongs, is the first SN counter in the SN counter value set 2 of the candidate SN2. By using the first SN counter, the terminal device calculates K SN You can get -5.

[0366] The terminal device further includes: SN -5, a user plane key for performing encryption or data integrity protection on data between candidate cell 5 and candidate cell 5 may be derived, and further, K SN Based on candidate cell 5, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from candidate cell 5.

[0367] Step 776: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN2.

[0368] For example, assuming that the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, the terminal device may send an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to candidate SN2 (the candidate SN to which candidate cell 5 belongs). The RRC reconfiguration complete message may indicate that the terminal device selects candidate cell 5.

[0369] Step 777: The MN forwards the SN reconfiguration complete message to the candidate SN2.

[0370] Similarly, in this embodiment of the present application, the order of execution of step 775, step 777 and step 778 is not specifically limited.

[0371] Step 778: The MN determines the K to be used in the next triggered CPC process based on the updated SN counter. SN is derived.

[0372] In the example, each candidate cell corresponds to one SN counter. For example, candidate cell 1 is used as an example. The SN counter used by the terminal device to previously access candidate cell 1 is updated and used for candidate cell 1 in the next CPC process. SN (For example, K SN -1-2) is derived by using the updated SN counter of candidate cell 1. In another example, candidate cell 5 is used as an example. The SN counter used by the terminal device to access candidate cell 5 last time is updated and used for candidate cell 5 in the next CPC process. SN (For example, K SN -5-2) is derived by using the updated SN counter of candidate cell 5.

[0373] In another example, each candidate SN corresponds to one SN counter. For example, candidate SN1 is used as an example. The SN counter used by the terminal device to access candidate SN1 last time is updated and used for candidate SN1 in the next CPC process. SN is derived by using the updated SN counter of candidate SN1. In another example, candidate SN2 is used as an example. The SN counter used by the terminal device to access candidate SN2 last time is updated and used for candidate SN2 in the next CPC process. SN is derived by using the updated SN counter of candidate SN2.

[0374] Step 789: MN determines the corresponding K SN to the candidate cell or the candidate SN to which the candidate cell belongs.

[0375] MN is the K for use in the next triggered CPC process derived in step 788. SN may be sent to all candidate cells or to the candidate SN to which all candidate cells belong.

[0376] In the above technical solutions, after performing CPA or CPC once, the MN sends the key K to all candidate cells or the candidate SNs to which all candidate cells belong, which will be used in the next triggered CPC process. SN may be distributed in advance, so that the candidate cell or the candidate SN to which the candidate cell belongs will receive the key K SN can be obtained in advance and need not communicate securely with the terminal device only after receiving the reconfiguration complete message of the MN.

[0377] Step 780: The terminal device performs synchronization with the candidate SN2.

[0378] The terminal device may perform synchronization with the candidate SN2 to which the candidate cell 5 belongs. For example, the synchronization process may be implemented via the RACH.

[0379] Similarly, candidate cell 5 receives K SN -5, a user plane key for performing encryption or data integrity protection on data between the terminal device and the device may be derived based on the SN Based on -5, a control plane key can be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0380] It should be noted that the execution order of step 778, step 779, and step 780 is not specifically limited in this embodiment of the present application. Step 778 and step 779 may be executed first, and then step 780 may be executed; or step 780 may be executed first, and then step 778 and step 779 may be executed; or step 778, step 779, and step 780 may be executed simultaneously.

[0381] Step 783: The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0382] Step 788: The terminal device calculates K based on the SN counter included in the CPAC configuration. SN -1-1 is determined and stored.

[0383] When the terminal device detects again that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device updates the starting SN counter corresponding to candidate cell 1 or the SN1 to which candidate cell 1 belongs to obtain an updated SN counter, and calculates K based on the updated SN counter. SN -1-1 can be determined and stored.

[0384] Example 1: For example, the CPAC configuration includes a starting value (SN counter #1) of the SN counter corresponding to the candidate cell 1, and the SN counter corresponding to the candidate cell 1 is updated to SN counter #x+n*M. In this implementation, since the terminal device accesses the candidate cell 1 for the second time, K SN is 1 (n=1), and the terminal device updates the SN counter corresponding to candidate cell 1 according to the above SN counter update rule to obtain an updated SN counter, which is SN counter #1+1*M. In another example, the CPAC configuration includes a starting value (SN counter #1) of the SN counter corresponding to candidate cell 1, and the terminal device updates the SN counter corresponding to candidate cell 1 to the SN counter previously used for candidate cell 1+M. Since the SN counter previously used by the terminal device for candidate cell 1 is SN counter #1, the terminal device updates the SN counter of candidate cell 1 to SN counter #1+M. By using SN counter #1+1*M, the terminal device calculates K SN You can get -1-1.

[0385] Example 2: For example, the CPAC configuration includes a starting value of the SN counter corresponding to candidate cell 1 (SN counter #1), and the SN counter of candidate cell 1 is updated to SN counter = SN counter #1 + P. In this implementation, since the terminal device accesses candidate cell 1 for the second time, the terminal device updates the SN counter corresponding to candidate cell 1 according to the above update rule to obtain an updated SN counter, which is SN counter #1 + 1. In another example, the SN counter corresponding to candidate cell 1 included in the CPAC configuration is the starting value of the SN counter (SN counter #1), and the terminal device updates the SN counter corresponding to candidate cell 1 to the SN counter previously used for candidate cell 1 + 1. Since the SN counter previously used to access candidate cell 1 is SN counter #1, the terminal device updates the SN counter of candidate cell 1 to SN counter #1 + 1. By using SN counter #1 + 1, the terminal device calculates K SN You can get -1-1.

[0386] Example 3: The CPAC configuration includes an SN counter value set 1 corresponding to candidate cell 1, and the SN counter value set 1 includes multiple available SN counters corresponding to candidate cell 1. The SN counter update rule is to determine the corresponding SN counter from the SN counter value set based on the number of times the terminal device accesses candidate cell 1. In this implementation, since the terminal device accesses candidate cell 1 for the second time, the terminal device updates the initial SN counter corresponding to candidate cell 1 according to the above SN counter update rule to obtain an updated SN counter, which is the second SN counter in the SN counter value set corresponding to candidate cell 1. By using the second SN counter in the SN counter value set, the terminal device calculates K SN You can get -1-1.

[0387] Example 4: For example, the CPAC configuration includes a starting value (SN counter #1) of the SN counter corresponding to the SN1 to which the candidate cell 1 belongs, and the SN counter corresponding to the SN1 to which the candidate cell 1 belongs is updated to SN counter #x+n*Q. In this implementation, since the terminal device accesses the SN1 to which the candidate cell 1 belongs for the second time, K for the SN1 to which the candidate cell 1 belongs SN is 1 (n=1), and the terminal device updates the SN counter corresponding to the SN1 to which the candidate cell 1 belongs according to the above SN counter update rule to obtain an updated SN counter, which is SN counter #1+1*Q. In another example, the CPAC configuration includes a starting value (SN counter #1) of the SN counter corresponding to the SN1 to which the candidate cell 1 belongs, and the terminal device updates the SN counter corresponding to the SN1 to which the candidate cell 1 belongs to the SN counter #1 last used for the SN1 + Q. Since the SN counter last used by the terminal device for the SN1 to which the candidate cell 1 belongs is SN counter #1, the terminal device updates the SN counter of the SN1 to which the candidate cell 1 belongs to the SN counter #1+Q. By using the SN counter #1+1*Q, the terminal device calculates K SN You can get -1-1.

[0388] Example 5: For example, the CPAC configuration includes a starting value (SN counter #1) of the SN counter corresponding to the SN1 to which the candidate cell 1 belongs, and the SN counter of the SN1 to which the candidate cell 1 belongs is updated to SN counter = SN counter #1 + r, where r is the number of times the terminal device accesses the SN1, or K for the SN1 SN (e.g., r is the number of times the terminal device accesses SN1 minus 1, or r is the number of times K SN(The number of times K is derived is minus 1). In this implementation, since the terminal device accesses the SN1 to which the candidate cell 1 belongs for the second time, the terminal device updates the SN counter corresponding to the SN1 to which the candidate cell 1 belongs according to the above update rule to obtain an updated SN counter, which is SN counter #1+1. In another example, the SN counter corresponding to the SN1 included in the CPAC configuration to which the candidate cell 1 belongs is the starting value of the SN counter (SN counter #1), and the terminal device updates the SN counter corresponding to the SN1 to which the candidate cell 1 belongs to the SN counter #1 last used for the SN1 to which the candidate cell 1 belongs. Since the SN counter last used to access the SN1 to which the candidate cell 1 belongs is SN counter #1, the terminal device updates the SN counter of the SN1 to which the candidate cell 1 belongs to the SN counter #1+1. By using the SN counter #1+1, the terminal device obtains K SN You can get -1-1.

[0389] Example 3: The CPAC configuration includes an SN counter value set 1 corresponding to the SN1 to which the candidate cell 1 belongs, and the SN counter value set 1 includes multiple available SN counters corresponding to the SN1 to which the candidate cell 1 belongs. The SN counter update rule is to determine the corresponding SN counter from the SN counter value set based on the number of times the terminal device accesses the SN1 to which the candidate cell 1 belongs. In this implementation, since the terminal device accesses the SN1 to which the candidate cell 1 belongs for the second time, the terminal device updates the starting SN counter corresponding to the SN1 to which the candidate cell 1 belongs according to the above SN counter update rule, and obtains an updated SN counter, which is the second SN counter in the SN counter value set corresponding to the SN1 to which the candidate cell 1 belongs. By using the second SN counter in the SN counter value set, the terminal device calculates K SN You can get -1-1.

[0390] The terminal device further includes: SN -1-1, a user plane key for performing encryption or data integrity protection on data between candidate cell 1 and candidate cell 2 may be derived, and further, KSN Based on -1-1, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from candidate cell 1.

[0391] Step 789: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0392] For example, assuming that the terminal device again detects that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device may send an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to candidate SN1 (the candidate SN to which candidate cell 1 belongs). The RRC reconfiguration complete message may indicate that the candidate cell selected by the terminal device is candidate cell 1.

[0393] Optionally, the RRC reconfiguration complete message may further include an updated SN counter corresponding to the selected candidate cell or the SN to which the selected candidate cell belongs.

[0394] In the example, if the RRC reconfiguration complete message contains an updated SN counter corresponding to candidate cell 1, in this embodiment of the present application, step 788 should be performed first, and then step 789 is performed.

[0395] In another example, if the RRC reconfiguration complete message does not include an updated SN counter, the execution order of step 788 and step 789 is not specifically limited in this embodiment of the present application. Step 788 may be executed first, and then step 789 may be executed; or step 789 may be executed first, and then step 788 may be executed; or step 788 and step 789 may be executed simultaneously.

[0396] Step 790: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0397] In this embodiment of the present application, after receiving the RRC reconfiguration complete message sent by the terminal device, the MN may forward the SN reconfiguration complete message to the candidate SN1 to which the candidate cell1 belongs based on the message indicating that the candidate cell selected by the terminal device is the candidate cell1.

[0398] In this embodiment of the present application, the SN reconfiguration complete message forwarded by the MN to the candidate SN1 to which the candidate cell 1 belongs further includes: SN -1-1 may be included.

[0399] In the example, the MN obtains an SN counter obtained by updating the starting SN counter of the candidate cell 1 or the SN1 to which the candidate cell 1 belongs, and calculates K through the updated SN counter corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs. SN -1-1. It should be understood that in multiple implementations, the MN acquires an updated SN counter corresponding to candidate cell 1 or the SN1 to which candidate cell 1 belongs. This is not specifically limited in the embodiments of the present application. In a possible implementation, the reconfiguration complete message sent by the terminal device to the MN includes the updated SN counter, that is, the MN acquires the updated SN counter corresponding to candidate cell 1 or the SN1 to which candidate cell 1 belongs from the reconfiguration complete message sent by the terminal device. In another possible implementation, the MN may determine the starting SN counter corresponding to candidate cell 1 or the SN1 to which candidate cell 1 belongs and the updated SN counter corresponding to candidate cell 1 or the SN1 to which candidate cell 1 belongs based on the SN counter update rules in Examples 1 to 6 above. For a specific determination process, please refer to the description in step 788. Details will not be described again here.

[0400] Step 791: The MN determines the K to be used in the next triggered CPC process based on the updated SN counter. SN is derived.

[0401] In the example, each candidate cell corresponds to one SN counter. For example, candidate cell 1 is used as an example. The SN counter used by the terminal device to previously access candidate cell 1 is updated and used for candidate cell 1 in the next CPC process. SN (For example, K SN -1-3) is derived by using the updated SN counter of candidate cell 1. In another example, candidate cell 5 is used as an example. The SN counter used by the terminal device to access candidate cell 5 last time is updated and used for candidate cell 5 in the next CPC process. SN (For example, K SN -5-3) is derived by using the updated SN counter of candidate cell 5.

[0402] In another example, each candidate SN corresponds to one SN counter. For example, candidate SN1 is used as an example. The SN counter used by the terminal device to access candidate SN1 last time is updated and used for candidate SN1 in the next CPC process. SN is derived by using the updated SN counter of candidate SN1. In another example, candidate SN2 is used as an example. The SN counter used by the terminal device to access candidate SN2 last time is updated and used for candidate SN2 in the next CPC process. SN is derived by using the updated SN counter of candidate SN2.

[0403] Step 792: MN determines the corresponding K SN to the candidate cell or the candidate SN to which the candidate cell belongs.

[0404] MN is the K for use in the next triggered CPC process derived in step 791. SN may be sent to all candidate cells or to the candidate SN to which all candidate cells belong.

[0405] In the above technical solutions, after performing CPA or CPC once, the MN sends the key K to all candidate cells or the candidate SNs to which all candidate cells belong, which will be used in the next triggered CPC process. SN may be distributed in advance, so that the candidate cell or the candidate SN to which the candidate cell belongs will receive the key K SN can be obtained in advance and does not need to communicate securely with the terminal device only after receiving the reconfiguration complete message of the MN.

[0406] Step 795: The terminal device performs synchronization with the candidate SN1.

[0407] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through the RACH. Similarly, the candidate cell 1 may synchronize with the received K SN -1-1, based on which a user plane key for performing encryption or data integrity protection on data between the terminal device and the device may be derived, and further, K SN Based on -1-1, a control plane key can be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0408] In the above technical solution, in the later CPAC process, every time the terminal device triggers CPA or CPC, the terminal device updates the SN counter corresponding to the selected candidate cell or the SN to which the selected candidate cell belongs. In the later CPAC process, the terminal device maintains an SN counter for each candidate cell or each candidate SN, and updates the SN counter so that when the terminal device returns to the previously accessed candidate cell or candidate SN in the later CPAC process, it uses the new SN counter to generate a new K SN is derived, thereby avoiding the key reuse problem.

[0409] Referring to Figure 8, the following will describe in detail a specific implementation process in which the P value in the first set is used as the first parameter value in step 510. It should be understood that the example in Figure 8 is merely intended to help those skilled in the art understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to the specific values ​​or specific scenarios in the example. It is clear that those skilled in the art can make various equivalent modifications or variations based on the following example provided in Figure 8, and such modifications and variations also fall within the scope of the embodiments of the present application.

[0410] 8 is another schematic flowchart of a communication method according to an embodiment of the present application. As shown in FIG. 8, the method may include steps 810 to 899. In the following, steps 810 to 899 will be described separately in detail. The description of some steps in FIG. 8 is the same as FIG. 6 or FIG. 7, and the details will not be described again here.

[0411] Step 810: The terminal device establishes an RRC connection with the MN.

[0412] Step 815: The terminal device establishes an RRC connection with the source SN.

[0413] Note that step 815 is optional.

[0414] Step 820: The MN sends an SN addition request message to the candidate SN.

[0415] For example, the MN sends an SN addition request message to candidate SN1 and candidate SN2 separately.

[0416] In a possible implementation, the SN addition request message is sent to each of the K candidate cells. SN It may contain a group of K SN The group of K SN Each candidate cell is assigned a K corresponding to each candidate cell based on the number of times the terminal device accesses the candidate cell.SN From the group of SN can be selected in sequence.

[0417] Using the example above where the candidate cell is the first cell, the first cell's K SN It should be understood that this group corresponds to the second set above.

[0418] For example, candidate cell 1 is K SN When the terminal device is handed over to the candidate cell 1 for the first time, the candidate cell 1 is determined to be a group of K corresponding to the candidate cell 1 based on the fact that the terminal device is handed over to the cell for the first time. SN From the group of 1K SN When the terminal device is handed over to the candidate cell 2 for the first time (where the candidate cell 2 is K SN ), and candidate cell 2 is based on the first handover of the terminal device to the cell, and K corresponding to candidate cell 2 SN From the group of 1K SN When the terminal device is handed over to the candidate cell 1 for the second time, the candidate cell 1 may select K corresponding to the candidate cell 1 based on the terminal device being handed over to the cell for the second time. SN From the group of 2K SN can be selected.

[0419] In another possible implementation, the SN addition request message includes K corresponding candidate SNs. SN It may contain a group of K SN The group of K is associated with the corresponding candidate SN. SN Each candidate SN is assigned a K corresponding to each candidate SN based on the number of times the terminal device accesses the candidate SN. SN From the group of SN can be selected in sequence.

[0420] Using the example above where the candidate cell is the first cell, the candidate SN to which the candidate cell belongs is the secondary node to which the first cell belongs, and the K of the secondary node to which the first cell belongsSN It should be understood that this group corresponds to the second set above.

[0421] For example, candidate SN1 is K SN When the terminal device is handed over to the candidate cell served by the candidate SN1 for the first time, the candidate SN1 selects the K corresponding to the candidate SN1 based on the terminal device being handed over to the SN for the first time. SN From the group of 1K SN When the terminal device is handed over to the candidate cell served by the candidate SN2 for the first time (where the candidate SN2 selects K SN ), the candidate SN2 is based on the first handover of the terminal device to the SN, and ... SN From the group of 1K SN When the terminal device is handed over to the candidate cell served by the candidate SN1 for the second time, the candidate SN1 may select K corresponding to the candidate SN1 based on the terminal device being handed over to the SN for the second time. SN From the group of 2K SN can be selected.

[0422] In the method shown in FIG. 7, the starting K SN is distributed to each candidate cell in the start phase, or the start K corresponding to each candidate SN SN It should be understood that K is distributed to each candidate SN in the initiation phase. After that, each time a terminal device triggers a CPA or CPC, the MN receives the updated K SN The selected candidate cell or the secondary node to which the selected candidate cell belongs will distribute the updated K only after receiving the reconfiguration complete message of the MN. SN Compared with the method shown in Figure 7, in the embodiment shown in Figure 8, multiple K SNis distributed to the candidate SN in advance, so that the candidate SN receives the updated K only after receiving the MN's reconfiguration complete message. SN In other words, the candidate SN does not need to start performing secure data or signaling communication with the terminal device only after receiving the MN's reconfiguration complete message, thereby reducing delay and improving the efficiency of the reconfiguration.

[0423] Step 825: The candidate SN sends an SN addition request acknowledgement message to the MN.

[0424] Step 830: The MN sends an RRC reconfiguration message to the terminal device.

[0425] The RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, which may include the configuration of candidate cells and corresponding execution conditions, and the RRC reconfiguration message may further indicate a group of SN counters corresponding to each candidate cell or each candidate SN.

[0426] There are several ways in which the RRC reconfiguration message indicates a group of SN counters corresponding to each candidate cell or each candidate SN. For example, the RRC reconfiguration message includes multiple SN counters corresponding to each candidate cell or each candidate SN, which may also be referred to as an SN counter list or set corresponding to each candidate cell or each candidate SN. In another example, the RRC reconfiguration message includes a starting value and the number of available SN counters corresponding to each candidate cell or each candidate SN, and the multiple SN counters corresponding to each candidate cell or each candidate SN are determined by using the starting value and the available number. In this specification, an SN counter set corresponding to each candidate cell or each candidate SN is used to represent multiple SN counters corresponding to each candidate cell or each candidate SN.

[0427] Using the example where the candidate cell is the first cell above, it should be understood that the SN counter set of the first cell corresponds to the first set above.

[0428] Using the example where the candidate cell is the first cell above, it should be understood that the SN to which the candidate cell belongs is the secondary node to which the first cell belongs, and the SN counter set of the candidate SN to which the first cell belongs corresponds to the first set above.

[0429] Step 835: The terminal device returns an RRC reconfiguration complete message to the MN.

[0430] Step 840: The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0431] Step 845: The terminal device determines whether K is a candidate cell or a candidate SN based on a first SN counter in the SN counter set corresponding to the candidate cell or the candidate SN included in the CPAC configuration. SN Determine.

[0432] When the terminal device finds a candidate cell that satisfies the conditions through evaluation, or when the terminal device accesses a candidate cell that satisfies the conditions, the terminal device determines an SN counter to be used from a plurality of SN counters corresponding to each candidate cell or each candidate SN, and calculates K by using the selected SN counter. SN Determine.

[0433] For example, the terminal device may determine the SN counter to be used from a plurality of SN counters based on the number of times the terminal device accesses the candidate cell or the SN to which the candidate cell belongs.

[0434] For example, when the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 1, since the terminal device is connected to candidate cell 1 or the SN1 to which candidate cell 1 belongs for the first time, the terminal device uses the first SN counter in the SN counter set corresponding to candidate cell 1 or the SN1 to which candidate cell 1 belongs, included in the CPAC configuration, to determine K SN can be determined.

[0435] The terminal device is K SNand further, K SN Based on the above, a user plane key for performing encryption or data integrity protection on data between candidate cell 1 and candidate cell 2 may be derived, and further, K SN Based on this, it may derive a control plane key for performing encryption or data integrity protection on signaling to and from candidate cell 1.

[0436] Using the example where candidate cell 1 is the first cell described above, the SN counter set corresponding to candidate cell 1 corresponds to the first set described above, and the first SN counter in the SN counter set corresponding to candidate cell 1 corresponds to the first parameter value described above, and the K determined by using the first SN counter SN It should be understood that corresponds to the first key above.

[0437] Using the example where candidate cell 1 is the first cell described above, the SN counter set corresponding to SN1 to which candidate cell 1 belongs corresponds to the first set described above, and the first SN counter in the SN counter set corresponding to SN1 to which candidate cell 1 belongs corresponds to the first parameter value described above, and the K determined by using the first SN counter SN It should be understood that corresponds to the first key above.

[0438] Step 850: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0439] For example, assuming that the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device may send an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to candidate SN1 (the candidate SN to which candidate cell 1 belongs). The RRC reconfiguration complete message may indicate that the candidate cell selected by the terminal device is candidate cell 1.

[0440] Step 855: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0441] Step 860: The terminal device performs synchronization with the candidate SN1.

[0442] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through RACH. During or before the RACH process, the candidate SN1 may acquire K corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs. SN 1st K in a set SN can be determined.

[0443] In this embodiment of the present application, the K SN There are several ways to determine this.

[0444] In a possible implementation, the terminal device transmits a first identifier to the SN to which the candidate cell belongs, where the first identifier is a plurality of K corresponding to the selected candidate cell or the SN to which the selected candidate cell belongs. SN K to be used in SN Alternatively, the first identifier indicates which K SN The SN to which the candidate cell belongs receives the first identifier and, based on the first identifier, selects a plurality of K SN K to be used in SN The first identifier may be a key identifier or an SN counter identifier. The first identifier may be included in Msg3 in the RACH process or may be included in MAC CE (e.g., included in C-RATI MAC CE or included in the first MAC CE, where the first MAC CE is used to carry the first identifier). The first identifier may be transmitted in the RACH process or may be transmitted before or after the RACH process.

[0445] In another possible implementation, the SN to which the selected candidate cell belongs is selected based on the number of times the terminal device accesses the candidate cell or the SN to which the candidate cell belongs, by selecting a plurality of K corresponding to the candidate cell or the secondary node to which the candidate cell belongs. SN K to be used from SN For example, when a terminal device accesses a candidate cell or an SN to which the candidate cell belongs for the first time, the SN is selected as the first K SN In another example, when the terminal device accesses the candidate cell or the SN to which the candidate cell belongs for the second time, the SN is selected as the second K SN Select .

[0446] In the above two possible implementations, for example, the selected candidate cell is candidate cell 1, and the secondary node to which candidate cell 1 belongs is SN1. Candidate cell 1 or SN1 is selected based on the first identifier or the number of times the terminal device accesses candidate cell 1 or SN1. SN The corresponding K from the set SN In the example, the terminal device may select a first SN counter from the set of SN counters corresponding to candidate cell 1 or SN1 to select K SN To derive K , the terminal device may further transmit a first identifier to SN1, where the first identifier is K corresponding to the candidate cell 1 or SN1. SN 1st K from the set SN In another example, the SN1 instructs the SN1 to select K corresponding to the candidate cell 1 or SN1 based on the first access of the terminal device to the candidate cell 1 or SN1. SN 1st K from the set SN can be selected.

[0447] Using the example above where candidate cell 1 is the first cell, the K corresponding to candidate cell 1 SN The set corresponds to the second set above, and K SN 1st K in a set SN It should be understood that corresponds to the first key above.

[0448] Using the example where candidate cell 1 is the first cell above, SN1 to which candidate cell 1 belongs corresponds to the secondary node to which the first cell belongs, and K corresponding to SN1 SN The set corresponds to the second set above, and the first K SN and K. SN It should be understood that the set corresponds to the first key above.

[0449] Similarly, candidate cell 1 or SN1 further SN 1st K in a set SN derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on SN 1st K in a set SN Based on this, the control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0450] It should be noted that the order of execution of steps 840, 845, 850, 855, and 860 is not limited. For example, step 845 may be executed first, then steps 850, 855, and 860 are executed, and then step 845 is executed. In this case, the terminal finds a candidate cell that satisfies the conditions through evaluation, and sends an RRC reconfiguration complete message to the MN. The reconfiguration complete message indicates the candidate cell to be selected by the terminal device. The MN sends an SN reconfiguration complete message to the SN to which the selected candidate cell belongs. The SN determines the K to be used based on the number of times the terminal device accesses the candidate cell or the SN to which the candidate cell belongs. SN (For details, refer to the description of step 860, and details will not be described again), and may indicate to the terminal device the SN counter to be used by using the second identifier. The terminal device selects an SN counter to be used from a plurality of SN counters corresponding to the candidate cell or the SN to which the candidate cell belongs based on the second identifier, and uses the selected SN counter to SN is derived.

[0451] Step 865: The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0452] Step 868: The terminal device determines, based on the first SN counter, K in the group corresponding to the candidate cell 5 or the SN2 to which the candidate cell 5 belongs, included in the CPAC configuration. SN Determine.

[0453] When the terminal device detects that the candidate cell that satisfies the execution condition is the candidate cell 5, since the terminal device is connected to the candidate cell 5 for the first time or is connected to the SN2 to which the candidate cell 5 belongs for the first time, the terminal device uses the first SN counter in the group of SN counters corresponding to the candidate cell 5 or the SN2 included in the CPAC configuration to determine K SN can be determined.

[0454] The terminal device further includes: SN Based on the above, a user plane key for performing encryption or data integrity protection on data between the candidate cell 5 can be derived, and further, K SN Based on this, it may derive a control plane key for performing encryption or data integrity protection on signaling to and from the candidate cell 5.

[0455] Step 870: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0456] Step 875: The MN forwards the SN reconfiguration complete message to the candidate SN2.

[0457] Step 880: The terminal device performs synchronization with the candidate SN2.

[0458] The terminal device may perform synchronization with the candidate SN2 to which the candidate cell 5 belongs. For example, the synchronization process may be implemented through RACH. During or before the RACH process, the candidate SN2 may acquire K corresponding to the candidate cell 5 or the candidate SN2. SN 1st K in a set SN can be selected.

[0459] Similarly, the candidate cell 5 or the candidate SN2 further includes the K SN 1st K in a set SN derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on the candidate cell 5 or candidate SN2; and SN 1st K in a set SN Based on this, the control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0460] Step 885: The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0461] Step 890: The terminal device determines K based on a second SN counter in the group of SN counters corresponding to the candidate cell 1 or the SN 1 to which the candidate cell 1 belongs, which is included in the CPAC configuration. SN Determine.

[0462] When the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device is connected to candidate cell 1 or the SN1 to which candidate cell 1 belongs for the second time, so the terminal device uses the second SN counter in the SN counter set corresponding to candidate cell 1 or the SN1 to which candidate cell 1 belongs, included in the CPAC configuration, to calculate K SN can be determined.

[0463] Step 895: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0464] Step 898: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0465] Step 899: The terminal device performs synchronization with the candidate SN1.

[0466] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through RACH. During or before the RACH process, the candidate SN1 may acquire K corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs. SN 2nd K in a set SN can be used.

[0467] Similarly, candidate cell 1 or SN1 further SN 2nd K in a set SN derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on SN 2nd K in a set SN Based on this, the control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0468] In the above technical solution, K corresponding to each candidate cell or each candidate SN SN The set is pre-distributed to the candidate SNs so that the candidate SNs need not communicate securely with the terminal device until after receiving the MN's reconfiguration complete message.

[0469] 9 is another schematic flowchart of a communication method according to an embodiment of the present application. As shown in FIG. 9, the method may include steps 910 and 920. In the following, steps 910 and 920 will be described in detail separately.

[0470] Step 910: Derive a fourth key, where the fourth key is determined based on the fifth key.

[0471] For example, in this embodiment of the present application, the fourth key may be derived based on the fifth key. For example, the terminal device may derive the fourth key based on the fifth key.

[0472] Note that the terminal device may evaluate whether the execution condition of the second cell is satisfied, and the second cell is a candidate cell for conditional cell addition or modification. If the terminal device evaluates that the execution condition of the second cell is satisfied, the terminal device may derive a fourth key, and the fourth key may be used for security of the second cell.

[0473] It should be noted that the terminal device does not necessarily perform key derivation immediately after finding a candidate cell that satisfies the execution condition through evaluation, for example, the terminal device performs key derivation when or after accessing the selected candidate cell.

[0474] In a possible implementation, the terminal device may derive the fourth key based on the fifth key by using the fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or the secondary node to which the second cell belongs. The fourth parameter value is not specifically limited in the embodiments of the present application and may be a parameter value associated with the second cell or the secondary node to which the second cell belongs, or may be obtained through an update based on the fifth parameter value, or may be determined based on the number of times the second cell or the secondary node to which the second cell belongs is accessed. The fifth parameter value is a parameter value previously used for the second cell or the secondary node to which the second cell belongs, or the fifth parameter value is a parameter value used by the terminal device for the previous access.

[0475] The fifth key is not specifically limited in the embodiments of the present application. The following describes several possible implementations by using examples.

[0476] In an example, the fifth key may be the key for the previous cell accessed by the terminal device, that is, the fourth key may be derived based on the key for the previous cell accessed by the terminal device. In the following, the specific implementation process of this method will be described in detail with reference to Figure 10, and the details will not be described here.

[0477] The fourth key is K SN and the fifth key is the K SN It should be understood that

[0478] In another example, the fifth key may alternatively be a key last used by the terminal device to access the second cell or the secondary node to which the second cell belongs, that is, the fourth key may be derived based on a key last used by the terminal device to access the second cell or the secondary node to which the second cell belongs. Below, the specific implementation process of this scheme will be described in detail with reference to Figure 11, and details will not be described here.

[0479] The fourth key is K SN and the fifth key is the K SN It should be understood that

[0480] In another example, the fifth key may alternatively be a key previously used for a cell in the second cell set, the second cell set including the second cell. In other words, the terminal device may use a key (e.g., K SN ) or a counter (e.g., SN counter). For example, the counter can be understood as the fourth parameter. When the terminal device is handed over from a cell in another cell set to a cell in the second cell set, the terminal device derives the fourth key. The fourth key derived by the terminal device is determined by using a fifth key. The fifth key is the K SN previously used for the cell in the second cell set. SNFor example, the second cell set instructs the terminal device to perform PDCP re-establishment. For example, when the terminal device is handed over from a cell in the second cell set to another cell in the second cell set, PDCP re-establishment does not need to be performed; or when the terminal device is handed over from a cell outside the second cell set to a cell in the second cell set, PDCP re-establishment needs to be performed.

[0481] For example, the second cell set may be configured by the network device, for example, by indicating identities of candidate cells included in the second cell set.

[0482] For example, alternatively, the second set of cells is not configured by the network device. The second set of cells may use the same key (e.g., K SN ) or contain cells with the same counter (e.g., SN counter). SN When the terminal device is handed over from a cell associated with the first counter or counter (e.g., SN counter) to a second cell, or when the terminal device is handed over from a cell having a different counter to a second cell, the terminal device derives the fourth key.

[0483] In another example, the fifth key may alternatively be the key previously used for the fourth cell, and the fourth cell and the second cell may use the same counter (e.g., SN counter) or key (K SN ) For example, a counter can be understood as the fourth parameter. In other words, the terminal device calculates K SN or SN counters of different candidate cells. SN When a terminal device is handed over from another cell to a second cell, the SN counters or K of the two cells are SN If the SN counters are different, the terminal device derives a fourth key. The fourth key derived by the terminal device is determined by using a fifth key. The fifth key may be determined by using the same SN counter as the second cell or the same K SN Previously used K for cells with SNThe fourth cell may alternatively be the second cell.

[0484] Step 920: Derive a sixth key based on the fourth key, where the sixth key is a user plane key and / or a control plane key.

[0485] In this embodiment of the present application, the sixth key may be derived based on the fourth key, i.e., the sixth key is a user plane key and / or a control plane key derived based on the fourth key. The control plane key and / or the user plane key are used to perform ciphering or data integrity protection on data and / or signaling between the terminal device and the second cell. The user plane key is used to perform ciphering or data integrity protection on data between the terminal device and the second cell.

[0486] Optionally, in some embodiments, the MN may derive a fourth key based on the fifth key, and transmit the derived fourth key to the second cell, or transmit the fourth key to a secondary node to which the second cell belongs. The process by which the MN derives the fourth key based on the fifth key is the same as the process by which the terminal device derives the fourth key based on the fifth key. For details, please refer to the description in step 910. The details will not be described again here. In ... fourth key to the secondary node to which the second cell belongs. SN may be sent to the candidate SN in the Xth message. The Xth message may be an SN addition request message. In this implementation, all received K SN If SN considers that K will be or is being used, SN The request message may request the MN to update multiple K SN Used to request updates.

[0487] Optionally, in some embodiments, the SN may also derive a fourth key based on the fifth key and a sixth key based on the fourth key. The process by which the SN derives the fourth key and the sixth key is the same as the process by which the terminal device derives the fourth key and the sixth key. For details, see the descriptions in steps 910 and 920. The details will not be repeated here.

[0488] 10 , the following describes in detail a specific implementation process of deriving a fourth key based on a key for a previous cell accessed by a terminal device in step 910. It should be understood that the example in FIG. 10 is intended merely to help those skilled in the art understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to the specific values ​​or specific scenarios in the example. It is clear that those skilled in the art can make various equivalent modifications or variations based on the following example provided in FIG. 10, and such modifications and variations also fall within the scope of the embodiments of the present application.

[0489] 10 is another schematic flowchart of a communication method according to an embodiment of the present application. As shown in FIG. 10, the method may include steps 1010 to 1099. In the following, steps 1010 to 1099 will be described in detail separately.

[0490] Step 1010: The terminal device establishes an RRC connection with the MN.

[0491] Step 1015: The terminal device establishes an RRC connection with the source SN.

[0492] Note that step 1015 is optional.

[0493] Step 1020: The MN sends an SN addition request message to the candidate SN.

[0494] For example, the MN sends an SN addition request message to candidate SN1 and candidate SN2 separately. SN #0, K SN The SN counters corresponding to all candidate cells are the same, and are SN counters #0. The MN obtains K through calculation based on the SN counter #0. SN Assume you can get #0.

[0495] Step 1025: The candidate SN sends an SN addition request acknowledgement message to the MN.

[0496] Step 1030: The MN sends an RRC reconfiguration message to the terminal device.

[0497] The RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, which includes the configurations of candidate cells included in candidate SN1 and candidate SN2, corresponding execution conditions, and K SN The SN counter may include an SN counter (e.g., SN Counter #0) used by the MN to derive SN Counter #0.

[0498] Step 1035: The terminal device returns an RRC reconfiguration complete message to the MN.

[0499] Step 1040: The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0500] Step 1045: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0501] For example, assuming that the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device may send an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to candidate SN1 (the candidate SN to which candidate cell 1 belongs). The RRC reconfiguration complete message may indicate that the candidate cell selected by the terminal device is candidate cell 1.

[0502] Step 1050: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0503] Step 1055: The terminal device calculates K based on the SN counter included in the CPAC configuration. SN Derive #0.

[0504] For example, after receiving the CPAC configuration, the terminal device gNB and K based on the SN counter (e.g., SN counter #0). SN The terminal device may further derive K SN Based on the candidate cell #0, a user plane key for performing encryption or data integrity protection on data between candidate cell 1 and candidate cell 2 may be derived, and K SN Based on #0, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from candidate cell 1.

[0505] Step 1060: The terminal device performs synchronization with the candidate SN1.

[0506] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through the RACH. Similarly, the candidate cell 1 may synchronize with the received K SN Based on the user plane key K, a user plane key for performing encryption or data integrity protection on data between the terminal device and the user plane key K may be derived. SN Based on #0, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0507] Step 1063: The terminal device continues to evaluate whether the candidate PSCells included in the CPAC configuration meet the execution conditions.

[0508] Step 1065: The terminal device SN #0 based on K SN Derive #1.

[0509] In the example, suppose the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, the terminal device will SN #0 based on K SN #1 can be derived and stored.

[0510] In another example, when a terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, if candidate cell 1 belongs to a cell set and candidate cell 5 belongs to another cell set, when the terminal device is handed over from a cell in the cell set to which candidate cell 1 belongs to to a cell in the cell set to which candidate cell 5 belongs, K SN #1 is the K SN #0 can be derived and stored.

[0511] In another example, when the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, the SN counters of candidate cell 5 and candidate cell 1 or K SN If different, K SN #1 is the K previously used for candidate cell 10 SN Candidate cell 10 and candidate cell 5 can be derived and stored by using the same SN counter or the same K SN It consists of:

[0512] The terminal device further includes: SN Based on #1, a user plane key for performing encryption or data integrity protection on data between the candidate cell 5 can be derived, and further, K SNBased on #1, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from candidate cell 5.

[0513] Using the example above where candidate cell 5 is the second cell, K SN #0 corresponds to the fifth key above, and K SN It should be understood that #1 corresponds to the fourth key above.

[0514] Step 1070: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the RRC reconfiguration complete message sent to the candidate SN2.

[0515] For example, the terminal device may detect candidate cell 5 that satisfies the execution condition, and the terminal device may send an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to candidate SN2 (the candidate SN to which candidate cell 5 belongs). The RRC reconfiguration complete message may indicate that the terminal device selects candidate cell 5.

[0516] It should be noted that the execution order of step 1065 and step 1070 is not specifically limited in this embodiment of the present application. Step 1065 can be executed first, and then step 1070 can be executed; or step 1070 can be executed first, and then step 1065 can be executed; or step 1065 and step 1070 can be executed simultaneously.

[0517] Step 1075: MN determines whether K SN #0 based on K SN Derive #1.

[0518] In this embodiment of the present application, after receiving the RRC reconfiguration complete message sent by the terminal device, the MN obtains the key K for the previous cell accessed by the terminal device. SN By using #0, K SN #1 can be derived and stored.

[0519] In a possible implementation, K SN #1 is K SN The fifth SN counter may be derived based on the sixth SN counter and the sixth SN counter. In an example, the fifth SN counter may be an SN counter associated with the candidate cell 5 or the SN2 to which the candidate cell 5 belongs. In another example, the fifth SN counter may alternatively be obtained through updating based on the sixth SN counter, which is the SN counter previously used for the candidate cell 5 or the SN2 to which the candidate cell 5 belongs, or the SN counter used by the terminal device for the previous access. In another example, the fifth SN counter may alternatively be determined based on the number of times the candidate cell 5 or the SN2 to which the candidate cell 5 belongs is accessed.

[0520] K SN #0 corresponds to the fifth key above, and K SN Using the example where #1 corresponds to the fourth key above, it should be understood that the fifth SN counter corresponds to the fourth parameter value above, and the sixth SN counter corresponds to the fifth parameter value above.

[0521] In another possible implementation, the terminal device SN #0 and K based on SN counter #0 SN SN Counter #1 can be derived. SN Counter #0 is the SN counter used by all candidate cells or all candidate SNs.

[0522] K SN #0 corresponds to the fifth key above, and K SN Using the example where #1 corresponds to the fourth key above, it should be understood that SN Counter #0 corresponds to the fourth parameter value above.

[0523] Step 1078: The MN forwards the SN reconfiguration complete message to the candidate SN2.

[0524] In this embodiment of the present application, the MN may forward the SN reconfiguration complete message to the candidate SN2 to which the candidate cell 5 belongs, based on the candidate cell selected by the terminal device and indicated by the RRC reconfiguration complete message being the candidate cell 5.

[0525] Optionally, the SN reconfiguration complete message forwarded by the MN to the candidate SN2 further includes K SN It may include #1.

[0526] Step 1080: The terminal device performs synchronization with the candidate SN2.

[0527] The terminal device may perform synchronization with the candidate SN2 to which the candidate cell 5 belongs. For example, the synchronization process may be implemented via the RACH.

[0528] Similarly, candidate cell 5 is K SN Based on #1, a user plane key for performing encryption or data integrity protection on data between the terminal device may be derived, and further, K SN Based on #1, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0529] In this embodiment of the present application, the candidate cell 5 is SN It should be understood that there are multiple implementations that obtain #1. In the example, the reconfiguration complete message sent by the MN to the candidate SN2 is K SN #1, and candidate cell 5 is K SN In another example, the candidate cell 5 may obtain the key K for the previous cell accessed by the terminal device. SN By using #0, K SN In this case, the RRC reconfiguration complete message sent by the MN to the candidate SN2 can be derived as K SN For details, see step 1075. SN #0 based on K SNSee the process for deriving #1, the details of which will not be repeated here.

[0530] Step 1083: The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0531] Step 1085: The terminal device SN Based on #1 K SN Derive #2.

[0532] For example, suppose the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 1. Then, the terminal device detects the candidate cell that satisfies the execution condition. SN Based on #1 K SN #2 can be derived and stored.

[0533] The terminal device further includes: SN Based on #2, a user plane key for performing encryption or data integrity protection on data between candidate cell 1 and candidate cell 2 can be derived, and further, K SN Based on #2, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from candidate cell 1.

[0534] Using the example above where candidate cell 1 is the second cell, K SN #1 corresponds to the fifth key above, K SN It should be understood that #2 corresponds to the fourth key above.

[0535] Step 1090: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0536] Step 1093: MN determines whether K SN Based on #1 K SN Derive #2.

[0537] In this embodiment of the present application, after receiving the RRC reconfiguration complete message sent by the terminal device, the MN SN By using #1, K SN #2 can be derived.

[0538] Step 1095: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0539] Optionally, the SN reconfiguration complete message forwarded by the MN to the candidate SN1 further includes K SN May include #2.

[0540] Step 1099: The terminal device performs synchronization with the candidate SN1.

[0541] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through the RACH. Similarly, the candidate cell 1 may SN Based on #2, a user plane key for performing encryption or data integrity protection on data between the terminal device can be derived, and further, K SN Based on #2, a control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0542] Candidate cell 1 is identified as K from the RRC reconfiguration complete message sent by the terminal device. SN Get #2 or K SN Based on #1 K SN #2 can be derived. For details, see the above description. Details will not be repeated here.

[0543] In the above technical solution, every time the terminal device triggers a SN change, the previously used / stored K SN Based on the new K SN is derived. SNSince is different every time CPA or CPC is triggered, a new K SN is derived, thereby avoiding the key reuse problem.

[0544] 11 , the following describes in detail a specific implementation process of deriving a fourth key based on a key last used by the terminal device to access the second cell or a secondary node to which the second cell belongs in step 910. It should be understood that the example in FIG. 11 is intended merely to help those skilled in the art understand the embodiments of the present application, and is not intended to limit the embodiments of the present application to the specific values ​​or specific scenarios in the example. It is clear that those skilled in the art can make various equivalent modifications or variations based on the following example provided in FIG. 11, and such modifications and variations also fall within the scope of the embodiments of the present application.

[0545] 11 is another schematic flowchart of a communication method according to an embodiment of the present application. As shown in FIG. 11, the method may include steps 1110 to 1199. In the following, steps 1110 to 1199 will be described in detail separately.

[0546] Step 1110: The terminal device establishes an RRC connection with the MN.

[0547] Step 1115: The terminal device establishes an RRC connection with the source SN.

[0548] Note that step 1115 is optional.

[0549] Step 1120: The MN sends an SN addition request message to the candidate SN.

[0550] For example, the MN sends an SN addition request message to candidate SN1 and candidate SN2 separately. The SN addition request message includes the starting K corresponding to each candidate cell or each candidate SN. SN and a starting K corresponding to each candidate cell or each candidate SN.SN is calculated by the MN based on the starting SN counter corresponding to each candidate cell or each candidate SN.

[0551] It should be understood that the starting SN counter corresponding to each candidate cell or each candidate SN may be the starting value (SN counter #x) of the SN counter of each candidate cell or each candidate SN, or may be the first SN counter in the SN counter value set corresponding to each candidate cell or each candidate SN. This is not limited in the embodiment of the present application. For details, please refer to the above description. The details will not be described again here.

[0552] For example, the starting K derived by the MN based on the SN counter corresponding to candidate cell 1 SN is K SN#1 and the starting K is derived based on the SN counter corresponding to candidate cell 2. SN is K SN#2 and the starting K is derived based on the SN counter corresponding to candidate cell 3. SN is K SN#3 and so on.

[0553] A starting K derived by the MN based on the SN counter corresponding to the candidate SN1 SN is K SN#1 and the starting K is derived based on the SN counter corresponding to the candidate SN2. SN is K SN#2 and so on.

[0554] Step 1125: The candidate SN sends an SN addition request acknowledgement message to the MN.

[0555] Step 1130: The MN sends an RRC reconfiguration message to the terminal device.

[0556] The RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, which may include the configuration of candidate cells included in candidate SN1 and candidate SN2, corresponding execution conditions, and an SN counter corresponding to each candidate cell or each candidate SN.

[0557] Step 1135: The terminal device returns an RRC reconfiguration complete message to the MN.

[0558] Step 1140: The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0559] Step 1145: The terminal device calculates K based on the SN counter included in the CPAC configuration. SN#1 is determined and stored.

[0560] After receiving the CPAC configuration, when the terminal device evaluates that the candidate cell or the candidate cell served by the candidate SN satisfies the execution condition for the first time, or when the terminal device accesses the candidate cell (or the candidate cell served by the candidate SN) that satisfies the execution condition for the first time, the terminal device calculates K based on the master key by using the SN counter corresponding to the candidate cell or the secondary node to which the candidate cell belongs. SN For example, when detecting that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device derives K based on the master key by using the SN counter corresponding to candidate cell 1 or SN1 to which candidate cell 1 belongs, which is included in the CPAC configuration. SN#1 may be determined and stored.

[0561] Step 1150: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0562] Step 1155: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0563] It should be noted that the execution order of step 1145, step 1150, and step 1155 is not specifically limited in this embodiment of the present application. Step 1145 may be executed first, and then step 1150 and step 1155 may be executed; or step 1150 and step 1155 may be executed first, and then step 1145 may be executed; or step 1145, step 1150, and step 1155 may be executed simultaneously.

[0564] Step 1160: The terminal device performs synchronization with the candidate SN1.

[0565] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through the RACH. Similarly, the candidate cell 1 may synchronize with the received K SN#1 derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on SN#1 Based on this, the control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0566] Step 1163: The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0567] Step 1165: The terminal device calculates K based on the SN counter included in the CPAC configuration. SN#5 is determined and stored.

[0568] In the example, when the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, the terminal device accesses candidate cell 5 or SN2 to which candidate cell 5 belongs for the first time, so the terminal device calculates K by using the SN counter corresponding to candidate cell 5 or SN2 included in the CPAC configuration. SN#5 may be determined and stored.

[0569] In another example, when a terminal device detects that a candidate cell that satisfies the execution condition is candidate cell 5, if candidate cell 1 belongs to a cell set and candidate cell 5 belongs to another cell set, when the terminal device is handed over from a cell in the cell set to which candidate cell 1 belongs to to a cell in the cell set to which candidate cell 5 belongs, the K previously used for the cell in the cell set to which candidate cell 5 belongs is used. SN (For example, K SN#5 ) can be used.

[0570] In another example, when the terminal device detects that the candidate cell that satisfies the execution condition is candidate cell 5, the SN counters of candidate cell 5 and candidate cell 1 or K SN If different, the previously used K for candidate cell 10 SN (For example, K SN#5 ) can be used. The candidate cell 10 and the candidate cell 5 can use the same SN counter or the same K SN It consists of:

[0571] Step 1170: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0572] Step 1175: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0573] Similarly, in this embodiment of the present application, the order of execution of step 1165, step 1170, and step 1175 is not specifically limited. Step 1165 can be executed first, and then step 1170 and step 1175 can be executed; or step 1170 and step 1175 can be executed first, and then step 1165 can be executed; or step 1165, step 1170, and step 1175 can be executed simultaneously.

[0574] Step 1180: The terminal device performs synchronization with the candidate SN2.

[0575] The terminal device may perform synchronization with the candidate SN2 to which the candidate cell 5 belongs. For example, the synchronization process may be implemented through the RACH. Similarly, the candidate cell 5 may synchronize with the received K SN#5 derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on SN#5 Based on this, the control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0576] Step 1183: The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.

[0577] Step 1185: The terminal device SN#1 Based on K SN#1-1 is derived.

[0578] When the terminal device evaluates that the candidate cell or the candidate cell served by the candidate SN satisfies the execution condition again (or the candidate cell or the candidate cell served by the candidate SN does not satisfy the execution condition for the first time), or when the terminal device re-accesses the candidate cell or the candidate cell served by the candidate SN that satisfies the execution condition (or the terminal device does not access the candidate cell or the candidate cell served by the candidate SN for the first time), the terminal device shall use the K previously used for the candidate cell or the SN to which the candidate cell belongs. SN By using the new K SN For example, when the terminal device detects again that the candidate cell that satisfies the execution condition is candidate cell 1, the terminal device derives K SN#1 By using K SN#1-1 can be determined.

[0579] Step 1187: The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes the reconfiguration complete message sent to the candidate SN1.

[0580] Step 1190: MN SN#1 Based on K SN#1-1 is derived.

[0581] In this embodiment of the present application, after receiving the RRC reconfiguration complete message sent by the terminal device, the MN determines whether the K SN#1 By using K SN#1-1 can be derived.

[0582] Step 1195: The MN forwards the SN reconfiguration complete message to the candidate SN1.

[0583] In this embodiment of the present application, the MN may forward the SN reconfiguration complete message to the candidate SN1 to which the candidate cell1 belongs, based on the candidate cell selected by the terminal device and indicated by the RRC reconfiguration complete message being the candidate cell1.

[0584] Optionally, the SN reconfiguration complete message further includes K SN#1-1 may include:

[0585] Step 1198: Candidate SN1 is K SN#1 Based on K SN#1-1 is derived.

[0586] Candidate SN1 is the K SN Based on the new K SN can be derived.

[0587] In the example, candidate SN1 is K SN#1 By using K SN#1-1 can be derived. SN#1is the K used by the terminal device to access candidate cell 1 last time. SN or the K previously used by the terminal device to access the candidate SN1 to which the candidate cell 1 belongs. SN It should be understood that it may be possible.

[0588] Optionally, the SN addition request message received by the candidate SN1 from the MN includes an SN counter. For example, the SN counter may be an SN counter corresponding to the candidate cell, or an SN counter corresponding to the candidate SN to which the candidate cell belongs. In this implementation, in a possible implementation, the candidate SN1 may SN#1 and K based on the SN counter SN#1-1 can be derived.

[0589] Note that if step 1190 is performed, then step 1198 is not performed; or alternatively, if step 1198 is performed, then step 1190 is not performed.

[0590] Step 1199: The terminal device performs synchronization with the candidate SN1.

[0591] The terminal device may perform synchronization with the candidate SN1 to which the candidate cell 1 belongs. For example, the synchronization process may be implemented through the RACH. Similarly, the candidate cell 1 may synchronize with the received K SN#1-1 derive a user plane key for performing encryption or data integrity protection on data to and from the terminal device based on SN#1-1 Based on this, the control plane key may be derived to perform encryption or data integrity protection on signaling to and from the terminal device.

[0592] In the above technical solution, in the subsequent CPAC process, each time the terminal device triggers CPA or CPC, the terminal device and MN (or SN) will use the previously used K SN Based on the new K SNIn the later CPAC process, K SN For each update of the input key K SN It is ensured that K s are different, and when the terminal device returns to the previously accessed candidate cell or candidate SN in a later CPAC process, a different K SN By using the new K SN is derived, thereby avoiding the key reuse problem.

[0593] The above describes in detail the technical solutions provided in the communication method in the embodiments of the present application with reference to Figures 1 to 11. The following describes the communication device provided in the embodiments of the present application with reference to Figures 12 to 14.

[0594] 12 is a block diagram of a communication device according to an embodiment of the present application. As shown in FIG. 12, the device 1200 may include a processing unit 1220. The processing unit 1220 is configured to process data / information, thereby implementing the functions of the terminal device in the methods illustrated in FIGS. 5 to 11 or the functions of the network device in the methods illustrated in FIGS. 5 to 11.

[0595] Optionally, the device 1200 may further include a transceiver unit 1210. The transceiver unit 1210 may communicate with the outside, for example, input data / information received from the outside to the processing unit, or in another example, output data / information processed by the processing unit to the outside. The transceiver unit 1210 may also be referred to as a communication interface or a communication unit.

[0596] In a possible implementation, the apparatus 1200 may be a terminal device in the methods shown in Figures 5 to 11, or may be a chip configured to implement the functions of the terminal device in the methods shown in Figures 5 to 11. Specifically, the apparatus 1200 may implement corresponding procedures performed by the terminal device in the methods shown in Figures 5 to 11. The processing unit 1220 is configured to perform terminal device processing-related operations in the above method procedures.

[0597] In an example, the processing unit 1220 is configured to derive a first key and derive a third key based on the first key, where the first key is determined based on the second key by using the first parameter value, where the second key is a master key, where the first parameter value is obtained through an update based on the second parameter value, or where the first parameter value is determined based on the number of times the first cell or a secondary node to which the first cell belongs is accessed, where the third key is a user plane key and / or a control plane key, and where the third key is used to perform encryption or data integrity protection on data and / or signaling to and from the first cell.

[0598] Optionally, the second parameter value is a parameter value last used for the first cell or the secondary node to which the first cell belongs, or the second parameter value is a parameter value used for a previous access.

[0599] Optionally, the first parameter value is the second parameter value+N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for the conditional cell addition or modification.

[0600] Optionally, the first parameter value is determined based on a third parameter value and a number of times the first cell or the secondary node to which the first cell belongs is accessed, and the third parameter value is a starting parameter value associated with the first cell or the secondary node to which the first cell belongs.

[0601] Optionally, the first parameter value is the Pth value in the first set, where P is related to the number of times the first cell or the secondary node to which the first cell belongs is accessed, and the first set includes a plurality of parameter values ​​associated with the first cell or the secondary node to which the first cell belongs.

[0602] Optionally, the transceiver unit 1210 is configured to send a first message to the master node, where the first message indicates a first cell that meets the execution condition or a secondary node to which the first cell belongs, and the first message includes a first parameter value.

[0603] In another example, the processing unit 1220 is configured to derive a fourth key and derive a sixth key based on the fourth key, where the fourth key is determined based on a fifth key, where the fifth key is a key for a previously accessed cell or the fifth key is a key last used to access the second cell or a secondary node to which the second cell belongs, and the sixth key is a user plane key and / or a control plane key, and the sixth key is used to perform encryption or data integrity protection on data and / or signaling to and from the second cell.

[0604] Optionally, the processing unit 1220 is specifically configured to derive a fourth key based on the fifth key by using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs.

[0605] Optionally, the fourth parameter value is a parameter value associated with the second cell or the secondary node to which the second cell belongs, or the fourth parameter value is obtained through an update based on the fifth parameter value, or the fourth parameter value is determined based on the number of times the second cell or the secondary node to which the second cell belongs is accessed.

[0606] Optionally, the fifth parameter value is a parameter value last used for the second cell or the secondary node to which the second cell belongs, or the fifth parameter value is a parameter value used for the previous access.

[0607] It should be understood that the processing unit 1220 and the transceiver unit 1210 may also separately perform any other steps, operations, and / or functions implemented by the terminal device in the methods illustrated in Figures 5 to 11. The specific processes of performing the above corresponding steps by each unit are described in detail in the above method embodiments. For the sake of brevity, the details will not be described again here.

[0608] In another possible implementation, the apparatus 1200 may be the MN in the methods shown in Figures 5 to 11, or may be a chip configured to implement the functions of the MN in the methods shown in Figures 5 to 11. Specifically, the apparatus 1200 may implement corresponding procedures performed by the MN in the methods shown in Figures 5 to 11. The processing unit 1220 is configured to perform processing-related operations of the MN in the above method procedures.

[0609] In an example, the processing unit 1220 is configured to derive a first key, where the first key is used for security of the first cell, and the first cell is a candidate cell for the conditional cell addition or modification CPAC, and the first key is determined based on a second key by using a first parameter value, and the second key is a master key, and the first parameter value is received from a terminal device, or the first parameter value is obtained through updating based on the second parameter value, or the first parameter value is determined based on the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs. The transceiver unit 1210 is configured to send the first key to the first cell or the secondary node to which the first cell belongs.

[0610] Optionally, the transceiver unit 1210 is specifically configured to send the second set to the first cell or the secondary node to which the first cell belongs, where the second set includes a plurality of keys associated with the first cell or the secondary node to which the first cell belongs, and the plurality of keys includes the first key.

[0611] Optionally, the transceiver unit 1210 is further configured to receive a first message from the terminal device, where the first message includes a first parameter value, and the first message indicates a first cell that meets the execution condition or a secondary node to which the first cell belongs.

[0612] Optionally, the second parameter value is a parameter value last used for the first cell or the secondary node to which the first cell belongs, or the second parameter value is a parameter value used by the terminal device for a previous access.

[0613] Optionally, the first parameter value is the second parameter value+N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for the conditional cell addition or modification.

[0614] Optionally, the first parameter value is determined based on the third parameter value and the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, and the third parameter value is a starting parameter value associated with the first cell or the secondary node to which the first cell belongs.

[0615] Optionally, the first parameter value is a P-th value in a first set, where P is related to the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, and the first set includes a plurality of parameter values ​​associated with the first cell or the secondary node to which the first cell belongs.

[0616] In another example, the processing unit 1220 is configured to derive a fourth key, where the fourth key is used for security of the second cell, the fourth key is determined based on a fifth key, the fifth key is a key used for the previously accessed cell, or the fifth key is a key previously used to access the second cell or a secondary node to which the second cell belongs; and the transceiver unit 1210 is configured to send the fourth key to the second cell or the secondary node to which the second cell belongs.

[0617] Optionally, the processing unit 1220 is specifically configured to derive a fourth key based on the fifth key by using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs.

[0618] Optionally, the fifth key is determined based on the sixth key by using a fifth parameter value, where the sixth key is a master key, and the fifth parameter value is a parameter value associated with the second cell or the secondary node to which the second cell belongs, or the fifth parameter value is obtained through updating based on the sixth parameter value, or the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary node to which the second cell belongs.

[0619] Optionally, the sixth parameter value is a parameter value last used for the second cell or a secondary node to which the second cell belongs, or the sixth parameter value is a parameter value used by the terminal device for a previous access.

[0620] It should be understood that the processing unit 1220 and the transceiver unit 1210 may further separately perform any other steps, operations, and / or functions implemented by the MN in the methods shown in Figures 5 to 11. The specific processes of performing the above corresponding steps by each unit are described in detail in the above method embodiments. For the sake of brevity, the details will not be described again here.

[0621] In another possible implementation, the apparatus 1200 may be an SN in the methods shown in Figures 5 to 11, or may be a chip configured to implement the functions of the SN in the methods shown in Figures 5 to 11. Specifically, the apparatus 1200 may implement the corresponding procedures performed by the SN in the methods shown in Figures 5 to 11. The processing unit 1220 is configured to perform processing-related operations of the SN in the above method procedures.

[0622] In an example, the transceiver unit 1210 is configured to receive a second set, where the second set includes a plurality of keys associated with the first cell or the secondary node to which the first cell belongs, and the plurality of keys includes a first key; the processing unit 1220 is configured to determine the first key from the second set based on the first identifier or the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, where the first identifier indicates the position of the first key in the second set.

[0623] Optionally, the transceiver unit 1210 is further configured to receive a second message, where the second message includes the first identifier.

[0624] In another example, the processing unit 1220 is configured to derive a fourth key and derive a sixth key based on the fourth key, where the fourth key is used for security of the second cell, the fourth key is determined based on a fifth key, the fifth key being a key last used to access the second cell or a secondary node to which the second cell belongs, the sixth key being a user plane key and / or a control plane key, and the sixth key being used to perform data encryption or data integrity protection for and / or signaling with the terminal device.

[0625] Optionally, the processing unit 1220 is further configured to derive a fourth key based on the fifth key by using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary node to which the second cell belongs.

[0626] Optionally, the fifth key is determined based on the sixth key by using a fifth parameter value, where the sixth key is a master key, and the fifth parameter value is a parameter value associated with the second cell or the secondary node to which the second cell belongs, or the fifth parameter value is obtained through updating based on the sixth parameter value, or the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary node to which the second cell belongs.

[0627] Optionally, the sixth parameter value is a parameter value last used for the second cell or a secondary node to which the second cell belongs, or the sixth parameter value is a parameter value used by the terminal device for a previous access.

[0628] It should be understood that the processing unit 1220 and the transceiver unit 1210 may also separately perform any other steps, operations, and / or functions implemented by the SN in the methods shown in Figures 5 to 11. The specific processes of performing the above corresponding steps by each unit are described in detail in the above method embodiments. For the sake of brevity, the details will not be described again here.

[0629] It should be further understood that in any one of the above implementations, the transceiver unit 1210 may include a receiving unit and a transmitting unit, where the receiving unit is configured to perform the receiving function of the transceiver unit 1210, and the transmitting unit is configured to perform the transmitting function of the transceiver unit 1210.

[0630] The apparatus 1200 has a function of implementing corresponding steps performed by a terminal device in the methods shown in Figures 5 to 11, or the apparatus 1200 has a function of implementing corresponding steps performed by a network device in the methods shown in Figures 5 to 11. The functions may be implemented by using hardware, or by using hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. For example, a transceiver unit may be replaced by a transceiver (e.g., a transmitting unit in a transceiver unit may be replaced by a transmitter, and a receiving unit in a transceiver unit may be replaced by a receiver), and another unit, such as a processing unit, may be replaced by a processor, which separately performs transmitting and receiving operations and related processing operations in the method embodiments.

[0631] It should be understood that apparatus 1200 herein may be embodied in the form of a functional unit, where the term "unit" may refer to an application-specific integrated circuit (ASIC), an electronic circuit, a memory and processor (such as a shared processor, dedicated processor, or group of processors) configured to execute one or more software or firmware programs, a combinatorial logic circuit, and / or another suitable component that supports the described functionality.

[0632] In addition, the transceiver unit may alternatively be a transceiver circuit (e.g., the transceiver circuit may include a receiver circuit and a transmitter circuit), and the processing unit may be a processing circuit. In the embodiments of the present application, the device 1200 may be the terminal device or network device in the above embodiments, or may be a chip or a chip system, such as a system on chip (SoC). The transceiver unit may be an input / output circuit or a communication interface. The processing unit may be a processor, a microprocessor, or an integrated circuit integrated on a chip. This is not limited here.

[0633] 13 is another diagram of the structure of a communication device according to an embodiment of the present application. As shown in FIG. 13, the communication device 1300 includes at least one processor 1310. The processor 1310 is configured to execute instructions, such that the functions of the terminal device in the methods shown in FIGS. 5 to 11 are implemented, or the functions of the network device in the methods shown in FIGS. 5 to 11 are implemented.

[0634] Optionally, the apparatus 1300 may further include a transceiver 1320. The transceiver 1320 is configured to transmit signals and / or receive signals.

[0635] Optionally, communications device 1300 further includes a memory 1330 configured to store instructions. Processor 1310 is coupled to the memory and configured to execute the instructions stored in the memory and to control transceiver 1320 to transmit signals and / or receive signals.

[0636] It should be understood that the processor 1310 and the memory 1330 may be combined into one processing unit, and the processor 1310 is configured to implement the above-described functions by executing program code stored in the memory 1330. In a specific implementation, the memory 1330 may be integrated into the processor 1310 or may be separate from the processor 1310.

[0637] It should be further understood that the transceiver 1320 may include a receiver (also referred to as a receiver) and a transmitter (also referred to as a transmitter). The transceiver 720 may further include one or more antennas. The transceiver 1320 may be a communication interface or interface circuit.

[0638] When the communication device 1300 is a chip, the chip includes a transceiver unit and a processing unit. The transceiver unit may be an input / output circuit or a communication interface. The processing unit may be a processor, a microprocessor, or an integrated circuit integrated on the chip.

[0639] The embodiments of the present application further provide a processing device including a processor and an interface, wherein the processor may enable the methods in the above method embodiments to be implemented.

[0640] It should be understood that the processing device can be a chip. For example, the processing device can be a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on a chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or another integrated chip.

[0641] In the implementation process, the steps of the above method can be implemented by using hardware integrated logic circuits in a processor or by using instructions in the form of software. The steps of the method disclosed with reference to the embodiments of the present application can be directly executed by a hardware processor, or can be executed by a combination of hardware and software modules in a processor. The software modules can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with the hardware of the processor. To avoid repetition, the details will not be described again here.

[0642] 14 is another diagram of the structure of a communication device according to an embodiment of the present application. As shown in FIG. 14, the device 1400 includes a processing circuit 1410. The processing circuit 1410 is configured to execute instructions, such that the functions of the terminal device in the methods illustrated in FIGS. 5 to 11 are implemented, or the functions of the network device in the methods illustrated in FIGS. 5 to 11 are implemented.

[0643] Optionally, the apparatus 1400 may further include a transceiver circuit 1420. The processing circuit 1410 and the transceiver circuit 1420 communicate with each other through an internal connection path, and the processing circuit 1410 may control the transceiver circuit 1420 to transmit signals and / or receive signals.

[0644] Optionally, the apparatus 1400 may further include a storage medium 1430. The storage medium 1430 is in communication with the processing circuit 1410 and the transceiver circuit 1420 through an internal connection path. The storage medium 1430 is configured to store instructions, and the processing circuit 1410 may execute the instructions stored in the storage medium 1430.

[0645] In a possible implementation, the apparatus 1400 is configured to implement procedures corresponding to the terminal device in the above method embodiments.

[0646] In another possible implementation, the apparatus 1400 is configured to implement procedures corresponding to the network device in the above method embodiments.

[0647] According to the method provided in the embodiment of the present application, the present application further provides a computer program product, which includes instructions, which, when executed by a processor, implement the functions of the terminal device in the method illustrated in Figures 5 to 11, or the functions of the network device in the method illustrated in Figures 5 to 11.

[0648] According to the method provided in the embodiment of the present application, the present application further provides a computer-readable storage medium, which includes instructions, which, when executed by a processor, implement the functions of the terminal device in the method illustrated in Figures 5 to 11, or the functions of the network device in the method illustrated in Figures 5 to 11.

[0649] According to the method provided in the embodiment of the present application, the present application further provides a system, which includes one or more terminal devices and one or more network devices as described above.

[0650] All or part of the above embodiments may be implemented in software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product comprises one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the procedures or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, or digital subscriber line (DSL)) or wireless (e.g., infrared, radio, or microwave) transmission. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device, such as a server or a data center, that integrates one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), or the like.

[0651] In the embodiments of the present application, the terms "example" or "for example" are intended to indicate providing an example, illustration, or explanation. Any embodiment or design manner described herein as an "example" should not be construed as preferred or having more advantages than another embodiment or design manner. Specifically, the term "example" is used to present concepts in a particular way.

[0652] It should be understood that references throughout this specification to an "embodiment" mean that a particular feature, structure, or characteristic associated with an embodiment is included in at least one embodiment of the present application. Thus, the references to embodiments throughout the specification do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0653] It should be understood that in the embodiments of the present application, the sequence numbers of the processes do not imply the order of execution. The order of execution of the processes should be determined according to the functions and internal logic of the processes and should not constitute any limitations on the implementation process of the embodiments of the present application. The names of all nodes and messages in this application are merely a set of names for facilitating the description in this application and may be different in an actual network. It should be understood that the names of various nodes and messages are not limited in this application. On the contrary, any names having the same or similar functions as the nodes or messages used in this application shall be regarded as the methods or equivalent replacements of the present application and fall within the protection scope of the present application.

[0654] It should be further understood that in this application, "when" and "if" mean that the UE or the base station executes the corresponding processing in an objective situation, and are not intended to limit the time, and the UE or the base station does not necessarily need to execute the decision action during implementation, and do not imply any other limitation.

[0655] It should be noted that in the embodiments of the present application, "pre-set," "pre-configured," or the like may be implemented by pre-storing a corresponding code, table, or other method capable of indicating relevant information in a device (e.g., a terminal device). Specific implementations thereof, such as pre-set rules or pre-set constants in the embodiments of the present application, are not limited in the present application.

[0656] Additionally, the terms "system" and "network" are generally used interchangeably herein. The term "and / or" herein simply refers to an associative relationship between related objects and indicates that three relationships may exist. For example, A and / or B may indicate the following three cases: only A exists, both A and B exist, and only B exists.

[0657] The term "at least one of" as used herein refers to all or any combination of the listed items. For example, "at least one of A, B, and C" or "at least one of A, B, or C" can refer to the following six cases: only A is present, only B is present, only C is present, both A and B are present, both B and C are present, and A, B, and C are all present. As used herein, "at least one" means one or more. "Multiple" means two or more.

[0658] In the embodiments of the present application, it should be understood that "B corresponding to A" indicates that B is associated with A, and B may be determined based on A. However, it should be further understood that determining B based on A does not mean that B is determined based only on A. B may alternatively be determined based on A and / or other information. The terms "include," "comprise," "have," and their derivatives all mean "including but not limited to," unless specifically emphasized otherwise in a different manner.

[0659] It should be understood that in the various embodiments of the present application, the first, second, and various numbers are merely distinctions for ease of explanation and do not limit the scope of the embodiments of the present application, e.g., different information is distinguished.

[0660] Those skilled in the art may recognize that, in combination with the examples described in the embodiments disclosed herein, the steps of the units and algorithms may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether a function is implemented by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementations should not be considered to go beyond the scope of this application.

[0661] Those skilled in the art can clearly understand that for convenience and conciseness of description, the specific operation processes of the above-described systems, devices and units may refer to the corresponding processes in the above-described method embodiments, and the details will not be described again in this specification.

[0662] In some embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the described device embodiments are merely examples. For example, the division into units is merely a logical division of functionality. In actual implementation, there may be other division schemes. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. In addition, the shown or described mutual couplings or direct couplings or communication connections may be implemented through some interfaces, and indirect couplings or communication connections between devices or units may be implemented in electrical, mechanical, or other forms.

[0663] The units described as separate parts may or may not be physically separate, and the parts presented as units may or may not be physical units, and may be located in one place or distributed over multiple network units. Some or all of the units may be selected according to the actual requirements for achieving the objectives of the solutions in the embodiments.

[0664] Additionally, the functional units in the embodiments of the present application may be integrated into a single processing unit, each of the units may exist physically alone, or two or more units may be integrated into a single unit.

[0665] When a function is implemented in the form of a software functional unit and sold or used as an independent product, the function may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may essentially be implemented in the form of a software product, or a portion of the contribution to the prior art may be implemented in the form of a software product. A computer software product is stored in a storage medium and includes a plurality of instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method described in the embodiments of the present application. The storage medium includes any medium capable of storing program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0666] The above description is merely a specific implementation of the present application. However, the scope of protection of the present application is not limited thereto. The scope of protection of the present application shall include any modifications or substitutions that can be easily devised by those skilled in the art within the technical scope disclosed in the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims.

Claims

1. 1. A communication method comprising: deriving a first key, wherein the first key is determined based on a second key by using a first parameter value, the second key being a master key, and the first parameter value being obtained through updating based on the second parameter value, or the first parameter value being determined based on the number of times a first cell or a secondary node to which the first cell belongs; and deriving a third key based on the first key, wherein the third key is a user plane key and / or a control plane key, and the third key is used to perform encryption or data integrity protection on data and / or signaling to and from the first cell. A method for providing the above.

2. 2. The method of claim 1, wherein the second parameter value is a parameter value last used for the first cell or the secondary node to which the first cell belongs, or the second parameter value is a parameter value used for a previous access.

3. 2. The method of claim 1, wherein the second parameter value is a parameter value used the last time a third cell was accessed, the third cell having the same second parameter as the first cell.

4. The step of deriving a first key comprises: Deriving the first key in case of a handover from a cell having a different second parameter value to the first cell. The method of claim 3, comprising:

5. The method of claim 1 , wherein the second parameter value is a parameter value last used for a cell in a first cell set, the first cell set including the first cell.

6. The step of deriving a first key comprises: deriving the first key in case of a handover from a cell outside the first cell set to the first cell. The method of claim 5 , comprising:

7. 7. The method of claim 1, wherein the first parameter value is the second parameter value + N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for conditional cell addition or modification.

8. the first parameter value is determined based on a third parameter value and the number of times the first cell or the secondary node to which the first cell belongs is accessed, the third parameter value being a starting parameter value associated with the first cell or the secondary node to which the first cell belongs; or 7. The method of claim 1, wherein the first parameter value is determined based on the third parameter value and the number of times a cell in the first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set.

9. 7. The method of claim 1, wherein the first parameter value is a P-th value in a first set, where P is related to the number of times the first cell or the secondary node to which the first cell belongs is accessed, and the first set includes a plurality of parameter values ​​associated with the first cell or the secondary node to which the first cell belongs.

10. The method further comprises: sending the first message to the master node, wherein the first message indicates the first cell that satisfies an execution condition or the secondary node to which the first cell belongs, and the first message includes the first parameter value; The method of any one of claims 1 to 9, comprising:

11. 1. A communication method comprising: deriving a first key, wherein the first key is determined based on a second key by using a first parameter value, the second key being a master key, the first parameter value belonging to a third set, the third set including a plurality of parameter values ​​associated with a first cell set, the first cell set including the first cell; and deriving a third key based on the first key, wherein the third key is a user plane key and / or a control plane key, and the third key is used to perform encryption or data integrity protection on data and / or signaling to and from the first cell. A method for providing the above.

12. The method of claim 11 , wherein the first parameter value is randomly selected from the plurality of parameter values ​​included in the third set.

13. The method of claim 11 , wherein the first parameter value is a Pth value in the third set, where P is related to a number of times the first set of cells is accessed.

14. 14. The method of claim 11, wherein the first parameter value is deleted from the third set.

15. The step of deriving a first key comprises: deriving the first key in case of a handover from a cell outside the first cell set to the first cell.

15. The method of any one of claims 11 to 14, comprising:

16. 1. A communication method comprising: Deriving a first key, wherein the first key is used for security of the first cell, the first cell being a candidate cell for a conditional cell addition or modification CPAC, the first key being determined based on a second key by using a first parameter value, the second key being a master key, the first parameter value being received from a terminal device, or the first parameter value being obtained through an update based on the second parameter value, or the first parameter value being determined based on the number of times the terminal device accesses the first cell or a secondary node to which the first cell belongs; and transmitting the first key to the first cell or to the secondary node to which the first cell belongs; A method for providing the above.

17. The step of transmitting the first key to the first cell or the secondary node to which the first cell belongs comprises: transmitting a second set to the first cell or the secondary node to which the first cell belongs, wherein the second set includes a plurality of keys associated with the first cell or the secondary node to which the first cell belongs, the plurality of keys including the first key; 17. The method of claim 16, comprising:

18. The method further comprises: receiving a first message from the terminal device, wherein the first message includes the first parameter value, and the first message indicates the first cell that satisfies an execution condition or the secondary node to which the first cell belongs; 18. The method of claim 16 or 17, comprising:

19. 19. The method according to claim 16, wherein the second parameter value is a parameter value last used for the first cell or the secondary node to which the first cell belongs, or the second parameter value is a parameter value used by the terminal device for a previous access.

20. 19. A method according to any one of claims 16 to 18, wherein the second parameter value is a parameter value used the last time a third cell was accessed, the third cell having the same second parameter as the first cell.

21. The step of deriving a first key comprises: Deriving the first key in case of a handover from a cell having a different second parameter value to the first cell.

21. The method of claim 20, comprising:

22. 19. The method of claim 16, wherein the second parameter value is a parameter value last used for a cell in a first cell set, the first cell set including the first cell.

23. The step of deriving a first key comprises: deriving the first key in case of a handover from a cell outside the first cell set to the first cell.

23. The method of claim 22, comprising:

24. 24. The method of any one of claims 16 to 23, wherein the first parameter value is the second parameter value + N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells for conditional cell addition or modification.

25. the first parameter value is determined based on a third parameter value and the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, and the third parameter value is a starting parameter value associated with the first cell or the secondary node to which the first cell belongs; or 24. The method of claim 16, wherein the first parameter value is determined based on the third parameter value and a number of times a cell in the first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set.

26. 24. The method of claim 16, wherein the first parameter value is a P-th value in a first set, where P is related to the number of times the terminal device accesses the first cell or the secondary node to which the first cell belongs, and the first set includes a plurality of parameter values ​​associated with the first cell or the secondary node to which the first cell belongs.

27. 1. A communication method comprising: receiving a second set, wherein the second set includes a plurality of keys associated with the first cell or a secondary node to which the first cell belongs, the plurality of keys including the first key; and determining the first key from the second set based on a first identifier or a number of times a terminal device accesses the first cell or the secondary node to which the first cell belongs, wherein the first identifier indicates a position of the first key in the second set; A method for providing the above.

28. The method further comprises: receiving a second message, wherein the second message includes the first identifier; 28. The method of claim 27, comprising:

29. 1. A communication method comprising: deriving a fourth key, wherein the fourth key is determined based on a fifth key, the fifth key being a key for a previously accessed cell, or the fifth key being a key previously used to access a second cell or a secondary node to which the second cell belongs, or the fifth key being a key previously used for a cell in a second cell set, the first cell set including the second cell, or the fifth key being a key previously used when accessing a fourth cell, the fourth cell having the same key or the same counter as the second cell; and deriving a sixth key based on the fourth key, wherein the sixth key is a user plane key and / or a control plane key, and the sixth key is used to perform ciphering or data integrity protection on data and / or signaling to and from the second cell. A method for providing the above.

30. The step of deriving the fourth key comprises: deriving the fourth key in the case of a handover to the second cell from a cell outside the second cell set or in the case of a handover to the second cell from a cell having a different counter.

30. The method of claim 29, comprising:

31. The fourth key is determined based on the fifth key by: the fourth key is derived based on the fifth key by using a fourth parameter value.

31. The method of claim 29 or 30, comprising:

32. 32. The method of claim 31 , wherein the fourth parameter value is a parameter value associated with the second cell or the secondary node to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set, or the fourth parameter value is obtained through an update based on a fifth parameter value, or the fourth parameter value is determined based on the number of times the second cell or the secondary node to which the second cell belongs is accessed.

33. 33. The method of claim 32, wherein the fifth parameter value is a parameter value last used for the second cell or the secondary node to which the second cell belongs, or the fifth parameter value is a parameter value used for a previous access, or the fifth parameter value is a parameter value last used for a cell in the second cell set.

34. 1. A communication method comprising: deriving a fourth key, wherein the fourth key is used for security of the second cell, the fourth key being determined based on a fifth key, the fifth key being a key used for a previously accessed cell, or the fifth key being a key previously used to access the second cell or a secondary node to which the second cell belongs; and transmitting the fourth key to the second cell or the secondary node to which the second cell belongs; A method for providing the above.

35. 1. A communication method comprising: deriving a fourth key, wherein the fourth key is used for security of the second cell, the fourth key being determined based on a fifth key, the fifth key being a key last used to access the second cell or a secondary node to which the second cell belongs, or the fifth key being a key last used for a cell in a second cell set, the first cell set including the second cell, or the fifth key being a key last used when accessing a fourth cell, the fourth cell having the same key or the same counter as the second cell; and deriving a sixth key based on the fourth key, wherein the sixth key is a user plane key and / or a control plane key, and the sixth key is used to perform encryption or data integrity protection on data and / or signaling to and from a terminal device. A method for providing the above.

36. The fourth key is determined based on the fifth key by: the fourth key is derived based on the fifth key by using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or the secondary node to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set.

36. The method of claim 34 or 35, comprising:

37. 37. The method of claim 34, wherein the fifth key is determined based on a sixth key by using a fifth parameter value, the sixth key being a master key, and the fifth parameter value is a parameter value associated with the second cell or the secondary node to which the second cell belongs, or the fifth parameter value is obtained through an update based on a sixth parameter value, or the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary node to which the second cell belongs, or the fifth parameter value is a parameter value last used for a cell in the second cell set.

38. 38. The method of claim 37, wherein the sixth parameter value is a parameter value last used for the second cell or the secondary node to which the second cell belongs, or the sixth parameter value is a parameter value used by the terminal device for a previous access.

39. A communications device comprising a unit or module configured to perform the method according to any one of claims 1 to 10, or a unit or module configured to perform the method according to any one of claims 11 to 15, or a unit or module configured to perform the method according to any one of claims 29 to 33, or a unit or module configured to perform the method according to any one of claims 16 to 26, or a unit or module configured to perform the method according to any one of claims 34 and 35 to 38, or a unit or module configured to perform the method according to claim 27 or 28.

40. 1. A communications device comprising a processor and a storage medium, the storage medium storing instructions that, when executed by the processor, implement a method according to any one of claims 1 to 10, or a method according to any one of claims 11 to 15, or a method according to any one of claims 29 to 33, or a method according to any one of claims 16 to 26, or a method according to any one of claims 34 and 35 to 38, or a method according to claim 27 or 28.

41. A computer readable storage medium comprising instructions which, when executed by a processor, cause the method of any one of claims 1 to 10 to be implemented, or the method of any one of claims 11 to 15 to be implemented, or the method of any one of claims 29 to 33 to be implemented, or the method of any one of claims 16 to 26 to be implemented, or the method of any one of claims 34 and 35 to 38 to be implemented, or the method of claim 27 or 28 to be implemented.

42. 1. A computer program product comprising instructions which, when executed by a processor, cause the method of any one of claims 1 to 10 to be implemented, or the method of any one of claims 11 to 15 to be implemented, or the method of any one of claims 29 to 33 to be implemented, or the method of any one of claims 16 to 26 to be implemented, or the method of any one of claims 34 and 35 to 38 to be implemented, or the method of claim 27 or 28 to be implemented.

43. A communication method comprising a method according to any one of claims 1 to 10, a method according to any one of claims 11 to 15, a method according to any one of claims 16 to 26, a method according to claim 27 or 28; or a method according to any one of claims 29 to 33 and a method according to any one of claims 34 and 35 to 38.

44. A communication system comprising a unit or module configured to perform the method according to any one of claims 1 to 10, a unit or module configured to perform the method according to any one of claims 11 to 15, a unit or module configured to perform the method according to any one of claims 16 to 26, and a unit or module configured to perform the method according to claim 27 or 28; or a unit or module configured to perform the method according to any one of claims 29 to 33, and a unit or module configured to perform the method according to any one of claims 34 and 35 to 38.

Citation Information

Patent Citations

  • Generation of Multiple Shared Keys by User Equipment and Base Stations Using Key Expansion Multipliers

    JP2017534207A

  • Setting method, device, and system

    JP2020511846A