WO2024066738A1 - 一种通信的方法和装置 - Google Patents

一种通信的方法和装置 Download PDF

Info

Publication number
WO2024066738A1
WO2024066738A1 PCT/CN2023/111239 CN2023111239W WO2024066738A1 WO 2024066738 A1 WO2024066738 A1 WO 2024066738A1 CN 2023111239 W CN2023111239 W CN 2023111239W WO 2024066738 A1 WO2024066738 A1 WO 2024066738A1
Authority
WO
WIPO (PCT)
Prior art keywords
cell
key
parameter value
candidate
terminal device
Prior art date
Application number
PCT/CN2023/111239
Other languages
English (en)
French (fr)
Inventor
李娇娇
强鹂
常俊仁
雷骜
吴义壮
勒孔特大卫
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2023/112739 priority Critical patent/WO2024066766A1/zh
Publication of WO2024066738A1 publication Critical patent/WO2024066738A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • H04W12/106Packet or message integrity

Definitions

  • the embodiments of the present application relate to the field of communications, and more specifically, to a communication method and device.
  • the terminal device will have the process of adding or changing the execution condition of the primary secondary cell group cell (PSCell).
  • PSCell primary secondary cell group cell
  • the terminal device evaluates that the execution condition of a candidate cell is met, the terminal device can perform the process of adding or changing the PSCell.
  • the communication between the terminal device and the cell can be encrypted and/or integrity protected based on the security key.
  • the problem of security key reuse may occur, which makes the communication process between the terminal device and the candidate cells under the secondary station unsafe.
  • the embodiments of the present application provide a communication method and apparatus that can avoid key reuse during the process of adding or changing candidate cells in a terminal device.
  • a method is provided.
  • the method may be executed by a terminal device or by a chip or circuit configured in the terminal device, and the present application does not limit the method.
  • the method includes: deriving a first key, and deriving a third key based on the first key, wherein the first key is based on the second key and is determined using a first parameter value, the second key is a primary key, the first parameter value is updated based on the second parameter value, or the first parameter value is determined based on the number of times of accessing the first cell or the secondary station to which the first cell belongs, the third key is a user plane key and/or a control plane key, and the third key is used to encrypt data and/or signaling between the first cell or the secondary station to which the first cell belongs or to protect data integrity.
  • the second key may be a master key between the terminal device and the MN, such as a KgNB or a KeNB.
  • the master key is used to derive a control plane key and/or a user plane key, and the control plane key and/or the user plane key are used to encrypt or protect the data integrity of the data and/or signaling between the terminal device and the MN.
  • the control plane key is used to encrypt and/or protect the data integrity of the signaling between the terminal device and the MN.
  • the user plane key is used to encrypt and/or protect the data integrity of the data between the terminal device and the MN.
  • the first key may be a secondary key, such as KSN, S-KgNB or S-KeNB.
  • the first key is used to derive a control plane key and/or a user plane key, and the control plane key and/or the user plane key are used to encrypt or protect the data integrity of the data and/or signaling between the terminal device and the SN, that is, the third key.
  • the control plane key is used to encrypt and/or protect the data integrity of the signaling between the terminal device and the SN.
  • the user plane key is used to encrypt and/or protect the data integrity of the data between the terminal device and the SN.
  • the third key is an integrity protection key (KRRCint or KUPint) and/or an encryption and decryption key (KRRCenc or KUPenc).
  • the derived key may also be referred to as a deduced key, or a deduced key, or a determined key, or an obtained key, etc.
  • the terminal device may evaluate whether the execution condition of the first cell is met, and the first cell is a candidate cell added or changed by the conditional cell.
  • the terminal device may derive the first key, and the first key may be used for the security of the first cell.
  • the terminal device does not necessarily derive the first key immediately upon detecting a cell that meets the conditions.
  • the terminal device may derive the first key during or after performing an access procedure (eg, a random access procedure).
  • a new first parameter value can be obtained by updating the second parameter value, or a new first parameter value can be determined according to the number of times the first cell or the secondary station to which the first cell belongs is accessed, so that a new parameter value can be determined each time a candidate cell is accessed, and a new key is derived based on the new parameter value, thereby avoiding the problem of key reuse in the process of switching candidate cells.
  • the second parameter value is a parameter value last used by the first cell or a secondary station to which the first cell belongs, or the second parameter value is a parameter value used for the last access.
  • the second parameter value is a parameter value used by the third cell for the last access, and the third cell has the same second parameter as the first cell.
  • the first key is derived when switching from a cell with a different second parameter value to the first cell.
  • the second parameter value is a parameter value last used by a cell in a first cell set, wherein the first cell set includes the first cell.
  • the first key is derived when switching from a cell outside the first cell set to the first cell.
  • the first parameter value is the second parameter value plus N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells added or changed for the conditional cell.
  • the first parameter value is determined based on a third parameter value and the number of times the first cell or the secondary station to which the first cell belongs is accessed, wherein the third parameter value is a starting parameter value associated with the first cell or the secondary station 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 of a first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set.
  • the first parameter value is the Pth value in a first set, where P is related to the number of times the first cell or the secondary station to which the first cell belongs is accessed, and the first set includes multiple parameter values associated with the first cell or the secondary station to which the first cell belongs.
  • the method further includes:
  • the first message is sent to the primary station, where the first message indicates the first cell that meets the execution condition or the secondary station to which the first cell belongs, and the first message includes the first parameter value.
  • a communication method is provided.
  • the method may be executed by a terminal device or by a chip or circuit configured in the terminal device, and the present application does not limit the method.
  • the method includes: deriving a first key, wherein the first key is determined based on a second key and using a first parameter value, the second key is a master key, the first parameter value belongs to a third set, the third set includes multiple parameter values associated with a first cell set, and the first cell set includes the first cell; deriving a third key based on the first key, the third key is a user plane key and/or a control plane key, and the third key is used to encrypt data and/or signaling between the first cell or protect data integrity.
  • the first parameter value is randomly selected from a plurality of parameter values included in the third set.
  • the first parameter value is the Pth value in the third set, where P is related to the number of times the first cell set is accessed.
  • the first parameter value is deleted from the third set.
  • the first key is derived when switching from a cell outside the first cell set to the first cell.
  • a communication method is provided.
  • the method may be executed by a network device or by a chip or circuit configured in the network device, and the present application does not limit the method.
  • the method includes: deriving a first key, sending the first key to a first cell or a secondary station to which the first cell belongs, wherein the first key is used for the security of the first cell, the first cell is a candidate cell for adding or changing CPAC for a conditional cell, the first key is based on a second key and is determined using a first parameter value, the second key is a master key, the first parameter value is received from a terminal device, or the first parameter value is updated based on the second parameter value, or the first parameter value is determined based on the terminal device accessing the first cell.
  • the number of times the secondary station in the area or the first cell belongs to is determined.
  • a second set is sent to the first cell or the secondary station to which the first cell belongs, the second set including multiple keys associated with the first cell or the secondary station to which the first cell belongs, the multiple keys including the first key.
  • the method further includes: receiving a first message from the terminal device, the first message including the first parameter value, the first message indicating a first cell that meets the execution condition or a secondary station to which the first cell belongs.
  • the second parameter value is a parameter value last used by the first cell or a secondary station to which the first cell belongs, or the second parameter value is a parameter value last used by the terminal device for access.
  • the second parameter value is a parameter value used by the third cell for the last access, and the third cell has the same second parameter as the first cell.
  • the first key is derived when switching from a cell with a different second parameter value to the first cell.
  • the second parameter value is a parameter value last used by a cell in a first cell set, wherein the first cell set includes the first cell.
  • the first key is derived when switching from a cell outside the first cell set to the first cell.
  • the first parameter value is the second parameter value plus N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells added or changed for the conditional cell.
  • 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 station to which the first cell belongs, wherein the third parameter value is a starting parameter value associated with the first cell or the secondary station 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 of a first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set.
  • the first parameter value is the Pth value in the first set, where P is related to the number of times the terminal device accesses the first cell or the secondary station to which the first cell belongs, and the first set includes multiple parameter values associated with the first cell or the secondary station to which the first cell belongs.
  • a communication method is provided.
  • the method may be executed by a network device or by a chip or circuit configured in the network device, and the present application does not limit this method.
  • the method includes: receiving a second set, and determining the first key from the second set according to a first identifier or the number of times a terminal device accesses the first cell or the secondary station to which the first cell belongs, wherein the second set includes multiple keys associated with the first cell or the secondary station to which the first cell belongs, the multiple keys include the first key, and the first identifier is used to indicate the first key in the second set.
  • the candidate cell or the secondary station to which the candidate cell belongs does not have to communicate securely with the terminal device only after receiving the reconfiguration completion message of the MN.
  • the KSN set corresponding to each candidate cell or the secondary station to which the candidate cell belongs includes the KSN that may be added or changed in the starting cell, as well as the KSN used for subsequent cell changes.
  • the method further includes: receiving a second message, where the second message includes the first identifier.
  • the first key in the second set is determined to be used by receiving the first identifier of the terminal device, so that the keys used by the terminal device and the auxiliary station are aligned, thereby ensuring the security synchronization between the terminal device and the auxiliary station and avoiding the problem of security parameter misalignment or security parameter rollback caused by the failed access attempt of the terminal device.
  • a communication method is provided.
  • the method can be executed by a terminal device or by a chip or circuit configured in the terminal device, and the present application does not limit this method.
  • the method includes: deriving a fourth key, and deriving a sixth key according to the fourth key, wherein the fourth key is determined based on a fifth key, the fifth key is a key of a last cell accessed, or the fifth key is a key used for the last access to a second cell or access to a secondary station to which the second cell belongs, or the fifth key is a key used for the last access to a cell in a second cell set, and the first cell set includes the second cell, or the fifth key is a key used for the last access to a fourth cell, and the fourth cell is a cell associated with the first cell set.
  • the two cells have the same key or the same count value
  • the sixth key is a user plane key and/or a control plane key
  • the sixth key is used to encrypt and/or perform data integrity protection on data and/or signaling between the second cell.
  • the terminal device may evaluate whether the execution condition of the second cell is met, and the second cell is a candidate cell added or changed by the conditional cell.
  • the terminal device may derive the fourth key, and the fourth key may be used for the security of the second cell.
  • the fourth key and the fifth key mentioned above are secondary keys, such as KSN, S-KgNB or S-KeNB.
  • the sixth key mentioned above is an integrity protection key (KRRCint or KUPint) and/or an encryption/decryption key (KRRCenc or KUPenc).
  • the fifth key used to derive the fourth key is different, or the input key KSN used to derive a new KSN is different. Therefore, the fifth key used each time to access the candidate cell is different, and the sixth key derived using the fifth key is also different, avoiding the problem of key reuse.
  • the fourth key is derived when switching from a cell outside the second cell set to the second cell, or when switching from a cell with a different count value to the second cell.
  • the fourth key is derived based on the fifth key and using a fourth parameter value.
  • the fourth parameter value is a parameter value associated with the second cell or the secondary station 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 updated based on the fifth parameter value, or the fourth parameter value is determined based on the number of accesses to the second cell or the secondary station to which the second cell belongs.
  • the fifth parameter value is the parameter value last used by the second cell or the secondary station to which the second cell belongs, or the fifth parameter value is the parameter value used for the last access, or the fifth parameter value is the parameter value last used by a cell in the second cell set.
  • a communication method is provided.
  • the method can be executed by a network device or by a chip or circuit configured in the network device, and the present application does not limit this method.
  • the method includes: deriving a fourth key, and sending the fourth key to the second cell or a secondary station to which the second cell belongs, wherein the fourth key is used for the security of the second cell, the fourth key is determined based on a fifth key, the fifth key is a key for the last cell accessed, or the fifth key is a key used for the last access to the second cell or the secondary station to which the second cell belongs.
  • the fourth key is derived based on the fifth key and using a fourth parameter value
  • the fourth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set.
  • the fifth key is determined based on the sixth key and using a fifth parameter value
  • the sixth key is a master key
  • the fifth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is updated based on the sixth parameter value
  • the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is the parameter value last used by a cell in the second cell set.
  • the sixth parameter value is the parameter value last used by the second cell or the secondary station to which the second cell belongs, or the sixth parameter value is the parameter value last used by the terminal device for access.
  • a communication method is provided.
  • the method can be executed by a network device or by a chip or circuit configured in the network device, and the present application does not limit this method.
  • the method includes: deriving a fourth key, and deriving a sixth key based on the fourth key, wherein the fourth key is used for the security of the second cell, the fourth key is determined based on a fifth key, the fifth key is the key used for the last access to the second cell or access to the secondary station to which the second cell belongs, or the fifth key is the key last used by a cell in a second cell set, the first cell set includes the second cell, or the fifth key is the key used for the last access to a fourth cell, the fourth cell has the same key as the second cell or has the same count value, the sixth key is a user plane key and/or a control plane key, and the sixth key is used to encrypt data and/or signaling between a terminal device or to protect data integrity.
  • the fourth key is used for the security of the second cell
  • the fourth key is determined based on a fifth key
  • the fifth key is the key used for the last access to the second cell or access to the secondary station to which the second cell belongs
  • the fourth key is derived based on the fifth key and using a fourth parameter value.
  • the fourth parameter value is a parameter value associated with the second cell or a secondary station to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set.
  • the fifth key is determined based on the sixth key and using a fifth parameter value
  • the sixth key is a master key
  • the fifth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is updated based on the sixth parameter value
  • the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is the parameter value last used by a cell in the second cell set.
  • the sixth parameter value is the parameter value last used by the second cell or the secondary station to which the second cell belongs, or the sixth parameter value is the parameter value last used by the terminal device for access.
  • a communication device which may be a terminal device or a chip or circuit configured in the terminal device, and is not limited in the present application.
  • the device includes: a processing unit, used to derive a first key, and derive a third key based on the first key, wherein the first key is based on the second key and is determined using a first parameter value, the second key is a primary key, the first parameter value is updated based on the second parameter value, or the first parameter value is determined based on the number of times of accessing the first cell or the secondary station to which the first cell belongs, the third key is a user plane key and/or a control plane key, and the third key is used to encrypt data and/or signaling between the first cell or the secondary station to which the first cell belongs or to perform data integrity protection.
  • a processing unit used to derive a first key, and derive a third key based on the first key, wherein the first key is based on the second key and is determined using a first parameter value, the second key is a primary key, the first parameter value is updated based on the second parameter value, or the first parameter value is determined based on the number of times of accessing
  • the second parameter value is a parameter value last used by the first cell or a secondary station to which the first cell belongs, or the second parameter value is a parameter value used for the last access.
  • the second parameter value is a parameter value used by the third cell for the last access, and the third cell has the same second parameter as the first cell.
  • the first key is derived when switching from a cell with a different second parameter value to the first cell.
  • the second parameter value is a parameter value last used by a cell in a first cell set, wherein the first cell set includes the first cell.
  • the first key is derived when switching from a cell outside the first cell set to the first cell.
  • the first parameter value is the second parameter value plus N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells added or changed to the conditional cell.
  • the first parameter value is determined based on a third parameter value and the number of times the first cell or the secondary station to which the first cell belongs is accessed, wherein the third parameter value is a starting parameter value associated with the first cell or the secondary station 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 of a first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set.
  • the first parameter value is the Pth value in the first set, where P is related to the number of accesses to the first cell or the secondary station to which the first cell belongs, and the first set includes multiple parameter values associated with the first cell or the secondary station to which the first cell belongs.
  • the device includes: a transceiver unit, used to send the first message to the primary station, the first message indicates the first cell that meets the execution conditions or the secondary station to which the first cell belongs, and the first message includes the first parameter value.
  • a communication device which may be a terminal device or a chip or circuit configured in the terminal device, and is not limited in the present application.
  • the device includes: a processing unit, configured to derive a fourth key, and derive a sixth key according to the fourth key, wherein the fourth key is determined based on a fifth key, the fifth key is a key of a last cell accessed, or the fifth key is a key used for the last access to the second cell or to a secondary station to which the second cell belongs, or the fifth key is a key used for the last access to a cell in a second cell set, and the first cell set includes the second cell, or the fifth key is a key used for the last access to the fourth cell,
  • the fourth cell has the same key or the same count value as the second cell
  • the sixth key is a user plane key and/or a control plane key
  • the sixth key is used to encrypt or protect data integrity of data and/or signaling between the second cell.
  • the processing unit is specifically used to derive the fourth key when switching from a cell outside the second cell set to the second cell, or when switching from a cell with a different count value to the second cell.
  • the processing unit is specifically used to derive the fourth key based on the fifth key and using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary station to which the second cell belongs.
  • the fourth parameter value is a parameter value associated with the second cell or the secondary station 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 updated based on the fifth parameter value, or the fourth parameter value is determined based on the number of accesses to the second cell or the secondary station to which the second cell belongs.
  • the fifth parameter value is the parameter value last used by the second cell or the secondary station to which the second cell belongs, or the fifth parameter value is the parameter value used for the last access, or the fifth parameter value is the parameter value last used by a cell in the second cell set.
  • the processing unit when the communication device is a terminal device, the processing unit may be a processor, and the transceiver unit may be a transceiver.
  • the processing unit 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, a pin or a circuit, etc.
  • a communication device which may be a network device or a chip or circuit configured in a network device, and is not limited in the present application.
  • the device includes: a processing unit and a transceiver unit, wherein the processing unit is used to derive a first key, wherein the first key is used for the security of the first cell, the first cell is a candidate cell for adding or changing CPAC for a conditional cell, the first key is determined based on a second key and using a first parameter value, the second key is a master key, the first parameter value is received from a terminal device, or the first parameter value is updated based on the second parameter value, or the first parameter value is determined according to the number of times the terminal device accesses the first cell or the secondary station to which the first cell belongs.
  • the transceiver unit is used to send the first key to the first cell or the secondary station to which the first cell belongs.
  • the transceiver unit is specifically used to send a second set to the first cell or the secondary station to which the first cell belongs, the second set including multiple keys associated with the first cell or the secondary station to which the first cell belongs, and the multiple keys include the first key.
  • the transceiver unit is further used to receive a first message from the terminal device, the first message including the first parameter value, and the first message indicating a first cell that meets the execution conditions or a secondary station to which the first cell belongs.
  • the second parameter value is the parameter value last used by the first cell or the secondary station to which the first cell belongs, or the second parameter value is the parameter value last used by the terminal device for access.
  • the second parameter value is a parameter value used by the third cell for the last access, and the third cell has the same second parameter as the first cell.
  • the processing unit is specifically used to derive the first key when switching from a cell with a different second parameter value to the first cell.
  • the second parameter value is a parameter value last used by a cell in a first cell set, wherein the first cell set includes the first cell.
  • the processing unit is specifically used to derive the first key when switching from a cell outside the first cell set to the first cell.
  • the first parameter value is the second parameter value plus N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells to be added or changed for the conditional cell.
  • 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 station to which the first cell belongs, wherein the third parameter value is a starting parameter value associated with the first cell or the secondary station 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 of a first cell set is accessed, and the third parameter value is a starting parameter value associated with the first cell set.
  • the first parameter value is the Pth value in the first set, where P is related to the number of times the terminal device accesses the first cell or the secondary station to which the first cell belongs, and the first set includes multiple parameter values associated with the first cell or the secondary station to which the first cell belongs.
  • a communication device which may be a network device or a chip or circuit configured in the network device, and is not limited in the present application.
  • the device includes: a processing unit and a transceiver unit, wherein the processing unit is used to derive a fourth key, wherein the fourth key is used for the security of the second cell, the fourth key is determined based on a fifth key, the fifth key is a key used for accessing the last cell, or the fifth key is a key used for the last access to the second cell or accessing the secondary station to which the second cell belongs; the transceiver unit is used to send the fourth key to the second cell or the secondary station to which the second cell belongs.
  • the processing unit is specifically used to derive the fourth key based on the fifth key and using a fourth parameter value, wherein the fourth parameter value is a parameter value associated with the second cell or a secondary station to which the second cell belongs, or the fourth parameter value is a parameter value associated with the second cell set.
  • the fifth key is determined based on the sixth key and using a fifth parameter value
  • the sixth key is a master key
  • the fifth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is updated based on the sixth parameter value
  • the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is the parameter value last used by a cell in the second cell set.
  • the sixth parameter value is the parameter value last used by the second cell or the secondary station to which the second cell belongs, or the sixth parameter value is the parameter value last used by the terminal device for access.
  • a communication device In a twelfth aspect, a communication device is provided.
  • the device may be a network device or a chip or circuit configured in the network device, and this application does not limit this.
  • the device includes: a processing unit and a transceiver unit, wherein the transceiver unit is used to receive a second set, the second set includes multiple keys associated with a first cell or an auxiliary station to which the first cell belongs, and the multiple keys include a first key; the processing unit is used to determine the first key from the second set according to a first identifier or the number of times a terminal device accesses the first cell or the auxiliary station to which the first cell belongs, and the first identifier is used to indicate the position of the first key in the second set.
  • the transceiver unit is further used to receive a second message, where the second message includes the first identifier.
  • a communication device which may be a network device or a chip or circuit configured in the network device, and is not limited in the present application.
  • the device includes: a processing unit, used to derive a fourth key, and derive a sixth key based on the fourth key, wherein the fourth key is used for the security of the second cell, the fourth key is determined based on a fifth key, the fifth key is the key used for the last access to the second cell or access to the secondary station to which the second cell belongs, or the fifth key is the key last used by a cell in a second cell set, the first cell set includes the second cell, or the fifth key is the key used for the last access to a fourth cell, the fourth cell has the same key as the second cell or has the same count value, the sixth key is a user plane key and/or a control plane key, and the sixth key is used to encrypt or protect data integrity of data and/or signaling between the terminal device.
  • the fourth key is used for the security of the second cell
  • the fourth key is determined based on a fifth key
  • the fifth key is the key used for the last access to the second cell or access to the secondary station to which the second cell belongs
  • the processing unit is specifically used to derive the fourth key when switching from a cell outside the second cell set to the second cell, or when switching from a cell with a different count value to the second cell.
  • the processing unit is further used to derive the fourth key based on the fifth key and using a fourth parameter value.
  • the fifth key is based on the sixth key and uses the fifth parameter
  • the sixth key is a master key
  • the fifth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is updated based on the sixth parameter value
  • the fifth parameter value is determined according to the number of times the terminal device accesses the second cell or the secondary station to which the second cell belongs.
  • the sixth parameter value is the parameter value last used by the second cell or the secondary station to which the second cell belongs, or the sixth parameter value is the parameter value last used by the terminal device for access.
  • the processing unit when the communication device is a network device, the processing unit may be a processor, and the transceiver unit may be a transceiver.
  • the processing unit 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, a pin or a circuit, etc.
  • a communication device including a processor and a storage medium, the storage medium storing instructions, and when the instructions are executed by the processor, the method in the first aspect or any possible implementation of the first aspect is implemented, or the method in the fifth aspect or any possible implementation of the fifth aspect is implemented.
  • the communication device may be a terminal device, or a chip or circuit configured in the terminal device.
  • the communication device may further include a communication interface, the communication interface being used to receive data and/or information and transmit the received data and/or information to the processor.
  • the communication interface is also used to output the data and/or information processed by the processor.
  • a communication device including a processor and a storage medium, the storage medium storing instructions, and when the instructions are executed by the processor, the method in the third aspect or any possible implementation of the third aspect is implemented, or the method in the fourth aspect or any possible implementation of the fourth aspect is implemented, or the method in the sixth aspect or any possible implementation of the sixth aspect is implemented, or the method in the seventh aspect or any possible implementation of the seventh aspect is implemented.
  • the communication device may be a network device, or a chip or circuit configured in the network device.
  • the communication device may further include a communication interface, the communication interface being used to receive data and/or information and transmit the received data and/or information to the processor.
  • the communication interface is also used to output the data and/or information processed by the processor.
  • a computer-readable storage medium includes instructions, which, when executed by a processor, enable the method in the first aspect or any possible implementation of the first aspect to be implemented, or enable the method in the fifth aspect or any possible implementation of the fifth aspect to be implemented.
  • a computer-readable storage medium includes instructions, which, when executed by a processor, enable the method in the third aspect or any possible implementation of the third aspect to be implemented, or enable the method in the fourth aspect or any possible implementation of the fourth aspect to be implemented, or enable the method in the sixth aspect or any possible implementation of the sixth aspect to be implemented, or enable the method in the seventh aspect or any possible implementation of the seventh aspect to be implemented.
  • a computer program product comprising computer program code or instructions, which, when executed, enables the method in the first aspect or any possible implementation of the first aspect to be implemented, or enables the method in the fifth aspect or any possible implementation of the fifth aspect to be implemented.
  • a computer program product comprising computer program codes or instructions, which, when executed, implement the method in the third aspect or any possible implementation of the third aspect, or implement the method in the fourth aspect or any possible implementation of the fourth aspect, or implement the method in the sixth aspect or any possible implementation of the sixth aspect, or implement the method in the seventh aspect or any possible implementation of the seventh aspect.
  • a communication method including a method as in the first aspect or any possible implementation of the first aspect, a method as in the third aspect or any possible implementation of the third aspect, and a method as in the fourth aspect or any possible implementation of the fourth aspect.
  • a communication method including the method in the fourth aspect or any possible implementation of the fourth aspect, the method in the fifth aspect or any possible implementation of the fifth aspect, and the method in the sixth aspect or any possible implementation of the sixth aspect.
  • a communication system including the communication device in the eighth aspect or any possible implementation of the eighth aspect.
  • a communication system comprising the communication device in the ninth aspect or any possible implementation of the ninth aspect, the communication device in the eleventh aspect or any possible implementation of the eleventh aspect, and the communication device in the thirteenth aspect or any possible implementation of the thirteenth aspect.
  • a communication system comprising the communication device in the fourteenth aspect or any possible implementation of the fourteenth aspect and the communication device in the fifteenth aspect or any possible implementation of the fifteenth aspect.
  • FIG. 1 is a schematic diagram of a communication system applicable to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a dual connection scenario applicable to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a key reuse in the prior art.
  • FIG. 4 is a schematic diagram of another key reuse in the prior art.
  • FIG5 is a schematic flowchart of a communication method provided in an embodiment of the present application.
  • FIG6 is a schematic flowchart of another communication method provided in an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of another communication method provided in an embodiment of the present application.
  • FIG8 is a schematic flowchart of another communication method provided in an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of another communication method provided in an embodiment of the present application.
  • FIG. 10 is a schematic flow chart of another communication method provided in an embodiment of the present application.
  • FIG. 11 is a schematic flowchart of another communication method provided in an embodiment of the present application.
  • FIG. 12 is a schematic block diagram of a communication device provided in an embodiment of the present application.
  • FIG. 13 is another schematic structural diagram of a communication device provided in an embodiment of the present application.
  • FIG. 14 is another schematic structural diagram of the communication device provided in an embodiment of the present application.
  • GSM Global System of Mobile communication
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • GPRS General Packet Radio Service
  • LTE Long Term Evolution
  • FDD frequency division duplex
  • TDD LTE time division duplex
  • UMTS universal mobile telecommunication system
  • WiMAX worldwide interoperability for microwave access
  • 5G mobile communication system can be a non-standalone (NSA) or an independent network (SA).
  • the technical solution provided in the present application can also be applied to machine type communication (MTC), long term evolution-machine (LTE-M), device-to-device (D2D) network, machine-to-machine (M2M) network, Internet of Things (IoT) network or other networks.
  • IoT network can include vehicle networking, for example.
  • vehicle to X, V2X, X can represent anything
  • the V2X can include: vehicle to vehicle (V2V) communication, vehicle to infrastructure (V2I) communication, vehicle to pedestrian (V2P) communication or vehicle to network (V2N) communication, etc.
  • the technical solution provided in this application can also be applied to future communication systems, such as the sixth generation (6G) mobile communication system. This application does not limit this.
  • 6G sixth generation
  • the terminal device may also be referred to as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device.
  • UE user equipment
  • a terminal device can be a device that provides voice/data connectivity to a user, such as a handheld device with wireless connection function, Vehicle-mounted equipment, etc.
  • some examples of terminals can be: mobile phones, tablet computers (pad), computers with wireless transceiver functions (such as laptops, PDAs, etc.), mobile Internet devices (mobile internet devices, MID), 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 (for example, home appliances such as televisions, smart boxes, game consoles), cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), and wireless terminals in smart cities.
  • SIP session initiation protocol
  • WLL wireless local loop
  • PDAs personal digital assistants
  • PDA personal digital assistant
  • handheld devices with wireless communication function computing devices or other processing devices connected to a wireless modem
  • vehicle-mounted devices wearable devices
  • terminal devices in 5G networks or terminal devices in future evolved public land mobile communication networks public land mobile network, PLMN
  • wearable devices can also be called wearable smart devices, which are a general term for the intelligent design and development of wearable devices for daily wear using wearable technology, such as glasses, gloves, watches, clothing and shoes.
  • Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothes or accessories.
  • Wearable devices are not only hardware devices, but also realize powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-sized, and independent of smartphones to achieve complete or partial functions, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
  • the terminal device can also be a terminal device in the Internet of Things (IoT) system.
  • IoT Internet of Things
  • Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.
  • IoT technology can achieve massive connections, deep coverage, and terminal power saving through narrowband (NB) technology, for example.
  • NB narrowband
  • the terminal device may also be a vehicle or a whole vehicle, which can achieve communication through the Internet of Vehicles, or it may be a component located in the vehicle (for example, placed in the vehicle or installed in the vehicle), that is, a vehicle-mounted terminal device, a vehicle-mounted module or a vehicle-mounted unit (on-board unit, OBU).
  • a vehicle-mounted terminal device for example, placed in the vehicle or installed in the vehicle
  • OBU on-board unit
  • terminal devices can also include sensors such as smart printers, train detectors, and gas stations. Their main functions include collecting data (part of the terminal equipment), receiving control information and downlink data from network devices, and sending electromagnetic waves to transmit uplink data to network devices.
  • sensors such as smart printers, train detectors, and gas stations.
  • Their main functions include collecting data (part of the terminal equipment), receiving control information and downlink data from network devices, and sending electromagnetic waves to transmit uplink data to network devices.
  • the network device can be any device with wireless transceiver function.
  • the device includes but is not limited to: evolved Node B (eNB), radio network controller (RNC), Node B (NB), base station controller (BSC), base transceiver station (BTS), home base station (e.g., home evolved Node B, or home Node B, HNB), baseband unit (BBU), wireless fidelity (Wi-Fi), etc.
  • eNB evolved Node B
  • RNC radio network controller
  • NB Node B
  • BSC base station controller
  • BTS base transceiver station
  • home base station e.g., home evolved Node B, or home Node B, HNB
  • BBU baseband unit
  • Wi-Fi wireless fidelity
  • the access point (AP), wireless relay node, wireless backhaul node, transmission point (TP) or transmission and reception point (TRP) in the system can also be a gNB in a 5G, such as NR, system, or a transmission point (TRP or TP), one or a group of (including multiple antenna panels) antenna panels of a base station in a 5G system, or a network node constituting a gNB or a transmission point, such as a baseband unit (BBU), or a distributed unit (DU), or a base station in a next generation communication 6G system, etc.
  • a 5G such as NR, system
  • TRP or TP transmission point
  • TRP or TP transmission point
  • a network node constituting a gNB or a transmission point such as a baseband unit (BBU), or a distributed unit (DU), or a base station in a next generation communication 6G system, etc.
  • BBU baseband unit
  • DU distributed unit
  • the gNB may include a centralized unit (CU) and a DU.
  • the gNB may also include an active antenna unit (AAU).
  • the CU implements some of the gNB functions, and the DU implements some of the gNB functions.
  • the CU is responsible for processing non-real-time protocols and services, and implements the functions of the radio resource control (RRC) and packet data convergence protocol (PDCP) layers.
  • the DU is responsible for processing physical layer protocols and real-time services, and implements the functions of the radio link control (RLC) layer, the medium access control (MAC) layer, and the physical (PHY) layer.
  • the AAU implements some physical layer processing functions, RF processing, and related functions of active antennas.
  • the network device may be a device including one or more of a CU node, a DU node, and an AAU node.
  • the CU may be classified as a network device in an access network (radio access network, RAN), or the CU may be classified as a network device in a core network (core network, CN), and this application does not limit this.
  • the network device provides services for the cell, and the terminal device communicates with the cell through the transmission resources (e.g., frequency domain resources, or spectrum resources) allocated by the network device.
  • the cell can belong to a macro base station (e.g., macro eNB or macro gNB, etc.) or a small
  • the small cells here may include: metro cells, micro cells, pico cells, femto cells, etc. These small cells have the characteristics of small coverage and low transmission power, and are suitable for providing high-speed data transmission services.
  • FIG. 1 is a schematic diagram of a communication system 100 applicable to an embodiment of the present application.
  • the communication system 100 may include at least one terminal device, such as the terminal device 110 shown in FIG. 1 ; the communication system 100 may also include at least two network devices, such as the network device 120 and the network device 130 shown in FIG. 1 .
  • the terminal device 110 may communicate with the network device 120 and the network device 130 at the same time.
  • the terminal device 110 and the network device 120, and the terminal device 110 and the network device 130 may communicate via a wireless link.
  • Each communication device, such as the terminal device 110, the network device 120 or the network device 130 may be configured with multiple antennas.
  • the configured multiple antennas may include at least one transmitting antenna for transmitting signals and at least one receiving antenna for receiving signals. Therefore, the communication devices in the communication system, the terminal device 110 and the network device 120, and the terminal device 110 and the network device 130 may communicate via a multi-antenna technology.
  • FIG. 1 is only a simplified schematic diagram for ease of understanding, and the communication system may also include other network devices or other terminal devices, which are not shown in FIG. 1 .
  • the terminal device 110 communicating with the network device 120 and the network device 130 at the same time can also be called dual-connectivity (DC) or multi-radio dual connectivity (MR-DC) of the terminal device.
  • DC dual-connectivity
  • MR-DC multi-radio dual connectivity
  • one network device communicating with the terminal device 110 can be called a master node (MN)
  • the other network device communicating with the terminal device 110 can be called a secondary node (SN).
  • MN master node
  • SN secondary node
  • the MN and SN can be network devices of the same type, or can be network devices of different types, which is not specifically limited in the present embodiment.
  • the network devices please refer to the above description, which will not be described in detail here.
  • FIG2 is a schematic diagram of a dual connection scenario applicable to an embodiment of the present application.
  • each network device may include a cell group (CG).
  • the cell group under the MN is a master cell group (MCG)
  • the cell group under the SN is a secondary cell group (SCG).
  • the master cell group may include a primary cell (PCell) and at least one secondary cell (SCell)
  • the secondary cell group may include a primary secondary cell (PSCell) and at least one secondary cell (SCell).
  • FIG2 is illustrated by taking the example that each cell group includes 2 SCells.
  • the terminal device will have the process of adding or changing the PSCell.
  • the addition of PSCell triggered by the terminal device is called conditional PSCell addition (CPA), and the change of PSCell triggered by the terminal device is called conditional PSCell change (CPC).
  • CPA can be understood as the conditional addition of PSCell.
  • CPC can be understood as the conditional change of PSCell.
  • CPA and CPC can also be collectively referred to as conditional PSCell addition and change (CPAC).
  • the network configuration will configure multiple candidate PSCells and send the CPAC configuration to the terminal device.
  • the CPAC configuration includes the configuration of the multiple candidate PSCells and the corresponding execution conditions.
  • the terminal device evaluates that the execution condition of a candidate PSCell is met, the terminal device can perform the process of adding or changing the PSCell.
  • the cell that meets the execution condition can become the selected cell.
  • the terminal device After the terminal device completes the CPA or CPC process and establishes a connection with a candidate PSCell that meets the conditions (for example, a random access channel (RACH)), the terminal device will release the CPA configuration and/or CPC configuration. Therefore, before the network is reconfigured or the network is restarted, the terminal device cannot continue to use the CPA configuration 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 configuration and/or CPC configuration. Before the network is reconfigured or the network is restarted, the terminal device continues to use the previously stored CPA configuration or CPC configuration, thereby continuing to execute the CPA or CPC process.
  • RACH random access channel
  • CPA or CPC may be collectively referred to as CPAC in this application.
  • CPA configuration or CPC configuration may be collectively referred to as CPAC configuration.
  • the terminal device executing the CPC process as an example. Assume that the terminal device is currently communicating with the MN and cell 0 under the SN (there may be other SCell cells), that is, cell 0 is the PSCell of the terminal device at this time. Assume that the terminal device receives the CPC configuration, which includes the configuration information of candidate cells 1 to candidate cells 3, and the execution information corresponding to each candidate cell in candidate cells 1 to candidate cells 3. Execution conditions. When the terminal device detects that the execution conditions of candidate cell 3 are met, the terminal device can execute the CPC process and change the PSCell from cell 0 to candidate cell 3.
  • the terminal device After completing the connection with candidate cell 3, the terminal device does not release the CPC configuration, but continues to maintain the CPC configuration and executes the CPC process.
  • the terminal device can also continue to evaluate other candidate cells according to the stored CPC configuration. When other candidate cells meet the execution conditions, the terminal device should trigger the CPC process again. For example, the terminal device subsequently detects that candidate cell 1 meets the execution conditions, so the terminal device switches the PSCell from candidate cell 3 to candidate cell 1 and completes the connection with candidate cell 1.
  • the communication between the terminal device and the network device can be encrypted and/or integrity protected based on the security key.
  • the communication between the terminal device and the MN is based on the master key (master key, such as KgNB or KeNB) derived from the control plane key (radio resource control (RRC) key, such as integrity protection key KRRCint and encryption and decryption key KRRCenc) and/or the user plane key (UP key, such as integrity protection key KUPint and encryption and decryption key KUPenc).
  • master key such as KgNB or KeNB
  • RRC radio resource control
  • UP key such as integrity protection key KUPint and encryption and decryption key KUPenc
  • the communication between the terminal device and the SN is based on the secondary key (secondary key, such as KSN, S-KgNB or S-KeNB, hereinafter referred to as KSN) derived from the control plane key and/or the user plane key.
  • KSN secondary key
  • the KSN is based on KgNB, using the SN counter (or sk-counter, hereinafter referred to as SN counter) derived key, where the SN counter is an SN counter associated with the current security context.
  • MN generates or updates SN Counter and sends it to UE.
  • MN and UE use the same master key and SN Counter to derive the same KSN.
  • the input parameters for deriving KSN may also include other parameters, such as the length of SN Counter.
  • MN sends the derived KSN to the auxiliary station to be added or accessed, thereby achieving alignment of KSN between the terminal device and the auxiliary station, so that the terminal device and the auxiliary station use the same KSN to derive the same integrity and/or encryption and decryption keys to ensure the security of communication between the two.
  • the terminal device does not release the CPAC configuration. Before the network is reconfigured or restarted, the terminal device continues to use the previously stored CPAC configuration. Although the above process can reduce the delay and signaling overhead of the secondary cell group change, when the terminal device continues to execute CPAC according to the CPAC configuration, there will be a problem of key reuse when the terminal device communicates with the PSCell under the SN, which makes the communication process between the terminal device and the PSCell under the SN unsafe.
  • key reuse means that the terminal device uses the same key to encrypt/integrity protect communication data packets more than once (for example, twice). If an attacker obtains two or more ciphertexts encrypted/integrity protected with the same key, there is a risk of plaintext being disclosed.
  • the above CPAC configuration includes the configuration and execution conditions of candidate cell 1, the configuration and execution conditions of candidate cell 2, the configuration and execution conditions of candidate cell 3, and an SN Counter.
  • the above CPAC configuration includes the configuration, execution conditions, and SN Counter#1 of candidate cell 1; the configuration, execution conditions, and SN Counter#2 of candidate PSCell 2; and the configuration, execution conditions, and SN Counter#3 of candidate PSCell 3.
  • FIG3 is a schematic diagram of a key reuse in the prior art.
  • the KSN used this time is derived based on KgNB and SN Counter (or SN Counter#1)
  • the KSN used this time has not changed and is still the same as the KSN used by the terminal device to complete the first CPA or CPC.
  • the user plane and control plane keys derived based on the same KSN are also the same, which will cause the risk of key stream reuse.
  • the above CPAC configuration includes the configuration, execution conditions, and SN Counter#1 of candidate cell 1; the configuration, execution conditions, and SN Counter#2 of candidate cell 2; and the configuration, execution conditions, and SN Counter#3 of candidate cell 3.
  • the candidate cells under different SNs or the SN Counters associated with each candidate cell are not equal, for example, SN Counter#1 ⁇ SN Counter#2 ⁇ SN Counter#3.
  • FIG4 is a schematic diagram of another key reuse in the prior art.
  • the KSN used this time is derived based on KgNB and SN Counter#1. If the terminal device subsequently triggers a change to the candidate cell 1 again, since the KgNB and SN Counter#1 are the same as those used when the candidate cell 1 was accessed last time, the KSN used this time is still the same as the KSN used when the candidate cell 1 was accessed last time. In this way, the user plane and control plane keys derived based on the same KSN are also the same, and there is a risk of key stream reuse.
  • whether to reestablish the packet data convergence protocol (PDCP) is indicated by a network device.
  • the network device instructs the UE whether to perform PDCP reestablishment when the PSCell is switched through reestablishPDCP indication information. It is important to understand that if the key needs to be changed during the handover process, the network device needs to instruct the terminal device to perform PDCP reestablishment and complete the key change during the PDCP reestablishment process. Therefore, in the scenario of continuous CPAC, the network device needs to indicate whether to perform PDCP reestablishment or change the key each time the handover occurs, which can be done in the following ways:
  • Method 1 Indicated by means of candidate cell groups (or candidate cell sets):
  • the network provides multiple cell sets to the UE, each of which includes one or more cells.
  • Each cell set corresponds to the same SN Counter. If the source cell and the target cell of the UE belong to the same cell set, the UE does not perform PDCP reconstruction during switching, that is, does not perform new key derivation. If the source cell and the target cell of the UE belong to different cell sets, the UE must perform PDCP reconstruction and new key derivation during switching.
  • the cells in the cell set have the same SN Counter value.
  • the SN Counter of a cell set can be one or more.
  • Method 2 The network configures an associated SN Counter for each candidate cell.
  • the associated SN Counter configured for each cell can be one or more (i.e., a set of SN Counters).
  • the SN Counters associated with different candidate cells can be the same or different. If the SN Counters of the source cell and the target cell to which the UE switches are the same, the UE does not need to perform PDCP reconstruction, that is, it does not need to derive a new key; if the SN Counter/SN Counter set of the source cell and the target cell to which the UE switches are different, the UE needs to perform PDCP reconstruction, that is, the UE needs to derive a new key.
  • Method 3 The network configures an associated SN Counter for each candidate cell.
  • the associated SN Counter configured for each cell can be one or more (i.e., an SN Counter set).
  • the SN Counters associated with different candidate cells can be the same or different.
  • the network instructs the UE whether to perform PDCP reconstruction when switching from a cell to another cell. For example, there are 3 candidate cells (cell 1, cell 2, and cell 3).
  • the network instructs the UE whether PDCP reconstruction is required when switching 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 reconstruction is required, the UE needs to perform PDCP reconstruction, that is, the UE needs to derive new keys. If the network indicates that PDCP reconstruction is not required, the UE does not need to perform PDCP reconstruction, that is, the UE does not need to derive new keys.
  • an embodiment of the present application provides a communication method that can avoid the problem of key reuse in a CPAC scenario.
  • Fig. 5 is a schematic flow chart of a communication method provided by an embodiment of the present application. As shown in Fig. 5, the method may include steps 510-520, and steps 510-520 are described in detail below.
  • Step 510 Derive a first key, where the first key is based on the second key and is determined using a first parameter value.
  • a first key may be derived based on a second key and using a first parameter value.
  • the terminal device may derive a first key based on the second key and using a first parameter value.
  • the first key may be a secondary key, such as KSN, S-KgNB or S-KeNB. It should be understood that deriving the first key may also be referred to as deriving the first key, or deducing the first key, or determining the first key, or obtaining the first key, etc.
  • the terminal device can evaluate whether the execution condition of the first cell is met, and the first cell can be a candidate cell added or changed for the conditional cell. If the terminal device evaluates that the execution condition of the first cell is met, or the terminal device accesses a candidate cell that meets the execution condition, the terminal device can determine the first parameter value and derive the first key using the first parameter value.
  • the above-mentioned second key may be a master key between the terminal device and the MN, for example, it may be KgNB, or KeNB.
  • the master key is used to derive the control plane key and/or the user plane key, and the control plane key and/or the user plane key are used to encrypt or protect the data integrity of the data and/or signaling between the terminal device and the MN.
  • the control plane key is used to encrypt or protect the data integrity of the signaling between the terminal device and the MN.
  • the user plane key is used to encrypt or protect the data integrity of the data between the terminal device and the MN.
  • the above-mentioned first key may be a Secondary key, such as KSN, S-KgNB or S-KeNB.
  • the first key is used to derive the control plane key and/or the user plane key, and the control plane key and/or the user plane key are used to encrypt or protect the data integrity of the data and/or signaling between the terminal device and the SN.
  • the control plane key is used to encrypt or protect the data integrity of the signaling between the terminal device and the SN.
  • the user plane key is used to encrypt or protect the data integrity of the data between the terminal device and the SN.
  • the first parameter value may be updated based on the second parameter value.
  • the second parameter value plus N where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells added or changed by the conditional cell.
  • the second parameter value is the parameter value last used by the first cell or the secondary station to which the first cell belongs (or, the second parameter value is the parameter value last used by the terminal device in the first cell or the secondary station to which the first cell belongs), or the second parameter value is the parameter value used for the last access (or, the second parameter value is the parameter value used last).
  • the second parameter value is the parameter value last used by the cells in the first cell set, wherein the first cell set includes the first cell. That is, the terminal device maintains an SN Counter for the cells in the first cell set.
  • the second parameter values e.g., SN Counter
  • the terminal device switches 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 the second parameter, and the second parameter is the SN Counter last used by the cells in the first cell set.
  • the first cell set is used to instruct the terminal device to perform PDCP reconstruction.
  • the terminal device switches from a cell in the first cell set to another cell in the first cell set, there is no need to perform PDCP reconstruction; when the terminal device switches from a cell outside the first cell set to a cell in the first cell set, it is necessary to perform PDCP reconstruction.
  • the second parameter value is the parameter value last used by the third cell, wherein the third cell and the first cell are configured with the same SN Counter. That is, the terminal device maintains an SN Counter for each candidate cell.
  • the SN Counters of different candidate cells may be the same or different.
  • the terminal device switches from another cell to the first cell, if the SN Counters of the two cells are different, the terminal device derives the 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 the SN Counter value last used by the cell with the same SN Counter as the first cell.
  • the third cell may also be the first cell.
  • the first parameter value is determined based on the third parameter value and the number of times the first cell or the secondary station to which the first cell belongs is accessed, wherein the third parameter value is the starting parameter value associated with the first cell or the secondary station to which the first cell belongs.
  • the terminal device detects that candidate cell 2 meets the corresponding execution condition, or before the terminal device accesses candidate cell 2, the terminal device updates SN Counter to the starting value of SN Counter of candidate cell 2 or the auxiliary station to which the candidate cell belongs plus the number of times the terminal device accesses candidate cell 2 or the auxiliary station to which the candidate cell belongs.
  • This implementation method will be described in detail below in conjunction with FIG. 7 and will not be described in detail here.
  • 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, wherein the third parameter value is a starting parameter value associated with the first cell set.
  • the first cell set includes the first cell. That is, the terminal device maintains an SN Counter for the first cell set.
  • the terminal device switches from a cell in another cell set to a cell in the first cell set, the terminal device derives a first key. Before the terminal device derives the first key, for example, if the terminal device evaluates that a candidate cell meets the execution condition, the terminal device updates the first parameter value based on the third parameter value and the number of times the cell in the first cell set is accessed.
  • the terminal device detects that candidate cell 2 meets 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 where candidate cell 2 is located plus the number of times the terminal device accesses the cell set.
  • the first parameter value may be the Pth value in the first set, where P is related to the number of times the first cell or the secondary station to which the first cell belongs is accessed, and the first set includes multiple parameter values associated with the first cell or the secondary station to which the first cell belongs.
  • the first parameter value is selected from a third set, and the third set includes multiple parameter values associated with the first cell set, and the multiple parameter values include the first parameter value.
  • the first parameter value is randomly selected from the multiple parameter values included in the third set.
  • the first parameter value is selected in order from large to small, or from small to large according to the parameter values in the third set.
  • the first parameter value is the Pth value in the third set, where P is related to the number of accesses to the first cell or the secondary station to which the first cell belongs. That is, the terminal device maintains a set of SN Counters for the first cell set. When the terminal device switches from a cell outside the first cell set to the first cell, the terminal device derives the first key.
  • the terminal device selects a new SN Counter from the SN Counter set of the first cell set and derives a new key.
  • the selection rule can be based on The SN Counter is selected in sequence according to the number of times the UE accesses the cell set, or can be selected randomly (regardless of the number of times the UE accesses the cell set), and it is necessary to ensure that the SN Counter selected each time is not repeated.
  • the first cell set may be configured by a network device, for example, indicating identifiers of candidate cells included in the first cell set.
  • 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).
  • the first parameter value is selected from a third set, the third set including multiple parameter values, the multiple parameter values including the first parameter value. Multiple candidate cells can be associated with the third set.
  • the terminal device switches from a cell associated with a non-third set to a cell associated with the third set, the terminal device derives a first key.
  • first parameter value, second parameter value, and third parameter value can be different values of the parameter SN Counter.
  • Step 520 Derive a third key according to the first key, where the third key is a user plane key and/or a control plane key.
  • a third key may be derived from the first key, that is, the third key is a user plane key and/or a control plane key derived from the first key.
  • the control plane key and/or the user plane key are used to encrypt or protect the data integrity of data and/or signaling between the terminal device and the first cell.
  • the user plane key is used to encrypt or protect the data integrity of data between the terminal device and the first cell.
  • a new first parameter value can be obtained by updating the second parameter value, or a new first parameter value can be determined according to the number of times the first cell or the secondary station to which the first cell belongs is accessed, so that each time the terminal device accesses a cell, a new parameter value can be determined, and a new key is derived based on the new parameter value, thereby avoiding the problem of key reuse in the process of switching candidate cells.
  • input parameters may also be used to derive the third key based on the first key, such as one or more of the security algorithm type identifier, the length of the security algorithm type identifier, the security algorithm identifier, and the length of the security algorithm identifier.
  • the terminal device may also send the determined first parameter value to the MN.
  • the terminal device may send a first message to the master station MN, the first message indicating the first cell that meets the execution condition or the secondary station to which the first cell belongs, and the first message may include the first parameter value. That is, the first message includes both indication information indicating the first cell that meets the execution condition or the secondary station to which the first cell belongs, and the first parameter value.
  • the first message may be an RRC reconfiguration completion message.
  • the MN may send multiple KSNs that may be used to the candidate SN in the Xth message.
  • the Xth message may be an SN addition request message. In this implementation, if the SN believes that the received KSNs are about to be used in full or are all used, the SN may request the MN to update the KSN. The request message is used to request updates to multiple KSNs.
  • the MN can update the first parameter value based on the second parameter value, or determine the first parameter value according to the number of times the terminal device accesses the first cell or the secondary station to which the first cell belongs. At this time, the first message sent by the terminal device to the MN does not include the first parameter value.
  • step 510 the implementation process of the MN determining the first parameter value is the same as the process of the terminal device obtaining the first parameter value in step 510.
  • the description in step 510 please refer to the description in step 510, which will not be repeated here.
  • the above-mentioned MN can also derive the first key based on the second key and using the first parameter value.
  • the MN can also send the first key to the first cell or the secondary station to which the first cell belongs.
  • the MN sends a second set to the first cell or the secondary station to which the first cell belongs, and the second set includes multiple keys associated with the first cell or the secondary station to which the first cell belongs, and the multiple keys include the above-mentioned first key.
  • the secondary station can determine the first key from the second set according to the first identifier or the number of times the terminal device accesses the first cell or the secondary station to which the first cell belongs.
  • the first identifier is used to indicate the first key in the second set.
  • candidate SNs and the number of candidate cells included under each candidate SN.
  • candidate SNs candidate SNs
  • candidate SN1 candidate cell 1
  • candidate cell 2 candidate cell 3
  • candidate SN2 candidate cell 4
  • candidate cell 5 candidate cell 6
  • Fig. 6 is a schematic flow chart of another communication method provided by an embodiment of the present application. As shown in Fig. 6, the method may include steps 610-699, and steps 610-699 are described in detail below.
  • Step 610 The terminal device establishes an RRC connection with the MN.
  • Step 615 The terminal device establishes an RRC connection with the source SN.
  • step 615 is optional.
  • the terminal device needs to perform a PSCell change process according to the execution conditions.
  • the terminal device can also establish an RRC connection with the source SN.
  • the terminal device can only establish an RRC connection with the MN, and there is no need to execute step 615 to establish an RRC connection with the source SN.
  • Step 620 The MN sends an SN adding request message 1 to the candidate SN1, and the SN adding request message 1 includes KSN1.
  • each candidate cell included under candidate SN1 corresponds to an SN Counter1, that is, the SN Countere corresponding to each candidate cell is the same.
  • MN can calculate KSN1 based on KgNB and SN Counter.
  • MN can also send SN add request message 1 to candidate SN1 or candidate cells under candidate SN1 (for example, candidate cell 1, candidate cell 2, candidate cell 3), and the SN add request message 1 includes KSN1.
  • KgNB is the key required for communication between the MN and the terminal device, corresponding to the master key mentioned above.
  • MN can also calculate KSN1 based on parameters such as KgNB, SN Counter, and the length of SN Counter.
  • SN Counter1 can correspond to the second parameter value in the above text.
  • Step 625 Candidate SN1 sends SN adding request confirmation message 1 to MN.
  • the candidate SN1 after the candidate SN1 receives the SN adding request message 1 sent by the MN, if the candidate SN1 confirms that resources can be allocated to the candidate cells included therein, the candidate SN1 can send an SN adding request confirmation message 1 to the MN, and the SN adding request confirmation message 1 indicates that the candidate SN1 confirms that it can be added as a candidate SN.
  • Step 630 The MN sends an SN adding request message 2 to the candidate SN2.
  • each candidate cell included in candidate SN2 corresponds to an SN Counter 1, that is, the SN Countere corresponding to each candidate cell is the same.
  • MN can calculate KSN1 based on KgNB and SN Counter.
  • MN can also send an SN add request message 2 to candidate SN2 or candidate cells under candidate SN2 (for example, candidate cell 4, candidate cell 5, candidate cell 6), and the SN add request message 2 includes KSN1.
  • Step 635 Candidate SN2 sends an SN adding request confirmation message 2 to MN.
  • candidate SN2 after candidate SN2 receives the SN adding request message 2 sent by MN, if the candidate SN1 confirms that resources can be allocated to the candidate cells included therein, the candidate SN2 can send an SN adding request confirmation message 2 to MN, and the SN adding request confirmation message 2 indicates that the candidate SN2 confirms that it can be added as a candidate SN.
  • Step 640 The MN sends an RRC reconfiguration message to the terminal device.
  • 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 included in candidate SN1 and candidate SN2 and the corresponding execution conditions, as well as SN Counter 1.
  • the CPAC configuration includes the configuration of candidate cells 1 to 6 and the corresponding execution conditions, as well as SN Counter 1.
  • Step 645 The terminal device replies with an RRC reconfiguration completion message 1 to the MN.
  • the terminal device After receiving the RRC reconfiguration message from the MN and successfully completing the reconfiguration, the terminal device replies with an RRC reconfiguration completion message 1 to the MN.
  • Step 650 The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • the terminal device After receiving the CPAC configuration sent by the MN, the terminal device can start to evaluate the execution conditions included in the CPAC configuration to determine whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 655 The terminal device determines KSN1 based on SN Counter1 included in the CPAC configuration.
  • the terminal device can derive KSN1 based on the master key and using SN Counter1 included in the CPAC configuration.
  • the terminal device saves KSN1, and can derive a user plane key for encrypting data or protecting data integrity with the candidate cell 1 based on KSN1, and can also derive a control plane key for encrypting signaling or protecting data integrity with the candidate cell 1 based on KSN1.
  • Step 660 The terminal device sends an RRC reconfiguration complete message 2 to the MN.
  • the RRC reconfiguration complete message 2 includes a message sent to the candidate RRC reconfiguration complete message of SN1.
  • the terminal device can send an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message can indicate the candidate cell selected by the terminal device.
  • the terminal device can send an RRC reconfiguration completion message 2 to the MN, and the RRC reconfiguration completion message 2 includes an SN reconfiguration completion message sent to candidate SN1 (the candidate SN to which candidate cell 1 belongs).
  • the RRC reconfiguration completion message 2 can indicate that the candidate cell selected by the terminal device is candidate cell 1.
  • Step 665 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • the MN after receiving the RRC reconfiguration completion message 2 sent by the terminal device, the MN can determine that the terminal device selects the candidate cell 1 according to the message, and the MN forwards the SN reconfiguration completion message to the candidate SN1 where the candidate cell 1 is located.
  • step 655 may be executed first, and then step 660 and step 665; or, step 660 and step 665 may be executed first, and then step 655; or, step 655, step 660 and step 665 may be executed simultaneously.
  • the derivation of KSN1 in step 655 and the derivation of integrity protection or encryption and decryption keys based on KSN1 may be executed consecutively or separately. For example, the terminal device first derives KSN1, and then derives integrity protection or encryption and decryption keys based on KSN1 before or after executing the following step 670.
  • Step 667 MN derives KSN2 based on the updated SN Counter.
  • the MN may also derive a new key for all candidate SNs (e.g., candidate SN1, candidate SN2) or all candidate cells (e.g., candidate cell 1 to candidate cell 6) after each execution of CPA or CPC, and the new key is used for the next triggered CPC process.
  • candidate SNs e.g., candidate SN1, candidate SN2
  • candidate cells e.g., candidate cell 1 to candidate cell 6
  • the MN may update the SN Counter1 included in the CPAC configuration according to the SN Counter update rule to obtain SN Counter2, and use SN Counter2 to derive KSN2.
  • 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 added or changed for the conditional cell.
  • the terminal device may obtain SN Counter2 based on SN Counter1 + N based on the SN Counter update rule, and derive KSN2 based on SN Counter2.
  • Step 668 MN sends the KSN2 to candidate SN1 and candidate SN2.
  • the MN may send the KSN2 derived in step 667 for use in the next triggered CPC process to all candidate cells or candidate SNs to which all candidate cells belong.
  • the MN after executing a CPA or CPC, the MN can send the key KSN2 used in the next triggered CPC process to all candidate SNs in advance, so that the candidate SN can obtain the key KSN2 in advance during the next CPC process, without having to communicate securely with the terminal device only after receiving the reconfiguration completion message from the MN.
  • Step 670 The terminal device performs synchronization with the candidate SN1.
  • the terminal device may perform synchronization with the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate SN1 may also derive a user plane key for encrypting data or protecting data integrity between the terminal device and the candidate SN1 based on the received KSN1, and may also derive a control plane key for encrypting signaling or protecting data integrity between the terminal device and the candidate SN1 based on KSN1.
  • SN1 may derive the above-mentioned user plane or control plane key after receiving KSN1 from the MN, or before or after the next step 670, or when executing step 670.
  • Step 667 and step 668 can be executed first, and then step 670; or step 670 can be executed first, and then step 667 and step 668; or step 667, step 668 and step 670 can be executed simultaneously.
  • Step 673 The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • the terminal device After completing the first CPA or CPC, the terminal device does not release the CPAC configuration. In order to support subsequent CPC processes, the terminal device retains the CPAC configuration and continues to evaluate candidate cells that meet the execution conditions based on the configuration.
  • Step 675 The terminal device derives KSN2 based on the updated SN Counter.
  • the terminal device can update the SN Counter based on the last used SN Counter, and use the updated SN Counter to derive a new KSN.
  • the terminal device can update the SN Counter included in the CPAC configuration according to the SN Counter update rule to obtain SN Counter2.
  • the terminal device can also update the SN Counter based on the last used SN Counter of the cell in the cell set where the candidate cell that meets the execution conditions is located, and use the updated SN Counter to derive a new KSN. The new SN Counter derives a new KSN.
  • the terminal device can update the SN Counter last used by the cells in cell set 1 included in the CPAC configuration according to the SN Counter update rule to obtain SN Counter2.
  • the terminal device can also update the SN Counter based on the SN Counter last used by the cell that is configured with the same SN Counter as the candidate cell that meets the execution conditions, and derive a new KSN using the updated SN Counter.
  • the terminal device can update the SN Counter last used by the candidate cell 10 included in the CPAC configuration according to the SN Counter update rule to obtain SN Counter2.
  • SN Counter is updated to SN Counter + N, where N is a positive integer greater than or equal to 1.
  • the terminal device can update the SN Counter based on the SN Counter update rule, for example, SN Counter is updated to SN Counter + 1, and SN Counter 1 + 1 is added to obtain SN Counter 2.
  • the terminal device can also use SN Counter 2 to derive KSN 2.
  • the terminal device can save KSN2, and can also derive a user plane key for encrypting or protecting data integrity between the candidate cell 5 based on KSN2, and can also derive a control plane key for encrypting or protecting data integrity between the signaling between the candidate cell 5 and the candidate cell 5 based on KSN2.
  • SN Counter1 may correspond to the second parameter value mentioned above
  • SN Counter2 may correspond to the first parameter value mentioned above
  • KSN2 may correspond to the first key mentioned above.
  • the above-mentioned user plane key and/or control plane key may correspond to the third key mentioned above.
  • the terminal device does not necessarily update the SN Counter and derive the KSN and subsequent keys immediately after evaluating the candidate cell that meets the execution conditions.
  • the terminal device may update the SN Counter and derive the KSN before or at the same time as accessing the candidate cell that meets the conditions.
  • Step 680 The terminal device sends an RRC reconfiguration complete message 3 to the MN, and the RRC reconfiguration complete message 3 includes a reconfiguration complete message sent to the candidate SN2.
  • the terminal device detects that the candidate cell 5 meets the execution condition, and the terminal device can send an RRC reconfiguration complete message 3 to the MN.
  • the RRC reconfiguration complete message 3 may include an SN reconfiguration complete message sent to the candidate SN2 (the candidate SN where the candidate cell 5 is located).
  • the RRC reconfiguration complete message 3 may indicate that the terminal device selects the candidate cell 5.
  • RRC reconfiguration complete message 3 may correspond to the first message mentioned above.
  • the RRC reconfiguration completion message 3 may also include SN Counter 2.
  • step 675 should be executed first and then step 680 in the embodiment of the present application.
  • step 675 may be executed first, and then step 680; or, step 680 may be executed first, and then step 675; or, step 675 and step 680 may be executed simultaneously.
  • Step 685 The MN forwards the SN reconfiguration completion message to the candidate SN2.
  • the MN after receiving the RRC reconfiguration completion message 3 sent by the terminal device, the MN can select the candidate cell as candidate cell 5 according to the candidate cell selected by the terminal device indicated in the message, and forward the SN reconfiguration completion message to the candidate SN2 to which the candidate cell 5 belongs.
  • MN can obtain SN Counter2 and calculate KSN2 based on KgNB and SN Counter2. It should be understood that there are many ways for MN to obtain SN Counter2, and the embodiments of the present application do not specifically limit this.
  • MN obtains SN Counter2 from the reconfiguration completion message 3 sent by the terminal device.
  • MN can update SN Counter1 to obtain SN Counter2 based on the SN Counter update rule of SN Counter + N, and SN Counter2 is SN Counter1 + N.
  • the MN may also forward the SN reconfiguration completion message to the candidate SN2 to which the candidate cell 5 belongs, including KSN2.
  • the MN may send the SN reconfiguration completion message of SN2 and KSN2 to the candidate cell 5.
  • Step 687 MN derives KSN3 based on the updated SN Counter.
  • the MN may also update SN Counter2 according to the SN Counter update rule to obtain SN Counter3, and use SN Counter3 to derive KSN3.
  • the SN Counter update rule is that 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 added or changed to the conditional cell.
  • the terminal device may obtain SN Counter3 based on SN Counter2+N based on the SN Counter update rule, and derive KSN3 based on SN Counter3.
  • Step 688 MN sends the KSN3 to candidate SN1 and candidate SN2.
  • the MN may send the KSN3 derived in step 687 for use in the CPC process triggered next time to all candidate cells or candidate SNs to which all candidate cells belong.
  • the MN after executing a CPA or CPC, the MN can send the key KSN3 used in the next triggered CPC process to all candidate SNs in advance, so that the candidate SN can obtain the key KSN3 in advance during the next CPC process, without having to communicate securely with the terminal device only after receiving the reconfiguration completion message from the MN.
  • Step 690 The terminal device performs synchronization with the candidate SN2.
  • the terminal device may perform synchronization with the candidate SN2 where the candidate cell 5 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate SN2 may also derive a user plane key for encrypting data or protecting data integrity between the terminal device and the candidate SN2 based on the received KSN2, and may also derive a control plane key for encrypting signaling or protecting data integrity between the terminal device and the candidate SN2 based on KSN2.
  • SN2 may derive the above-mentioned user plane or control plane key after receiving KSN2 from the MN, after step 690, or when executing step 690.
  • Step 687 and step 688 may be executed first, and then step 690; or step 690 may be executed first, and then step 687 and step 688; or step 687, step 688 and step 690 may be executed simultaneously.
  • Step 692 The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • the terminal device After completing CPC, the terminal device does not release the CPAC configuration. To support subsequent CPC processes, the terminal device retains the CPAC configuration and continues to evaluate candidate cells that meet the execution conditions based on the configuration. The terminal device can update or release the CPAC configuration based on a timer or number of CPA or CPC executions or based on an indication from a network device.
  • Step 694 The terminal device derives KSN3 based on the updated SN Counter.
  • step 675 Similar to step 675, for ease of description, only one implementation method is introduced below. For the remaining implementation methods, please refer to the description in step 675 and will not be repeated here.
  • the terminal device can update SN Counter based on the SN Counter used last time, and use the updated SN Counter to derive a new KSN.
  • the terminal device can update SN Counter 2 according to the SN Counter update rule to obtain SN Counter 3.
  • the terminal device can obtain SN Counter 3 based on SN Counter 2 + N based on the SN Counter update rule.
  • the terminal device can also use SN Counter 3 to derive KSN 3.
  • the terminal device can save KSN3, and can also derive a user plane key for encrypting data or protecting data integrity between the candidate cell 1 based on KSN3, and can also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 1 based on KSN3.
  • SN Counter2 may correspond to the second parameter value mentioned above, that is, the parameter value used by the terminal device last time.
  • SN Counter3 may correspond to the first parameter value mentioned above, and KSN3 may correspond to the first key mentioned above.
  • the above-mentioned user plane key and/or control plane key may correspond to the third key mentioned above.
  • Step 695 The terminal device sends an RRC reconfiguration complete message 4 to the MN, and the RRC reconfiguration complete message 4 includes a reconfiguration complete message sent to the candidate SN1.
  • the terminal device may send an RRC reconfiguration completion message 4 to the MN.
  • the RRC reconfiguration completion message 4 includes an SN reconfiguration completion message sent to the candidate SN1 (the candidate SN where the candidate cell 1 is located).
  • the RRC reconfiguration completion message 4 may indicate that the terminal device has selected the candidate cell 1.
  • RRC reconfiguration complete message 4 may correspond to the first message mentioned above.
  • the RRC reconfiguration completion message 4 may also include SN Counter 3.
  • step 675 should be executed first and then step 680 in the embodiment of the present application.
  • step 694 may be executed first, and then step 695; or, step 695 may be executed first, and then step 694; or, step 694 and step 695 may be executed simultaneously.
  • Step 696 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • the MN after receiving the RRC reconfiguration completion message 4 sent by the terminal device, the MN can indicate The candidate cell selected by the terminal device is candidate cell 1, and the SN reconfiguration completion message is forwarded to candidate SN1 to which candidate cell 1 belongs.
  • MN can obtain SN Counter3 and calculate KSN3 based on KgNB and SN Counter3. It should be understood that there are many ways for MN to obtain SN Counter3, and the embodiments of the present application do not specifically limit this. In one possible implementation, MN obtains SN Counter3 from the reconfiguration completion message 4 sent by the terminal device. In another possible implementation, MN can update SN Counter2 to obtain SN Counter3 based on the SN Counter update rule of SN Counter+N, and SN Counter3 is SN Counter2+N.
  • the SN reconfiguration completion message forwarded by the MN to the candidate SN1 to which the candidate cell 1 belongs may also include KSN3.
  • Step 697 MN derives KSN4 based on the updated SN Counter.
  • the MN may also update SN Counter3 according to the SN Counter update rule to obtain SN Counter4, and use SN Counter4 to derive KSN4.
  • 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 added or changed for the conditional cell.
  • the terminal device may obtain SN Counter4 based on the SN Counter update rule by performing SN Counter3 + N, and derive KSN4 based on SN Counter4.
  • Step 698 MN sends the KSN4 to candidate SN1 and candidate SN2.
  • MN After executing a CPA or CPC, MN can send the key KSN4 used in the next triggered CPC process to all candidate SNs in advance, so that the candidate SN can obtain the key KSN4 in advance during the next CPC process, without having to communicate securely with the terminal device only after receiving the reconfiguration completion message from MN.
  • Step 699 The terminal device performs synchronization with the candidate SN1.
  • the terminal device may perform synchronization with the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate SN1 may also derive a user plane key for encrypting data or protecting data integrity between the terminal device and the candidate SN1 based on the received KSN3, and may also derive a control plane key for encrypting signaling or protecting data integrity between the terminal device and the candidate SN1 based on KSN3.
  • SN1 may derive the above-mentioned user plane or control plane key after receiving KSN3 from the MN, after step 699, or when executing step 699.
  • Step 697 and step 698 may be executed first, and then step 699; or step 699 may be executed first, and then step 697 and step 698; or step 697, step 698 and step 699 may be executed simultaneously.
  • the terminal device maintains the SN Counter in the subsequent CPAC process and performs the SN Counter update synchronously with the MN.
  • Fig. 7 is a schematic flow chart of another communication method provided by an embodiment of the present application. As shown in Fig. 7, the method may include steps 710-795, and steps 710-795 are described in detail below.
  • Step 710 The terminal device establishes an RRC connection with the MN.
  • Step 715 The terminal device establishes an RRC connection with the source SN.
  • step 715 is optional.
  • Step 720 The MN sends an SN adding request message to the candidate SN1.
  • the number of SN add request messages sent by the MN to the candidate SN is the same as the number of candidate cells included under the candidate SN. That is, the number of SN add request messages sent by the MN to the candidate SN1 is the same as the number of candidate cells included under the candidate SN1.
  • Each SN add request message may include the KSN corresponding to the corresponding candidate cell.
  • the KSN is calculated by the MN based on the SN Counter (which may be called the starting SN Counter) corresponding to each candidate cell.
  • the input for the MN to derive the KSN also includes a master key.
  • the SN add request message sent by the MN to the candidate SN includes multiple KSNs, corresponding to multiple candidate cells under the candidate SN. That is, the number of candidate cells included in the candidate SN1, and the number of candidate cells included in the SN add request sent by the MN to the SN.
  • the number of KSNs is calculated by the MN according to the SN Counter (which may be called the starting SN Counter) corresponding to each candidate cell.
  • the input for MN to derive the KSN also includes the master key.
  • KSN1 corresponding to candidate cell 1 can be calculated by MN according to the SN Counter corresponding to candidate cell 1;
  • KSN2 corresponding to candidate cell 2 can be calculated by MN according to the SN Counter corresponding to candidate cell 2;
  • KSN5 corresponding to candidate cell 5 can be calculated by MN according to the SN Counter corresponding to candidate cell 5, and so on.
  • the SN add request message sent by the MN to the candidate SN includes a KSN corresponding to one or more candidate cells under the candidate SN. That is, the KSNs corresponding to multiple candidate cells under SN1 are consistent.
  • the KSN is calculated by the MN based on the SN Counter (which can be called the starting SN Counter) corresponding to the candidate SN.
  • the input for the MN to derive the KSN also includes a master key.
  • KSN1 corresponding to candidate SN1 can be calculated by MN according to the SN Counter corresponding to candidate SN1, and is applicable to one or more candidate cells under candidate SN1;
  • KSN2 corresponding to candidate SN2 can be calculated by MN according to the SN Counter corresponding to candidate SN2, and is applicable to one or more candidate cells under candidate SN2, and so on.
  • the SN Counter corresponding to candidate cell 1 corresponds to the third parameter value in the above text
  • the SN Counter corresponding to candidate SN1 to which candidate cell 1 belongs corresponds to the third parameter value in the above text.
  • the embodiment of the present application does not specifically limit the starting SN Counter corresponding to each candidate cell or each candidate SN. Two possible implementation methods are listed below.
  • the starting SN Counter corresponding to each candidate cell can be the starting value (SN Counter#x) of the SN Counter of each candidate cell.
  • the starting value of the SN Counter of candidate cell 1 is SN Counter#1.
  • the starting value of the SN Counter of candidate cell 2 is SN Counter#2.
  • the starting value of the SN Counter of candidate cell 3 is SN Counter#3, etc.
  • the MN can calculate the starting KSN corresponding to each candidate cell based on the starting value (SN Counter#x) of the SN Counter corresponding to each candidate cell under candidate SN1 based on the above method.
  • the starting SN Counter corresponding to each candidate cell can be the first SN Counter in the SN Counter value set of each candidate cell.
  • the value set of the available SN Counters for candidate cell 1 is 1 to 10, and the first SN Counter in the value set is 1.
  • the value set of the available SN Counters for candidate cell 2 is 11 to 20, and the first SN Counter in the value set is 11.
  • the MN can calculate the starting KSN corresponding to each candidate cell based on the first SN Counter in the SN Counter value set corresponding to each candidate cell under candidate SN1 based on the above method.
  • the starting SN Counter corresponding to each candidate SN may be the starting value (SN Counter#y) of the SN Counter of each candidate SN.
  • the starting value of the SN Counter of candidate SN1 is SN Counter#1.
  • the starting value of the SN Counter of candidate SN2 is SN Counter#2.
  • the starting value of the SN Counter of candidate SN3 is SN Counter#3, etc.
  • the MN may calculate the starting KSN of candidate SN1 based on the starting value (SN Counter#x) of the SN Counter corresponding to candidate SN1 based on the above method.
  • the starting SN Counter corresponding to each candidate SN can be the first SN Counter in the SN Counter value set of each candidate SN.
  • the value set of the available SN Counters for candidate SN1 is 1 to 10, and the first SN Counter in the value set is 1.
  • the value set of the available SN Counters for candidate SN2 is 11 to 20, and the first SN Counter in the value set is 11.
  • the MN can calculate the starting KSN corresponding to candidate SN1 based on the first SN Counter in the SN Counter value set corresponding to candidate SN1 based on the above method.
  • Step 725 Candidate SN1 sends an SN adding request confirmation message to MN.
  • Step 730 The MN sends an SN adding request message to the candidate SN2.
  • the SN add request message sent by the MN to the candidate SN2 includes the KSN corresponding to each candidate cell under the candidate SN2.
  • the KSN is calculated by the MN according to the starting SN Counter corresponding to each candidate cell included in the candidate SN2.
  • the specific process please refer to the description in step 720, which will not be repeated here.
  • the SN add request message sent by the MN to the candidate SN2 includes the KSN corresponding to the candidate SN2.
  • the KSN is calculated by the MN according to the starting SN Counter corresponding to the candidate SN2.
  • the specific process please refer to the description in step 720, which will not be repeated here.
  • Step 735 Candidate SN2 sends an SN adding request confirmation message to MN.
  • Step 740 The MN sends an RRC reconfiguration message to the terminal device.
  • 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 and the corresponding execution conditions, as well as the SN Counter corresponding to each candidate cell.
  • the SN Counter corresponding to each candidate cell is the starting value SN Counter#x of the SN Counter of each candidate cell.
  • M can also be indicated in the CPAC configuration, where M is a positive integer (for example, M is a positive integer greater than or equal to the number of candidate cells).
  • the SN Counter corresponding to each candidate cell is the starting value SN Counter#x of each candidate cell.
  • the CPAC configuration may also include the number of available SN Counters P for each candidate cell. In other words, the value range of the available SN Counter for each candidate cell is SN Counter#x to SN Counter#x+P.
  • the SN Counter corresponding to each candidate cell is a value set of the SN Counter available for each candidate cell.
  • the value set 1 of the SN Counter available for candidate cell 1 is 1 to 10
  • the value set 2 of the SN Counter available for candidate cell 2 is 11 to 20
  • the value set 3 of the SN Counter available for candidate cell 3 is 21 to 30, and so on.
  • 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 and the corresponding execution conditions, and the SN Counter corresponding to each candidate cell.
  • the SN Counters corresponding to multiple candidate cells belonging to the same SN are the same. That is, 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 and the corresponding execution conditions, and the SN Counter corresponding to each candidate SN.
  • the SN Counter corresponding to each candidate SN is the starting value SN Counter#y of each candidate SN.
  • Q can also be indicated in the CPAC configuration, where Q is a positive integer (for example, Q is a positive integer greater than or equal to the number of candidate SNs).
  • the SN Counter corresponding to each candidate SN is the starting value SN Counter#x of each candidate SN
  • the CPAC configuration may also include the number of available SN Counters of each candidate SN, R. That is, the value range of the SN Counter available for each candidate SN is SN Counter#y to SN Counter#y+R.
  • the SN Counter corresponding to each candidate SN is a value set of the SN Counter available for each candidate SN.
  • the value set 1 of the SN Counter available for candidate SN1 is 1 to 10
  • the value set 2 of the SN Counter available for candidate SN2 is 11 to 20
  • the value set 3 of the SN Counter available for candidate SN3 is 21 to 30, and so on.
  • Step 745 The terminal device replies to the MN with an RRC reconfiguration completion message.
  • Step 750 The terminal device evaluates whether the candidate PSCell included in the CPAC configuration meets the execution condition.
  • Step 755 The terminal device sends an RRC reconfiguration completion message to the MN, where the RRC reconfiguration completion message includes an SN reconfiguration completion message sent to the candidate SNs that meet the execution conditions.
  • the terminal device can send an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes an SN reconfiguration completion message sent to candidate SN1 (the candidate SN where candidate cell 1 is located).
  • the RRC reconfiguration completion message can indicate that the terminal device selects candidate cell 1.
  • Step 758 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • Step 760 The terminal device determines KSN-1 based on the SN Counter included in the CPAC configuration.
  • the terminal device evaluates a candidate cell that meets the conditions, or the terminal device accesses a candidate cell that meets the conditions, the terminal device updates the SN Counter corresponding to the candidate cell or the candidate SN to which the candidate cell belongs, and uses the updated SN Counter to determine the KSN.
  • the terminal device detects that the candidate cell that meets the execution conditions is candidate cell 1, it can use the SN Counter corresponding to the candidate cell 1 or the SN to which the candidate cell 1 belongs to derive KSN-1.
  • Example 1 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to the starting SN Counter corresponding to the candidate cell, or the terminal device updates the SN Counter according to the SN Counter last used in the candidate cell, or the terminal device updates the SN Counter based on the SN Counter last used in the cell set where the candidate cell that meets the execution conditions is located, or the terminal device updates the SN Counter based on the SN Counter last used in the cell that meets the execution conditions is configured with the same SN Counter as the candidate cell that meets the execution conditions, and uses the updated SN Counter to determine the KSN.
  • SN Counter#x is the starting value of the SN Counter corresponding to each candidate cell
  • n is related to the number of times the KSN is derived for the candidate cell
  • n is related to the number of times the terminal device accesses the candidate cell (for example, n is the number of times the KSN is derived for the candidate cell-1 or n is the number of times the terminal device accesses the candidate cell-1, and n is greater than or equal to 1.
  • M is a positive integer (for example, M is an integer greater than or equal to the number of candidate cells).
  • the CPAC configuration includes the 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 used last time in the candidate cell.
  • the SN Counter used by the terminal device for the first access to the candidate cell is the starting value of the SN Counter of the candidate cell.
  • the SN Counter used is the starting SN Counter#1.
  • the terminal device can use SN Counter#1 to calculate KSN-1.
  • M can be network configured or predefined.
  • Example 2 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to 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 according to the SN Counter last used at the candidate SN, and uses the updated SN Counter to determine the KSN.
  • the terminal device determines the starting SN Counter corresponding to the candidate cell 1 as SN Counter#1 according to the above update rule.
  • the CPAC configuration includes the starting value of the SN Counter corresponding to the candidate cell x (SN Counter#x) and (optionally) the number of available SN Counters P for each candidate cell.
  • the SN Counter used by the terminal device when it first accesses the candidate cell is the starting value of the SN Counter of the candidate cell.
  • the number of times the terminal device accesses a candidate cell is limited, that is, it accesses at most P times.
  • the P value corresponding to each candidate cell can be the same or different.
  • the terminal device can release the configuration of the candidate cell or release the CPAC configuration.
  • the SN Counter used is the starting SN Counter #1.
  • the terminal device can calculate KSN-1 using SN Counter #1.
  • P can be network configured or predefined.
  • Example 3 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to the multiple 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 determine the KSN.
  • the CPAC configuration includes an SN Counter value set x corresponding to the 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 obtain the corresponding SN Counter from the SN Counter value set according to the number of times the terminal device accesses the candidate cell.
  • the terminal device 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 the SN Counter value set 1 corresponding to the candidate cell 1.
  • the terminal device can use the first SN Counter in the SN Counter value set to calculate KSN-1.
  • Example 4 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to the starting SN Counter corresponding to the candidate SN to which the candidate cell belongs, or the terminal device updates the SN Counter according to the SN Counter last used on the candidate SN, and uses the updated SN Counter to determine the KSN.
  • SN Counter#y is the starting value of the SN Counter corresponding to each candidate SN
  • n is related to the number of times the KSN is derived for the candidate SN
  • n is related to the number of times the terminal device accesses the candidate SN (for example, the number of times the KSN is derived for the candidate SN or n is the number of times the terminal device accesses the candidate SN, and n is an integer greater than or equal to 0)
  • Q is a positive integer (for example, Q is an integer greater than or equal to the number of candidate SNs).
  • the CPAC configuration includes the starting value of the SN Counter (SN Counter#y) corresponding to the candidate SNy, 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 used last time at the SN to which the candidate cell belongs.
  • the SN Counter used by the terminal device when it first accesses the candidate SN is the starting value of the SN Counter of the candidate SN.
  • the SN Counter used is the starting SN Counter#1 corresponding to the candidate SN1.
  • the terminal device can use SN Counter#1 to calculate KSN-1.
  • Q can be network-configured or predefined.
  • Example 5 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to 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 according to the SN Counter last used at the candidate SN, and uses the updated SN Counter to determine the KSN.
  • the terminal device determines that the starting SN Counter corresponding to SN1 to which the candidate cell 1 belongs is SN Counter#1 according to the above update rule.
  • the CPAC configuration includes the starting value of the SN Counter corresponding to the candidate SNy (SN Counter#y) and (optionally) the number of available SN Counters R for each candidate cell.
  • the SN Counter used by the terminal device when it first accesses the candidate SN is the starting value of the SN Counter of the candidate SN.
  • the number of times the terminal device accesses a candidate SN is limited, that is, it accesses at most R times.
  • the R value corresponding to each candidate cell can be the same or different.
  • the terminal device can release the configuration of the candidate cell under the candidate SN or release the CPAC configuration.
  • the SN Counter used is the starting SN Counter#1.
  • the terminal device can use SN Counter#1 to calculate KSN-1.
  • R can be network-configured or predefined.
  • Example 6 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to the multiple SN Counters corresponding to the SN to which the candidate cell belongs and (optionally) the number of times the candidate SN is accessed, and uses the updated SN Counter to determine the KSN.
  • the CPAC configuration includes an SN Counter value set y corresponding to the candidate SNy, and the SN Counter value set y includes multiple available SN Counters corresponding to the candidate SNy.
  • the SN Counter of the selected candidate cell is updated to obtain the corresponding SN Counter from the SN Counter value set according to the number of times the terminal device accesses the candidate SN.
  • the terminal device since the terminal device accesses the candidate SN1 to the candidate cell 1 for the first time, the terminal device updates the SN Counter to the first SN Counter in the SN Counter value set 1 corresponding to the candidate SN1.
  • the terminal device can use the first SN Counter in the SN Counter value set to calculate KSN-1.
  • Example 7 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to multiple SN Counters associated with the cell set to which the candidate cell belongs, and uses the updated SN Counter to determine the KSN.
  • the CPAC configuration includes a value set z for the SN Counter value set associated with the cell set to which the candidate SNz belongs, and the value set z of the SN Counter includes multiple available SN Counters.
  • an SN Counter may be randomly selected from the value set z of the SN Counter, and KSN-1 may be calculated based on the selected SN Counter.
  • SN Counters may be selected in order from large to small, or from small to large, and KSN-1 may be calculated based on the selected SN Counter.
  • the SN Counter of the selected candidate cell is updated by obtaining the corresponding SN Counter from the value set z of the SN Counter according to the number of times the terminal device accesses the candidate SN.
  • the terminal device 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 can calculate KSN-1 using the first SN Counter in the SN Counter value set z.
  • the terminal device can save KSN-1, and can also derive a user plane key for encrypting or protecting data integrity between the candidate cell 1 based on KSN-1, and can also derive a control plane key for encrypting or protecting data integrity between the signaling between the candidate cell 1 and the candidate cell 1 based on KSN-1.
  • Step 763 MN derives the KSN used in the next triggered CPC process based on the updated SN Counter.
  • the MN may also derive a new key for all candidate SNs (e.g., candidate SN1, candidate SN2) or all candidate cells (e.g., candidate cell 1 to candidate cell 9) after each execution of CPA or CPC, and the new key is used for the next triggered CPC process.
  • candidate SNs e.g., candidate SN1, candidate SN2
  • candidate cells e.g., candidate cell 1 to candidate cell 9
  • each candidate cell corresponds to an SN Counter.
  • the MN can update the starting SN Counter corresponding to each candidate cell, obtain the updated SN Counter corresponding to each candidate cell, and derive the KSN corresponding to each candidate cell based on the updated SN Counter corresponding to each candidate cell.
  • the candidate cell can use the KSN corresponding to the candidate cell to communicate securely with the terminal device. For example, taking candidate cell 1 as an example, the starting SN Counter of candidate cell 1 is updated, and the updated SN Counter of candidate cell 1 is used to derive the KSN (for example, KSN-1-1) used by candidate cell 1 in the next CPC process.
  • the starting SN Counter of candidate cell 5 is updated, and the updated SN Counter of candidate cell 5 is used to derive the KSN (for example, KSN-5-1) used by candidate cell 5 in the next CPC process.
  • KSN for example, KSN-5-1
  • each candidate SN corresponds to an SN Counter.
  • the MN can update the SN Counter corresponding to each candidate SN, obtain the updated SN Counter corresponding to each candidate SN, and derive the KSN corresponding to each candidate SN based on the updated SN Counter corresponding to each candidate SN. If the terminal device accesses one of the candidate cells during the next CPC process, the candidate cell can use the KSN corresponding to the SN to which the candidate cell belongs to communicate securely with the terminal device. Please refer to the description in step 760 for the specific process, which will not be described in detail here.
  • Step 764 The MN sends the corresponding KSN to the candidate cell or the candidate SN to which the candidate cell belongs.
  • the MN may send the KSN derived in step 763 for use in the next triggered CPC process to all candidate cells or candidate SNs to which all candidate cells belong.
  • MN after executing a CPA or CPC, MN can send the key KSN used in the next triggered CPC process to all candidate cells or candidate SNs belonging to the candidate cells in advance, so that the candidate cells or candidate SNs belonging to the candidate cells can obtain the key KSN in advance during the next CPC process, without having to communicate securely with the terminal device only after receiving the reconfiguration completion message from MN.
  • Step 765 The terminal device performs synchronization with the candidate SN1.
  • the terminal device may perform synchronization with the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate cell 1 may also derive a user plane key for encrypting data or protecting data integrity between the candidate cell 1 and the terminal device based on the received KSN-1, and may also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 1 and the terminal device based on the KSN-1.
  • step 755, step 758, step 760 and step 765 The terminal device may first execute step 755 and step 758, then execute step 760, and then execute step 765; or, it may first execute step 760, then execute step 755 and step 758, and then execute step 765; or, it may also execute step 755, step 758, step 760 and step 765 at the same time.
  • Step 763 and step 764 can be executed first, and then step 765; or step 765 can be executed first, and then step 763 and step 764; or step 763, step 764 and step 765 can be executed simultaneously.
  • Step 770 The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 775 The terminal device determines KSN-5 based on the SN Counter included in the CPAC configuration.
  • the terminal device evaluates another candidate cell that meets the conditions, or the terminal device subsequently accesses a candidate cell that meets the conditions, the terminal device updates the SN Counter corresponding to the candidate cell or the candidate SN to which the candidate cell belongs, and uses the updated SN Counter to determine the KSN.
  • the terminal device detects that the candidate cell that meets the execution conditions is candidate cell 5
  • the terminal device can use the starting SN Counter corresponding to the candidate cell 5 or the SN to which the candidate cell 5 belongs to determine KSN-5.
  • Example 1 If the terminal device evaluates a candidate cell that meets the conditions, or the terminal device accesses a candidate cell that meets the conditions, the terminal device updates the SN Counter according to the starting SN Counter corresponding to the candidate cell, or the terminal device updates the SN Counter according to the SN Counter last used in the candidate cell, and uses the updated SN Counter to determine the KSN.
  • the CPAC configuration includes the 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#5+n*M.
  • the CPAC configuration includes the 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 updated based on the number of times the KSN is derived for the candidate cell 5.
  • the SN Counter used is the starting SN Counter #5. The terminal device can use SN Counter #5 to calculate KSN-5.
  • Example 2 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to 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 according to the SN Counter last used on the candidate SN, and uses the updated SN Counter to determine the KSN.
  • the number of times the terminal device accesses the candidate cell 5 is limited, that is, a maximum of P times.
  • the P value corresponding to each candidate cell can be the same or different.
  • the terminal device can release the configuration of the candidate cell or release the CPAC configuration.
  • the SN Counter used is the starting SN Counter#5.
  • the terminal device can use SN Counter#5 to calculate KSN-5.
  • Example 3 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to the multiple 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 determine the KSN.
  • the CPAC configuration includes SN Counter value set 5 corresponding to candidate cell 5, and value set 5 includes multiple available SN Counters corresponding to candidate cell 5.
  • the starting SN Counter corresponding to candidate cell 5 determined by the terminal device according to the above SN Counter update rule is the first SN Counter in the SN Counter value set 5 of candidate cell 5.
  • the terminal device can use the first SN Counter to calculate KSN-5.
  • Example 4 If the terminal device evaluates a candidate cell that meets the conditions, or the terminal device accesses a candidate cell that meets the conditions, the terminal device updates the SN Counter according to the starting SN Counter corresponding to the candidate SN to which the candidate cell belongs, or the terminal device updates the SN Counter according to the SN Counter last used on the candidate SN, and uses the updated SN Counter to determine the KSN.
  • the CPAC configuration includes the starting value (SN Counter#2) of the SN Counter corresponding to SN2 to which candidate cell 5 belongs, and the SN Counter of the candidate SN to which candidate cell 5 belongs is updated to SN Counter#2+n*Q.
  • the CPAC configuration includes the starting value of the SN Counter corresponding to SN2 to which candidate cell 5 belongs (SN Counter#2), and the SN Counter of SN2 to which candidate cell 5 belongs is updated to SN Counter+Q.
  • the SN Counter is obtained based on the SN Counter+Q used last time in the candidate SN to which the candidate cell belongs.
  • the SN Counter used by the terminal device when it first accesses the candidate SN is the starting value of the SN Counter of the candidate SN.
  • the SN Counter used is SN Counter#2.
  • the terminal device can use SN Counter2 to calculate KSN-5.
  • Example 5 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to 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 according to the SN Counter last used on the candidate SN, and uses the updated SN Counter to determine the KSN.
  • the CPAC configuration includes the starting value (SN Counter#5) of the SN Counter corresponding to SN2 to which the candidate cell 5 belongs and (optionally) the number of available SN Counters P of the candidate cell 5.
  • the number of times the terminal device accesses SN2 is limited, that is, a maximum of P times.
  • the P value corresponding to each candidate SN can be the same or different.
  • the terminal device can release the configuration of the candidate cell under the SN or release the CPAC configuration.
  • the SN Counter used is SN Counter#2.
  • the terminal device can use SN Counter#2 to calculate KSN-5.
  • Example 6 If the terminal device evaluates a candidate cell that meets the execution conditions, or accesses a candidate cell that meets the execution conditions, the terminal device updates the SN Counter according to the multiple SN Counters corresponding to the SN to which the candidate cell belongs and (optionally) the number of times the candidate cell is accessed, and uses the updated SN Counter to determine the KSN.
  • the CPAC configuration includes SN Counter value set 2 corresponding to SN2 to which candidate cell 5 belongs, and value set 2 includes multiple available SN Counters corresponding to SN2 to which candidate cell 5 belongs.
  • the terminal device since the terminal device accesses SN2 to which candidate cell 5 belongs for the first time, the SN Counter corresponding to SN2 to which candidate cell 5 belongs, determined by the terminal device according to the above SN Counter update rule, is the first SN Counter in SN Counter value set 2 of candidate SN2.
  • the terminal device can use the first SN Counter to calculate KSN-5.
  • the terminal device can also derive a user plane key for encrypting or protecting data integrity between the terminal device and the candidate cell 5 based on KSN-5, and can also derive a control plane key for encrypting or protecting data integrity between the terminal device and the candidate cell 5 based on KSN-5.
  • Step 776 The terminal device sends an RRC reconfiguration complete message to the MN, and the RRC reconfiguration complete message includes a reconfiguration complete message sent to the candidate SN2.
  • the terminal device can send an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to candidate SN2 (the candidate SN where candidate cell 5 is located).
  • the RRC reconfiguration completion message can indicate that the terminal device selects candidate cell 5.
  • Step 777 The MN forwards the SN reconfiguration completion message to the candidate SN2.
  • step 775 does not specifically limit the execution order of step 775, step 777 and step 778.
  • Step 778 MN derives the KSN used in the next triggered CPC process based on the updated SN Counter.
  • each candidate cell corresponds to an SN Counter.
  • the SN Counter used by the terminal device when it last accessed candidate cell 1 is updated, and the updated SN Counter of candidate cell 1 is used to derive the KSN (for example, KSN-1-2) used by candidate cell 1 in the next CPC process.
  • the SN Counter used by the terminal device when it last accessed candidate cell 5 is updated, and the updated SN Counter of candidate cell 5 is used to derive the KSN (for example, KSN-5-2) used by candidate cell 5 in the next CPC process.
  • each candidate SN corresponds to an SN Counter.
  • the SN Counter used when the terminal device last accessed the candidate SN1 is updated, and the updated SN Counter of the candidate SN1 is used to derive the KSN used by the candidate SN1 in the next CPC process.
  • the SN Counter used when the terminal device last accessed the candidate SN2 is updated, and the updated SN Counter of the candidate SN2 is used to derive the KSN used by the candidate SN2 in the next CPC process.
  • Step 789 The MN sends the corresponding KSN to the candidate cell or the candidate SN to which the candidate cell belongs.
  • the MN may send the KSN derived in step 788 for use in the next triggered CPC process to all candidate cells or candidate SNs to which all candidate cells belong.
  • MN after executing a CPA or CPC, MN can send the key KSN used in the next triggered CPC process to all candidate cells or candidate SNs belonging to the candidate cells in advance, so that the candidate cells or candidate SNs belonging to the candidate cells can obtain the key KSN in advance during the next CPC process, without having to communicate securely with the terminal device only after receiving the reconfiguration completion message from MN.
  • Step 780 The terminal device performs synchronization with the candidate SN2.
  • the terminal device may perform synchronization to the candidate SN2 where the candidate cell 5 is located.
  • the synchronization process may be implemented through RACH.
  • Candidate cell 5 can also encrypt or complete the data between the terminal device and the candidate cell 5 based on the received KSN-5.
  • the user plane key for integrity protection can also be used to derive a control plane key for encrypting signaling or protecting data integrity between the terminal device based on KSN-5.
  • Step 778 and step 779 can be executed first, and then step 780; or step 780 can be executed first, and then step 778 and step 779; or step 778, step 779 and step 780 can be executed simultaneously.
  • Step 783 The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 788 The terminal device determines and saves KSN-1-1 based on the SN Counter included in the CPAC configuration.
  • the terminal device When the terminal device detects again that the candidate cell that meets the execution conditions is candidate cell 1, the terminal device can update the starting SN Counter corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs, obtain the updated SN Counter, and determine and save KSN-1-1 based on the updated SN Counter.
  • the CPAC configuration includes the starting value of the SN Counter corresponding to the candidate cell 1 (SN Counter#1), and the SN Counter corresponding to the candidate cell 1 is updated to SN Counter#x+n*M.
  • the CPAC configuration includes the starting value of the SN Counter corresponding to the candidate cell 1 (SN Counter#1), and the terminal device updates the SN Counter corresponding to the candidate cell 1 to the SN Counter+M used last in the candidate cell 1. Since the SN Counter used last by the terminal device in the candidate cell 1 is SN Counter#1, the terminal device updates the SN Counter of the candidate cell 1 to SN Counter#1+M. The terminal device can use SN Counter#1+1*M to calculate KSN-1-1.
  • the terminal device since the terminal device is accessing the candidate cell 1 for the second time, the terminal device updates the SN Counter corresponding to the candidate cell 1 according to the above update rule, and the updated SN Counter is SN Counter#1+1.
  • the SN Counter corresponding to the candidate cell 1 included in the CPAC configuration is the SN Counter starting value (SN Counter#1), and the terminal device updates the SN Counter corresponding to the candidate cell 1 to the SN Counter+1 used in the last candidate cell 1. Since the SN Counter used in the last access to the candidate cell 1 was SN Counter#1, the terminal device updates the SN Counter of the candidate cell 1 to SN Counter#1+1.
  • the terminal device can use SN Counter#1+1 to calculate KSN-1-1.
  • the CPAC configuration includes 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 according to the number of times the terminal device accesses the candidate cell 1.
  • the terminal device since the terminal device accesses the candidate cell 1 for the second time, the terminal device updates the starting SN Counter corresponding to the candidate cell 1 according to the above SN Counter update rule, and the updated SN Counter is the second SN Counter in the SN Counter value set corresponding to the candidate cell 1.
  • the terminal device can use the second SN Counter in the SN Counter value set to calculate KSN-1-1.
  • the CPAC configuration includes the starting value (SN Counter#1) of the SN Counter corresponding to SN1 to which candidate cell 1 belongs, and the SN Counter corresponding to SN1 to which candidate cell 1 belongs is updated to SN Counter#x+n*Q.
  • the CPAC configuration includes the starting value (SN Counter#1) of the SN Counter corresponding to SN1 to which candidate cell 1 belongs, and the terminal device updates the SN Counter corresponding to SN1 to which candidate cell 1 belongs to SN Counter+Q used last time in SN1. Since the last SN Counter used by the terminal device in SN1 to which candidate cell 1 belongs is SN Counter#1, the terminal device updates the SN Counter of SN1 to which candidate cell 1 belongs to SN Counter#1+Q. The terminal device can calculate KSN-1-1 using SN Counter#1+1*Q.
  • the terminal device since the terminal device accesses SN1 to which candidate cell 1 belongs for the second time, the terminal device updates the SN Counter corresponding to SN1 to which candidate cell 1 belongs according to the above-mentioned update rule, and the updated SN Counter is SN Counter#1+1.
  • the SN Counter corresponding to SN1 to which candidate cell 1 belongs included in the CPAC configuration The terminal device updates the SN Counter corresponding to SN1 of candidate cell 1 to SN Counter+1 used last time in SN1 of candidate cell 1. Since the SN Counter used last time to access SN1 of candidate cell 1 is SN Counter#1, the terminal device updates the SN Counter of SN1 of candidate cell 1 to SN Counter#1+1.
  • the terminal device can use SN Counter#1+1 to calculate KSN-1-1.
  • the CPAC configuration includes an SN Counter value set 1 corresponding to SN1 to which candidate cell 1 belongs, and the SN Counter value set 1 includes multiple available SN Counters corresponding to SN1 to which candidate cell 1 belongs.
  • the SN Counter update rule is to determine the corresponding SN Counter from the SN Counter value set according to the number of times the terminal device accesses SN1 to which candidate cell 1 belongs.
  • the terminal device since the terminal device accesses SN1 to which candidate cell 1 belongs for the second time, the terminal device updates the starting SN Counter corresponding to SN1 to which candidate cell 1 belongs according to the above SN Counter update rule, and the updated SN Counter is the second SN Counter in the SN Counter value set corresponding to SN1 to which candidate cell 1 belongs.
  • the terminal device can use the second SN Counter in the SN Counter value set to calculate KSN-1-1.
  • the terminal device can also derive a user plane key for encrypting or protecting data integrity between the candidate cell 1 based on KSN-1-1, and can also derive a control plane key for encrypting or protecting data integrity between the signaling between the candidate cell 1 based on KSN-1-1.
  • Step 789 The terminal device sends an RRC reconfiguration complete message to the MN, and the RRC reconfiguration complete message includes a reconfiguration complete message sent to the candidate SN1.
  • the terminal device can send an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to candidate SN1 (the candidate SN where candidate cell 1 is located).
  • the RRC reconfiguration completion message can indicate that the candidate cell selected by the terminal device is candidate cell 1.
  • the above-mentioned RRC reconfiguration completion message may also include the above-mentioned selected candidate cell or the updated SN Counter corresponding to the SN to which the selected candidate cell belongs.
  • step 788 should be executed first and then step 789 in the embodiment of the present application.
  • step 788 may be executed first, and then step 789; or, step 789 may be executed first, and then step 788; or, step 788 and step 789 may be executed simultaneously.
  • Step 790 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • the MN after receiving the RRC reconfiguration completion message sent by the terminal device, the MN can select the candidate cell as candidate cell 1 according to the candidate cell selected by the terminal device indicated in the message, and forward the SN reconfiguration completion message to the candidate SN1 where the candidate cell 1 is located.
  • the SN reconfiguration completion message forwarded by the MN to the candidate SN1 to which the candidate cell 1 belongs may also include KSN-1-1.
  • the MN may obtain the SN Counter after updating the starting SN Counter of the candidate cell 1 or the SN1 to which the candidate cell 1 belongs, and calculate KSN-1-1 according to the updated SN Counter corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs. It should be understood that there are many implementation methods for the MN to obtain the updated SN Counter corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs, and the embodiments of the present application do not specifically limit this.
  • the reconfiguration completion message sent by the terminal device to the MN includes the updated SN Counter, that is, the MN obtains the updated SN Counter corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs from the reconfiguration completion message sent by the terminal device.
  • the MN may determine the updated SN Counter corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs based on the starting SN Counter corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs and the SN Counter update rules in the above examples 1 to 6.
  • the specific determination process please refer to the description in step 788, which will not be repeated here.
  • Step 791 MN derives the KSN used in the next triggered CPC process based on the updated SN Counter.
  • each candidate cell corresponds to an SN Counter.
  • the SN Counter used by the terminal device when it last accessed candidate cell 1 is updated, and the updated SN Counter of candidate cell 1 is used to derive the KSN (for example, KSN-1-3) used by candidate cell 1 in the next CPC process.
  • the SN Counter used by the terminal device when it last accessed candidate cell 5 is updated, and the updated SN Counter of candidate cell 5 is used to derive the KSN (for example, KSN-5-3) used by candidate cell 5 in the next CPC process.
  • each candidate SN corresponds to an SN Counter.
  • the last access of the terminal device The SN Counter used by the candidate SN1 is updated, and the updated SN Counter of the candidate SN1 is used to derive the KSN used by the candidate SN1 in the next CPC process.
  • the candidate SN2 taking the candidate SN2 as an example, the SN Counter used by the terminal device when it last accessed the candidate SN2 is updated, and the updated SN Counter of the candidate SN2 is used to derive the KSN used by the candidate SN2 in the next CPC process.
  • Step 792 The MN sends the corresponding KSN to the candidate cell or the candidate SN to which the candidate cell belongs.
  • the MN may send the KSN derived in step 791 for use in the next triggered CPC process to all candidate cells or candidate SNs to which all candidate cells belong.
  • MN after executing a CPA or CPC, MN can send the key KSN used in the next triggered CPC process to all candidate cells or candidate SNs belonging to the candidate cells in advance, so that the candidate cells or candidate SNs belonging to the candidate cells can obtain the key KSN in advance during the next CPC process, without having to communicate securely with the terminal device only after receiving the reconfiguration completion message from MN.
  • Step 795 The terminal device performs synchronization with the candidate SN1.
  • the terminal device may perform synchronization with the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate cell 1 may also derive a user plane key for encrypting data or protecting data integrity between the candidate cell 1 and the terminal device based on the received KSN-1-1, and may also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 1 and the terminal device based on the KSN-1-1.
  • the terminal device in the subsequent CPAC process, each 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.
  • the terminal device maintains the SN Counter and updates the SN Counter for each candidate cell or each candidate SN in the subsequent CPAC process, ensuring that when the subsequent CPAC process returns to the previously accessed candidate cell or candidate SN, a new KSN is derived through the new SN Counter, avoiding the problem of key reuse.
  • FIG8 is a schematic flow chart of another communication method provided by an embodiment of the present application. As shown in FIG8, the method may include steps 810-899, and steps 810-899 are described in detail below. The description of some steps in FIG8 is the same as that in FIG6 or FIG7, and will not be repeated here.
  • Step 810 The terminal device establishes an RRC connection with the MN.
  • Step 815 The terminal device establishes an RRC connection with the source SN.
  • step 815 is optional.
  • Step 820 The MN sends an SN adding request message to the candidate SN.
  • the MN sends SN adding request messages to the candidate SN1 and the candidate SN2 respectively.
  • the SN add request message may include a group of KSNs corresponding to each candidate cell.
  • the group of KSNs includes multiple KSNs associated with the corresponding candidate cell.
  • Each candidate cell may select a corresponding KSN from the group of KSNs corresponding to each candidate cell in turn according to the number of times the terminal device accesses the candidate cell.
  • a group of KSNs of the first cell corresponds to the second set mentioned above.
  • candidate cell 1 corresponds to a group of KSNs.
  • the candidate cell 1 can select the first KSN from the group of KSNs corresponding to candidate cell 1 based on whether the terminal device switches to the cell for the first time.
  • candidate cell 2 corresponds to a group of KSNs.
  • the candidate cell 2 can select the first KSN from the group of KSNs corresponding to candidate cell 2 based on whether the terminal device switches to the cell for the first time.
  • candidate cell 1 can select the second KSN from the group of KSNs corresponding to candidate cell 1 based on whether the terminal device switches to the cell for the second time.
  • the SN add request message may include a group of KSNs corresponding to each candidate SN.
  • the group of KSNs includes multiple KSNs associated with the corresponding candidate SN.
  • Each candidate SN may select a corresponding KSN from the group of KSNs corresponding to each candidate SN in turn according to the number of times the terminal device accesses the candidate SN.
  • the candidate SN to which the candidate cell belongs is the secondary station to which the first cell belongs, and a group of KSNs of the secondary station to which the first cell belongs corresponds to the second set mentioned above.
  • candidate SN1 corresponds to a group of KSNs.
  • the candidate SN1 can select the first KSN from the group of KSNs corresponding to candidate SN1 based on whether the terminal device switches to the SN for the first time.
  • candidate SN2 corresponds to a group of KSNs.
  • the candidate SN2 can select the first KSN from the group of KSNs corresponding to candidate SN2 based on whether the terminal device switches to the SN for the first time.
  • the candidate SN1 can select the second KSN from the group of KSNs corresponding to candidate SN1 based on whether the terminal device switches to the SN for the second time.
  • the method shown in FIG. 7 above is to send the starting KSN corresponding to each candidate cell to each candidate cell at the beginning stage, or to send the starting KSN corresponding to each candidate SN to each candidate SN.
  • the MN will send an updated KSN to the corresponding candidate cell or candidate SN.
  • the selected candidate cell or the secondary station to which the selected candidate cell belongs can obtain the updated KSN only after receiving the reconfiguration completion message from the MN.
  • the candidate SN 8 sends multiple KSNs that may be used by each candidate cell or candidate SN in the future to the candidate SN in advance, so that the candidate SN does not need to obtain the updated KSN only after receiving the reconfiguration completion message from the MN. That is, the candidate SN does not need to start secure data or signaling communication with the terminal device after receiving the reconfiguration completion message from the MN, which reduces the delay and improves the reconfiguration efficiency.
  • Step 825 The candidate SN sends a SN adding request confirmation message to the MN.
  • Step 830 The MN sends an RRC reconfiguration message to the terminal device.
  • the RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, which may include the configuration of the candidate cells and the corresponding execution conditions.
  • the RRC reconfiguration message also indicates a group of SN Counters corresponding to each candidate cell or each candidate SN.
  • the RRC reconfiguration message includes multiple SN Counters corresponding to each candidate cell or each candidate SN, which can also be called a list or set of SN Counters corresponding to each candidate cell or each candidate SN.
  • the RRC reconfiguration message includes the starting value and available number of 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 the starting value and the available number.
  • the SN Counter set corresponding to each candidate cell or each candidate SN is used to represent the multiple SN Counters corresponding to each candidate cell or each candidate SN.
  • the SN Counter set of the first cell corresponds to the first set mentioned above.
  • the SN to which the candidate cell belongs is the secondary station 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 mentioned above.
  • Step 835 The terminal device replies to the MN with an RRC reconfiguration completion message.
  • Step 840 The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 845 The terminal device determines the KSN based on the first SN Counter in the SN Counter set corresponding to the candidate cell or candidate SN included in the CPAC configuration.
  • the terminal device evaluates a candidate cell that meets the conditions, or the terminal device accesses a candidate cell that meets the conditions, the terminal device determines the SN Counter to be used from multiple SN Counters corresponding to each candidate cell or each candidate SN, and uses the selected SN Counter to determine the KSN.
  • the terminal device can determine the SN Counter to be used from multiple SN Counters based on the number of times the terminal device accesses the candidate cell or accesses the SN to which the candidate cell belongs.
  • the terminal device when the terminal device detects that the candidate cell that meets the execution conditions is candidate cell 1, since the terminal device is connected to candidate cell 1 or SN1 to which candidate cell 1 belongs for the first time, the terminal device can use the first SN Counter in the SN Counter set corresponding to candidate cell 1 or SN1 to which candidate cell 1 belongs included in the CPAC configuration to determine the KSN.
  • the terminal device can save the above-mentioned KSN, and can also derive a user plane key for encrypting data or protecting data integrity between the candidate cell 1 based on the above-mentioned KSN, and can also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 1 based on the above-mentioned KSN.
  • the SN Counter set corresponding to candidate cell 1 corresponds to the first set in the above text
  • the first SN Counter in the SN Counter set corresponding to candidate cell 1 corresponds to the first parameter value in the above text
  • the KSN determined using the first SN Counter corresponds to the first key in the above text.
  • the SN Counter set corresponding to SN1 to which candidate cell 1 belongs is Corresponding to the first set mentioned above, the first SN Counter in the SN Counter set corresponding to SN1 to which candidate cell 1 belongs corresponds to the first parameter value mentioned above, and the KSN determined using the first SN Counter corresponds to the first key mentioned above.
  • Step 850 The terminal device sends an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to the candidate SN1.
  • the terminal device can send an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to candidate SN1 (the candidate SN where candidate cell 1 is located).
  • the RRC reconfiguration completion message can indicate that the candidate cell selected by the terminal device is candidate cell 1.
  • Step 855 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • Step 860 The terminal device performs synchronization with the candidate SN1.
  • the terminal device may perform synchronization to the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate SN1 may determine the first KSN in the KSN set corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs.
  • the terminal device sends a first identifier to the SN to which the candidate cell belongs, and the first identifier is used to indicate the KSN used in the selected candidate cell or the multiple KSNs corresponding to the SN to which the selected candidate cell belongs. Or the first identifier can be understood as indicating which KSN the candidate SN uses.
  • the SN to which the candidate cell belongs receives the first identifier, and determines the KSN to be used among the multiple KSNs based on the first identifier.
  • the first identifier can be a key identifier or an SN Counter identifier.
  • the first identifier can be included in Msg3 of the RACH process, or can be included in a MAC CE (for example, included in a C-RATI MAC CE, or included in a first MAC CE, and the first MAC CE is used to carry the first identifier).
  • the first identifier can be sent during the RACH process, or before or after the RACH process.
  • the SN to which the selected candidate cell belongs selects a KSN for use from multiple KSNs corresponding to the candidate cell or the secondary station to which the candidate cell belongs, based on the number of times the terminal device accesses the candidate cell or the SN to which the candidate cell belongs. For example, if the terminal device accesses the candidate cell or the SN to which the candidate cell belongs for the first time, the SN selects the first KSN. For another example, if the terminal device accesses the candidate cell or the SN to which the candidate cell belongs for the second time, the SN selects the second KSN.
  • the selected candidate cell is candidate cell 1
  • the secondary station to which candidate cell 1 belongs is SN1.
  • Candidate cell 1 or SN1 can select the corresponding KSN from the KSN set corresponding to candidate cell 1 or SN1 according to the first identifier or the number of times the terminal device accesses candidate cell 1 or SN1.
  • the terminal device since the terminal device selects the first SN Counte derived KSN from the SN Counte set corresponding to candidate cell 1 or SN1, the terminal device can also send a first identifier to SN1, and the first identifier is used to instruct SN1 to select the first KSN from the KSN set corresponding to candidate cell 1 or SN1.
  • SN1 can select the first KSN from the KSN set corresponding to candidate cell 1 or SN1 according to the fact that it is the first time for the terminal device to access the candidate cell 1 or SN1.
  • the KSN set corresponding to candidate cell 1 corresponds to the second set mentioned above, and the first KSN in the KSN set corresponds to the first key mentioned above.
  • SN1 to which candidate cell 1 belongs corresponds to the secondary station to which the first cell in the text belongs
  • the KSN set corresponding to SN1 corresponds to the second set in the above text
  • the first KSN in the KSN set corresponds to the first key in the above text.
  • candidate cell 1 or SN1 can also derive a user plane key for encrypting or protecting data integrity between the terminal device based on the first KSN in the KSN set, and can also derive a control plane key for encrypting or protecting data integrity between the terminal device based on the first KSN in the KSN set.
  • step 845 may be performed first, then step 850, 855 and 860 may be performed, and then step 845 may be performed.
  • the terminal evaluates a candidate cell that meets the conditions and sends an RRC reconfiguration completion message to the MN, in which the candidate cell selected by the terminal device is indicated.
  • the MN sends an SN reconfiguration completion message to the SN to which the selected candidate cell belongs.
  • the SN may determine the KSN 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 (for details, please refer to the description in step 860, which will not be repeated here), and indicates the SN Counter to be used to the terminal device through the second identifier.
  • the terminal device selects the SN Counter to be used from the multiple SN Counters corresponding to the candidate cell or the SN to which the candidate cell belongs according to the second identifier, and derives the KSN using the selected SN Counter.
  • Step 865 The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 868 The terminal device determines the KSN based on the first SN Counter in a group corresponding to the candidate cell 5 included in the CPAC configuration or the SN2 to which the candidate cell 5 belongs.
  • the terminal device When the terminal device detects that the candidate cell that meets the execution conditions is candidate cell 5, since the terminal device is connected to candidate cell 5 for the first time, or is accessing SN2 where candidate cell 5 is located for the first time, the terminal device can use the first SN Counter in a group of SN Counters corresponding to candidate cell 5 or SN2 included in the CPAC configuration to determine the KSN.
  • the terminal device can also derive a user plane key for encrypting or protecting data integrity between the terminal device and the candidate cell 5 based on the above-mentioned KSN, and can also derive a control plane key for encrypting or protecting data integrity between the terminal device and the candidate cell 5 based on the above-mentioned KSN.
  • Step 870 The terminal device sends an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to the candidate SN1.
  • Step 875 The MN forwards the SN reconfiguration completion message to the candidate SN2.
  • Step 880 The terminal device performs synchronization with the candidate SN2.
  • the terminal device may perform synchronization to the candidate SN2 where the candidate cell 5 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate SN2 may select the first KSN in the KSN set corresponding to the candidate cell 5 or the candidate SN2.
  • candidate cell 5 or candidate SN2 can also derive a user plane key for encrypting or protecting data integrity between the terminal device based on the first KSN in the corresponding KSN set, and can also derive a control plane key for encrypting or protecting data integrity between the terminal device based on the first KSN in the corresponding KSN set.
  • Step 885 The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 890 The terminal device determines the KSN based on the second SN Counter in a group of SN Counters corresponding to the candidate cell 1 included in the CPAC configuration or the SN1 to which the candidate cell 1 belongs.
  • the terminal device When the terminal device detects that the candidate cell that meets the execution conditions is candidate cell 1, since the terminal device is connected to candidate cell 1 or SN1 to which candidate cell 1 belongs for the second time, the terminal device can use the second SN Counter in the SN Counter set corresponding to candidate cell 1 or SN1 to which candidate cell 1 belongs included in the CPAC configuration to determine the KSN.
  • Step 895 The terminal device sends an RRC reconfiguration complete message to the MN, and the RRC reconfiguration complete message includes a reconfiguration complete message sent to the candidate SN1.
  • Step 898 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • Step 899 The terminal device performs synchronization to the candidate SN1.
  • the terminal device may perform synchronization to the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate SN1 may use the second KSN in the KSN set corresponding to the candidate cell 1 or the SN1 to which the candidate cell 1 belongs.
  • candidate cell 1 or SN1 can also derive a user plane key for encrypting or protecting data integrity between the terminal device based on the second KSN in the KSN set, and can also derive a control plane key for encrypting or protecting data integrity between the terminal device based on the second KSN in the KSN set.
  • the candidate SN does not have to communicate securely with the terminal device only after receiving the reconfiguration completion message from the MN.
  • Fig. 9 is a schematic flow chart of another communication method provided by an embodiment of the present application. As shown in Fig. 9, the method may include steps 910-920, and steps 910-920 are described in detail below.
  • Step 910 Derive a fourth key, where the fourth key is determined based on the fifth key.
  • the fourth key may be derived based on the fifth key.
  • the terminal device may derive the fourth key based on the fifth key.
  • the terminal device can evaluate whether the execution condition of the second cell is met, and the second cell is a candidate cell added or changed by the conditional cell. If the terminal device evaluates that the execution condition of the second cell is met, the terminal device can derive a fourth key, and the fourth key can be used for the security of the second cell.
  • the terminal device does not necessarily perform key derivation immediately after evaluating a candidate cell that meets the execution condition. For example, the terminal device performs key derivation during or after accessing the selected candidate cell.
  • the terminal device may derive the fourth key based on the fifth key and using the fourth parameter value.
  • the fourth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs.
  • the fourth parameter value is not specifically limited in the embodiment of the present application, and may be a parameter value associated with the second cell or the secondary station to which the second cell belongs, or may be updated based on the fifth parameter value, or may be determined based on the number of times the second cell or the secondary station to which the second cell belongs is accessed.
  • the fifth parameter value is the parameter value last used by the second cell or the secondary station to which the second cell belongs, or the fifth parameter value is the parameter value used by the terminal device for the last access.
  • the fifth key is not specifically limited in the present application embodiment. Several possible implementation methods are described below with examples.
  • the fifth key may be the key of the last cell accessed by the terminal device, that is, the fourth key may be derived based on the key of the last cell accessed by the terminal device.
  • the fourth key is the KSN to be used by the terminal device
  • the fifth key is the KSN used by the terminal device.
  • the fifth key may also be the key used by the terminal device when it last accessed the second cell or accessed the secondary station to which the second cell belongs, that is, the fourth key may be derived based on the key used by the terminal device when it last accessed the second cell or accessed the secondary station to which the second cell belongs.
  • the fourth key is the KSN to be used by the terminal device
  • the fifth key is the KSN last used by the terminal device in the selected candidate cell.
  • the fifth key may also be the key last used by a cell in the second cell set, wherein the second cell is included in the second cell set. That is, the terminal device maintains a key (e.g., KSN) or a count value (e.g., SN Counter) for the cells in the second cell set. Exemplarily, the count value may be understood as the fourth parameter.
  • KSN key
  • SN Counter count value
  • the terminal device switches from a cell in another cell set to a cell in the second cell set
  • the terminal device derives the fourth key.
  • the derivation of the fourth key by the terminal device is determined by the fifth key.
  • the fifth key is the KSN last used by the cell in the second cell set.
  • the second cell set is used to instruct the terminal device to perform PDCP reconstruction.
  • the terminal device switches from a cell in the second cell set to another cell in the second cell set, there is no need to perform PDCP reconstruction; when the terminal device switches from a cell outside the second cell set to a cell in the second cell set, PDCP reconstruction needs to be performed.
  • the second cell set may be configured by the network device, for example, indicating identifiers of candidate cells included in the second cell set.
  • the second cell set includes cells with the same key (e.g., KSN) or count value (e.g., SN Counter).
  • KSN the same key
  • SN Counter count value
  • the terminal device switches from a cell associated with a non-identical key (e.g., KSN) or count value (e.g., SN Counter) to the second cell, or when switching from a cell with a different count value to the second cell, the terminal device derives a fourth key.
  • the fifth key may also be the key last used in the fourth cell, wherein the fourth cell is configured with the same count value (e.g., SN Counter) or key (KSN) as the second cell.
  • the count value may be understood as the fourth parameter. That is, the terminal device maintains a KSN or SN Counter for each candidate cell. The SN Counter or KSN of different candidate cells may be the same or different.
  • the terminal device switches from another cell to the second cell, if the SN Counter or KSN of the two cells is different, the terminal device derives the fourth key. The derivation of the fourth key by the terminal device is determined by the fifth key.
  • the fifth key is the KSN last used by the cell with the same SN Counter or KSN as the second cell.
  • the fourth cell may also be the second cell.
  • Step 920 Derive a sixth key according to the fourth key, where the sixth key is a user plane key and/or a control plane key.
  • a sixth key may be derived from the fourth key, that is, the sixth key is a user plane key and/or a control plane key derived from the fourth key.
  • the control plane key and/or the user plane key is used to encrypt or protect the data integrity of the data and/or signaling between the terminal device and the second cell.
  • the user plane key is used to encrypt or protect the data integrity of the data between the terminal device and the second cell.
  • the MN may derive a fourth key based on the fifth key, and send the derived fourth key to the second cell or the secondary station to which the second cell belongs to send the fourth key.
  • 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.
  • the MN may send multiple KSNs that may be used to the candidate SN in the Xth message.
  • the Xth message may be an SN addition request message.
  • the SN may request the MN to update the KSN.
  • the request message is used to request updates to multiple KSNs.
  • the SN may also derive a fourth key based on the fifth key, and derive a sixth key based on the fourth key.
  • the process of SN deriving the fourth key and the sixth key is the same as the process of the terminal device deriving the fourth key and the sixth key.
  • Fig. 10 is a schematic flow chart of another communication method provided by an embodiment of the present application. As shown in Fig. 10, the method may include steps 1010-1099, and steps 1010-1099 are described in detail below.
  • Step 1010 The terminal device establishes an RRC connection with the MN.
  • Step 1015 The terminal device establishes an RRC connection with the source SN.
  • step 1015 is optional.
  • Step 1020 The MN sends an SN adding request message to the candidate SN.
  • MN sends SN add request messages to candidate SN1 and candidate SN2 respectively.
  • the SN add request message may include KSN#0, which is calculated by MN according to SN Counter. Assuming that the SN Counte corresponding to each candidate cell is the same, which is SN Counter#0, MN can calculate KSN#0 according to SN Counter#0.
  • Step 1025 The candidate SN sends an SN adding request confirmation message to the MN.
  • Step 1030 The MN sends an RRC reconfiguration message to the terminal device.
  • the RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, which may include the configuration of the candidate cells included in the candidate SN1 and the candidate SN2 and the corresponding execution conditions, as well as the SN Counter (for example, SN Counter#0) used by the MN to derive KSN#0.
  • a CPAC configuration which may include the configuration of the candidate cells included in the candidate SN1 and the candidate SN2 and the corresponding execution conditions, as well as the SN Counter (for example, SN Counter#0) used by the MN to derive KSN#0.
  • Step 1035 The terminal device replies with an RRC reconfiguration completion message to the MN.
  • Step 1040 The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 1045 The terminal device sends an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to the candidate SN1.
  • the terminal device can send an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to candidate SN1 (the candidate SN where candidate cell 1 is located).
  • the RRC reconfiguration completion message can indicate that the candidate cell selected by the terminal device is candidate cell 1.
  • Step 1050 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • Step 1055 The terminal device derives KSN#0 based on the SN Counter included in the CPAC configuration.
  • the terminal device can derive KSN#0 according to the SN Counter (e.g., SN Counter#0) and KgNB included in the CPAC configuration.
  • the terminal device can also derive a user plane key for encrypting data or protecting data integrity with the candidate cell 1 based on KSN#0, and derive a control plane key for encrypting signaling or protecting data integrity with the candidate cell 1 based on KSN#0.
  • Step 1060 The terminal device performs synchronization with the candidate SN1.
  • the terminal device may perform synchronization with the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate cell 1 may also derive a user plane key for encrypting data or protecting data integrity between the candidate cell 1 and the terminal device based on the received KSN#0, and may also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 1 and the terminal device based on KSN#0.
  • Step 1063 The terminal device continues to evaluate whether the candidate PSCell included in the CPAC configuration meets the execution conditions.
  • Step 1065 The terminal device derives KSN#1 based on KSN#0.
  • the terminal device can derive and save KSN#1 based on the last used KSN#0.
  • KSN#0 last used by the cell in the cell set to which candidate cell 5 belongs can be used to derive and save KSN#1.
  • candidate cell 10 and candidate cell 5 are configured with the same SN Counter or KSN.
  • the terminal device can also derive a user plane key for encrypting or protecting data integrity between the terminal device and the candidate cell 5 based on KSN#1, and can also derive a control plane key for encrypting or protecting data integrity between the terminal device and the candidate cell 5 based on KSN#1.
  • KSN#0 corresponds to the fifth key mentioned above
  • KSN#1 corresponds to the fourth key mentioned above.
  • Step 1070 The terminal device sends an RRC reconfiguration complete message to the MN, where the RRC reconfiguration complete message includes an RRC reconfiguration complete message sent to the candidate SN2.
  • the terminal device may send an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to the candidate SN2 (the candidate SN where the candidate cell 5 is located).
  • the RRC reconfiguration completion message may indicate that the terminal device has selected the candidate cell 5.
  • Step 1065 can be executed first, and then step 1070; or, step 1070 can be executed first, and then step 1065; or, step 1065 and step 1070 can be executed at the same time.
  • Step 1075 MN derives KSN#1 based on KSN#0.
  • the MN after receiving the RRC reconfiguration completion message sent by the terminal device, the MN can use the key KSN#0 of the previous cell accessed by the terminal device to derive and save KSN#1.
  • KSN#1 may be derived based on KSN#0 and the fifth SN Counter.
  • the fifth SN Counter may be an SN Counter associated with the candidate cell 5 or SN2 to which the candidate cell 5 belongs.
  • the fifth SN Counter may also be updated based on the sixth SN Counter, which is the SN Counter last used by the candidate cell 5 or SN2 to which the candidate cell 5 belongs, or the SN Counter last used by the terminal device for access.
  • the fifth SN Counter may also be determined based on the number of times the candidate cell 5 or SN2 to which the candidate cell 5 belongs is accessed.
  • the fifth SN Counter corresponds to the fourth parameter value in the above text
  • the sixth SN Counter corresponds to the fifth parameter value in the above text.
  • the terminal device can derive KSN#1 based on KSN#0 and SN Counter#0.
  • SN Counter#0 is the SN Counter used by all candidate cells or all candidate SNs.
  • SN Counter#0 corresponds to the fourth parameter value in the above text.
  • Step 1078 The MN forwards the SN reconfiguration completion message to the candidate SN2.
  • the MN may select the candidate cell as candidate cell 5 according to the terminal device indicated by the RRC reconfiguration completion message, and forward the SN reconfiguration completion message to the candidate SN2 where the candidate cell 5 is located.
  • the SN reconfiguration completion message forwarded by the MN to the candidate SN2 may also include KSN#1.
  • Step 1080 The terminal device performs synchronization with the candidate SN2.
  • the terminal device may perform synchronization to the candidate SN2 where the candidate cell 5 is located.
  • the synchronization process may be implemented through RACH.
  • Candidate cell 5 can also derive a user plane key for encrypting or protecting data integrity between the terminal device based on KSN#1, and can also derive a control plane key for encrypting or protecting data integrity between the terminal device based on KSN#1.
  • the reconfiguration completion message sent by the MN to the candidate SN2 includes KSN#1, and the candidate cell 5 can obtain KSN#1 from the message.
  • the candidate cell 5 can derive KSN#1 using the key KSN#0 of the previous cell accessed by the terminal device.
  • KSN#1 is not included in the RRC reconfiguration completion message sent by the MN to the candidate SN2.
  • Step 1083 The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 1085 The terminal device derives KSN#2 based on KSN#1.
  • the terminal device can select the candidate cell 1 according to the last time it was used. Use KSN#1 to derive and save KSN#2.
  • the terminal device can also derive a user plane key for encrypting or protecting data integrity between the candidate cell 1 based on KSN#2, and can also derive a control plane key for encrypting or protecting data integrity between the signaling between the candidate cell 1 and the candidate cell 1 based on KSN#2.
  • KSN#1 corresponds to the fifth key in the above text
  • KSN#2 corresponds to the fourth key in the above text.
  • Step 1090 The terminal device sends an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to the candidate SN1.
  • Step 1093 MN derives KSN#2 based on KSN#1.
  • the MN after receiving the RRC reconfiguration completion message sent by the terminal device, the MN can use KSN#1 to derive KSN#2.
  • Step 1095 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • the SN reconfiguration completion message forwarded by the MN to the candidate SN1 may also include KSN#2.
  • Step 1099 The terminal device performs synchronization with the candidate SN1.
  • the terminal device may perform synchronization with the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate cell 1 may also derive a user plane key for encrypting data or protecting data integrity between the candidate cell 1 and the terminal device based on KSN#2, and may also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 1 and the terminal device based on KSN#2.
  • Candidate cell 1 may obtain KSN#2 from the RRC reconfiguration complete message sent by the terminal device, or may derive KSN#2 according to KSN#1. For details, please refer to the above description, which will not be repeated here.
  • a new KSN is derived based on the KSN used last time/stored by the terminal device. Since the KSN used by the terminal device is different each time CPA or CPC is triggered, it is guaranteed that a new KSN is derived during the candidate CPAC process, avoiding the problem of key reuse.
  • Fig. 11 is a schematic flow chart of another communication method provided by an embodiment of the present application. As shown in Fig. 11, the method may include steps 1110-1199, and steps 1110-1199 are described in detail below.
  • Step 1110 The terminal device establishes an RRC connection with the MN.
  • Step 1115 The terminal device establishes an RRC connection with the source SN.
  • step 1115 is optional.
  • Step 1120 The MN sends an SN adding request message to the candidate SN.
  • MN sends SN add request messages to candidate SN1 and candidate SN2 respectively.
  • the SN add request message may include the starting KSN corresponding to each candidate cell or each candidate SN, and the starting KSN corresponding to each candidate cell or each candidate SN is calculated by MN according to the starting SN Counter corresponding to each candidate cell or each candidate SN.
  • the starting SN Counter corresponding to each candidate cell or each candidate SN mentioned above can be the SN Counter starting value (SN Counter#x) of each candidate cell or each candidate SN, or can also be the first SN Counter in the SN Counter value set corresponding to each candidate cell or each candidate SN.
  • the embodiment of the present application does not limit this. Please refer to the above description for details, which will not be repeated here.
  • the starting KSN derived by the MN from the SN Counter corresponding to candidate cell 1 is KSN#1
  • the starting KSN derived from the SN Counter corresponding to candidate cell 2 is KSN#2
  • the starting KSN derived from the SN Counter corresponding to candidate cell 3 is KSN#3, and so on.
  • the starting KSN derived by MN based on the SN Counter corresponding to candidate SN1 is KSN#1
  • the starting KSN derived based on the SN Counter corresponding to candidate SN2 is KSN#2
  • Step 1125 The candidate SN sends an SN adding request confirmation message to the MN.
  • Step 1130 The MN sends an RRC reconfiguration message to the terminal device.
  • the RRC reconfiguration message sent by the MN to the terminal device may include a CPAC configuration, which may include the configuration of the candidate cells included in candidate SN1 and candidate SN2 and the corresponding execution conditions, as well as the SN Counter corresponding to each candidate cell or each candidate SN.
  • Step 1135 The terminal device replies with an RRC reconfiguration completion message to the MN.
  • Step 1140 The terminal device evaluates whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 1145 The terminal device determines and saves KSN#1 based on the SN Counter included in the CPAC configuration.
  • the terminal device After receiving the CPAC configuration, if the terminal device evaluates that a candidate cell or a candidate cell under a candidate SN meets the execution condition for the first time, or the terminal device accesses a candidate cell (or a candidate cell under a candidate SN) that meets the execution condition for the first time, the terminal device derives the KSN based on the master key and uses the SN Counter corresponding to the candidate cell or the secondary station to which the candidate cell belongs. For example, when the terminal device detects that the candidate cell that meets the execution condition is candidate cell 1, KSN#1 can be determined and saved based on the master key and using the SN Counter corresponding to the candidate cell 1 or SN1 to which the candidate cell 1 belongs included in the CPAC configuration.
  • Step 1150 The terminal device sends an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to the candidate SN1.
  • Step 1155 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • Step 1145 can be executed first, and then step 1150 and step 1155; or, step 1150 and step 1155 can be executed first, and then step 1145; or, step 1145, step 1150 and step 1155 can be executed simultaneously.
  • Step 1160 The terminal device performs synchronization with the candidate SN1.
  • the terminal device may perform synchronization with the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate cell 1 may also derive a user plane key for encrypting data or protecting data integrity between the candidate cell 1 and the terminal device based on the received KSN#1, and may also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 1 and the terminal device based on KSN#1.
  • Step 1163 The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 1165 The terminal device determines and saves KSN#5 based on the SN Counter included in the CPAC configuration.
  • the terminal device when the terminal device detects that the candidate cell that meets the execution conditions is candidate cell 5, since the terminal device is accessing candidate cell 5 or SN2 to which candidate cell 5 belongs for the first time, it can use the SN Counter corresponding to the candidate cell 5 or SN2 included in the CPAC configuration to determine and save KSN#5.
  • the terminal device detects that the candidate cell that meets the execution conditions is candidate cell 5, assuming that candidate cell 1 belongs to one cell set and candidate cell 5 belongs to another cell set, when the terminal device switches from a cell in the cell set to which candidate cell 1 belongs to a cell in the cell set to which candidate cell 5 belongs, the KSN last used by the cell in the cell set to which candidate cell 5 belongs (for example, KSN#5) can be used.
  • candidate cell 10 when the terminal device detects that the candidate cell that meets the execution condition is candidate cell 5, if the SN Counter or KSN of candidate cell 5 is different from that of candidate cell 1, the KSN (for example, KSN#5) last used by candidate cell 10 can be used.
  • candidate cell 10 and candidate cell 5 are configured with the same SN Counter or KSN.
  • Step 1170 The terminal device sends an RRC reconfiguration completion message to the MN, and the RRC reconfiguration completion message includes a reconfiguration completion message sent to the candidate SN1.
  • Step 1175 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • step 1165 may be executed first, and then step 1170 and step 1175; or, step 1170 and step 1175 may be executed first, and then step 1165; or, step 1165, step 1170 and step 1175 may be executed simultaneously.
  • Step 1180 The terminal device performs synchronization with the candidate SN2.
  • the terminal device may perform synchronization with the candidate SN2 where the candidate cell 5 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate cell 5 may also derive a user plane key for encrypting data or protecting data integrity between the terminal device and the candidate cell 5 based on the received KSN#5, and may also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 5 and the terminal device based on KSN#5.
  • Step 1183 The terminal device continues to evaluate whether the candidate cells included in the CPAC configuration meet the execution conditions.
  • Step 1185 The terminal device derives KSN#1-1 based on KSN#1.
  • the terminal device evaluates that a candidate cell or a candidate cell under a candidate SN meets the execution condition again (or a candidate cell or a candidate cell under a candidate SN does not meet the execution condition for the first time), or the terminal device accesses a candidate cell or a candidate cell under a candidate SN that meets the execution condition again (or it is not the first time to access a candidate cell or a candidate cell under a candidate SN), the terminal device uses the KSN used last time in the candidate cell or the SN to which the candidate cell belongs to derive a new KSN. For example, when the terminal device detects again that the candidate cell that meets the execution condition is candidate cell 1, the terminal device can use KSN#1 used when it last accessed candidate cell 1 or SN1 to which candidate cell 1 belongs to determine KSN#1-1.
  • Step 1187 The terminal device sends an RRC reconfiguration complete message to the MN, and the RRC reconfiguration complete message includes a reconfiguration complete message sent to the candidate SN1.
  • Step 1190 MN derives KSN#1-1 based on KSN#1.
  • the MN after receiving the RRC reconfiguration completion message sent by the terminal device, the MN can use the KSN#1 used by the terminal device to access the candidate cell 1 last time to derive KSN#1-1.
  • Step 1195 The MN forwards the SN reconfiguration completion message to the candidate SN1.
  • the MN may select the candidate cell as candidate cell 1 according to the terminal device indicated by the RRC reconfiguration completion message, and forward the SN reconfiguration completion message to the candidate SN1 where the candidate cell 1 is located.
  • the SN reconfiguration completion message may also include KSN#1-1.
  • Step 1198 Candidate SN1 derives KSN#1-1 based on KSN#1.
  • Candidate SN1 may derive a new KSN based on the last used KSN of candidate cell 1 or the candidate SN to which candidate cell 1 belongs.
  • candidate SN1 can use KSN#1 to derive KSN#1-1. It should be understood that the above KSN#1 can be the KSN used by the terminal device when it last accessed candidate cell 1, or it can also be the KSN corresponding to candidate SN1 to which the terminal device last accessed candidate cell 1.
  • the SN add 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.
  • the candidate SN1 may derive KSN#1-1 based on KSN#1 and the SN Counter.
  • step 1190 if step 1190 is executed, step 1198 will not be executed; or, if step 1198 is executed, step 1190 will not be executed.
  • Step 1199 The terminal device performs synchronization to the candidate SN1.
  • the terminal device may perform synchronization with the candidate SN1 where the candidate cell 1 is located.
  • the synchronization process may be implemented through RACH.
  • the candidate cell 1 may also derive a user plane key for encrypting data or protecting data integrity between the candidate cell 1 and the terminal device based on the received KSN#1-1, and may also derive a control plane key for encrypting signaling or protecting data integrity between the candidate cell 1 and the terminal device based on KSN#1-1.
  • the terminal device and MN each time the terminal device triggers CPA or CPC, the terminal device and MN (or SN) derive a new KSN based on the last used KSN of the selected candidate cell or the secondary station to which the selected candidate cell belongs.
  • FIG12 is a schematic block diagram of a communication device provided in an embodiment of the present application.
  • the device 1200 may include a processing unit 1220, wherein the processing unit 1220 is used to process data/information so that the functions of the terminal device in the methods shown in FIG5 to FIG11 are implemented, or the functions of the network device in the methods shown in FIG5 to FIG11 are implemented.
  • the device 1200 may further include a transceiver unit 1210, which may communicate with the outside, for example, input data/information received from the outside into the processing unit, or 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.
  • the device 1200 may be a terminal device in the method shown in FIGS. 5 to 11 above, or may be a chip for implementing the functions of the terminal device in the method shown in FIGS. 5 to 11 above. Specifically, the device 1200 may implement a process corresponding to the process executed by the terminal device in the method shown in FIGS. 5 to 11 above, wherein the processing unit 1220 is used to perform operations related to the processing of the terminal device in the above method process.
  • processing unit 1220 is used to derive a first key and derive a third key based on the first key, wherein the first key is based on the second key and is determined using a first parameter value, the second key is a primary key, the first parameter value is updated based on the second parameter value, or the first parameter value is determined based on the number of accesses to the first cell or the secondary station to which the first cell belongs, the third key is a user plane key and/or a control plane key, and the third key is used to encrypt or protect data integrity of data and/or signaling between the first cell.
  • the second parameter value is a parameter value used last time by the first cell or a secondary station to which the first cell belongs, or the second parameter value is a parameter value used in the last access.
  • the first parameter value is the second parameter value plus N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells added or changed for the conditional cell.
  • the first parameter value is determined according to a third parameter value and the number of times of accessing the first cell or the secondary station to which the first cell belongs, wherein the third parameter value is a starting parameter value associated with the first cell or the secondary station to which the first cell belongs.
  • the first parameter value is the Pth value in a first set, where P is related to the number of accesses to the first cell or the secondary station to which the first cell belongs, and the first set includes multiple parameter values associated with the first cell or the secondary station to which the first cell belongs.
  • the transceiver unit 1210 is configured to send the first message to the primary station, where the first message indicates the first cell that meets the execution condition or the secondary station to which the first cell belongs, and the first message includes the first parameter value.
  • processing unit 1220 is used 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, the fifth key is the key of the last cell accessed, or the fifth key is the key used for the last access to the second cell or the secondary station 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 encrypt or protect data integrity of data and/or signaling between the second cell.
  • the processing unit 1220 is specifically configured to derive the fourth key based on the fifth key and using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary station to which the second cell is connected.
  • the fourth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs, or the fourth parameter value is updated based on the fifth parameter value, or the fourth parameter value is determined according to the number of times the second cell or the secondary station to which the second cell belongs is accessed.
  • the fifth parameter value is a parameter value used last time by the second cell or a secondary station to which the second cell belongs, or the fifth parameter value is a parameter value used in the last access.
  • processing unit 1220 and transceiver unit 1210 can also respectively execute any other steps, operations and/or functions implemented by the terminal device in the methods shown in Figures 5 to 11 above.
  • the specific process of each unit executing the above-mentioned corresponding steps has been described in detail in the above-mentioned method embodiment. For the sake of brevity, it will not be repeated here.
  • the device 1200 may be the MN in the method shown in FIGS. 5 to 11 above, or may be a chip for implementing the functions of the MN in the method shown in FIGS. 5 to 11 above. Specifically, the device 1200 may implement the process executed by the MN in the method shown in FIGS. 5 to 11 above, wherein the processing unit 1220 is used to perform operations related to the processing of the MN in the above method process.
  • the processing unit 1220 is used to derive a first key, wherein the first key is used for the security of the first cell, the first cell is a candidate cell for adding or changing CPAC as a conditional cell, the first key is determined based on the second key and using a first parameter value, the second key is a master key, the first parameter value is received from a terminal device, or the first parameter value is updated 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 station to which the first cell belongs.
  • the transceiver unit 1210 is used to send the first key to the first cell or the secondary station to which the first cell belongs.
  • the transceiver unit 1210 is specifically configured to send a second set to the first cell or the secondary station to which the first cell belongs, the second set including multiple keys associated with the first cell or the secondary station to which the first cell belongs, the multiple keys including the first key.
  • the transceiver unit 1210 is further used to receive a first message from the terminal device, the first message includes the first parameter value, and the first message indicates a first cell that meets the execution condition or a secondary station to which the first cell belongs.
  • the second parameter value is a parameter value last used by the first cell or a secondary station to which the first cell belongs, or the second parameter value is a parameter value last used by the terminal device for access.
  • the first parameter value is the second parameter value plus N, where N is an integer greater than or equal to 1, or N is the maximum number of candidate cells added or changed for the conditional cell.
  • 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 station to which the first cell belongs, wherein the third parameter value is a starting parameter value associated with the first cell or the secondary station to which the first cell belongs.
  • the first parameter value is the Pth value in the first set, where P is related to the number of times the terminal device accesses the first cell or the secondary station to which the first cell belongs, and the first set includes multiple parameter values associated with the first cell or the secondary station to which the first cell belongs.
  • the processing unit 1220 is used to derive a fourth key, wherein the fourth key is used for the security of the second cell, the fourth key is determined based on a fifth key, the fifth key is a key for the last cell accessed, or the fifth key is a key used for the last access to the second cell or access to the secondary station to which the second cell belongs; the transceiver unit 1210 is used to send the fourth key to the second cell or the secondary station to which the second cell belongs.
  • the processing unit 1220 is specifically configured to derive the fourth key based on the fifth key and using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary station to which the second cell is connected.
  • the fifth key is determined based on the sixth key and using a fifth parameter value
  • the sixth key is a master key
  • the fifth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is updated based on the sixth parameter value
  • the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary station to which the second cell belongs.
  • the sixth parameter value is a parameter value last used by the second cell or a secondary station to which the second cell belongs, or the sixth parameter value is a parameter value last used by the terminal device for access.
  • processing unit 1220 and transceiver unit 1210 can also respectively execute any other steps, operations and/or functions implemented by the MN in the methods shown in Figures 5 to 11 above.
  • the specific process of each unit executing the above-mentioned corresponding steps has been described in detail in the above-mentioned method embodiment. For the sake of brevity, it will not be repeated here.
  • the device 1200 may be the SN in the method shown in FIGS. 5 to 11 above, or may be a chip for implementing the functions of the SN in the method shown in FIGS. 5 to 11 above. Specifically, the device 1200 may implement a process corresponding to the execution of the SN in the method shown in FIGS. 5 to 11 above, wherein the processing unit 1220 is used to perform operations related to the processing of the SN in the above method process.
  • the transceiver unit 1210 is used to receive a second set, which includes multiple keys associated with a first cell or an auxiliary station to which the first cell belongs, and the multiple keys include a first key; the processing unit 1220 is used to determine the first key from the second set based on a first identifier or the number of times a terminal device accesses the first cell or the auxiliary station to which the first cell belongs, and the first identifier is used to indicate the position of the first key in the second set.
  • the transceiver unit 1210 is further configured to receive a second message, where the second message includes the first identifier.
  • processing unit 1220 is used to derive a fourth key, and derive a sixth key based on the fourth key, wherein the fourth key is used for the security of the second cell, the fourth key is determined based on a fifth key, the fifth key is the key used for the last access to the second cell or access to the secondary station to which the second cell belongs, the sixth key is a user plane key and/or a control plane key, and the sixth key is used to encrypt data and/or signaling between the terminal device or to protect data integrity.
  • the processing unit 1220 is further configured to derive the fourth key based on the fifth key and using a fourth parameter value, where the fourth parameter value is a parameter value associated with the second cell or a secondary station to which the second cell is connected.
  • the fifth key is determined based on the sixth key and using a fifth parameter value
  • the sixth key is a master key
  • the fifth parameter value is a parameter value associated with the second cell or the secondary station to which the second cell belongs
  • the fifth parameter value is updated based on the sixth parameter value
  • the fifth parameter value is determined based on the number of times the terminal device accesses the second cell or the secondary station to which the second cell belongs.
  • the sixth parameter value is a parameter value last used by the second cell or a secondary station to which the second cell belongs, or the sixth parameter value is a parameter value last used by the terminal device for access.
  • processing unit 1220 and the transceiver unit 1210 can also respectively execute any other steps, operations and/or functions implemented by the SN in the methods shown in Figures 5 to 11 above.
  • the specific process of each unit executing the above-mentioned corresponding steps has been described in detail in the above-mentioned method embodiment. For the sake of brevity, it will not be repeated here.
  • the above-mentioned transceiver unit 1210 may include a receiving unit and a sending unit, wherein the receiving unit is used to perform the receiving function in the above-mentioned transceiver unit 1210, and the sending unit is used to perform the sending function in the above-mentioned transceiver unit 1210.
  • the above-mentioned device 1200 has the function of implementing the corresponding steps executed by the terminal device in the method shown in Figures 5 to 11, or the above-mentioned device 1200 has the function of implementing the corresponding steps executed by the network device in the method shown in Figures 5 to 11.
  • the functions can be implemented by hardware, or by hardware executing corresponding software implementations.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions; for example, the transceiver unit can be replaced by a transceiver (for example, the sending unit in the transceiver unit can be replaced by a sending unit In the embodiment, the receiving unit in the transceiver unit may be replaced by a receiver), and other units, such as the processing unit, etc. may be replaced by a processor to respectively perform the transceiver operations and related processing operations in each method embodiment.
  • the device 1200 herein is embodied in the form of a functional unit.
  • the term "unit” herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and/or other suitable components that support the described functions.
  • ASIC application specific integrated circuit
  • processor e.g., a shared processor, a dedicated processor, or a group processor, etc.
  • memory for executing one or more software or firmware programs, a combined logic circuit, and/or other suitable components that support the described functions.
  • the above-mentioned transceiver unit can also be a transceiver circuit (for example, it can include a receiving circuit and a sending circuit), and the processing unit can be a processing circuit.
  • the device 1200 can be a terminal device or a network device in the aforementioned embodiment, or it can be a chip or a chip system, for example: a system on chip (SoC).
  • SoC system on chip
  • the transceiver unit can be an input and output circuit, a communication interface.
  • the processing unit is a processor or a microprocessor or an integrated circuit integrated on the chip. This is not limited here.
  • Figure 13 is another schematic structural diagram of a communication device provided in an embodiment of the present application.
  • the communication device 1300 includes: at least one processor 1310, the processor 1310 is used to execute instructions so that the functions of the terminal device in the methods shown in Figures 5 to 11 above are implemented, or the functions of the network device in the methods shown in Figures 5 to 11 above are implemented.
  • the device 1300 may further include a transceiver 1320, where the transceiver 1320 is used to send signals and/or receive signals.
  • the communication device 1300 further includes a memory 1330 for storing instructions.
  • the processor 1310 is coupled to the memory and is configured to execute instructions stored in the memory to control the transceiver 1320 to send and/or receive signals.
  • processor 1310 and the memory 1330 may be combined into one processing device, and the processor 1310 is used to execute the program code stored in the memory 1330 to implement the above functions.
  • the memory 1330 may also be integrated into the processor 1310 or independent of the processor 1310.
  • the transceiver 1320 may include a receiver (or receiver) and a transmitter (or transmitter).
  • the transceiver 720 may further include an antenna, and the number of antennas may be one or more.
  • the transceiver 1320 may also be a communication interface or an interface circuit.
  • the chip When the communication device 1300 is a chip, the chip includes a transceiver unit and a processing unit, wherein the transceiver unit may be an input/output circuit or a communication interface; and the processing unit may be a processor or a microprocessor or an integrated circuit integrated on the chip.
  • the present application also provides a processing device, including a processor and an interface.
  • the processor can implement the method in the above method embodiment.
  • the above-mentioned processing device can be a chip.
  • the processing device can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
  • FPGA field programmable gate array
  • ASIC application specific integrated circuit
  • SoC system on chip
  • CPU central processor unit
  • NP network processor
  • DSP digital signal processor
  • MCU microcontroller unit
  • PLD programmable logic device
  • each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
  • the steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution.
  • the software module 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 or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
  • Figure 14 is another schematic structural diagram of a communication device provided in an embodiment of the present application.
  • the device 1400 includes a processing circuit 1410, and the processing circuit 1410 is used to execute instructions so that the functions of the terminal device in the methods shown in Figures 5 to 11 above are implemented, or the functions of the network device in the methods shown in Figures 5 to 11 above are implemented.
  • the device 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 send and/or receive signals.
  • the device 1400 may further include a storage medium 1430, which communicates with the processing circuit 1410 and the transceiver circuit 1420 via an internal connection path.
  • the storage medium 1430 is used to store instructions, and the processing circuit 1410 may execute the instructions stored in the storage medium 1430.
  • the apparatus 1400 is used to implement the process corresponding to the terminal device in the above method embodiment.
  • the apparatus 1400 is used to implement a process corresponding to the network device in the above method embodiment.
  • the present application also provides a computer program product, which includes instructions.
  • the instructions are executed by a processor, the functions of the terminal device in the method shown in Figures 5 to 11 are implemented, or the functions of the network device in the method shown in Figures 5 to 11 are implemented.
  • the present application also provides a computer-readable storage medium, which includes instructions.
  • the instructions are executed by a processor, the functions of the terminal device in the method shown in Figures 5 to 11 are implemented, or the functions of the network device in the method shown in Figures 5 to 11 are implemented.
  • the present application also provides a system, which includes one or more terminal devices and one or more network devices mentioned above.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density digital video disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
  • a magnetic medium e.g., a floppy disk, a hard disk, a magnetic tape
  • an optical medium e.g., a high-density digital video disc (DVD)
  • DVD high-density digital video disc
  • SSD solid state disk
  • the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
  • the names of all nodes and messages in this application are merely names set by this application for the convenience of description. The names in the actual network may be different. It should not be understood that this application limits the names of various nodes and messages. On the contrary, any name with the same or similar function as the node or message used in this application is regarded as a method or equivalent replacement of this application, and is within the scope of protection of this application.
  • pre-setting can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, a terminal device).
  • a device for example, a terminal device.
  • the present application does not limit its specific implementation method, such as the preset rules and preset constants in the embodiments of the present application.
  • system and “network” are often used interchangeably in this article.
  • the term “and/or” in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships.
  • a and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
  • At least one of" or “at least one of" herein refers to all or any combination of the listed items.
  • at least one of A, B, and C or “at least one of A, B, or C” may refer to the following six situations: A exists alone, B exists alone, C exists alone, A and B exist at the same time, B and C exist at the same time, and A, B, and C exist at the same time.
  • At least one herein refers to one or more.
  • “More than one” refers to two or more.
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B according to A does not mean determining B only according to A, but B can also be determined according to A and/or other information.
  • the terms “include”, “comprises”, “has” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art.
  • the computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

Landscapes

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

Abstract

本申请实施例提供了一种通信的方法和装置,该方法包括:派生第一密钥,并根据第一密钥派生第三密钥,其中,第一密钥是基于第二密钥并使用第一参数值确定的,第二密钥为主密钥,第一参数值是基于第二参数值更新得到的,或者第一参数值是根据接入第一小区或第一小区所属的辅站的次数确定的,第三密钥为用户面密钥和/或控制面密钥,第三密钥用于对与第一小区之间的数据和/或信令进行加密或数据完整性保护。根据上述方案可以避免密钥重用。

Description

一种通信的方法和装置
本申请要求于2022年09月30日提交国家知识产权局、申请号为202211214503.X、发明名称为“一种通信的方法和装置”的中国专利申请的优先权,以及于2023年04月07日提交国家知识产权局、申请号为202310409631.8、发明名称为“一种通信的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信领域,更具体地,涉及一种通信的方法和装置。
背景技术
在双连接(dual-connectivity,DC)或多连接(multi-radio dual connectivity,MR-DC)的场景中,终端设备会存在执行条件主辅小区(primary secondary cell group cell,PSCell)的添加或变更过程。当终端设备评估到某个候选小区的执行条件满足时,该终端设备可以执行PSCell的添加或变更过程。
为了防止数据被窃听和/或篡改,可以基于安全密钥对终端设备和小区之间的通信进行加密和/或完整性保护。但是终端设备在执行连续的(subsequent)候选小区的添加或变更的过程中,会出现安全密钥重用的问题,从而导致终端设备和辅站下的候选小区之间进行通信的过程不安全。
因此,如何在终端设备执行候选小区的添加或变更的过程中,避免安全密钥重用成为亟需解决的技术问题。
发明内容
本申请实施例提供一种通信的方法和装置,能够在终端设备执行候选小区的添加或变更的过程中,避免密钥重用。
第一方面,提供了一种方法,该方法可以由终端设备执行,也可以由配置于终端设备中的芯片或电路执行,本申请不作限定。
该方法包括:派生(derive)第一密钥,并根据第一密钥派生第三密钥,其中,第一密钥是基于第二密钥并使用第一参数值确定的,第二密钥为主密钥,第一参数值是基于第二参数值更新得到的,或者第一参数值是根据接入第一小区或第一小区所属的辅站的次数确定的,第三密钥为用户面密钥和/或控制面密钥,第三密钥用于对与第一小区之间的数据和/或信令进行加密或数据完整性保护。
作为示例,上述第二密钥可以是终端设备和MN之间的主密钥(master key),例如可以是KgNB,或KeNB。该主密钥用于派生控制面的密钥和/或用户面的密钥,该控制面的密钥和/或用户面的密钥用于对终端设备和MN之间的数据和/或信令进行加密或数据完整性保护。例如,该控制面的密钥用于对终端设备和MN之间的信令进行加密和/或数据完整性保护。又如,该用户面的密钥用于对终端设备和MN之间的数据进行加密和/或数据完整性保护。
作为示例,该第一密钥可以是辅密钥(Secondary key),例如KSN,S-KgNB或S-KeNB。该第一密钥用于派生控制面的密钥和/或用户面的密钥,该控制面的密钥和/或用户面的密钥用于对终端设备和SN之间的数据和/或信令进行加密或数据完整性保护,也即第三密钥。例如,该控制面的密钥用于对终端设备和SN之间的信令进行加密和/或数据完整性保护。又如,该用户面的密钥用于对终端设备和SN之间的数据进行加密和/或数据完整性保护。例如第三密钥为完整性保护密钥(KRRCint或KUPint)和/或加解密密钥(KRRCenc或KUPenc)。
应理解,派生密钥也可以称为推导密钥,或推演密钥,或确定密钥,或获得密钥等。
需要说明的是,在派生第一密钥之前,终端设备可以评估第一小区的执行条件是否被满足,该第一小区为条件小区添加或变更的候选小区。在终端设备评估第一小区的执行条件被满足的情况下,该终端设备可以派生第一密钥,该第一密钥可以用于该第一小区的安全。
应理解,终端设备并不一定在检测到满足条件的小区时立即派生第一密钥,例如终端设备可以在执行接入过程(例如随机接入过程)中或执行接入过程后派生第一密钥。
根据上述方案,可以通过对第二参数值进行更新得到一个新的第一参数值,或者根据接入第一小区或第一小区所属的辅站的次数确定一个新的第一参数值,使得每接入一个候选小区都可以确定一个新的参数值,基于该新的参数值确定派生新的密钥,从而避免在切换候选小区的过程中密钥重用的问题。
结合第一方面,在第一方面的某些实现方式中,该第二参数值为该第一小区或该第一小区所属的辅站上一次使用的参数值,或者该第二参数值为上一次接入使用的参数值。
结合第一方面,在第一方面的某些实现方式中,该第二参数值为第三小区上一次接入使用的参数值,该第三小区为与该第一小区有相同的该第二参数。
结合第一方面,在第一方面的某些实现方式中,在从有不同第二参数值的小区切换到该第一小区的情况下,派生该第一密钥。
结合第一方面,在第一方面的某些实现方式中,该第二参数值为第一小区集合中的小区上一次使用的参数值,其中,该第一小区集合包括该第一小区。
结合第一方面,在第一方面的某些实现方式中,在从该第一小区集合外的小区切换到该第一小区的情况下,派生该第一密钥。
结合第一方面,在第一方面的某些实现方式中,该第一参数值为该第二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。
结合第一方面,在第一方面的某些实现方式中,该第一参数值为根据第三参数值以及接入该第一小区或该第一小区所属的辅站的次数确定的,其中,该第三参数值为该第一小区或该第一小区所属的辅站关联的起始参数值;或者该第一参数值为根据该第三参数值以及接入第一小区集合的小区的次数确定的,该第三参数值为该第一小区集合关联的起始参数值。
结合第一方面,在第一方面的某些实现方式中,该第一参数值为第一集合中的第P个数值,其中P与接入该第一小区或该第一小区所属的辅站的次数相关,该第一集合包括该第一小区或该第一小区所属的辅站关联的多个参数值。
结合第一方面,在第一方面的某些实现方式中,该方法还包括:
向主站发送该第一消息,该第一消息指示满足执行条件的第一小区或第一小区所属的辅站,该第一消息中包括该第一参数值。
第二方面,提供了一种通信的方法,该方法可以由终端设备执行,也可以由配置于终端设备中的芯片或电路执行,本申请不作限定。
该方法包括:派生第一密钥,其中,该第一密钥是基于第二密钥并使用第一参数值确定的,该第二密钥为主密钥,该第一参数值属于第三集合,该第三集合包括第一小区集合关联的多个参数值,该第一小区集合包括该第一小区;根据该第一密钥派生第三密钥,该第三密钥为用户面密钥和/或控制面密钥,该第三密钥用于对与该第一小区之间的数据和/或信令进行加密或数据完整性保护。
结合第二方面,在第二方面的某些实现方式中,该第一参数值是随机从该第三集合包括的多个参数值中选择的。
结合第二方面,在第二方面的某些实现方式中,该第一参数值是该第三集合中的第P个数值,其中P与接入该第一小区集合的次数相关。
结合第二方面,在第二方面的某些实现方式中,从该第三集合中删除该第一参数值。
结合第二方面,在第二方面的某些实现方式中,在从该第一小区集合外的小区切换到该第一小区的情况下,派生该第一密钥。
第三方面,提供了一种通信的方法,该方法可以由网络设备执行,也可以由配置于网络设备中的芯片或电路执行,本申请不作限定。
该方法包括:派生第一密钥,向第一小区或该第一小区所属的辅站发送该第一密钥,其中,该第一密钥用于该第一小区的安全,该第一小区为条件小区添加或变更CPAC的候选小区,该第一密钥是基于第二密钥并使用第一参数值确定的,该第二密钥为主密钥,该第一参数值是从终端设备接收到的,或者该第一参数值是基于第二参数值更新得到的,或者该第一参数值是根据该终端设备接入该第一小 区或该第一小区所属的辅站的次数确定的。
结合第三方面,在第三方面的某些实现方式中,向该第一小区或该第一小区所属的辅站发送第二集合,该第二集合包括该第一小区或该第一小区所属的辅站关联的多个密钥,该多个密钥包括第一密钥。
结合第三方面,在第三方面的某些实现方式中,该方法还包括:接收来自该终端设备的第一消息,该第一消息中包括该第一参数值,该第一消息指示满足执行条件的第一小区或第一小区所属的辅站。
结合第三方面,在第三方面的某些实现方式中,该第二参数值为该第一小区或该第一小区所属的辅站上一次使用的参数值,或者该第二参数值为该终端设备上一次接入使用的参数值。
结合第三方面,在第三方面的某些实现方式中,该第二参数值为第三小区上一次接入使用的参数值,该第三小区为与该第一小区有相同的该第二参数。
结合第三方面,在第三方面的某些实现方式中,在从有不同第二参数值的小区切换到该第一小区的情况下,派生该第一密钥。
结合第三方面,在第三方面的某些实现方式中,该第二参数值为第一小区集合中的小区上一次使用的参数值,其中,该第一小区集合包括该第一小区。
结合第三方面,在第三方面的某些实现方式中,在从该第一小区集合外的小区切换到该第一小区的情况下,派生该第一密钥。
结合第三方面,在第三方面的某些实现方式中,该第一参数值为该第二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。
结合第三方面,在第三方面的某些实现方式中,该第一参数值为根据第三参数值以及该终端设备接入该第一小区或该第一小区所属的辅站的次数确定的,其中,该第三参数值为该第一小区或该第一小区所属的辅站关联的起始参数值;或者该第一参数值为根据该第三参数值以及接入第一小区集合的小区的次数确定的,该第三参数值为该第一小区集合关联的起始参数值。
结合第三方面,在第三方面的某些实现方式中,该第一参数值为第一集合中的第P个数值,其中P与该终端设备接入该第一小区或该第一小区所属的辅站的次数相关,该第一集合包括该第一小区或该第一小区所属的辅站关联的多个参数值。
应理解,上述第三方面及其各种实现方式的有益效果可以参考第一方面及第一方面的各种实现方式。
第四方面,提供了一种通信的方法,该方法可以由网络设备执行,也可以由配置于网络设备中的芯片或电路执行,本申请不作限定。
该方法包括:接收第二集合,根据第一标识或终端设备接入该第一小区或该第一小区所属的辅站的次数从该第二集合中确定该第一密钥,其中,该第二集合包括第一小区或该第一小区所属的辅站关联的多个密钥,该多个密钥包括第一密钥,该第一标识用于指示该第二集合中第一密钥。
上述技术方案中,通过提前为每个候选小区或候选小区所属的辅站提供对应的KSN集合,使得候选小区或候选小区所属的辅站不必只有在接收到MN的重配完成消息之后才可以与终端设备之间安全通信。每个候选小区或候选小区所属的辅站对应的KSN集合中包括了其可能在起始小区添加或变更,以及后续小区变更用到的KSN。
结合第四方面,在第四方面的某些实现方式中,该方法还包括:接收第二消息,该第二消息包括第一标识。
上述技术方案中,通过接收终端设备的第一标识确定使用第二集合中的第一密钥,使得终端设备和辅站之间对齐使用的密钥,保证了终端设备和辅站之间的安全同步,避免了因终端设备尝试接入失败而带来的安全参数不对齐或安全参数回退的问题。
第五方面,提供了一种通信的方法,该方法可以由终端设备执行,也可以由配置于终端设备中的芯片或电路执行,本申请不作限定。
该方法包括:派生第四密钥,根据该第四密钥派生第六密钥,其中,该第四密钥是基于第五密钥确定的,该第五密钥为接入的上一个小区的密钥,或者该第五密钥为上一次接入第二小区或接入第二小区所属的辅站使用的密钥,或者该第五密钥为第二小区集合中的小区上一次使用的密钥,该第一小区集合中包括该第二小区,或者该第五密钥为第四小区上一次接入使用的密钥,该第四小区为与该第 二小区有相同的密钥或有相同的计数值,该第六密钥为用户面密钥和/或控制面密钥,该第六密钥用于对与该第二小区之间的数据和/或信令进行加密和/或数据完整性保护。
需要说明的是,在派生第四密钥之前,终端设备可以评估第二小区的执行条件是否被满足,该第二小区为条件小区添加或变更的候选小区。当终端设备评估第二小区的执行条件被满足时,该终端设备可以派生第四密钥,该第四密钥可以用于该第二小区的安全。
作为示例,上述第四密钥和第五密钥为辅密钥(Secondary key),例如KSN,S-KgNB或S-KeNB。
作为示例,上述第六密钥为完整性保护密钥(KRRCint或KUPint)和/或加解密密钥(KRRCenc或KUPenc)。
上述技术方案中,终端设备每选择一次候选小区,派生第四密钥使用的第五密钥不同,或者派生新的KSN使用的输入密钥KSN均不同,因此每次接入候选小区使用的第五密钥不同,使用第五密钥派生的第六密钥也不同,避免了密钥重用的问题。
结合第五方面,在第五方面的某些实现方式中,在从该第二小区集合外的小区切换到该第二小区的情况下,或者在从有不同计数值的小区切换到该第二小区的情况下,派生该第四密钥。
结合第五方面,在第五方面的某些实现方式中,基于该第五密钥并使用第四参数值派生该第四密钥。
结合第五方面,在第五方面的某些实现方式中,该第四参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者该第四参数值为该第二小区集合关联的参数值,或者第四参数值是基于第五参数值更新得到的,或者该第四参数值是根据接入该第二小区或该第二小区所属的辅站的次数确定的。
结合第五方面,在第五方面的某些实现方式中,该第五参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第五参数值为上一次接入使用的参数值,或者所述第五参数值为第二小区集合中的小区上一次使用的参数值。
第六方面,提供了一种通信的方法,该方法可以由网络设备执行,也可以由配置于网络设备中的芯片或电路执行,本申请不作限定。
该方法包括:派生第四密钥,向该第二小区或该第二小区所属的辅站发送该第四密钥,其中,该第四密钥用于第二小区的安全,该第四密钥是基于第五密钥确定的,该第五密钥为用于接入的上一个小区的密钥,或者该第五密钥为上一次接入该第二小区或接入该第二小区所属的辅站使用的密钥。
结合第六方面,在第六方面的某些实现方式中,基于该第五密钥并使用第四参数值派生该第四密钥,该第四参数值为该第二小区或接入该第二小区所属的辅站关联的参数值,或者该第四参数值为该第二小区集合关联的参数值。
结合第六方面,在第六方面的某些实现方式中,该第五密钥是基于第六密钥并使用第五参数值确定的,该第六密钥为主密钥,该第五参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者第五参数值是基于第六参数值更新得到的,或者该第五参数值是根据该终端设备接入该第二小区或该第二小区所属的辅站的次数确定的,或者该第五参数值为第二小区集合中的小区上一次使用的参数值。
结合第六方面,在第六方面的某些实现方式中,该第六参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第六参数值为该终端设备上一次接入使用的参数值。
应理解,上述第六方面及其各种实现方式的有益效果可以参考第五方面及第五方面的各种实现方式。
第七方面,提供了一种通信的方法,该方法可以由网络设备执行,也可以由配置于网络设备中的芯片或电路执行,本申请不作限定。
该方法包括:派生第四密钥,根据该第四密钥派生第六密钥,其中,该第四密钥用于第二小区的安全,该第四密钥是基于第五密钥确定的,该第五密钥为上一次接入该第二小区或接入该第二小区所属的辅站使用的密钥,或者该第五密钥为第二小区集合中的小区上一次使用的密钥,该第一小区集合中包括该第二小区,或者该第五密钥为第四小区上一次接入使用的密钥,该第四小区为与该第二小区有相同的密钥或有相同的计数值,该第六密钥为用户面密钥和/或控制面密钥,该第六密钥用于对与终端设备之间的数据和/或信令进行加密或数据完整性保护。
结合第七方面,在第七方面的某些实现方式中,基于该第五密钥并使用第四参数值派生该第四密 钥,该第四参数值为该第二小区或接入该第二小区所属的辅站关联的参数值,或者该第四参数值为该第二小区集合关联的参数值。
结合第七方面,在第七方面的某些实现方式中,该第五密钥是基于第六密钥并使用第五参数值确定的,该第六密钥为主密钥,该第五参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者第五参数值是基于第六参数值更新得到的,或者该第五参数值是根据该终端设备接入该第二小区或该第二小区所属的辅站的次数确定的,或者该第五参数值为第二小区集合中的小区上一次使用的参数值。
结合第七方面,在第七方面的某些实现方式中,该第六参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第六参数值为该终端设备上一次接入使用的参数值。
应理解,上述第七方面及其各种实现方式的有益效果可以参考第五方面及第五方面的各种实现方式。
第八方面,提供了一种通信装置,该装置可以是终端设备,也可以是配置于终端设备中的芯片或电路,本申请不作限定。
该装置包括:处理单元,用于派生第一密钥,并根据第一密钥派生第三密钥,其中,第一密钥是基于第二密钥并使用第一参数值确定的,第二密钥为主密钥,第一参数值是基于第二参数值更新得到的,或者第一参数值是根据接入第一小区或第一小区所属的辅站的次数确定的,第三密钥为用户面密钥和/或控制面密钥,第三密钥用于对与第一小区之间的数据和/或信令进行加密或数据完整性保护。
结合第八方面,在第八方面的某些实现方式中,该第二参数值为该第一小区或该第一小区所属的辅站上一次使用的参数值,或者该第二参数值为上一次接入使用的参数值。
结合第八方面,在第八方面的某些实现方式中,该第二参数值为第三小区上一次接入使用的参数值,该第三小区为与该第一小区有相同的该第二参数。
结合第八方面,在第八方面的某些实现方式中,在从有不同第二参数值的小区切换到该第一小区的情况下,派生该第一密钥。
结合第八方面,在第八方面的某些实现方式中,该第二参数值为第一小区集合中的小区上一次使用的参数值,其中,该第一小区集合包括该第一小区。
结合第八方面,在第八方面的某些实现方式中,在从该第一小区集合外的小区切换到该第一小区的情况下,派生该第一密钥。
结合第八方面,在第八方面的某些实现方式中,该第一参数值为该第二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。
结合第八方面,在第八方面的某些实现方式中,该第一参数值为根据第三参数值以及接入该第一小区或该第一小区所属的辅站的次数确定的,其中,该第三参数值为该第一小区或该第一小区所属的辅站关联的起始参数值;或者该第一参数值为根据该第三参数值以及接入第一小区集合的小区的次数确定的,该第三参数值为该第一小区集合关联的起始参数值。
结合第八方面,在第八方面的某些实现方式中,该第一参数值为第一集合中的第P个数值,其中P与接入该第一小区或该第一小区所属的辅站的次数相关,该第一集合包括该第一小区或该第一小区所属的辅站关联的多个参数值。
结合第八方面,在第八方面的某些实现方式中,该装置包括:收发单元,用于向主站发送该第一消息,该第一消息指示满足执行条件的第一小区或第一小区所属的辅站,该第一消息中包括该第一参数值。
应理解,上述第八方面及其各种实现方式的有益效果可以参考第一方面及第一方面的各种实现方式。
第九方面,提供了一种通信装置,该装置可以是终端设备,也可以是配置于终端设备中的芯片或电路,本申请不作限定。
该装置包括:处理单元,用于派生第四密钥,根据该第四密钥派生第六密钥,其中,该第四密钥是基于第五密钥确定的,该第五密钥为接入的上一个小区的密钥,或者该第五密钥为上一次接入该第二小区或接入该第二小区所属的辅站使用的密钥,或者该第五密钥为第二小区集合中的小区上一次使用的密钥,该第一小区集合中包括该第二小区,或者该第五密钥为第四小区上一次接入使用的密钥, 该第四小区为与该第二小区有相同的密钥或有相同的计数值,该第六密钥为用户面密钥和/或控制面密钥,该第六密钥用于对与该第二小区之间的数据和/或信令进行加密或数据完整性保护。
结合第九方面,在第九方面的某些实现方式中,处理单元具体用于在从该第二小区集合外的小区切换到该第二小区的情况下,或者在从有不同计数值的小区切换到该第二小区的情况下,派生该第四密钥。
结合第九方面,在第九方面的某些实现方式中,处理单元具体用于基于该第五密钥并使用第四参数值派生该第四密钥,该第四参数值为该第二小区或接入该第二小区所属的辅站关联的参数值。
结合第九方面,在第九方面的某些实现方式中,该第四参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者该第四参数值为该第二小区集合关联的参数值,或者第四参数值是基于第五参数值更新得到的,或者该第四参数值是根据接入该第二小区或该第二小区所属的辅站的次数确定的。
结合第九方面,在第九方面的某些实现方式中,该第五参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第五参数值为上一次接入使用的参数值,或者所述第五参数值为第二小区集合中的小区上一次使用的参数值。
应理解,上述第九方面及其各种实现方式的有益效果可以参考第五方面及第五方面的各种实现方式。
在第八方面和第九方面中,当通信装置是终端设备时,处理单元可以是处理器,收发单元可以是收发器。当通信装置是配置于终端设备中的芯片或电路时,处理单元可以是处理器,收发单元可以是输入/输出接口、管脚或电路等。
第十方面,提供了一种通信装置,该装置可以是网络设备,也可以是配置于网络设备中的芯片或电路,本申请不作限定。
该装置包括:处理单元,收发单元,其中,处理单元用于派生第一密钥,其中,该第一密钥用于该第一小区的安全,该第一小区为条件小区添加或变更CPAC的候选小区,该第一密钥是基于第二密钥并使用第一参数值确定的,该第二密钥为主密钥,该第一参数值是从终端设备接收到的,或者该第一参数值是基于第二参数值更新得到的,或者该第一参数值是根据该终端设备接入该第一小区或该第一小区所属的辅站的次数确定的。收发单元用于向该第一小区或该第一小区所属的辅站发送该第一密钥。
结合第十方面,在第十方面的某些实现方式中,收发单元具体用于向该第一小区或该第一小区所属的辅站发送第二集合,该第二集合包括该第一小区或该第一小区所属的辅站关联的多个密钥,该多个密钥包括第一密钥。
结合第十方面,在第十方面的某些实现方式中,收发单元还用于接收来自该终端设备的第一消息,该第一消息中包括该第一参数值,该第一消息指示满足执行条件的第一小区或第一小区所属的辅站。
结合第十方面,在第十方面的某些实现方式中,该第二参数值为该第一小区或该第一小区所属的辅站上一次使用的参数值,或者该第二参数值为该终端设备上一次接入使用的参数值。
结合第十方面,在第十方面的某些实现方式中,该第二参数值为第三小区上一次接入使用的参数值,该第三小区为与该第一小区有相同的该第二参数。
结合第十方面,在第十方面的某些实现方式中,处理单元具体用于在从有不同第二参数值的小区切换到该第一小区的情况下,派生该第一密钥。
结合第十方面,在第十方面的某些实现方式中,该第二参数值为第一小区集合中的小区上一次使用的参数值,其中,该第一小区集合包括该第一小区。
结合第十方面,在第十方面的某些实现方式中,处理单元具体用于在从该第一小区集合外的小区切换到该第一小区的情况下,派生该第一密钥。
结合第十方面,在第十方面的某些实现方式中,该第一参数值为该第二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。
结合第十方面,在第十方面的某些实现方式中,该第一参数值为根据第三参数值以及该终端设备接入该第一小区或该第一小区所属的辅站的次数确定的,其中,该第三参数值为该第一小区或该第一小区所属的辅站关联的起始参数值;或者该第一参数值为根据该第三参数值以及接入第一小区集合的小区的次数确定的,该第三参数值为该第一小区集合关联的起始参数值。
结合第十方面,在第十方面的某些实现方式中,该第一参数值为第一集合中的第P个数值,其中P与该终端设备接入该第一小区或该第一小区所属的辅站的次数相关,该第一集合包括该第一小区或该第一小区所属的辅站关联的多个参数值。
应理解,上述第十方面及其各种实现方式的有益效果可以参考第三方面及第三方面的各种实现方式。
第十一方面,提供了一种通信装置,该装置可以是网络设备,也可以是配置于网络设备中的芯片或电路,本申请不作限定。
该装置包括:处理单元,收发单元,其中,处理单元用于派生第四密钥,其中,该第四密钥用于该第二小区的安全,该第四密钥是基于第五密钥确定的,该第五密钥为用于接入的上一个小区的密钥,或者该第五密钥为上一次接入该第二小区或接入该第二小区所属的辅站使用的密钥;收发单元用于向该第二小区或该第二小区所属的辅站发送该第四密钥。
结合第十一方面,在第十一方面的某些实现方式中,处理单元具体用于基于该第五密钥并使用第四参数值派生该第四密钥,该第四参数值为该第二小区或接入该第二小区所属的辅站关联的参数值,或者该第四参数值为该第二小区集合关联的参数值。
结合第十一方面,在第十一方面的某些实现方式中,该第五密钥是基于第六密钥并使用第五参数值确定的,该第六密钥为主密钥,该第五参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者第五参数值是基于第六参数值更新得到的,或者该第五参数值是根据该终端设备接入该第二小区或该第二小区所属的辅站的次数确定的,或者该第五参数值为第二小区集合中的小区上一次使用的参数值。
结合第十一方面,在第十一方面的某些实现方式中,该第六参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第六参数值为该终端设备上一次接入使用的参数值。
应理解,上述第十一方面及其各种实现方式的有益效果可以参考第六方面及第六方面的各种实现方式。
第十二方面,提供了一种通信装置,该装置可以是网络设备,也可以是配置于网络设备中的芯片或电路,本申请不作限定。
该装置包括:处理单元,收发单元,其中,收发单元用于接收第二集合,该第二集合包括第一小区或该第一小区所属的辅站关联的多个密钥,该多个密钥包括第一密钥;处理单元用于根据第一标识或终端设备接入该第一小区或该第一小区所属的辅站的次数从该第二集合中确定该第一密钥,该第一标识用于指示该第一密钥在该第二集合中的位置。
结合第十二方面,在第十二方面的某些实现方式中,收发单元还用于接收第二消息,该第二消息包括第一标识。
应理解,上述第十二方面及其各种实现方式的有益效果可以参考第四方面及第四方面的各种实现方式。
第十三方面,提供了一种通信装置,该装置可以是网络设备,也可以是配置于网络设备中的芯片或电路,本申请不作限定。
该装置包括:处理单元,用于派生第四密钥,根据该第四密钥派生第六密钥,其中,该第四密钥用于该第二小区的安全,该第四密钥是基于第五密钥确定的,该第五密钥为上一次接入该第二小区或接入该第二小区所属的辅站使用的密钥,或者该第五密钥为第二小区集合中的小区上一次使用的密钥,该第一小区集合中包括该第二小区,或者该第五密钥为第四小区上一次接入使用的密钥,该第四小区为与该第二小区有相同的密钥或有相同的计数值,该第六密钥为用户面密钥和/或控制面密钥,该第六密钥用于对与终端设备之间的数据和/或信令进行加密或数据完整性保护。
结合第十三方面,在第十三方面的某些实现方式中,处理单元具体用于在从该第二小区集合外的小区切换到该第二小区的情况下,或者在从有不同计数值的小区切换到该第二小区的情况下,派生该第四密钥。
结合第十三方面,在第十三方面的某些实现方式中,处理单元还用于基于该第五密钥并使用第四参数值派生该第四密钥。
结合第十三方面,在第十三方面的某些实现方式中,该第五密钥是基于第六密钥并使用第五参数 值确定的,该第六密钥为主密钥,该第五参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者第五参数值是基于第六参数值更新得到的,或者该第五参数值是根据该终端设备接入该第二小区或该第二小区所属的辅站的次数确定的。
结合第十三方面,在第十三方面的某些实现方式中,该第六参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第六参数值为该终端设备上一次接入使用的参数值。
应理解,上述第十三方面及其各种实现方式的有益效果可以参考第五方面及第五方面的各种实现方式。
在第十方面至第十三方面中,当通信装置是网络设备时,处理单元可以是处理器,收发单元可以是收发器。当通信装置是配置于网络设备中的芯片或电路时,处理单元可以是处理器,收发单元可以是输入/输出接口、管脚或电路等。
第十四方面,提供一种通信装置,包括处理器和存储介质,该存储介质存储有指令,该指令被处理器运行时,以使得如第一方面或第一方面的任一可能的实现方式中的方法被实现,或者使得如第五方面或第五方面的任一可能的实现方式中的方法被实现。该通信装置可以是终端设备,也可以是配置于终端设备中的芯片或电路。
可选地,所述通信装置还可以包括通信接口,所述通信接口用于接收数据和/或信息,并将接收到的数据和/或信息传输至所述处理器。可选地,所述通信接口还用于输出经处理器处理之后的数据和/或信息。
第十五方面,提供一种通信装置,包括处理器和存储介质,该存储介质存储有指令,该指令被处理器运行时,以使得如第三方面或第三方面的任一可能的实现方式中的方法被实现,或者使得如第四方面或第四方面的任一可能的实现方式中的方法被实现,或者使得如第六方面或第六方面的任一可能的实现方式中的方法被实现,或者使得如第七方面或第七方面的任一可能的实现方式中的方法被实现。该通信装置可以是网络设备,也可以是配置于网络设备中的芯片或电路。
可选地,所述通信装置还可以包括通信接口,所述通信接口用于接收数据和/或信息,并将接收到的数据和/或信息传输至所述处理器。可选地,所述通信接口还用于输出经处理器处理之后的数据和/或信息。
第十六方面,提供一种计算机可读存储介质,所述计算机可读存储介质包括指令,当该指令被处理器运行时,以使得如第一方面或第一方面的任一可能的实现方式中的方法被实现,或者使得如第五方面或第五方面的任一可能的实现方式中的方法被实现。
第十七方面,提供一种计算机可读存储介质,所述计算机可读存储介质包括指令,当该指令被处理器运行时,以使得如第三方面或第三方面的任一可能的实现方式中的方法被实现,或者使得如第四方面或第四方面的任一可能的实现方式中的方法被实现,或者使得如第六方面或第六方面的任一可能的实现方式中的方法被实现,或者使得如第七方面或第七方面的任一可能的实现方式中的方法被实现。
第十八方面,提供一种计算机程序产品,所述计算机程序产品包括计算机程序代码或指令,当所述计算机程序代码或指令被运行时,使得如第一方面或第一方面的任一可能的实现方式中的方法被实现,或者使得如第五方面或第五方面的任一可能的实现方式中的方法被实现。
第十九方面,提供一种计算机程序产品,所述计算机程序产品包括计算机程序代码或指令,当所述计算机程序代码或指令被运行时,使得如第三方面或第三方面的任一可能的实现方式中的方法被实现,或者使得如第四方面或第四方面的任一可能的实现方式中的方法被实现,或者使得如第六方面或第六方面的任一可能的实现方式中的方法被实现,或者使得如第七方面或第七方面的任一可能的实现方式中的方法被实现。
第二十方面,提供一种通信方法,包括如第一方面或第一方面的任一可能的实现方式中的方法,如第三方面或第三方面的任一可能的实现方式中的方法以及如第四方面或第四方面的任一可能的实现方式中的方法。
第二十一方面,提供一种通信方法,包括如第四方面或第四方面的任一可能的实现方式中的方法,如第五方面或第五方面的任一可能的实现方式中的方法以及如第六方面或第六方面的任一可能的实现方式中的方法。
第二十二方面,提供一种通信系统,包括第八方面或第八方面的任一可能的实现方式中的通信装 置,第十方面或第十方面的任一可能的实现方式中的通信装置以及第十二方面或第十二方面的任一可能的实现方式中的通信装置。
第二十三方面,提供一种通信系统,包括第九方面或第九方面的任一可能的实现方式中的通信装置,第十一方面或第十一方面的任一可能的实现方式中的通信装置以及第十三方面或第十三方面的任一可能的实现方式中的通信装置。
第二十四方面,提供一种通信系统,包括第十四方面或第十四方面的任一可能的实现方式中的通信装置以及第十五方面或第十五方面的任一可能的实现方式中的通信装置。
附图说明
图1是适用于本申请实施例的一种通信系统的示意图。
图2是适用于本申请实施例的一种双连接的场景示意图。
图3是现有技术中一种密钥重用的示意图。
图4是现有技术中另一种密钥重用的示意图。
图5是本申请实施例提供的一种通信的方法的示意性流程图。
图6是本申请实施例提供的另一种通信的方法示意性流程图。
图7是本申请实施例提供的另一种通信的方法示意性流程图。
图8是本申请实施例提供的另一种通信的方法示意性流程图。
图9是本申请实施例提供的另一种通信的方法示意性流程图。
图10是本申请实施例提供的另一种通信的方法示意性流程。
图11是本申请实施例提供的另一种通信的方法示意性流程图。
图12是本申请实施例提供的一种通信装置的示意性框图。
图13是本申请实施例提供的通信装置的又一示意性结构图。
图14是本申请实施例提供的通信装置的又一示意性结构图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
本申请实施例的技术方案可以应用于各种通信系统,例如:全球移动通讯(Global System of Mobile communication,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 telecommunication system,UMTS)、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统、第五代(5th Generation,5G)移动通信系统或新空口(new radio,NR)。其中,5G移动通信系统可以是非独立组网(non-standalone,NSA)或独立组网(standalone,SA)。
本申请提供的技术方案还可以应用于机器类通信(machine type communication,MTC)、机器间通信长期演进技术(long term evolution-machine,LTE-M)、设备到设备(device-to device,D2D)网络、机器到机器(machine to machine,M2M)网络、物联网(internet of things,IoT)网络或者其他网络。其中,IoT网络例如可以包括车联网。其中,车联网系统中的通信方式统称为车到其他设备(vehicle to X,V2X,X可以代表任何事物),例如,该V2X可以包括:车辆到车辆(vehicle to vehicle,V2V)通信,车辆与基础设施(vehicle to infrastructure,V2I)通信、车辆与行人之间的通信(vehicle to pedestrian,V2P)或车辆与网络(vehicle to network,V2N)通信等。
本申请提供的技术方案还可以应用于未来的通信系统,如第六代(6th Generation,6G)移动通信系统等。本申请对此不作限定。
在本申请实施例中,终端设备也可以称为用户设备(user equipment,UE)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。
终端设备可以是一种向用户提供语音/数据连通性的设备,例如,具有无线连接功能的手持式设备、 车载设备等。目前,一些终端的举例可以为:手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑(如笔记本电脑、掌上电脑等)、移动互联网设备(mobile internet device,MID)、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端(例如,电视机等家电、智慧盒子、游戏机)、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等。
其中,可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。
此外,终端设备还可以是物联网(Internet of things,IoT)系统中的终端设备。IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。IoT技术可以通过例如窄带(narrow band,NB)技术,做到海量连接,深度覆盖,终端省电。
在本申请实施例中,该终端设备还可以是车辆或整车,通过车联网可以实现通信,也可以是位于车辆内(例如放置在车辆内或安装在车辆内)的部件,即车载终端设备、车载模块或者车载单元(on-board unit,OBU)。
此外,终端设备还可以包括智能打印机、火车探测器、加油站等传感器,主要功能包括收集数据(部分终端设备)、接收网络设备的控制信息与下行数据,并发送电磁波,向网络设备传输上行数据。
本申请实施例中,网络设备可以是任意一种具有无线收发功能的设备。该设备包括但不限于:演进型节点B(evolved Node B,eNB)、无线网络控制器(radio network controller,RNC)、节点B(Node B,NB)、基站控制器(base station controller,BSC)、基站收发台(base transceiver station,BTS)、家庭基站(例如,home evolved NodeB,或home Node B,HNB)、基带单元(baseband unit,BBU),无线保真(wireless fidelity,WiFi)系统中的接入点(access point,AP)、无线中继节点、无线回传节点、传输点(transmission point,TP)或者发送接收点(transmission and reception point,TRP)等,还可以为5G,如,NR,系统中的gNB,或,传输点(TRP或TP),5G系统中的基站的一个或一组(包括多个天线面板)天线面板,或者,还可以为构成gNB或传输点的网络节点,如基带单元(BBU),或,分布式单元(distributed unit,DU),或者下一代通信6G系统中的基站等。
在一些部署中,gNB可以包括集中式单元(centralized unit,CU)和DU。gNB还可以包括有源天线单元(active antenna unit,AAU)。CU实现gNB的部分功能,DU实现gNB的部分功能。比如,CU负责处理非实时协议和服务,实现无线资源控制(radio resource control,RRC),分组数据汇聚层协议(packet data convergence protocol,PDCP)层的功能。DU负责处理物理层协议和实时服务,实现无线链路控制(radio link control,RLC)层、媒体接入控制(medium access control,MAC)层和物理(physical,PHY)层的功能。AAU实现部分物理层处理功能、射频处理及有源天线的相关功能。由于RRC层的信息最终会变成PHY层的信息,或者,由PHY层的信息转变而来,因而,在这种架构下,高层信令,如RRC层信令,也可以认为是由DU发送的,或者,由DU和CU发送的。可以理解的是,网络设备可以为包括CU节点、DU节点、AAU节点中一项或多项的设备。此外,可以将CU划分为接入网(radio access network,RAN)中的网络设备,也可以将CU划分为核心网(core network,CN)中的网络设备,本申请对此不做限定。
网络设备为小区提供服务,终端设备通过网络设备分配的传输资源(例如,频域资源,或者说,频谱资源)与小区进行通信,该小区可以属于宏基站(例如,宏eNB或宏gNB等),也可以属于小小 区(small cell)对应的基站,这里的小小区可以包括:城市小区(metro cell)、微小区(micro cell)、微微小区(pico cell)、毫微微小区(femto cell)等,这些小小区具有覆盖范围小、发射功率低的特点,适用于提供高速率的数据传输服务。
图1是适用于本申请实施例的通信系统100的示意图。如图1所示,该通信系统100可以包括至少一个终端设备,例如图1所示的终端设备110;该通信系统100还可以包括至少两个网络设备,例如图1所示的网络设备120以及网络设备130。其中,终端设备110可以同时与网络设备120、网络设备130进行通信。作为示例,终端设备110与网络设备120之间,以及终端设备110与网络设备130之间可通过无线链路通信。各通信设备,如终端设备110、网络设备120或网络设备130,均可以配置多个天线。对于该通信系统中的每一个通信设备而言,所配置的多个天线可以包括至少一个用于发送信号的发送天线和至少一个用于接收信号的接收天线。因此,该通信系统中的各通信设备之间,终端设备110与网络设备120之间,以及终端设备110与网络设备130之间可通过多天线技术通信。
应理解,图1仅为便于理解而示例的简化示意图,该通信系统中还可以包括其他网络设备或者还可以包括其他终端设备,图1中未予以画出。
还应理解,终端设备110同时与网络设备120、网络设备130进行通信也可以称为终端设备的双连接(dual-connectivity,DC)或多连接(multi-radio dual connectivity,MR-DC)。其中,与终端设备110通信的一个网络设备可以称为主站(master node,MN),另一个与终端设备110通信的网络设备可以称为辅站(secondary node,SN)。作为示例,假设网络设备120为MN,网络设备130为SN。
上述MN和SN可以是相同类型的网络设备相同,或者也可以是不同类型的网络设备,本申请实施例对此不做具体限定。具体的有关网络设备的描述请参见上文中的说明,此处暂不详述。
图2是适用于本申请实施例的一种双连接的场景示意图。如图2所示,当双连接与载波聚合(carrier aggregation,CA)结合时,每个网络设备下可以包括一个小区组(cell group,CG)。其中,MN下的小区组为主小区组(master cell group,MCG),SN下的小区组为辅小区组(secondary cell group,SCG)。主小区组中可以包括一个主小区(primary cell,PCell)和至少一个辅小区(secondar cell,SCell),辅小区组中可以包括一个主辅小区(primary secondar cell,PSCell)和至少一个辅小区(secondar cell,SCell)。
应理解,当双连接没有与CA结合时,主站下只有一个主小区,辅站下只有一个主辅小区。该场景也适用于本申请实施例。
应理解,为了便于描述,图2中是以每个小区组中包括2个SCell为例进行说明的。
在DC场景中,终端设备会存在执行PSCell的添加或变更过程。终端设备触发的PSCell的添加称为条件PSCelll添加(conditional PSCell addition,CPA),终端设备触发的PSCell的变更称为条件PSCelll变更(conditional PSCell change,CPC)。其中,CPA可以理解为PSCell的条件性添加,当终端设备满足PSCell的添加条件时,该终端设备执行PSCell的添加过程。CPC可以理解为PSCell的条件性变更,当终端设备满足PSCell的变更条件时,该终端设备执行PSCell的变更过程。具体的,作为示例,CPA以及CPC也可以统称为条件PSCelll添加和变更(conditional PSCell addition/change,CPAC)。也即网络配置会配置多个候选PSCell,并向终端设备发送CPAC配置,该CPAC配置中包括有该多个候选PSCell的配置和对应的执行条件。当终端设备评估到某个候选PSCell的执行条件满足时,该终端设备可以执行PSCell的添加或变更过程。满足执行条件的小区可以成为选择的小区。
上述终端设备在执行完上述CPA或CPC的过程,与满足条件的候选PSCell之间建立连接(例如,随机接入信道(random access channel,RACH))后,该终端设备会释放CPA配置和/或CPC配置。因此,在网络重配或者网络重新启动之前,该终端设备无法继续使用CPA配置和/或CPC配置。为了减少辅小区组变更的时延和信令开销,终端设备可以不释放CPA配置和/或CPC配置,在网络重配或者网络重新启动之前,该终端设继续使用之前存储的CPA配置或CPC配置,从而继续执行CPA或CPC的过程。
为了便于描述,本申请中可以将CPA或CPC统称为CPAC。将CPA配置或CPC配置统称为CPAC配置。
举例说明,以终端设备执行CPC过程为例。假设终端设备当前与MN以及SN下小区0通信(可能还有其他SCell小区),即小区0为终端设备此时的PSCell。假设终端设备接收到CPC配置,该CPC配置中包括候选小区1~候选小区3的配置信息,以及候选小区1~候选小区3中每个候选小区对应的执 行条件。当终端设备检测到候选小区3的执行条件被满足,则该终端设备可以执行CPC过程,将PSCell从小区0变更为候选小区3。终端设备在完成与候选小区3的连接后,并不释放CPC配置,而是继续维护CPC配置,并执行CPC过程。该终端设备还可以根据存储的CPC配置继续评估其他候选小区,当有其他候选小区满足执行条件时,终端设备应再次触发CPC过程。例如,终端设备后续又检测到候选小区1满足执行条件,因此终端设备又将PSCell从候选小区3切换为候选小区1,并完成与候选小区1的连接。
为了防止数据被窃听和/或篡改,可以基于安全密钥对终端设备和网络设备之间的通信进行加密和/或完整性保护。在上述DC场景下,一个示例,终端设备与MN之间的通信是基于主密钥(master key,例如KgNB或KeNB)派生的用于控制面的密钥(无线资源控制(radio resource control,RRC)密钥,例如完整性保护密钥KRRCint和加解密密钥KRRCenc)和/或用于用户面的密钥(UP密钥,例如完整性保护密钥KUPint和加解密密钥KUPenc)。另一个示例,终端设备与SN之间的通信是基于辅密钥(secondary key,例如KSN,S-KgNB或S-KeNB,下文统一使用KSN描述)派生的用于控制面的密钥和/或用于用户面的密钥。该KSN是基于KgNB,使用SN counter(或sk-counter,下文统称为SN counter)派生的密钥,其中,SN counter是当前安全上下文关联的一个SN counter。MN在每次需要新的KSN或更新KSN时,MN生成或更新SN Counter并发送给UE。MN和UE使用相同的主密钥和SN Counter派生出相同的KSN。应理解,除SN Counter外,派生KSN的输入参数还可以包括其他参数,例如SNCounter的长度等。MN将派生的KSN发送给待添加或待接入的辅站,由此实现终端设备与辅站之间KSN的对齐,从而终端设备和辅站使用相同的KSN派生相同的完整性和/或加解密密钥,保证两者之间的通信安全。
上述为了减少变更的时延和信令开销,终端设备不释放CPAC配置,在网络重配或者网络重新启动之前,该终端设备继续使用之前存储的CPAC配置。上述过程虽然可以减少辅小区组变更的时延和信令开销,但是在终端设备根据CPAC配置继续执行CPAC的过程中,该终端设备和SN下的PSCell进行通信时,会存在密钥重用的问题,从而导致终端设备和SN下的PSCell之间进行通信的过程不安全。
应理解,密钥重用指的是终端设备使用相同的密钥加密/完整性保护通信数据包一次以上(例如两次),若攻击者获取到两个或以上使用相同密钥加密/完整性保护的密文,则会有明文被披露的风险。
例如,假设上述CPAC配置中包括候选小区1的配置和执行条件、候选小区2的配置和执行条件、候选小区3的配置和执行条件,以及一个SN Counter。或者,上述CPAC配置中包括候选小区1的配置、执行条件以及SN Counter#1;候选PSCell 2的配置、执行条件以及SN Counter#2;候选PSCell 3的配置、执行条件以及SN Counter#3。其中每个候选小区关联的SN Counter相等,即SN Counter#1=SN Counter#2=SN Counter#3。
图3是现有技术中一种密钥重用的示意图。如图3所示,当终端设备完成第一次CPA或CPC后(此次使用的KSN为基于KgNB与SN Counter(或SN Counter#1)派生的),该终端设备再次触发CPC时,由于CPAC配置中每个候选小区关联的KgNB和SN Counter(或SN Counter#1)均没有变化,则此次使用的KSN没有变化,还是与终端设备完成第一次CPA或CPC使用的KSN相同。这样,基于相同的KSN推导的用户面和控制面的密钥也相同,会存在密钥流重用的风险。
又如,假设上述CPAC配置中包括候选小区1的配置、执行条件以及SN Counter#1;候选l小区2的配置、执行条件以及SN Counter#2;候选小区3的配置、执行条件以及SN Counter#3。其中,不同SN下的候选小区或者每个候选小区关联的SN Counter不相等,例如SN Counter#1≠SN Counter#2≠SN Counter#3。
图4是现有技术中另一种密钥重用的示意图。如图4所示,当终端设备与候选小区1之间完成第一次CPA或CPC后(此次使用的KSN为基于KgNB与SN Counter#1派生的)。该终端设备后续如果再次触发变更到该候选小区1时,由于KgNB和SN Counter#1与上次接入到该候选小区1时使用的相同,因此,此次使用的KSN还是基与上次接入到候选小区1使用的KSN相同。这样,基于相同的KSN推导的用户面和控制面的密钥也相同,会存在密钥流重用的风险。
在现有技术中,是否重建分组数据汇聚协议(packet data convergence protocol,PDCP)是网络设备指示的,例如网络设备通过reestablishPDCP指示信息指示UE在PSCell切换时是否执行PDCP的重 建过程。需要理解的是,如果在切换过程中要变更密钥,网络设备需要指示终端设备执行PDCP重建,并在PDCP重建过程中完成密钥的变更。因此,在连续CPAC的场景下,网络设备要指示每次切换时是否要执行PDCP重建,或者要指示每次切换时是否要变更密钥,可以还可以通过以下方式:
方式1:通过候选小区组(或候选小区集合)的方式来指示:网络向UE提供多个小区集合,每个小区集合中包括一个或多个小区。每个小区集合对应相同的SN Counter。如果UE的源小区和目标小区属于同一个小区集合,则UE在切换时不执行PDCP重建,也即不执行新的密钥的推演。如果UE的源小区和目标小区属于不同的小区集合,则UE在切换时要执行PDCP重建,也要执行新的密钥的推演。小区集合中的小区的SN Counter值相同。一个小区集合的SN Counter可以是一个或者多个。
方式2:网络给每个候选小区配置关联的SN Counter。每个小区配置的关联的SN Counter可以是一个,或者多个(即SN Counter集合)。不同的候选小区关联的SN Counter/可以相同,也可以不同。如果UE切换的源小区和目标小区的SN Counter相同,则UE不需要执行PDCP重建,也即不需要推演新的密钥;如果UE切换的源小区和目标小区的SN Counter/SN Counter集合不同,则UE需要执行PDCP重建,也即UE需要推演新的密钥。
方式3:网络给每个候选小区配置关联的SN Counter。每个小区配置的关联的SN Counter可以是一个,或者多个(即SN Counter集合)。不同的候选小区关联的SN Counter/可以相同,也可以不同。网络指示UE从某个小区切换至另一个小区时是否执行PDCP重建。例如共有3个候选小区(小区1,小区2和小区3)。网络分别指示UE从小区1切换至小区2,从小区2切换至小区1,从小区1切换至小区3,从小区3切换至小区1,从小区2切换至小区3,从小区3切换至小区2是否需要PDCP重建。如果网络指示需要PDCP重建,则UE需要执行PDCP重建,也即UE需需要推演新的密钥。如果网络指示需要不PDCP重建,则UE不需要执行PDCP重建,也即UE不需需要推演新的密钥。
以上述的方式1为例,如果UE再次切换至某个小区集合中包括的小区,那么推演密钥所使用的SN Counter还是该小区集合对应的SN Counter,同样也会存在密钥流重用的风险。
有鉴于此,本申请实施例提供了一种通信的方法,该方法可以避免在CPAC场景下密钥重用的问题。
图5是本申请实施例提供的一种通信的方法的示意性流程图。如图5所示,该方法可以包括步骤510-520,下面分别对步骤510-520进行详细描述。
步骤510:派生(derive)第一密钥,第一密钥是基于第二密钥并使用第一参数值确定的。
作为示例,本申请实施例中可以基于第二密钥并使用第一参数值派生第一密钥。具体的,可以是终端设备基于第二密钥并使用第一参数值派生第一密钥。该第一密钥可以是辅密钥(Secondary key),例如KSN,S-KgNB或S-KeNB。应理解,派生第一密钥也可以称为推导第一密钥,或推演第一密钥,或确定第一密钥,或获得第一密钥等。
需要说明的是,终端设备可以评估第一小区的执行条件是否被满足,该第一小区可以为条件小区添加或变更的候选小区。若终端设备评估第一小区的执行条件被满足,或终端设备接入满足执行条件的候选小区,该终端设备可以确定第一参数值,并使用第一参数值派生第一密钥。
上述第二密钥可以是终端设备和MN之间的主密钥(master key),例如可以是KgNB,或KeNB。该主密钥用于派生控制面的密钥和/或用户面的密钥,该控制面的密钥和/或用户面的密钥用于对终端设备和MN之间的数据和/或信令进行加密或数据完整性保护。例如,该控制面的密钥用于对终端设备和MN之间的信令进行加密或数据完整性保护。又如,该用户面的密钥用于对终端设备和MN之间的数据进行加密或数据完整性保护。
上述第一密钥可以是Secondary key,例如KSN,S-KgNB或S-KeNB。该第一密钥用于派生控制面的密钥和/或用户面的密钥,该控制面的密钥和/或用户面的密钥用于对终端设备和SN之间的数据和/或信令进行加密或数据完整性保护。例如,该控制面的密钥用于对终端设备和SN之间的信令进行加密或数据完整性保护。又如,该用户面的密钥用于对终端设备和SN之间的数据进行加密或数据完整性保护。
上述第一参数值的确定方式有多种,本申请实施例对此不做具体限定。下面对几种可能的实现方式进行举例说明。
一种可能的实现方式中,第一参数值可以是基于第二参数值更新得到的。例如,第一参数值为第 二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。终端设备在派生第一密钥之前,例如若终端设备评估某个候选小区满足执行条件,终端设备将第二参数值更新为第一参数值。例如,终端设备检测到候选小区1满足对应的执行条件,或者终端设备在接入候选小区1之前,终端设备将SN Counter更新为SN Counter+1。下面会结合图6对这种实现方式进行详细描述,此处暂不详述。
一个示例,第二参数值为第一小区或第一小区所属的辅站上一次使用的参数值(或者,第二参数值为终端设备在第一小区或第一小区所属的辅站上一次使用的参数值),或者第二参数值为上一次接入使用的参数值(或者,第二参数值为上一次使用的参数值)。
另一个示例,第二参数值为第一小区集合中的小区上一次使用的参数值,其中,第一小区集合包括第一小区。也即终端设备针对第一小区集合中的小区维护一个SN Counter。换句话说,第一小区集合中的小区的第二参数值(例如SN Counter)相同。当终端设备从另一个小区集合中的小区切换到第一小区集合中的小区时,终端设备衍生第一密钥。终端设备衍生的第一密钥基于第一参数来确定的。第一参数是基于第二参数更新的,第二参数是第一小区集合中的小区上一次使用的SN Counter。示例性地,第一小区集合用于指示终端设备执行PDCP重建。例如终端设备从第一小区集合中的小区切换到第一小区集合中的另一个小区,不需要执行PDCP重建;终端设备从第一小区集合外的小区切换到第一小区集合中的小区,需要执行PDCP重建。
再一个示例,第二参数值为第三小区上一次使用的参数值,其中,第三小区与第一小区配置有相同的SN Counter。也即终端设备针对每个候选小区维护一个SN Counter。不同候选小区的SN Counter可以相同,也可以不同。当终端设备从另一个小区切换到第一小区时,如果两个小区的SN Counter不同,终端设备衍生第一密钥。UE衍生的第一密钥基于第一参数值来实现的。第一参数是基于第二参数值更新的,第二参数值是与第一小区有相同的SN Counter的小区上一次使用的SN Counter值。作为示例,第三小区也可以是第一小区。另一种可能的实现方式中,第一参数值为根据第三参数值以及接入所述第一小区或所述第一小区所属的辅站的次数确定的,其中,第三参数值为第一小区或第一小区所属的辅站关联的起始参数值。终端设备在派生第一密钥之前,例如若终端设备评估某个候选小区满足执行条件,终端设备根据第三参数值以及接入所述第一小区或所述第一小区所属的辅站的次数更新第一参数值。例如,终端设备检测到候选小区2满足对应的执行条件,或者终端设备在接入候选小区2之前,终端设备更新SN Counter为候选小区2或候选小区所属的辅站的SN Counter起始值加终端设备接入候选小区2或候选小区所属的辅站的次数。下面会结合图7对这种实现方式进行详细描述,此处暂不详述。
另一种可能的实现方式中,第一参数值为根据第三参数值以及接入第一小区集合的小区的次数确定的,其中,第三参数值为该第一小区集合关联的起始参数值。其中,第一小区集合包括第一小区。也即终端设备针对第一小区集合维护一个SN Counter。当终端设备从另一个小区集合中的小区切换到第一小区集合中的小区时,终端设备衍生第一密钥。终端设备在派生第一密钥之前,例如若终端设备评估某个候选小区满足执行条件,终端设备根据第三参数值以及接入所述第一小区集合中小区的次数更新第一参数值。例如,终端设备检测到候选小区2满足对应的执行条件,或者终端设备在接入候选小区2之前,终端设备更新SN Counter为候选小区2所在小区集合的SN Counter起始值加终端设备接入该小区集合的次数。下面会结合图7对这种实现方式进行详细描述,此处暂不详述。
另一种可能的实现方式中,第一参数值可以是第一集合中的第P个数值,其中P与接入第一小区或第一小区所属的辅站的次数相关,第一集合包括第一小区或第一小区所属的辅站关联的多个参数值。下面会结合图8对这种实现方式进行详细描述,此处暂不详述。
另一种可能的实现方式中,第一参数值是从第三集合中选择的,所述第三集合包括所述第一小区集合关联的多个参数值,所述多个参数值包括所述第一参数值。一个示例,第一参数值是随机从所述第三集合包括的多个参数值中选择的。另一个示例,第一参数值是按照第三集合中的参数值从大到小,或者从小到大依次选择的。再一个示例,第一参数值是所述第三集合中的第P个数值,其中P与接入所述第一小区或所述第一小区所属的辅站的次数相关。也即终端设备针对第一小区集合维护一组SN Counter。当终端设备从第一小区集合外的小区切换到第一小区时,终端设备推演第一密钥。终端设备从第一小区集合的SN Counter集合中挑选新的SN Counter,并推导新的密钥。挑选的规则可以是根据 UE接入该小区集合的次数依次进行选择,或者也可以随机挑选(与UE接入该小区集合的次数没有关系),需要保证每次挑选的SN Counter不重复。
示例性地,第一小区集合可以是网络设备配置的。例如指示第一小区集合中包括的候选小区的标识。
示例性地,或者第一小区集合不是网络设备配置的。第一小区集合包括有相同第二参数值集合(例如,SN Counter集合)的小区。在该示例中,第一参数值是从第三集合中选择的,所述第三集合包括多个参数值,所述多个参数值包括所述第一参数值。多个候选小区可以关联该第三集合。在终端设备从关联非第三集合的小区切换到关联了该第三集合的小区的情况下,终端设备推演第一密钥。
应理解,上述第一参数值,第二参数值,第三参数值可以是对参数SN Counter的不同取值。
步骤520:根据第一密钥派生第三密钥,该第三密钥为用户面密钥和/或控制面密钥。
本申请实施例中可以根据第一密钥派生第三密钥,也即该第三密钥为基于第一密钥派生的用户面密钥和/或控制面密钥。其中,该控制面的密钥和/或用户面的密钥用于对终端设备和第一小区之间的数据和/或信令进行加密或数据完整性保护。该用户面的密钥用于对终端设备和该第一小区之间的数据进行加密或数据完整性保护。
上述技术方案中,可以通过对第二参数值进行更新得到一个新的第一参数值,或者根据接入第一小区或第一小区所属的辅站的次数确定一个新的第一参数值,使得终端设备每接入一个小区都可以确定一个新的参数值,基于该新的参数值确定派生新的密钥,从而避免在切换候选小区的过程中密钥重用的问题。
应理解,根据第一密钥派生第三密钥还可以使用其他输入参数,例如安全算法类型标识,安全算法类型标识的长度、安全算法标识以及安全算法标识的长度中的一项或多项。
可选地,在一些实施例中,终端设备还可以将确定的第一参数值发送给MN。具体的,终端设备可以向主站MN发送第一消息,该第一消息指示满足执行条件的第一小区或第一小区所属的辅站,该第一消息中可以包括所述第一参数值。也就是说,该第一消息既包括指示满足执行条件的第一小区或第一小区所属的辅站的指示信息,又包括所述第一参数值。例如,第一消息可以是RRC重配完成消息。在一些实施例中,MN可以在第X消息中将多个可能用到的KSN发送给候选SN。第X消息可以是SN添加请求消息。在该实现方式中如果SN认为接收到的KSN即将全部使用,或全部被使用,SN可以向MN请求KSN的更新。该请求消息用于请求多个KSN的更新。
需要说明的是,MN可以基于第二参数值更新得到第一参数值,或者根据所述终端设备接入所述第一小区或所述第一小区所属的辅站的次数确定第一参数值。此时,终端设备向MN发送的第一消息中不包括该第一参数值。
应理解,MN确定第一参数值的实现过程和步骤510中终端设备得到第一参数值的过程相同,具体的请参考步骤510中的描述,此处不再赘述。
上述MN还可以基于第二密钥并使用第一参数值派生第一密钥。MN在派生得到第一密钥后,还可以向第一小区或第一小区所属的辅站发送所述第一密钥。一种可能的实现方式中,MN向第一小区或第一小区所属的辅站发送第二集合,该第二集合包括第一小区或第一小区所属的辅站关联的多个密钥,该多个密钥包括上述第一密钥。该辅站接收到第二集合后,可以根据第一标识或终端设备接入第一小区或第一小区所属的辅站的次数从第二集合中确定第一密钥。该第一标识用于指示第二集合中的第一密钥。下面会结合图8对这种实现方式进行详细描述,此处暂不详述。
应理解,本申请实施例对候选SN的个数以及每个候选SN下包括的候选小区的个数不做具体限定。为了便于描述,下面以包括两个候选SN(候选SN1,候选SN2),候选SN1下包括候选小区1、候选小区2、候选小区3,候选SN2下包括候选小区4、候选小区5、候选小区6为例进行说明。
下面结合图6,对步骤510中更新得到第一参数值的具体实现过程进行详细描述。应理解,图6的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据图6所给出的下面的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。
图6是本申请实施例提供的另一种通信的方法示意性流程图。如图6所示,该方法可以包括步骤610-699,下面分别对步骤610-699进行详细描述。
步骤610:终端设备与MN建立RRC连接。
步骤615:终端设备与源SN建立RRC连接。
需要说明的是,步骤615是可选地。
作为示例,如果终端设备进行的是CPC过程,也即该终端设备已经和源SN下的某个小区建立有连接,即UE有服务的PSCell,后续该终端设备需要根据执行条件进行PSCell的变更过程。这种实现方式中,该终端设备还可以与源SN建立RRC连接。
作为示例,如果终端设备进行的是CPA过程,也即该终端设备根据执行条件进行PSCell的添加过程,这种实现方式中,该终端设备可以仅和MN建立RRC连接,不需要执行步骤615建立与源SN之间的RRC连接。
步骤620:MN向候选SN1发送SN添加请求消息1,该SN添加请求消息1中包括KSN1。
作为示例,本实施例中候选SN1下包括的每个候选小区对应一个SN Counter1,也即每个候选小区对应的SN Counte相同。MN可以根据KgNB以及SN Counter计算得到KSN1。MN还可以向候选SN1或候选SN1下的候选小区(例如,候选小区1,候选小区2,候选小区3)发送SN添加请求消息1,该SN添加请求消息1中包括KSN1。其中,KgNB为所述MN和终端设备之间进行通信时需要使用的密钥,对应于上文中的主密钥。可选地,MN还可以根据KgNB、SN Counter以及SN Counter的长度等参数计算得到KSN1。
应理解,SN Counter1可以对应于上文中的第二参数值。
步骤625:候选SN1向MN发送SN添加请求确认消息1。
本申请实施例中,候选SN1在接收到MN发送的SN添加请求消息1后,如果该候选SN1确认可以为其包括的候选小区分配资源,该候选SN1可以向MN发送SN添加请求确认消息1,该SN添加请求确认消息1指示所述候选SN1确认可以添加为候选SN。
步骤630:MN向候选SN2发送SN添加请求消息2。
作为示例,本实施例中候选SN2下包括的每个候选小区对应一个SN Counter1,也即每个候选小区对应的SN Counte相同。MN可以根据KgNB以及SN Counter计算得到KSN1。MN还可以向候选SN2或候选SN2下的候选小区(例如,候选小区4,候选小区5,候选小区6)发送SN添加请求消息2,该SN添加请求消息2中包括KSN1。
步骤635:候选SN2向MN发送SN添加请求确认消息2。
本申请实施例中,候选SN2在接收到MN发送的SN添加请求消息2后,如果该候选SN1确认可以为其包括的候选小区分配资源,该候选SN2可以向MN发送SN添加请求确认消息2,该SN添加请求确认消息2指示所述候选SN2确认可以添加为候选SN。
应理解,上述步骤620和630之间,以及步骤625和635之间的执行先后顺序不做限制。
步骤640:MN向终端设备发送RRC重配消息。
MN向终端设备发送的RRC重配消息中可以包括CPAC配置,该CPAC配置中可以包括候选SN1以及候选SN2下包括的每个候选小区的配置及对应的执行条件,以及SN Counter1。具体的,作为示例,该CPAC配置中包括候选小区1~候选小区6的配置及对应的执行条件,以及SN Counter1。
步骤645:终端设备向MN回复RRC重配完成消息1。
终端设备在收到MN的RRC重配消息并成功完成重配置后,向MN回复RRC重配完成消息1。
步骤650:终端设备评估CPAC配置中包括的候选小区是否满足执行条件。
终端设备在接收到MN发送的CPAC配置后,可以开始评估CPAC配置中包括的执行条件,确定CPAC配置中包括的候选小区是否满足执行条件。
步骤655:终端设备根据CPAC配置中包括的SN Counter1确定KSN1。
如果终端设备检测到某个候选小区的执行条件被满足,或者终端设备要接入到满足执行条件的候选小区,终端设备可以根据主密钥,并使用CPAC配置中包括的SN Counter1派生KSN1。终端设备保存KSN1,并且可以基于KSN1派生对与所述候选小区1之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN1派生对与所述候选小区1之间的信令进行加密或数据完整性保护的控制面密钥。
步骤660:终端设备向MN发送RRC重配完成消息2,该RRC重配完成消息2中包括发送给候选 SN1的RRC重配完成消息。
如果终端设备确定某个候选小区的执行条件被满足,该终端设备可以向MN发送RRC重配完成消息,该RRC重配完成消息中可以指示终端设备选择的候选小区。作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区1,该终端设备可以向MN发送RRC重配完成消息2,该RRC重配完成消息2中包括发送给候选SN1(候选小区1所属的候选SN)的SN重配完成消息。该RRC重配完成消息2中可以指示终端设备选择的候选小区为候选小区1。
步骤665:MN向候选SN1转发SN重配完成消息。
本申请实施例中,MN在接收到终端设备发送的RRC重配完成消息2后,可以根据该消息确定终端设备选择的是候选小区1,MN向候选小区1所在的候选SN1转发SN重配完成消息。
需要说明的是,本申请实施对步骤655、步骤660和步骤665的执行顺序不做具体限定,可以先执行步骤655,再执行步骤660和步骤665;或者,也可以先执行步骤660和步骤665,再执行步骤655;或者,还可以同时执行步骤655、步骤660以及步骤665。步骤655中的派生KSN1与根据KSN1派生完整性保护或加解密密钥可以连续执行,也可以分开执行。例如终端设备先派生KSN1,在执行下述步骤670之前或之后再根据KSN1派生完整性保护或加解密密钥。
步骤667:MN基于更新后的SN Counter派生KSN2。
可选地,在一些实施例中,MN还可以在每次执行完一次CPA或CPC后,为所有的候选SN(例如,候选SN1,候选SN2)或者所有候选小区(例如,候选小区1~候选小区6)派生一个新的密钥,该新的密钥用于下次触发的CPC过程。
作为示例,MN可以根据SN Counter更新规则对CPAC配置中包括的SN Counter1进行更新得到SN Counter2,并使用SN Counter2派生KSN2。举例说明,一种可能的实现方式中,SN Counter更新规则为SN Counter更新为SN Counter+N,其中,N为大于或等于1的正整数,或者N为条件小区添加或变更的候选小区的最大个数。终端设备可以基于该SN Counter更新规则,对SN Counter1+N得到SN Counter2,并基于SN Counter2派生KSN2。
步骤668:MN向候选SN1以及候选SN2发送所述KSN2。
MN可以将步骤667中派生的用于下次触发的CPC过程中使用的KSN2发送给所有的候选小区或所有的候选小区所属的候选SN。
上述技术方案中,MN可以在执行完一次CPA或CPC后,将下次触发的CPC过程中使用的密钥KSN2提前下发给所有的候选SN,以便于候选SN在下一次CPC过程中,可以提前获得密钥KSN2,而不必只有在接收到MN的重配完成消息之后才可以与终端设备之间安全通信。
步骤670:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。候选SN1同样也可以基于接收到的KSN1派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN1派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。SN1派生上述用户面或控制面密钥可以发生在接收到来自MN的KSN1之后,也可以发生下步骤670之前或之后,或执行步骤670时发生。
需要说明的是,本申请实施对步骤667,步骤668以及步骤670的执行顺序不做具体限定,可以先执行步骤667和步骤668,再执行步骤670;或者,还可以先执行步骤670,再执行步骤667和步骤668;或者还可以同时执行步骤667、步骤668以及步骤670。
步骤673:终端设备继续评估CPAC配置中包括的候选小区是否满足执行条件。
终端设备在完成第一次CPA或CPC后,并不释放CPAC配置。为了支持后续(subsequent)CPC过程,终端设备保留CPAC配置,并继续基于该配置评估满足执行条件的候选小区。
步骤675:终端设备基于更新后的SN Counter派生KSN2。
若终端设备评估到满足执行条件的候选小区,一种可能的实现方式中,终端设备可以基于上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter派生新的KSN。作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区5,终端设备可以根据SN Counter更新规则对CPAC配置中包括的SN Counter进行更新得到SN Counter2。另一种可能的实现方式中,终端设备还可以基于满足执行条件的候选小区所在的小区集合中的小区上一次使用的SN Counter更新SN Counter,并使用更 新的SN Counter派生新的KSN。作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区5,候选小区5属于小区集合1,终端设备可以根据SN Counter更新规则对CPAC配置中包括的小区集合1中的小区上一次使用的SN Counter进行更新得到SN Counter2。另一种可能的实现方式中,终端设备还可以基于和满足执行条件的候选小区配置有相同的SN Counter的小区上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter派生新的KSN。作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区5,候选小区5和候选小区10配置有相同的SN Counter,终端设备可以根据SN Counter更新规则对CPAC配置中包括的候选小区10上一次使用的SN Counter进行更新得到SN Counter2。
举例说明,一种可能的实现方式中,SN Counter更新为SN Counter+N,其中,N为大于或等于1的正整数。终端设备可以基于该SN Counter更新规则,例如SN Counter更新为SN Counter+1,对SN Counter1+1得到SN Counter2。该终端设备还可以使用SN Counter2派生KSN2。
该终端设备可以保存KSN2,还可以基于KSN2派生对与所述候选小区5之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN2派生对与所述候选小区5之间的信令进行加密或数据完整性保护的控制面密钥。
应理解,SN Counter1可以对应于上文中的第二参数值,SN Counter2可以对应于上文中的第一参数值,KSN2可以对应于上文中的第一密钥。上述用户面密钥和/或控制面密钥可以对应上文中的第三密钥。
应理解,终端设备并不一定是在评估到满足执行条件的候选小区后,立即执行更新SN Counter以及派生KSN和后续密钥的行为。例如终端设备可以在接入满足条件的候选小区之前或同时更新SN Counter,并派生KSN等。
步骤680:终端设备向MN发送RRC重配完成消息3,该RRC重配完成消息3中包括发送给候选SN2的重配完成消息。作为示例,终端设备检测到满足执行条件的是候选小区5,该终端设备可以向MN发送RRC重配完成消息3。该RRC重配完成消息3中可以包括发送给候选SN2(候选小区5所在的候选SN)的SN重配完成消息。该RRC重配完成消息3中可以指示终端设备选择的是候选小区5。
应理解,该RRC重配完成消息3可以对应于上文中的第一消息。
可选地,该RRC重配完成消息3中还可以包括SN Counter2。
一个示例,如果RRC重配完成消息3中包括SN Counter2,那么本申请实施例中应该先执行步骤675,再执行步骤680。
另一个示例,如果RRC重配完成消息3中不包括SN Counter2,那么本申请实施例对步骤675和步骤680的执行顺序不做具体限定。可以先执行步骤675,再执行步骤680;或者,也可以先执行步骤680,再执行步骤675;或者,也可以同时执行步骤675和步骤680。
步骤685:MN向候选SN2转发SN的重配完成消息。
本申请实施例中,MN在接收到终端设备发送的RRC重配完成消息3后,可以根据该消息指示的终端设备选择的候选小区为候选小区5,向候选小区5所属的候选SN2转发SN的重配完成消息。
作为示例,MN可以获得SN Counter2,并根据KgNB以及SN Counter2计算得到KSN2。应理解,MN获得SN Counter2的实现方式有多种,本申请实施例对此不做具体限定,一种可能的实现方式中,MN从终端设备发送的重配完成消息3中获取SN Counter2。另一种可能的实现方式中,MN可以基于SN Counter更新规则为SN Counter+N,对SN Counter1进行更新得到SN Counter2,SN Counter2为SN Counter1+N。
本申请实施例中,MN向候选小区5所属的候选SN2转发SN的重配完成消息中还可以包括KSN2。或者MN向候选小区5发送SN2的SN重配完成消息和KSN2。
步骤687:MN基于更新后的SN Counter派生KSN3。
可选地,MN还可以根据SN Counter更新规则对SN Counter2进行更新得到SN Counter3,并使用SN Counter3派生KSN3。举例说明,一种可能的实现方式中,SN Counter更新规则为SN Counter更新为SN Counter+N,其中,N为大于或等于1的正整数,或者N为条件小区添加或变更的候选小区的最大个数。终端设备可以基于该SN Counter更新规则,对SN Counter2+N得到SN Counter3,并基于SN Counter3派生KSN3。
步骤688:MN向候选SN1以及候选SN2发送所述KSN3。
MN可以将步骤687中派生的用于下次触发的CPC过程中使用的KSN3发送给所有的候选小区或所有的候选小区所属的候选SN。
上述技术方案中,MN可以在执行完一次CPA或CPC后,将下次触发的CPC过程中使用的密钥KSN3提前下发给所有的候选SN,以便于候选SN在下一次CPC过程中,可以提前获得密钥KSN3,而不必只有在接收到MN的重配完成消息之后才可以与终端设备之间安全通信。
步骤690:终端设备向候选SN2执行同步。
终端设备可以向候选小区5所在的候选SN2执行同步,作为示例,该同步过程可以通过RACH实现。候选SN2同样也可以基于接收到的KSN2派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN2派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。SN2派生上述用户面或控制面密钥可以发生在接收到来自MN的KSN2之后,也可以发生在步骤690之后,或执行步骤690时发生。
需要说明的是,本申请实施对步骤687,步骤688以及步骤690的执行顺序不做具体限定,可以先执行步骤687和步骤688,再执行步骤690;或者,还可以先执行步骤690,再执行步骤687和步骤688;或者还可以同时执行步骤687、步骤688以及步骤690。
步骤692:终端设备继续评估CPAC配置中包括的候选小区是否满足执行条件。
终端设备在完成CPC后,并不释放CPAC配置。为了支持后续(subsequent)CPC过程,终端设备保留CPAC配置,并继续基于该配置评估满足执行条件的候选小区。终端设备可以基于CPA或CPC执行的定时器或次数或基于网络设备的指示更新或释放CPAC配置。
步骤694:终端设备基于更新后的SN Counter派生KSN3。
与步骤675类似,为了便于描述,下面仅介绍其中一种实现方式,其余的实现方式请参考步骤675中的描述,此处不再赘述。
若终端设备又评估到满足执行条件的候选小区,终端设备可以基于上一次使用的SN Counter更新SN Couter,并使用更新的SN Counter派生新的KSN。作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区1,终端设备可以根据SN Counter更新规则对SN Counter2进行更新得到SN Counter3。举例说明,以SN Counter更新规则为SN Counter+N为例,终端设备可以基于该SN Counter更新规则,对SN Counter2+N得到SN Counter3。该终端设备还可以使用SN Counter3派生KSN3。
该终端设备可以保存KSN3,还可以基于KSN3派生对与所述候选小区1之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN3派生对与所述候选小区1之间的信令进行加密或数据完整性保护的控制面密钥。
应理解,此时SN Counter2可以对应于上文中的第二参数值,即终端设备上一次使用的参数值。SN Counter3可以对应于上文中的第一参数值,KSN3可以对应于上文中的第一密钥。上述用户面密钥和/或控制面密钥可以对应上文中的第三密钥。
步骤695:终端设备向MN发送RRC重配完成消息4,该RRC重配完成消息4中包括发送给候选SN1的重配完成消息。
作为示例,终端设备检测到满足执行条件的是候选小区1,该终端设备可以向MN发送RRC重配完成消息4。该RRC重配完成消息4中包括发送给候选SN1(候选小区1所在的候选SN)的SN重配完成消息。该RRC重配完成消息4中可以指示终端设备选择的是候选小区1。
应理解,该RRC重配完成消息4可以对应于上文中的第一消息。
可选地,该RRC重配完成消息4中还可以包括SN Counter3。
一个示例,如果RRC重配完成消息4中包括SN Counter3,那么本申请实施例中应该先执行步骤675,再执行步骤680。
另一个示例,如果RRC重配完成消息4中不包括SN Counter3,那么本申请实施例对步骤694和步骤695的执行顺序不做具体限定。可以先执行步骤694,再执行步骤695;或者,也可以先执行步骤695,再执行步骤694;或者,也可以同时执行步骤694和步骤695。
步骤696:MN向候选SN1转发SN重配完成消息。
本申请实施例中,MN可以在接收到终端设备发送的RRC重配完成消息4后,可以根据该消息指 示的终端设备选择的候选小区为候选小区1,向候选小区1所属的候选SN1转发SN的重配完成消息。
作为示例,MN可以获得SN Counter3,并根据KgNB以及SN Counter3计算得到KSN3。应理解,MN获得SN Counter3的实现方式有多种,本申请实施例对此不做具体限定,一种可能的实现方式中,MN从终端设备发送的重配完成消息4中获取SN Counter3。另一种可能的实现方式中,MN可以基于SN Counter更新规则为SN Counter+N,对SN Counter2进行更新得到SN Counter3,SN Counter3为SN Counter2+N。
本申请实施例中,MN向候选小区1所属的候选SN1转发的SN重配完成消息中还可以包括KSN3。
步骤697:MN基于更新后的SN Counter派生KSN4。
可选地,MN还可以根据SN Counter更新规则对SN Counter3进行更新得到SN Counter4,并使用SN Counter4派生KSN4。举例说明,一种可能的实现方式中,SN Counter更新规则为SN Counter更新为SN Counter+N,其中,N为大于或等于1的正整数,或者N为条件小区添加或变更的候选小区的最大个数。终端设备可以基于该SN Counter更新规则,对SN Counter3+N得到SN Counter4,并基于SN Counter4派生KSN4。
步骤698:MN向候选SN1以及候选SN2发送所述KSN4。
MN可以在执行完一次CPA或CPC后,将下次触发的CPC过程中使用的密钥KSN4提前下发给所有的候选SN,以便于候选SN在下一次CPC过程中,可以提前获得密钥KSN4,而不必只有在接收到MN的重配完成消息之后才可以与终端设备之间安全通信。
步骤699:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。候选SN1同样也可以基于接收到的KSN3派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN3派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。SN1派生上述用户面或控制面密钥可以发生在接收到来自MN的KSN3之后,也可以发生在步骤699之后,或执行步骤699时发生。
需要说明的是,本申请实施对步骤697,步骤698以及步骤699的执行顺序不做具体限定,可以先执行步骤697和步骤698,再执行步骤699;或者,还可以先执行步骤699,再执行步骤697和步骤698;或者还可以同时执行步骤697、步骤698以及步骤699。
上述技术方案中,终端设备在后续的CPAC过程中维护SN Counter并与MN同步执行SN Counter更新。通过在每次后续CPC过程时更新SN Counter,确保了在候选CPAC过程中派生新的KSN,避免了密钥重用的问题。
下面结合图7,对步骤510中更新第一参数值的另一具体实现过程进行详细描述。应理解,图7的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据图7所给出的下面的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。图7中的某些步骤的描述与图6相同,在此不再赘述。
图7是本申请实施例提供的另一种通信的方法示意性流程图。如图7所示,该方法可以包括步骤710-795,下面分别对步骤710-795进行详细描述。
步骤710:终端设备与MN建立RRC连接。
步骤715:终端设备与源SN建立RRC连接。
需要说明的是,步骤715是可选地。
步骤720:MN向候选SN1发送SN添加请求消息。
在一种可能的实现方式中,MN向候选SN发送的SN添加请求消息的数量和候选SN下包括的候选小区的数量相同。也即候选SN1下包括多少个候选小区,MN向候选SN1发送多少个SN添加请求消息。每个SN添加请求消息中可以包括对应的候选小区对应的KSN。该KSN是MN分别根据每个候选小区对应的SN Counter(可以称为起始SN Counter)计算得到。可选的,MN派生KSN的输入中还包括主密钥。
在一种可能的实现方式中,MN向候选SN发送的SN添加请求消息中包括多个KSN,对应于该候选SN下的多个候选小区。也即候选SN1下包括多少个候选小区,MN向SN发送的SN添加请求中包 括多少个KSN。多个KSN是MN根据每个候选小区对应的SN Counter(可以称为起始SN Counter)计算得到。可选的,MN派生KSN的输入中还包括主密钥。
针对以上两种实现方式,举例说明,候选小区1对应的KSN1可以是MN根据候选小区1对应的SN Counter计算得到的;候选小区2对应的KSN2可以是MN根据候选小区2对应的SN Counter计算得到的;候选小区5对应的KSN5可以是MN根据候选小区5对应的SN Counter计算得到的,依次类推。
在另一种可能是实现方式中,MN向候选SN发送的SN添加请求消息中包括一个KSN,对应于该候选SN下的一个或多个候选小区。也即SN1下的多个候选小区对应的KSN一致。该KSN是MN根据该候选SN对应的SN Counter(可以称为起始SN Counter)计算得到。可选的,MN派生KSN的输入中还包括主密钥。
举例说明,候选SN1对应的KSN1可以是MN根据候选SN1对应的SN Counter计算得到的,适用于候选SN1下的一个或多个候选小区;候选SN2对应的KSN2可以是MN根据候选SN2对应的SN Counter计算得到的,适用于候选SN2下的一个或多个候选小区,依次类推。
应理解,以候选小区1为上文中的第一小区为例,候选小区1对应的SN Counter对应于上文中的第三参数值,或者候选小区1所属的候选SN1对应的SN Counter对应于上文中的第三参数值。
本申请实施例对每个候选小区或每个候选SN对应的起始SN Counter不做具体限定,下面分别列举两种可能的实现方式。
一个示例,每个候选小区对应的起始SN Counter可以是每个候选小区的SN Counter的起始值(SN Counter#x)。例如,候选小区1的SN Counter的起始值为SN Counter#1。又如,候选小区2的SN Counter的起始值为SN Counter#2。又如,候选小区3的SN Counter的起始值为SN Counter#3等。在这种实现方式中,MN可以基于上述方法,根据候选SN1下的每个候选小区对应的SN Counter的起始值(SN Counter#x)分别计算得到每个候选小区对应的起始KSN。
另一个示例,每个候选小区对应的起始SN Counter可以是每个候选小区的SN Counter取值集合中的第一个SN Counter。例如,候选小区1可用的SN Counter的取值集合为1~10,该取值集合中的第一个SN Counter为1。又如,候选小区2可用的SN Counter的取值集合为11~20,该取值集合中的第一个SN Counter为11。在这种实现方式中,MN可以基于上述方法,根据候选SN1下的每个候选小区对应的SN Counter取值集合中的第一个SN Counter分别计算得到每个候选小区对应的起始KSN。
另一个示例,每个候选SN对应的起始SN Counter可以是每个候选SN的SN Counter的起始值(SN Counter#y)。例如,候选SN1的SN Counter的起始值为SN Counter#1。又如,候选SN2的SN Counter的起始值为SN Counter#2。又如,候选SN3的SN Counter的起始值为SN Counter#3等。在这种实现方式中,MN可以基于上述方法,根据候选SN1对应的SN Counter的起始值(SN Counter#x)计算得到候选SN1的起始KSN。
另一个示例,每个候选SN对应的起始SN Counter可以是每个候选SN的SN Counter取值集合中的第一个SN Counter。例如,候选SN1可用的SN Counter的取值集合为1~10,该取值集合中的第一个SN Counter为1。又如,候选SN2可用的SN Counter的取值集合为11~20,该取值集合中的第一个SN Counter为11。在这种实现方式中,MN可以基于上述方法,根据候选SN1对应的SN Counter取值集合中的第一个SN Counter计算得到候选SN1对应的起始KSN。
步骤725:候选SN1向MN发送SN添加请求确认消息。
步骤730:MN向候选SN2发送SN添加请求消息。
一种可能的实现方式中,MN向候选SN2发送的SN添加请求消息中包括候选SN2下每个候选小区分别对应的KSN。该KSN是MN分别根据候选SN2下包括的每个候选小区对应的起始SN Counter计算得到。具体的过程请参考步骤720中的描述,此处不再赘述。
另一种可能的实现方式中,MN向候选SN2发送的SN添加请求消息中包括候选SN2对应的KSN。该KSN是MN根据候选SN2对应的起始SN Counter计算得到。具体的过程请参考步骤720中的描述,此处不再赘述。
步骤735:候选SN2向MN发送SN添加请求确认消息。
步骤740:MN向终端设备发送RRC重配消息。
一种可能的实现方式中,MN向终端设备发送的RRC重配消息中可以包括CPAC配置,该CPAC配置中可以包括每个候选小区的配置及对应的执行条件,以及每个候选小区对应的SN Counter。
示例1,上述每个候选小区对应的SN Counter为每个候选小区的SN Counter的起始值SN Counter#x。可选地,该CPAC配置中还可以指示M,其中,M是正整数(例如M为大于或等于候选小区的个数的正整数)。
示例2,上述每个候选小区对应的SN Counter为每个候选小区的SN Counter的起始值SN Counter#x,该CPAC配置中还可以包括每个候选小区的SN Counter可用个数P。也就是说,每个候选小区可使用的SN Counter的取值范围为SN Counter#x~SN Counter#x+P。
示例3,上述每个候选小区对应的SN Counter为每个候选小区可用的SN Counter的取值集合。例如,候选小区1可用的SN Counter的取值集合1为1~10,候选小区2可用的SN Counter的取值集合2为11~20,候选小区3可用的SN Counter的取值集合3为21~30等。
另一种可能的实现方式中,MN向终端设备发送的RRC重配消息中可以包括CPAC配置,该CPAC配置中可以包括每个候选小区的配置及对应的执行条件,以及每个候选小区对应的SN Counter。其中,属于同一SN的多个候选小区对应的SN Counter相同。也即MN向终端设备发送的RRC重配消息中可以包括CPAC配置,该CPAC配置中可以包括每个候选小区的配置及对应的执行条件,以及每个候选SN对应的SN Counter。
示例4,上述每个候选SN对应的SN Counter为每个候选SN的SN Counter的起始值SN Counter#y。可选地,该CPAC配置中还可以指示Q,其中,Q是正整数(例如Q为大于或等于候选SN的个数的正整数)。
示例5,上述每个候选SN对应的SN Counter为每个候选SN的SN Counter的起始值SN Counter#x,该CPAC配置中还可以包括每个候选SN的SN Counter可用个数R。也就是说,每个候选SN可使用的SN Counter的取值范围为SN Counter#y~SN Counter#y+R。
示例6,上述每个候选SN对应的SN Counter为每个候选SN可用的SN Counter的取值集合。例如,候选SN1可用的SN Counter的取值集合1为1~10,候选SN2可用的SN Counter的取值集合2为11~20,候选SN3可用的SN Counter的取值集合3为21~30等。
步骤745:终端设备向MN回复RRC重配完成消息。
步骤750:终端设备评估CPAC配置中包括的候选PSCell是否满足执行条件。
步骤755:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给满足执行条件的候选SN的SN重配完成消息。
作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区1,该终端设备可以向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1(候选小区1所在的候选SN)的SN重配完成消息。该RRC重配完成消息中可以指示终端设备选择的是候选小区1。
步骤758:MN向候选SN1转发SN重配完成消息。
步骤760:终端设备根据CPAC配置中包括的SN Counter确定KSN-1。
若终端设备评估到满足条件的候选小区,或终端设备接入满足条件的候选小区,终端设备更新该候选小区或该候选小区所属的候选SN对应的SN Counter,并使用更新的SN Counter确定KSN。示例性地,当终端设备检测到满足执行条件的候选小区为候选小区1,其可以使用该候选小区1或该候选小区1所属的SN对应的SN Counter派生KSN-1。
示例1,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区对应的起始SN Counter更新SN Counter,或者终端设备根据在该候选小区上一次使用的SN Counter更新SN Counter,或者终端设备基于满足执行条件的候选小区所在的小区集合中的小区上一次使用的SN Counter更新SN Counter,或者终端设备基于和满足执行条件的候选小区配置有相同的SN Counter的小区上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选小区x对应的SN Counter的起始值(SN Counter#x),选择的小区的SN Counter更新为SN Counter=SN Counter#x+n*M。其中,SN Counter#x为每个候选小区对应的SN Counter的起始值,n与针对该候选小区派生KSN的次数相关,或者n与终端设备接入该候选小区的次数相关(例如n为针对该候选小区派生KSN的次数-1或n为终端设备接入该候选小区的次数-1,n为大于或 等于0的整数),M为正整数(例如M为大于或等于候选小区个数的整数)。这种实现方式中,由于终端设备是第一次接入到候选小区1,针对该候选小区1派生KSN的次数为0(n=0),该终端设备根据上述SN Counter更新规则确定的候选小区1对应的起始SN Counter为SN Counter#1。再例如,CPAC配置中包括候选小区x对应的SN Counter的起始值(SN Counter#x),选择的候选小区的SN Counter更新为SN Counter+M。也即在每次接入到某个候选小区时,SN Counter是基于在该候选小区上一次使用的SN Counter+M得到的。终端设备第一次接入该候选小区使用的SN Counter为该候选小区的SN Counter起始值。这种实现方式中,由于终端设备是第一次接入到候选小区1,使用的SN Counter为起始SN Counter#1。该终端设备可以使用SN Counter#1计算得到KSN-1。M可以是网络配置的或者预定义的。
示例2,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区对应的起始SN Counter和(可选的)接入该候选小区的次数更新SN Counter,或者终端设备根据在该候选SN上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选小区x对应SN Counter的起始值(SN Counter#x)和(可选的)每个候选小区的可用SN Counter个数P,选择的小区的SN Counter更新为SN Counter=SN Counter#x+p,其中,p与终端设备接入该候选小区的次数或针对该候选小区派生KSN的次数相关(例如p为终端设备接入该候选小区的次数-1,或者p为针对该候选小区派生KSN的次数-1)。这种实现方式中,终端设备根据上述更新规则确定候选小区1对应的起始SN Counter为SN Counter#1。再例如,CPAC配置中包括候选小区x对应SN Counter的起始值(SN Counter#x)和(可选的)每个候选小区的可用SN Counter个数P,选择的候选小区的SN Counter更新为SN Counter=SN Counter+1,也即在每次接入到某个候选小区时,SN Counter是基于在该候选小区上一次使用的SN Counter+1得到的。终端设备第一次接入该候选小区使用的SN Counter为该候选小区的SN Counter起始值。在这种实现方式中,终端设备接入某个候选小区的次数是有限的,即最多接入P次。每个候选小区对应的P值可以相同或不同。当终端设备接入次数达到P次,终端设备可以释放该候选小区的配置或释放CPAC配置。可以理解,该实现方式的其中一种特殊实现方式为:终端设备接入候选小区,释放该候选小区的CPAC配置,也即P=1的情况。在举例中由于终端设备是第一次接入到候选小区1,使用的SN Counter为起始SN Counter#1。该终端设备可以使用SN Counter#1计算得到KSN-1。P可以是网络配置的或预定义的。
示例3,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区对应的多个SN Counter和(可选的)接入该候选小区的次数更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选小区x对应的SN Counter取值集合x,该SN Counter的取值集合x包括候选小区x对应的多个可用的SN Counter。选择的候选小区的SN Counter更新为根据终端设备接入该候选小区的次数,从SN Counter的取值集合中获取对应的SN Counter。这种实现方式中,由于终端设备是第一次接入到候选小区1,该终端设备将SN Counter更新为候选小区1对应的SN Counter取值集合1中的第一个SN Counter。该终端设备可以使用该SN Counter取值集合中的第一个SN Counter计算得到KSN-1。
示例4,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据该候选小区所属的候选SN对应的起始SN Counter更新SN Counter,或者终端设备根据在该候选SN上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选SNy对应的SN Counter的起始值(SN Counter#y),选择的小区的SN Counter更新为SN Counter=SN Counter#y+n*Q。其中,SN Counter#y为每个候选SN对应的SN Counter的起始值,n与针对该候选SN派生KSN的次数相关,或者n与终端设备接入该候选SN的次数相关(例如针对该候选SN派生KSN的次数或n为终端设备接入该候选SN的次数,n为大于或等于0的整数),Q为正整数(例如Q为大于或等于候选SN个数的整数)。这种实现方式中,由于终端设备是第一次接入到候选SN1,针对该候选SN1派生KSN的次数为0(n=0),该终端设备根据上述SN Counter更新规则确定的候选小区1所属的SN1对应的起始SN Counter为SN Counter#1。再例如,CPAC配置中包括候选SNy应的SN Counter的起始值(SN Counter#y),选择的候选小区的SN Counter更新为SN Counter+Q。也即在每次接入到某个候选小区时,SN Counter是基于在该候选小区所属的SN上一次使用的SN Counter+Q得到的。终端设备第一次接入该候选SN使用的SN Counter为该候选SN的SN Counter起 始值。这种实现方式中,由于终端设备是第一次接入到候选小区1所属的候选SN1,使用的SN Counter为候选SN1对应的起始SN Counter#1。该终端设备可以使用SN Counter#1计算得到KSN-1。Q可以是网络配置的或者预定义的。
示例5,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据该候选小区所属的候选SN对应的起始SN Counter和(可选的)接入该候选SN的次数更新SN Counter,或者终端设备根据在该候选SN上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选SNy对应SN Counter的起始值(SN Counter#y)和每个候选SN的可用SN Counter个数R,选择的候选小区的SN Counter更新为SN Counter=SN Counter#y+r,其中,r与终端设备接入该候选SN的次数或针对该候选SN派生KSN的次数相关(例如r为终端设备接入该候选SN的次数-1,或者r为针对该候选SN派生KSN的次数-1)。这种实现方式中,终端设备根据上述更新规则确定候选小区1所属的SN1对应的起始SN Counter为SN Counter#1。再例如,CPAC配置中包括候选SNy对应SN Counter的起始值(SN Counter#y)和(可选的)每个候选小区的可用SN Counter个数R,选择的候选小区的SN Counter更新为SN Counter=SN Counter+1,也即在每次接入到某个候选小区时,SN Counter是基于在该候选小区所属的SN上一次使用的SN Counter+1得到的。终端设备第一次接入该候选SN使用的SN Counter为该候选SN的SN Counter起始值。在这种实现方式中,终端设备接入某个候选SN的次数是有限的,即最多接入R次。每个候选小区对应的R值可以相同或不同。当终端设备接入次数达到R次,终端设备可以释放该候选SN下的候选小区的配置或释放CPAC配置。可以理解,该实现方式的其中一种特殊实现方式为:终端设备接入候选小区,释放该候选小区所属的SN的CPAC配置,也即R=1的情况。在举例中由于终端设备是第一次接入到候选小区1所属的SN1,使用的SN Counter为起始SN Counter#1。该终端设备可以使用SN Counter#1计算得到KSN-1。R可以是网络配置的或预定义的。
示例6,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区所属的SN对应的多个SN Counter和(可选的)接入该候选SN的次数更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选SNy对应的SN Counter取值集合y,该SN Counter的取值集合y包括候选SNy对应的多个可用的SN Counter。选择的候选小区的SN Counter更新为根据终端设备接入该候选SN的次数,从SN Counter的取值集合中获取对应的SN Counter。这种实现方式中,由于终端设备是第一次接入到候选小区1所属的候选SN1,该终端设备将SN Counter更新为候选SN1对应的SN Counter取值集合1中的第一个SN Counter。该终端设备可以使用该SN Counter取值集合中的第一个SN Counter计算得到KSN-1。
示例7,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区所属的小区集合关联的多个SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选SNz所属的小区集合关联的SN Counter取值集合为取值集合z,该SN Counter的取值集合z包括多个可用的SN Counter。一个示例,可以从SN Counter的取值集合z中随机选择一个SN Counter,并根据选择的该SN Counter计算得到KSN-1。另一个示例,按照SN Counter的取值集合z中多个可用的SN Counter的大小,按照从大到小,或者从小到大依次选择SN Counter,并根据选择的该SN Counter计算得到KSN-1。再一个示例,选择的候选小区的SN Counter更新为根据终端设备接入该候选SN的次数,从SN Counter的取值集合z中获取对应的SN Counter。这种实现方式中,由于终端设备是第一次接入到候选小区1所属的候选SN1,该终端设备将SN Counter更新为SN Counter的取值集合z中的第一个SN Counter。该终端设备可以使用该SN Counter的取值集合z中的第一个SN Counter计算得到KSN-1。
终端设备可以保存KSN-1,还可以基于KSN-1派生对与所述候选小区1之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN-1派生对与所述候选小区1之间的信令进行加密或数据完整性保护的控制面密钥。
步骤763:MN基于更新后的SN Counter派生下次触发的CPC过程中使用的KSN。
可选地,在一些实施例中,MN还可以在每次执行完一次CPA或CPC后,为所有的候选SN(例如,候选SN1,候选SN2)或者所有候选小区(例如,候选小区1~候选小区9)派生一个新的密钥,该新的密钥用于下次触发的CPC过程。
一个示例,以每个候选小区对应一个SN Counter为例。MN可以对每个候选小区对应的起始SN Counter进行更新,得到每个候选小区对应的更新后的SN Counter,并基于每个候选小区对应的更新后的SN Counter分别派生每个候选小区对应的KSN。如果终端设备在下次CPC的过程中接入到其中的某个候选小区,该候选小区可以使用该候选小区对应的KSN与终端设备之间进行安全通信。例如,以候选小区1为例,对候选小区1的起始SN Counter进行更新,并使用候选小区1更新后的SN Counter派生候选小区1在下一次CPC过程中使用的KSN(例如,KSN-1-1)。又如,以候选小区5为例,对候选小区5的起始SN Counter进行更新,并使用候选小区5更新后的SN Counter派生候选小区5在下一次CPC过程中使用的KSN(例如,KSN-5-1)。具体的过程请参考步骤760中的描述,此处暂不详述。
另一个示例,以每个候选SN对应一个SN Counter为例。MN可以对每个候选SN对应的SN Counter进行更新,得到每个候选SN对应的更新后的SN Counter,并基于每个候选SN对应的更新后的SN Counter分别派生每个候选SN对应的KSN。如果终端设备在下次CPC的过程中接入到其中的某个候选小区,该候选小区可以使用该候选小区所属的SN对应的KSN与终端设备之间进行安全通信。具体的过程请参考步骤760中的描述,此处暂不详述。
步骤764:MN向候选小区或候选小区所属的候选SN发送对应的KSN。
MN可以将步骤763中派生的用于下次触发的CPC过程中使用的KSN发送给所有的候选小区或所有的候选小区所属的候选SN。
上述技术方案中,MN可以在执行完一次CPA或CPC后,将下次触发的CPC过程中使用的密钥KSN提前下发给所有的候选小区或候选小区所属的候选SN,以便于候选小区或候选小区所属的候选SN在下一次CPC过程中,可以提前获得密钥KSN,而不必只有在接收到MN的重配完成消息之后才可以与终端设备之间安全通信。
步骤765:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。候选小区1同样也可以基于接收到的KSN-1派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN-1派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
需要说明的是,本申请实施对步骤755,步骤758,步骤760和步骤765执行顺序不做具体限定。终端设备可以先执行步骤755和步骤758,再执行步骤760,在执行步骤765;或者,也可以先执行步骤760,再执行步骤755和步骤758,再执行步骤765;或者,还可以同时执行步骤755,步骤758以,步骤760和步骤765。
需要说明的是,本申请实施对步骤763,步骤764以及步骤765的执行顺序不做具体限定,可以先执行步骤763和步骤764,再执行步骤765;或者,还可以先执行步骤765,再执行步骤763和步骤764;或者还可以同时执行步骤763、步骤764以及步骤765。
步骤770:终端设备继续评估CPAC配置中包括的候选小区是否满足执行条件。
步骤775:终端设备根据CPAC配置中包括的SN Counter确定KSN-5。
若终端设备又评估到满足条件的候选小区,或终端设备后续接入满足条件的候选小区,终端设备更新该候选小区或该候选小区所属的候选SN对应的SN Counter,并使用更新的SN Counter确定KSN。示例性地,当终端设备检测到满足执行条件的候选小区为候选小区5,终端设备可以使用该候选小区5或该候选小区5所属的SN对应的起始SN Counter确定KSN-5。
示例1,若终端设备评估到满足条件的候选小区,或终端设备接入满足条件的候选小区,终端设备根据候选小区对应的起始SN Counter更新SN Counter,或者终端设备根据在该候选小区上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。示例性地,CPAC配置中包括候选小区5对应的SN Counter的起始值(SN Counter#5),候选小区5的SN Counter更新为SN Counter#5+n*M。这种实现方式中,由于终端设备是第一次接入到候选小区5,针对该候选小区5派生KSN的次数为0(n=0),该终端设备根据上述SN Counter更新规则确定的候选小区5对应的SN Counter为SN Counter#5。再例如,CPAC配置中包括候选小区5对应的SN Counter的起始值(SN Counter#5),候选小区5的SN Counter更新为SN Counter+M。也即在每次接入到某个候选小区时,SN Counter是基于在该候选小 区上一次使用的SN Counter+M得到的。这种实现方式中,由于终端设备是第一次接入到候选小区5,使用的SN Counter为起始SN Counter#5。该终端设备可以使用SN Counter#5计算得到KSN-5。
示例2,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区对应的起始SN Counter和(可选的)接入该候选小区的次数更新SN Counter,或者终端设备根据在该候选SN上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选小区5对应的SN Counter的起始值(SN Counter#5),候选小区5的SN Counter更新为SN Counter=SN Counter#5+p,其中,p与终端设备接入该候选小区5的次数或针对该候选小区5派生KSN的次数相关(例如p为终端设备接入该候选小区5的次数-1,或者p为针对该候选小区5派生KSN的次数-1)。这种实现方式中,由于终端设备是第一次接入到候选小区5,针对该候选小区5派生KSN的次数为0(n=0),终端设备根据上述更新规则确定的候选小区5对应的SN Counter为SN Counter#5。再例如,CPAC配置中包括候选小区5对应SN Counter的起始值(SN Counter#5)和(可选的)候选小区5的可用SN Counter个数P,候选小区5的SN Counter更新为SN Counter=SN Counter+1,也即在每次接入到候选小区5时,SN Counter是基于在该候选小区5上一次使用的SN Counter+1得到的。在这种实现方式中,终端设备接入候选小区5的次数是有限的,即最多接入P次。每个候选小区对应的P值可以相同或不同。当终端设备接入次数达到P次,终端设备可以释放该候选小区的配置或释放CPAC配置。可以理解,该实现方式的其中一种特殊实现方式为:终端设备接入候选小区,释放该候选小区的CPAC配置,也即P=1的情况。在举例中由于终端设备是第一次接入到候选小区5,使用的SN Counter为起始SN Counter#5。该终端设备可以使用SN Counter#5计算得到KSN-5。
示例3,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区对应的多个SN Counter和(可选的)接入该候选小区的次数更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选小区5对应的SN Counter取值集合5,取值集合5中包括候选小区5对应的多个可用的SN Counter。这种实现方式中,由于终端设备是第一次接入到候选小区5,该终端设备根据上述SN Counter更新规则确定的候选小区5对应的起始SN Counter为候选小区5的SN Counter取值集合5中的第一个SN Counter。该终端设备可以使用该第一个SN Counter计算得到KSN-5。
示例4,若终端设备评估到满足条件的候选小区,或终端设备接入满足条件的候选小区,终端设备根据该候选小区所属的候选SN对应的起始SN Counter更新SN Counter,或者终端设备根据在该候选SN上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。示例性地,CPAC配置中包括候选小区5所属的SN2对应的SN Counter的起始值(SN Counter#2),候选小区5所属的候选SN的SN Counter更新为SN Counter#2+n*Q。这种实现方式中,由于终端设备是第一次接入到候选小区5所属的SN2,针对该候选小区5所属的SN2派生KSN的次数为0(n=0),该终端设备根据上述SN Counter更新规则确定的候选小区5所属的SN2对应的SN Counter为SN Counter#2。再例如,CPAC配置中包括候选小区5所属的SN2对应的SN Counter的起始值(SN Counter#2),候选小区5所属的SN2的SN Counter更新为SN Counter+Q。也即在每次接入到某个候选小区时,SN Counter是基于在该候选小区所属的候选SN上一次使用的SN Counter+Q得到的。终端设备第一次接入该候选SN使用的SN Counter为该候选SN的SN Counter起始值。这种实现方式中,由于终端设备是第一次接入到候选小区5所属的SN2,使用的SN Counter为SN Counter#2。该终端设备可以使用SN Counter2计算得到KSN-5。
示例5,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区所属的候选SN对应的起始SN Counter和(可选的)接入该候选SN的次数更新SN Counter,或者终端设备根据在该候选SN上一次使用的SN Counter更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选小区5所属的SN2对应的SN Counter的起始值(SN Counter#2),候选小区5所属的SN2的SN Counter更新为SN Counter=SN Counter#2+p,其中,p与终端设备接入该候选小区5所属的SN2的次数或针对该候选小区5所属的SN2派生KSN的次数相关(例如p为终端设备接入该候选SN2的次数-1,或者p为针对该候选SN2派生KSN的次数-1)。这种实现方式中,由于终端设备是第一次接入到候选小区5所属的SN2,针对该候选小区5所属的SN2派生KSN的次数为0(n=0),终端设备根据上述更新规则确定的候选小区5对应的SN Counter为SN  Counter#2。再例如,CPAC配置中包括候选小区5所属的SN2对应SN Counter的起始值(SN Counter#5)和(可选的)候选小区5的可用SN Counter个数P,候选小区5所属的SN2的SN Counter更新为SN Counter=SN Counter+1,也即在每次接入到候选小区5时,SN Counter是基于在该候选小区5所属的SN2上一次使用的SN Counter+1得到的。在这种实现方式中,终端设备接入SN2的次数是有限的,即最多接入P次。每个候选SN对应的P值可以相同或不同。当终端设备接入次数达到P次,终端设备可以释放该SN下的候选小区的配置或释放CPAC配置。在举例中由于终端设备是第一次接入到候选小区5所属的SN2,使用的SN Counter为SN Counter#2。该终端设备可以使用SN Counter#2计算得到KSN-5。
示例6,若终端设备评估到满足执行条件的候选小区,或接入到满足执行条件的候选小区,终端设备根据候选小区所属的SN对应的多个SN Counter和(可选的)接入该候选小区的次数更新SN Counter,并使用更新的SN Counter确定KSN。例如,CPAC配置中包括候选小区5所属的SN2对应的SN Counter取值集合2,取值集合2中包括候选小区5所属的SN2对应的多个可用的SN Counter。这种实现方式中,由于终端设备是第一次接入到候选小区5所属的SN2,该终端设备根据上述SN Counter更新规则确定的候选小区5所属的SN2对应的SN Counter为候选SN2的SN Counter取值集合2中的第一个SN Counter。该终端设备可以使用该第一个SN Counter计算得到KSN-5。
终端设备还可以基于KSN-5派生对与所述候选小区5之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN-5派生对与所述候选小区5之间的信令进行加密或数据完整性保护的控制面密钥。
步骤776:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN2的重配完成消息。
作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区5,该终端设备可以向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN2(候选小区5所在的候选SN)的重配完成消息。该RRC重配完成消息中可以指示终端设备选择的是候选小区5。
步骤777:MN向候选SN2转发SN的重配完成消息。
同样的,本申请实施对步骤775,步骤777和步骤778执行顺序不做具体限定。
步骤778:MN基于更新后的SN Counter派生下次触发的CPC过程中使用的KSN。
一个示例,每个候选小区对应一个SN Counter。例如,以候选小区1为例,对终端设备上次接入到该候选小区1使用的SN Counter进行更新,并使用候选小区1更新后的SN Counter派生候选小区1在下一次CPC过程中使用的KSN(例如,KSN-1-2)。又如,以候选小区5为例,对终端设备上次接入到该候选小区5使用的SN Counter进行更新,并使用候选小区5更新后的SN Counter派生候选小区5在下一次CPC过程中使用的KSN(例如,KSN-5-2)。
另一个示例,每个候选SN对应一个SN Counter。例如,以候选SN1为例,对终端设备上次接入到该候选SN1使用的SN Counter进行更新,并使用该候选SN1更新后的SN Counter派生候选SN1在下一次CPC过程中使用的KSN。又如,以候选SN2为例,对终端设备上次接入到该候选SN2使用的SN Counter进行更新,并使用候选SN2更新后的SN Counter派生候选SN2在下一次CPC过程中使用的KSN。
步骤789:MN向候选小区或候选小区所属的候选SN发送对应的KSN。
MN可以将步骤788中派生的用于下次触发的CPC过程中使用的KSN发送给所有的候选小区或所有的候选小区所属的候选SN。
上述技术方案中,MN可以在执行完一次CPA或CPC后,将下次触发的CPC过程中使用的密钥KSN提前下发给所有的候选小区或候选小区所属的候选SN,以便于候选小区或候选小区所属的候选SN在下一次CPC过程中,可以提前获得密钥KSN,而不必只有在接收到MN的重配完成消息之后才可以与终端设备之间安全通信。
步骤780:终端设备向候选SN2执行同步。
终端设备可以向候选小区5所在的候选SN2执行同步,作为示例,该同步过程可以通过RACH实现。
候选小区5同样也可以基于接收到的KSN-5派生对与所述终端设备之间的数据进行加密或数据完 整性保护的用户面密钥,还可以基于KSN-5派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
需要说明的是,本申请实施对步骤778,步骤779以及步骤780的执行顺序不做具体限定,可以先执行步骤778和步骤779,再执行步骤780;或者,还可以先执行步骤780,再执行步骤778和步骤779;或者还可以同时执行步骤778、步骤779以及步骤780。
步骤783:终端设备继续评估CPAC配置中包括的候选小区是否满足执行条件。
步骤788:终端设备根据CPAC配置中包括的SN Counter确定并保存KSN-1-1。
当终端设备再次检测到满足执行条件的候选小区为候选小区1,终端设备可以对该候选小区1或候选小区1所属的SN1对应的起始SN Counter进行更新,得到更新后的SN Counter,并根据该更新后的SN Counter确定并保存KSN-1-1。
示例1,例如,CPAC配置中包括候选小区1对应的SN Counter的起始值(SN Counter#1),候选小区1对应的SN Counter更新为SN Counter#x+n*M。这种实现方式中,由于终端设备是第二次接入到候选小区1,针对该候选小区1派生KSN的次数为1(n=1),该终端设备根据上述SN Counter更新规则将候选小区1对应的SN Counter进行更新,得到更新后的SN Counter为SN Counter#1+1*M。再例如,CPAC配置中包括候选小区1对应的SN Counter的起始值(SN Counter#1),终端设备将候选小区1对应的SN Counter更新为在候选小区1上一次使用的SN Counter+M。由于终端设备在候选小区1上一次使用的SN Counter为SN Counter#1,因此终端设备将候选小区1的SN Counter更新为SN Counter#1+M。该终端设备可以使用SN Counter#1+1*M计算得到KSN-1-1。
示例2,例如,CPAC配置中包括候选小区1对应的SN Counter起始值(SN Counter#1),候选小区1的SN Counter更新为SN Counter=SN Counter#1+P。这种实现方式中,由于终端设备是第二次接入到候选小区1,终端设备根据上述更新规则将候选小区1对应的SN Counter进行更新,得到更新后的SN Counter为SN Counter#1+1。再例如,CPAC配置中包括的候选小区1对应的SN Counter为SN Counter起始值(SN Counter#1),终端设备将候选小区1对应的SN Counter更新为在候选小区1上一次使用的SN Counter+1。由于上一次接入到候选小区1使用的SN Counter为SN Counter#1,因此终端设备将候选小区1的SN Counter更新为SN Counter#1+1。该终端设备可以使用SN Counter#1+1计算得到KSN-1-1。
示例3,CPAC配置中包括候选小区1对应的SN Counter取值集合1,该SN Counter的取值集合1包括候选小区1对应的多个可用的SN Counter。SN Counter更新规则为根据针对终端设备接入到该候选小区1的次数,从SN Counter的取值集合中确定对应的SN Counter。这种实现方式中,由于终端设备是第二次接入到候选小区1,该终端设备根据上述SN Counter更新规则对候选小区1对应的起始SN Counter进行更新,得到更新后的SN Counter为候选小区1对应的SN Counter取值集合中的第二个SN Counter。该终端设备可以使用该SN Counter取值集合中的第二个SN Counter计算得到KSN-1-1。
示例4,例如,CPAC配置中包括候选小区1所属的SN1对应的SN Counter的起始值(SN Counter#1),候选小区1所属的SN1对应的SN Counter更新为SN Counter#x+n*Q。这种实现方式中,由于终端设备是第二次接入到候选小区1所属的SN1,针对该候选小区1所属的SN1派生KSN的次数为1(n=1),该终端设备根据上述SN Counter更新规则将候选小区1所属的SN1对应的SN Counter进行更新,得到更新后的SN Counter为SN Counter#1+1*Q。再例如,CPAC配置中包括候选小区1所属的SN1对应的SN Counter的起始值(SN Counter#1),终端设备将候选小区1所属的SN1对应的SN Counter更新为在SN1上一次使用的SN Counter+Q。由于终端设备在候选小区1所属的SN1上一次使用的SN Counter为SN Counter#1,因此终端设备将候选小区1所属的SN1的SN Counter更新为SN Counter#1+Q。该终端设备可以使用SN Counter#1+1*Q计算得到KSN-1-1。
示例5,例如,CPAC配置中包括候选小区1所属的SN1对应的SN Counter起始值(SN Counter#1),候选小区1所属的SN1的SN Counter更新为SN Counter=SN Counter#1+r,其中,r与终端设备接入该SN1的次数或针对SN1派生KSN的次数相关(例如r为终端设备接入SN1的次数-1,或者r为针对SN1派生KSN的次数-1)。这种实现方式中,由于终端设备是第二次接入到候选小区1所属的SN1,终端设备根据上述更新规则将候选小区1所属的SN1对应的SN Counter进行更新,得到更新后的SN Counter为SN Counter#1+1。再例如,CPAC配置中包括的候选小区1所属的SN1对应的SN Counter 为SN Counter起始值(SN Counter#1),终端设备将候选小区1所属的SN1对应的SN Counter更新为在候选小区1所属的SN1上一次使用的SN Counter+1。由于上一次接入到候选小区1所属的SN1使用的SN Counter为SN Counter#1,因此终端设备将候选小区1所属的SN1的SN Counter更新为SN Counter#1+1。该终端设备可以使用SN Counter#1+1计算得到KSN-1-1。
示例3,CPAC配置中包括候选小区1所属的SN1对应的SN Counter取值集合1,该SN Counter的取值集合1包括候选小区1所属的SN1对应的多个可用的SN Counter。SN Counter更新规则为根据针对终端设备接入到该候选小区1所属的SN1的次数,从SN Counter的取值集合中确定对应的SN Counter。这种实现方式中,由于终端设备是第二次接入到候选小区1所属的SN1,该终端设备根据上述SN Counter更新规则对候选小区1所属的SN1对应的起始SN Counter进行更新,得到更新后的SN Counter为候选小区1所属的SN1对应的SN Counter取值集合中的第二个SN Counter。该终端设备可以使用该SN Counter取值集合中的第二个SN Counter计算得到KSN-1-1。
该终端设备还可以基于KSN-1-1派生对与所述候选小区1之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN-1-1派生对与所述候选小区1之间的信令进行加密或数据完整性保护的控制面密钥。
步骤789:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
作为示例,假设终端设备再次检测到满足执行条件的候选小区为候选小区1,该终端设备可以向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1(候选小区1所在的候选SN)的重配完成消息。该RRC重配完成消息中可以指示终端设备选择的候选小区为候选小区1。
可选地,上述RRC重配完成消息中还可以包括上述选择的候选小区或选择的候选小区所属的SN对应的更新后的SN Counter。
一个示例,如果RRC重配完成消息中包括候选小区1对应的更新后的SN Counter,那么本申请实施例中应该先执行步骤788,再执行步骤789。
另一个示例,如果RRC重配完成消息中不包括上述更新后的SN Counter,那么本申请实施例对步骤788和步骤789的执行顺序不做具体限定。可以先执行步骤788,再执行步骤789;或者,也可以先执行步骤789,再执行步骤788;或者,也可以同时执行步骤788和步骤789。
步骤790:MN向候选SN1转发SN的重配完成消息。
本申请实施例中,MN可以在接收到终端设备发送的RRC重配完成消息后,可以根据该消息指示的终端设备选择的候选小区为候选小区1,向候选小区1所在的候选SN1转发SN的重配完成消息。
本申请实施例中,MN向候选小区1所属的候选SN1转发SN的重配完成消息中还可以包括KSN-1-1。
作为示例,MN可以获得对候选小区1或候选小区1所属的SN1的起始SN Counter进行更新后的SN Counter,并根据候选小区1或候选小区1所属的SN1对应的更新后的SN Counter计算得到KSN-1-1。应理解,MN获得该候选小区1或候选小区1所属的SN1对应的更新后的SN Counter的实现方式有多种,本申请实施例对此不做具体限定,一种可能的实现方式中,终端设备向MN发送的重配完成消息中包括更新后的SN Counter,也即MN从终端设备发送的重配完成消息中获取候选小区1或候选小区1所属的SN1对应的更新后的SN Counter。另一种可能的实现方式中,MN可以基于候选小区1或候选小区1所属的SN1对应的起始SN Counter以及上述示例1~示例6中的SN Counter更新规则,确定候选小区1或候选小区1所属的SN1对应的更新后的SN Counter。具体的确定过程请参考步骤788中的描述,此处不再赘述。
步骤791:MN基于更新后的SN Counter派生下次触发的CPC过程中使用的KSN。
一个示例,每个候选小区对应一个SN Counter。例如,以候选小区1为例,对终端设备上次接入到该候选小区1使用的SN Counter进行更新,并使用候选小区1更新后的SN Counter派生候选小区1在下一次CPC过程中使用的KSN(例如,KSN-1-3)。又如,以候选小区5为例,对终端设备上次接入到该候选小区5使用的SN Counter进行更新,并使用候选小区5更新后的SN Counter派生候选小区5在下一次CPC过程中使用的KSN(例如,KSN-5-3)。
另一个示例,每个候选SN对应一个SN Counter。例如,以候选SN1为例,对终端设备上次接入 到该候选SN1使用的SN Counter进行更新,并使用该候选SN1更新后的SN Counter派生候选SN1在下一次CPC过程中使用的KSN。又如,以候选SN2为例,对终端设备上次接入到该候选SN2使用的SN Counter进行更新,并使用候选SN2更新后的SN Counter派生候选SN2在下一次CPC过程中使用的KSN。
步骤792:MN向候选小区或候选小区所属的候选SN发送对应的KSN。
MN可以将步骤791中派生的用于下次触发的CPC过程中使用的KSN发送给所有的候选小区或所有的候选小区所属的候选SN。
上述技术方案中,MN可以在执行完一次CPA或CPC后,将下次触发的CPC过程中使用的密钥KSN提前下发给所有的候选小区或候选小区所属的候选SN,以便于候选小区或候选小区所属的候选SN在下一次CPC过程中,可以提前获得密钥KSN,而不必只有在接收到MN的重配完成消息之后才可以与终端设备之间安全通信。
步骤795:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。候选小区1同样也可以基于接收到的KSN-1-1派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN-1-1派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
上述技术方案中,终端设备在后续的CPAC过程中,每触发一次CPA或CPC,则终端设备更新选择的候选小区或选择的候选小区所属的SN对应SN Counter。该终端设备在后续的CPAC过程中针对每个候选小区或每个候选SN维护SN Counter并进行SN Counter更新,确保了在后续CPAC过程回到之前接入过的候选小区或候选SN时,通过新的SN Counter派生新的KSN,避免了密钥重用的问题。
下面结合图8,对步骤510中将第一集合中的第P个数值作为第一参数值的具体实现过程进行详细描述。应理解,应理解,图8的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据图8所给出的下面的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。
图8是本申请实施例提供的另一种通信的方法示意性流程图。如图8所示,该方法可以包括步骤810-899,下面分别对步骤810-899进行详细描述。图8中的某些步骤的描述与图6或图7相同,在此不再赘述
步骤810:终端设备与MN建立RRC连接。
步骤815:终端设备与源SN建立RRC连接。
需要说明的是,步骤815是可选地。
步骤820:MN向候选SN发送SN添加请求消息。
作为示例,MN分别向候选SN1、候选SN2发送SN添加请求消息。
一种可能的实现方式,SN添加请求消息中可以包括每个候选小区对应的一组KSN。该一组KSN中包括对应的候选小区关联的多个KSN。每个候选小区可以根据终端设备接入到该候选小区的次数,依次从每个候选小区对应的一组KSN中选择对应的KSN。或者
应理解,以候选小区为上文中的第一小区为例,第一小区的一组KSN对应于上文中的第二集合。
举例说明,候选小区1对应一组KSN,当终端设备第一次切换到候选小区1,该候选小区1可以根据终端设备是第一次切换到该小区,从候选小区1对应的这一组KSN中选择第一个KSN。当终端设备第一次切换到候选小区2,候选小区2对应一组KSN,该候选小区2可以根据终端设备是第一次切换到该小区,从候选小区2对应的这一组KSN中选择第一个KSN。当终端设备第二次切换到候选小区1,该候选小区1可以根据终端设备是第二次切换到该小区,从候选小区1对应的这一组KSN中选择第二个KSN。
另一种可能的实现方式,SN添加请求消息中可以包括每个候选SN对应的一组KSN。该一组KSN中包括对应的候选SN关联的多个KSN。每个候选SN可以根据终端设备接入到该候选SN的次数,依次从每个候选SN对应的一组KSN中选择对应的KSN。
应理解,以候选小区为上文中的第一小区为例,候选小区所属的候选SN为第一小区所属的辅站,第一小区所属的辅站的一组KSN对应于上文中的第二集合。
举例说明,候选SN1对应一组KSN,当终端设备第一次切换到候选SN1下的候选小区,该候选SN1可以根据终端设备是第一次切换到该SN,从候选SN1对应的这一组KSN中选择第一个KSN。当终端设备第一次切换到候选SN2下的候选小区,候选SN2对应一组KSN,该候选SN2可以根据终端设备是第一次切换到该SN,从候选SN2对应的这一组KSN中选择第一个KSN。当终端设备第二次切换到候选SN1下的候选小区,该候选SN1可以根据终端设备是第二次切换到该SN,从候选SN1对应的这一组KSN中选择第二个KSN。
应理解,上述图7所示的方法是在开始阶段向每个候选小区下发每个候选小区对应的起始KSN,或则向每个候选SN下发每个候选SN对应的起始KSN,后续终端设备每触发一次CPA或CPC,MN会向对应的候选小区或候选SN下发更新的KSN,选择的候选小区或选择的候选小区所属的辅站只有在接收到MN的重配完成消息后,才可以获得更新的KSN。相对于图7所示的方法而言,图8所述的实施例将每个候选小区或候选SN后续可能使用的多个KSN提前下发给候选SN,使得候选SN无需只有在接收到MN的重配完成消息后,才可以获得更新的KSN。也即候选SN无需在接收到MN的重配完成消息后才能开始与终端设备进行安全的数据或信令通信,降低了时延,提高了重配效率。
步骤825:候选SN向MN发送SN添加请求确认消息。
步骤830:MN向终端设备发送RRC重配消息。
MN向终端设备发送的RRC重配消息中可以包括CPAC配置,该CPAC配置中可以包括候选小区的配置及对应的执行条件,该RRC重配消息中还指示了每个候选小区或每个候选SN对应的一组SN Counter。
RRC重配消息指示每个候选小区或每个候选SN对应的一组SN Counter的方式有多种。例如,RRC重配消息中包括每个候选小区或每个候选SN对应的多个SN Counter,也可以称为每个候选小区或每个候选SN对应的SN Counter列表或集合。再例如,RRC重配消息中包括每个候选小区或每个候选SN对应的SN Counter的起始值和可用个数,通过起始值和可用个数确定每个候选小区或每个候选SN对应的多个SN Counter。本文中使用每个候选小区或每个候选SN对应的SN Counter集合表示每个候选小区或每个候选SN对应的多个SN Counter。
应理解,以候选小区为上文中的第一小区为例,第一小区的SN Counter集合对应于上文中的第一集合。
应理解,以候选小区为上文中的第一小区为例,候选小区所属的SN为第一小区所属的辅站,第一小区所属的候选SN的SN Counter集合对应于上文中的第一集合。
步骤835:终端设备向MN回复RRC重配完成消息。
步骤840:终端设备评估CPAC配置中包括的候选小区是否满足执行条件。
步骤845:终端设备根据CPAC配置中包括的候选小区或候选SN对应的SN Counter集合中的第一个SN Counter确定KSN。
若终端设备评估到满足条件的候选小区,或者终端设备接入满足条件的候选小区,终端设备从每个候选小区或每个候选SN对应的多个SN Counter中确定使用的SN Counter,并使用选择的SN Counter确定KSN。
示例性的,终端设备可以基于终端设备接入该候选小区或接入该候选小区所属的SN的次数从多个SN Counter中确定使用的SN Counter。
例如,当终端设备检测到满足执行条件的候选小区为候选小区1,由于终端设备是第一次连接到候选小区1或者候选小区1所属的SN1,该终端设备可以使用CPAC配置中包括的候选小区1或者候选小区1所属的SN1对应的SN Counter集合中的第一个SN Counter确定KSN。
该终端设备可以保存上述KSN,还可以基于上述KSN派生对与所述候选小区1之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于上述KSN派生对与所述候选小区1之间的信令进行加密或数据完整性保护的控制面密钥。
应理解,以候选小区1为上文中的第一小区为例,候选小区1对应的SN Counter集合对应于上文中的第一集合,候选小区1对应的SN Counter集合中的第一个SN Counter对应于上文中的第一参数值,使用该第一个SN Counter确定的KSN对应于上文中的第一密钥。
应理解,以候选小区1为上文中的第一小区为例,候选小区1所属的SN1对应的SN Counter集合 对应于上文中的第一集合,候选小区1所属的SN1对应的SN Counter集合中的第一个SN Counter对应于上文中的第一参数值,使用该第一个SN Counter确定的KSN对应于上文中的第一密钥。
步骤850:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区1,该终端设备可以向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1(候选小区1所在的候选SN)的重配完成消息。该RRC重配完成消息中可以指示终端设备选择的候选小区为候选小区1。
步骤855:MN向候选SN1转发SN的重配完成消息。
步骤860:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。在该RACH过程中或RACH过程之前,候选SN1可以确定候选小区1或候选小区1所属的SN1对应的KSN集合中的第一个KSN。
本申请实施例中,选择的候选小区或者选择的候选小区所属的辅站确定使用的KSN的方法有多种。
一种可能的实现方式中,终端设备向候选小区所属的SN发送第一标识,所述第一标识用于指示选择的候选小区或选择的候选小区所属的SN对应的多个KSN中使用的KSN。或者第一标识可以理解为指示候选SN使用哪一个KSN。候选小区所属的SN接收第一标识,根据第一标识确定多个KSN中要使用的KSN。该第一标识可以是密钥标识或SN Counter标识。该第一标识可以包含在RACH过程的Msg3中,或者可以包含在MAC CE(例如包含在C-RATI MAC CE中,或者包含在第一MAC CE中,第一MAC CE用于承载第一标识)。该第一标识可以在RACH过程中发送,也可以在RACH过程前或RACH过程后发送。
另一种可能的实现方式中,选择的候选小区所属的SN根据终端设备接入该候选小区或接入该候选小区所属的SN的次数,从该候选小区或该候选小区所属的辅站对应的多个KSN中选择使用的KSN。例如,终端设备为第一次接入该候选小区或候选小区所属的SN,则SN选择第一个KSN。再例如,终端设备为第二次接入该候选小区或候选小区所属的SN,则SN选择第二个KSN。
针对以上两种可能的实现范式,示例性地,选择的候选小区为候选小区1,候选小区1所属的辅站为SN1。候选小区1或SN1可以根据第一标识或终端设备接入候选小区1或SN1的次数从候选小区1或SN1对应的KSN集合中选择对应的KSN。一个示例,由于终端设备从候选小区1或SN1对应的SN Counte集合中选择了第一个SN Counte派生KSN,因此,该终端设备还可以向SN1发送第一标识,该第一标识用于指示SN1从候选小区1或SN1对应的KSN集合中选择第一个KSN。另一个示例,SN1可以根据终端设备是第一次接入到该候选小区1或SN1,其可以从候选小区1或SN1对应的KSN集合中选择第一个KSN。
应理解,以候选小区1为上文中的第一小区为例,候选小区1对应的KSN集合对应于上文中的第二集合,该KSN集合中的第一个KSN对应于上文中的第一密钥。
应理解,以候选小区1为上文中的第一小区为例,候选小区1所属的SN1对应与文中第一小区所属的辅站,SN1对应的KSN集合对应于上文中的第二集合,该KSN集合中的第一个KSN对应于上文中的第一密钥。
同样的,候选小区1或SN1还可以基于KSN集合中的第一个KSN派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN集合中的第一个KSN派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
需要说明的是,上述步骤840,步骤845,步骤850和步骤855以及步骤860的执行顺序不受限制。例如可以先步骤845,在执行步骤850,步骤855和步骤860,再执行步骤845。在该情况下,终端评估到满足条件的候选小区,向MN发送RRC重配完成消息,该重配完成消息中指示终端设备选择的候选小区。MN向选择的候选小区所属的SN发送SN重配完成消息,SN可以基于终端设备接入该候选小区或该候选小区所属的SN的次数确定使用的KSN(详细可参考步骤860中的描述,不再赘述),并通过第二标识向终端设备指示要使用的SN Counter。终端设备根据第二标识从该候选小区或改候选小区所属的SN对应的多个SN Counter中选择要使用的SN Counter,并使用选择的SN Counter派生KSN。
步骤865:终端设备评估CPAC配置中包括的候选小区是否满足执行条件。
步骤868:终端设备根据CPAC配置中包括的候选小区5或候选小区5所属的SN2对应的一组中的第一个SN Counter确定KSN。
当终端设备检测到满足执行条件的候选小区为候选小区5,由于终端设备是第一次连接到候选小区5,或者是第一次接入到候选小区5所在的SN2,该终端设备可以使用CPAC配置中包括的候选小区5或SN2对应的一组SN Counter中的第一个SN Counter确定KSN。
该终端设备还可以基于上述KSN派生对与所述候选小区5之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于上述KSN派生对与所述候选小区5之间的信令进行加密或数据完整性保护的控制面密钥。
步骤870:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
步骤875:MN向候选SN2转发SN的重配完成消息。
步骤880:终端设备向候选SN2执行同步。
终端设备可以向候选小区5所在的候选SN2执行同步,作为示例,该同步过程可以通过RACH实现。在该RACH过程中或RACH过程之前,候选SN2可以选择候选小区5或候选SN2对应的KSN集合中的第一个KSN。
同样的,候选小区5或候选SN2还可以基于与其对应的KSN集合中的第一个KSN派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于与其对应KSN集合中的第一个KSN派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
步骤885:终端设备评估CPAC配置中包括的候选小区是否满足执行条件。
步骤890:终端设备根据CPAC配置中包括的候选小区1或候选小区1所属的SN1对应的一组SN Counter中的第二个SN Counter确定KSN。
当终端设备检测到满足执行条件的候选小区为候选小区1,由于终端设备是第二次连接到候选小区1或候选小区1所属的SN1,该终端设备可以使用CPAC配置中包括的候选小区1或候选小区1所属的SN1对应的SN Counter集合中的第二个SN Counter确定KSN。
步骤895:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
步骤898:MN向候选SN1转发SN的重配完成消息。
步骤899:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。在该RACH过程中或RACH过程之前,候选SN1可以使用候选小区1或候选小区1所属的SN1对应的KSN集合中的第二个KSN。
同样的,候选小区1或SN1还可以基于KSN集合中的第二个KSN派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN集合中的第二个KSN派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
上述技术方案中,通过提前向候选SN下发每个候选小区或每个候选SN对应的一个KSN集合,使得候选SN不必只有在接收到MN的重配完成消息之后才可以与终端设备之间安全通信。
图9是本申请实施例提供的另一种通信的方法的示意性流程图。如图9所示,该方法可以包括步骤910-920,下面分别对步骤910-920进行详细描述。
步骤910:派生第四密钥,第四密钥是基于第五密钥确定的。
作为示例,本申请实施例中可以基于第五密钥派生第四密钥。例如,可以是终端设备基于第五密钥派生第四密钥。
需要说明的是,终端设备可以评估第二小区的执行条件是否被满足,该第二小区为条件小区添加或变更的候选小区。若终端设备评估第二小区的执行条件被满足,该终端设备可以派生第四密钥,该第四密钥可以用于该第二小区的安全。
需要说明的是,终端设备不一定是在评估到满足执行条件的候选小区后立即执行密钥派生。例如,终端设备是在接入到选择的候选小区的过程中或之后执行密钥派生。
一种可能的实现方式中,终端设备可以基于第五密钥并使用第四参数值派生所述第四密钥,该第 四参数值为第二小区或接入所述第二小区所属的辅站关联的参数值。本申请实施例对第四参数值不做具体限定,可以是第二小区或所述第二小区所属的辅站关联的参数值,或者还可以是基于第五参数值更新得到的,或者还可以是根据接入所述第二小区或所述第二小区所属的辅站的次数确定的。其中,第五参数值为第二小区或第二小区所属的辅站上一次使用的参数值,或者第五参数值为终端设备上一次接入使用的参数值。
本申请实施例对上述第五密钥不做具体限定。下面对几种可能的实现方式进行举例说明。
一个示例,该第五密钥可以是终端设备接入的上一个小区的密钥,也即可以基于终端设备接入的上一个小区的密钥派生第四密钥。下面会结合图10对这种方式的具体实现过程进行详细描述,此处暂不详述。
应理解,上述第四密钥为终端设备要使用的KSN,上述第五密钥为终端设备上一个使用的KSN。
另一个示例,第五密钥还可以是终端设备上一次接入第二小区或接入所述第二小区所属的辅站使用的密钥,也即可以基于终端设备上一次接入第二小区或接入所述第二小区所属的辅站使用的密钥派生第四密钥。下面会结合图11对这种方式的具体实现过程进行详细描述,此处暂不详述。
应理解,上述第四密钥为终端设备要使用的KSN,上述第五密钥为终端设备在选择的候选小区上一次使用的KSN。
另一个示例,第五密钥还可以是第二小区集合中的小区上一次使用的密钥,其中,第二小区集合中包括所述第二小区。也即终端设备针对第二小区集合中的小区维护一个密钥(例如KSN)或者计数值(例如SN Counter)。示例性地,该计数值可以理解为第四参数。当终端设备从另一个小区集合中的小区切换到第二小区集合中的小区时,终端设备衍生第四密钥。终端设备衍生第四密钥是通过第五密钥来确定的。第五密钥是第二小区集合中的小区上一次使用的KSN。示例性地,第二小区集合用于指示终端设备执行PDCP重建。例如终端设备从第二小区集合中的小区切换到第二小区集合中的另一个小区,不需要执行PDCP重建;终端设备从第二小区集合外的小区切换到第二小区集合中的小区,需要执行PDCP重建。
示例性地,第二小区集合可以是网络设备配置的。例如指示第二小区集合中包括的候选小区的标识。
示例性地,或者第二小区集合不是网络设备配置的。第二小区集合包括有相同密钥(例如KSN)或者计数值(例如SN Counter)的小区。在终端设备从关联非相同密钥(例如KSN)或者计数值(例如SN Counter)的小区切换到第二小区的情况下,或者在从有不同计数值的小区切换到该第二小区的情况下,终端设备推演第四密钥。
另一个示例,第五密钥还可以是第四小区上一次使用的密钥,其中,第四小区是与第二小区配置有相同的计数值(例如SN Counter)或密钥(KSN)。示例性地,该计数值可以理解为第四参数。也即终端设备针对针对每个候选小区维护一个KSN或者SN Counter。不同候选小区的SN Counter或KSN可以相同,也可以不同。当终端设备从另一个小区切换到第二小区时,如果两个小区的SN Counter或KSN不同,终端设备衍生第四密钥。终端设备衍生第四密钥是通过第五密钥来确定的。第五密钥是与第二小区有相同SN Counter或KSN的小区上一次使用的KSN。第四小区也可以是第二小区。
步骤920:根据第四密钥派生第六密钥,该第六密钥为用户面密钥和/或控制面密钥。
本申请实施例中可以根据第四密钥派生第六密钥,也即该第六密钥为基于第四密钥派生的用户面密钥和/或控制面密钥。其中,该控制面的密钥和/或用户面的密钥用于对终端设备和第二小区之间的数据和/或信令进行加密或数据完整性保护。该用户面的密钥用于对终端设备和该第二小区之间的数据进行加密或数据完整性保护。
可选地,在一些实施例中,MN可以基于上述第五密钥派生第四密钥,并将派生的第四密钥发送给第二小区或第二小区所属的辅站发送所述第四密钥。MN基于第五密钥派生第四密钥的过程与终端设备基于第五密钥派生第四密钥的过程相同,具体的请参考步骤910中的描述,此处不再赘述。在一些实施例中,MN可以在第X消息中将多个可能用到的KSN发送给候选SN。第X消息可以是SN添加请求消息。在该实现方式中如果SN认为接收到的KSN即将全部使用,或全部被使用,SN可以向MN请求KSN的更新。该请求消息用于请求多个KSN的更新。
可选地,在一些实施例中,SN也可以基于上述第五密钥派生第四密钥,并根据第四密钥派生第六 密钥。SN派生第四密钥,以及派生第六密钥过程与终端设备派生第四密钥,以及派生第六密钥过程相同,具体的请参考步骤910和步骤920中的描述,此处不再赘述。
下面结合图10,对步骤910中基于终端设备接入的上一个小区的密钥派生第四密钥的具体实现过程进行详细描述。应理解,图10的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据图10所给出的下面的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。
图10是本申请实施例提供的另一种通信的方法示意性流程图。如图10所示,该方法可以包括步骤1010-1099,下面分别对步骤1010-1099进行详细描述。
步骤1010:终端设备与MN建立RRC连接。
步骤1015:终端设备与源SN建立RRC连接。
需要说明的是,步骤1015是可选地。
步骤1020:MN向候选SN发送SN添加请求消息。
作为示例,MN分别向候选SN1、候选SN2发送SN添加请求消息。该SN添加请求消息中可以包括KSN#0,该KSN#0是MN根据SN Counter计算得到的。假设每个候选小区对应的SN Counte相同,均为SN Counter#0,MN可以根据SN Counter#0计算得到KSN#0。
步骤1025:候选SN向MN发送SN添加请求确认消息。
步骤1030:MN向终端设备发送RRC重配消息。
MN向终端设备发送的RRC重配消息中可以包括CPAC配置,该CPAC配置中可以包括候选SN1以及候选SN2下包括的候选小区的配置及对应的执行条件,以及MN派生KSN#0使用的SN Counter(例如,SN Counter#0)。
步骤1035:终端设备向MN回复RRC重配完成消息。
步骤1040:终端设备评估CPAC配置中包括的候选小区是否满足执行条件。
步骤1045:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区1,该终端设备可以向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1(候选小区1所在的候选SN)的重配完成消息。该RRC重配完成消息中可以指示终端设备选择的候选小区为候选小区1。
步骤1050:MN向候选SN1转发SN的重配完成消息。
步骤1055:终端设备根据CPAC配置中包括的SN Counter派生KSN#0。
作为示例,终端设备在接收到CPAC配置后,可以根据CPAC配置中包括的SN Counter(例如,SN Counter#0)和KgNB派生KSN#0。该终端设备还可以基于KSN#0派生对与所述候选小区1之间的数据进行加密或数据完整性保护的用户面密钥,基于KSN#0派生对与所述候选小区1之间的信令进行加密或数据完整性保护的控制面密钥。
步骤1060:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。候选小区1同样也可以基于接收到的KSN#0派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN#0派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
步骤1063:终端设备继续评估CPAC配置中包括的候选PSCell是否满足执行条件。
步骤1065:终端设备根据KSN#0派生KSN#1。
一个示例,假设终端设备检测到满足执行条件的候选小区为候选小区5,终端设备可以根据上次使用的KSN#0派生并保存KSN#1。
另一个示例,当终端设备检测到满足执行条件的候选小区为候选小区5,假设候选小区1属于一个小区集合,候选小区5属于另一个小区集合,当终端设备从候选小区1所属的小区集合中的小区切换到候选小区5所属的小区集合中的小区时,可以使用候选小区5所属的小区集合中的小区上一次使用的KSN#0派生并保存KSN#1。
另一个示例,当终端设备检测到满足执行条件的候选小区为候选小区5,假设如果候选小区5和候 选小区1的SN Counter或KSN不同,可以使用候选小区10上一次使用的KSN#0派生并保存KSN#1。其中,候选小区10和候选小区5配置有相同的SN Counter或KSN。
该终端设备还可以基于KSN#1派生对与所述候选小区5之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN#1派生对与所述候选小区5之间的信令进行加密或数据完整性保护的控制面密钥。
应理解,以候选小区5为上文中的第二小区为例,KSN#0对应于上文中的第五密钥,KSN#1对应于上文中的第四密钥。
步骤1070:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN2的RRC重配完成消息。
作为示例,终端设备检测到满足执行条件的是候选小区5,该终端设备可以向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN2(候选小区5所在的候选SN)的重配完成消息。该RRC重配完成消息中可以指示终端设备选择的是候选小区5。
需要说明的是,本申请实施对步骤1065、步骤1070的执行顺序不做具体限定,可以先执行步骤1065,再执行步骤1070;或者,也可以先执行步骤1070,再执行步骤1065;或者,还可以同时执行步骤1065、步骤1070。
步骤1075:MN根据KSN#0派生KSN#1。
本申请实施例中,MN可以在接收到终端设备发送的RRC重配完成消息后,可以使用终端设备接入的上一个小区的密钥KSN#0派生并保存KSN#1。
一种可能的实现方式中,可以根据KSN#0以及第五SN Counter派生KSN#1。一个示例,该第五SN Counter可以是候选小区5或所述候选小区5所属的SN2关联的SN Counter。另一个示例,该第五SN Counter还可以是基于第六SN Counter更新得到的,该第六SN Counter为候选小区5或所述候选小区5所属的SN2上一次使用的SN Counter,或者为终端设备上一次接入使用的SN Counter。另一个示例,该第五SN Counter还可以是根据接入候选小区5或所述候选小区5所属的SN2的次数确定的。
应理解,以KSN#0对应于上文中的第五密钥,KSN#1对应于上文中的第四密钥为例,第五SN Counter对应于上文中的第四参数值,第六SN Counter对应于上文中的第五参数值。
另一种可能的实现方式中,终端设备可以根据KSN#0以及SN Counter#0派生KSN#1。SN Counter#0为所有候选小区或所有候选SN均使用的SN Counter。
应理解,以KSN#0对应于上文中的第五密钥,KSN#1对应于上文中的第四密钥为例,SN Counter#0对应于上文中的第四参数值。
步骤1078:MN向候选SN2转发SN的重配完成消息。
本申请实施例中,MN可以根据RRC重配完成消息指示的终端设备选择的候选小区为候选小区5,向候选小区5所在的候选SN2转发SN重配完成消息。
可选地,该MN向候选SN2转发SN的重配完成消息中还可以包括KSN#1。
步骤1080:终端设备向候选SN2执行同步。
终端设备可以向候选小区5所在的候选SN2执行同步,作为示例,该同步过程可以通过RACH实现。
候选小区5同样也可以基于KSN#1派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN#1派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
应理解,本申请实施例中候选小区5获得KSN#1的实现方式有多种,一个示例,MN向候选SN2发送的重配完成消息中包括KSN#1,候选小区5可以从该消息中获得KSN#1。另一个示例,候选小区5可以使用终端设备接入的上一个小区的密钥KSN#0派生KSN#1。此时MN向候选SN2发送的RRC重配完成消息中没有包括KSN#1。具体的请参考步骤1075中MN根据KSN#0派生KSN#1的过程,此处不再赘述。
步骤1083:终端设备继续评估CPAC配置中包括的候选小区是否满足执行条件。
步骤1085:终端设备根据KSN#1派生KSN#2。
作为示例,假设终端设备检测到满足执行条件的候选小区为候选小区1,终端设备可以根据上次使 用的KSN#1派生并保存KSN#2。
该终端设备还可以基于KSN#2派生对与所述候选小区1之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN#2派生对与所述候选小区1之间的信令进行加密或数据完整性保护的控制面密钥。
应理解,以候选小区1为上文中的第二小区为例,KSN#1对应于上文中的第五密钥,KSN#2对应于上文中的第四密钥。
步骤1090:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
步骤1093:MN根据KSN#1派生KSN#2。
本申请实施例中,MN可以在接收到终端设备发送的RRC重配完成消息后,可以使用KSN#1派生KSN#2。
步骤1095:MN向候选SN1转发SN重配完成消息。
可选地,该MN向候选SN1转发的SN重配完成消息中还可以包括KSN#2。
步骤1099:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。候选小区1同样也可以基于KSN#2派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN#2派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
候选小区1可以从终端设备发送的RRC重配完成消息中获得KSN#2,或者还可以根据KSN#1派生KSN#2。具体的请参考上文中的描述,此处不再赘述。
上述技术方案中,终端设备每触发一次SN变更,则基于上一次使用的/终端设备存储的KSN,派生新的KSN。由于每触发一次CPA或CPC,终端设备使用的KSN均不同,因此,保证了在候选CPAC过程中派生新的KSN,避免了密钥重用的问题。
下面结合图11,对步骤910中基于终端设备上一次接入第二小区或接入所述第二小区所属的辅站使用的密钥派生第四密钥的具体实现过程进行详细描述。应理解,图11的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据图11所给出的下面的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。
图11是本申请实施例提供的另一种通信的方法示意性流程图。如图11所示,该方法可以包括步骤1110-1199,下面分别对步骤1110-1199进行详细描述。
步骤1110:终端设备与MN建立RRC连接。
步骤1115:终端设备与源SN建立RRC连接。
需要说明的是,步骤1115是可选地。
步骤1120:MN向候选SN发送SN添加请求消息。
作为示例,MN分别向候选SN1、候选SN2发送SN添加请求消息。该SN添加请求消息中可以包括每个候选小区或每个候选SN对应的起始KSN,每个候选小区或每个候选SN对应的起始KSN是MN分别根据每个候选小区或每个候选SN对应的起始SN Counter计算得到的。
应理解,上述每个候选小区或每个候选SN对应的起始SN Counter可以是每个候选小区或每个候选SN的SN Counter起始值(SN Counter#x),或者还可以是每个候选小区或每个候选SN对应的SN Counter取值集合中的第一个SN Counter,本申请实施例对此不做限定,具体的请参考上文中的描述,此处不再赘述。
举例说明,假设MN根据候选小区1对应的SN Counter派生的起始KSN为KSN#1,根据候选小区2对应的SN Counter派生的起始KSN为KSN#2,根据候选小区3对应的SN Counter派生的起始KSN为KSN#3等等。或者,
假设MN根据候选SN1对应的SN Counter派生的起始KSN为KSN#1,根据候选SN2对应的SN Counter派生的起始KSN为KSN#2等等。
步骤1125:候选SN向MN发送SN添加请求确认消息。
步骤1130:MN向终端设备发送RRC重配消息。
MN向终端设备发送的RRC重配消息中可以包括CPAC配置,该CPAC配置中可以包括候选SN1以及候选SN2下包括的候选小区的配置及对应的执行条件,以及每个候选小区或每个候选SN对应的SN Counter。
步骤1135:终端设备向MN回复RRC重配完成消息。
步骤1140:终端设备评估CPAC配置中包括的候选小区是否满足执行条件。
步骤1145:终端设备根据CPAC配置中包括的SN Counter确定并保存KSN#1。
在接收到CPAC配置后,若终端设备评估到某候选小区或某候选SN下的候选小区第一次满足执行条件,或终端设备第一次接入到满足执行条件的某候选小区(或某候选SN下的候选小区),终端设备基于主密钥,并使用该候选小区或该候选小区所属的辅站对应的SN Counter派生KSN。例如,当终端设备检测到满足执行条件的候选小区为候选小区1,可以基于主密钥,并使用CPAC配置中包括的该候选小区1或候选小区1所属的SN1对应的SN Counter确定并保存KSN#1。
步骤1150:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
步骤1155:MN向候选SN1转发SN的重配完成消息。
需要说明的是,本申请实施对步骤1145,步骤1150和步骤1155执行顺序不做具体限定,可以先执行步骤1145,再执行步骤1150和步骤1155;或者,也可以先执行步骤1150和步骤1155,再执行步骤1145;或者,还可以同时执行步骤1145,步骤1150以及步骤1155。
步骤1160:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。候选小区1同样也可以基于接收到的KSN#1派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN#1派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
步骤1163:终端设备继续评估CPAC配置中包括的候选小区是否满足执行条件。
步骤1165:终端设备根据CPAC配置中包括的SN Counter确定并保存KSN#5。
一个示例,当终端设备检测到满足执行条件的候选小区为候选小区5,由于终端设备为第一次接入到候选小区5或候选小区5所属的SN2,其可以使用CPAC配置中包括的该候选小区5或SN2对应的SN Counter确定并保存KSN#5。
另一个示例,当终端设备检测到满足执行条件的候选小区为候选小区5,假设候选小区1属于一个小区集合,候选小区5属于另一个小区集合,当终端设备从候选小区1所属的小区集合中的小区切换到候选小区5所属的小区集合中的小区时,可以使用候选小区5所属的小区集合中的小区上一次使用的KSN(例如,KSN#5)。
另一个示例,当终端设备检测到满足执行条件的候选小区为候选小区5,如果候选小区5和候选小区1的SN Counter或KSN不同,可以使用候选小区10上一次使用的KSN(例如,KSN#5)。其中,候选小区10和候选小区5配置有相同的SN Counter或KSN。
步骤1170:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
步骤1175:MN向候选SN1转发SN的重配完成消息。
同样的,本申请实施对步骤1165,步骤1170和步骤1175执行顺序不做具体限定,可以先执行步骤1165,再执行步骤1170和步骤1175;或者,也可以先执行步骤1170和步骤1175,再执行步骤1165;或者,还可以同时执行步骤1165,步骤1170和步骤1175。
步骤1180:终端设备向候选SN2执行同步。
终端设备可以向候选小区5所在的候选SN2执行同步,作为示例,该同步过程可以通过RACH实现。候选小区5同样也可以基于接收到的KSN#5派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN#5派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥
步骤1183:终端设备继续评估CPAC配置中包括的候选小区是否满足执行条件。
步骤1185:终端设备根据KSN#1派生KSN#1-1。
若终端设备评估到某候选小区或某候选SN下的候选小区再次满足执行条件(或者某候选小区或某候选SN下的候选小区并非第一次满足执行条件),或终端设备再次接入到满足执行条件的某候选小区或某候选SN下的候选小区(或者并非第一次接入某候选小区或接入到某候选SN下的候选小区),终端设备使用在该候选小区或该候选小区所属的SN上一次使用的KSN派生新的KSN。例如,当终端设备再次检测到满足执行条件的候选小区为候选小区1,该终端设备可以使用其上一次接入到候选小区1或候选小区1所属的SN1使用的KSN#1确定KSN#1-1。
步骤1187:终端设备向MN发送RRC重配完成消息,该RRC重配完成消息中包括发送给候选SN1的重配完成消息。
步骤1190:MN根据KSN#1派生KSN#1-1。
本申请实施例中,MN可以在接收到终端设备发送的RRC重配完成消息后,可以使用终端设备上一次接入到候选小区1使用的KSN#1派生KSN#1-1。
步骤1195:MN向候选SN1转发SN的重配完成消息。
本申请实施例中,MN可以根据RRC重配完成消息指示的终端设备选择的候选小区为候选小区1,向候选小区1所在的候选SN1转发SN重配完成消息。
可选地,该SN重配完成消息中还可以包括KSN#1-1。
步骤1198:候选SN1根据KSN#1派生KSN#1-1。
候选SN1可以根据候选小区1或候选小区1所属的候选SN上一次使用的KSN派生一个新的KSN。
一个示例,候选SN1可以使用KSN#1派生KSN#1-1。应理解,上述KSN#1可以是终端设备上一次接入到候选小区1使用的KSN,或者还可以是终端设备上一次接入到候选小区1所属的候选SN1对应的KSN。
可选地,候选SN1从MN接收到的SN添加请求消息中包括SN Counter,例如,所述SN Counter可以是候选小区对应的SN Counter或候选小区所属的候选SN对应的SN Counter。在这种实现方式中,一种可能的实现方式中,候选SN1可以根据KSN#1以及该SN Counter派生KSN#1-1。
需要说明的是,如果执行步骤1190,则不执行步骤1198;或者,如果执行步骤1198,则不执行步骤1190。
步骤1199:终端设备向候选SN1执行同步。
终端设备可以向候选小区1所在的候选SN1执行同步,作为示例,该同步过程可以通过RACH实现。候选小区1同样也可以基于接收到的KSN#1-1派生对与所述终端设备之间的数据进行加密或数据完整性保护的用户面密钥,还可以基于KSN#1-1派生对与所述终端设备之间的信令进行加密或数据完整性保护的控制面密钥。
上述技术方案中,终端设备在后续的CPAC过程中,每触发一次CPA或CPC,则终端设备和MN(或SN)基于选择的候选小区或选择的候选小区所属的辅站上一次使用的KSN派生新的KSN。通过在后续的CPAC过程中确保每次更新KSN的输入密钥KSN不同,确保了在后续CPAC过程回到之前接入过的候选小区或候选SN时,通过不同的的KSN派生新的KSN,避免了密钥重用的问题。
以上结合了图1至图11详细描述了本申请实施例的通信的方法提供的技术方案,下面结合图12至图14介绍本申请实施例提供的通信装置。
图12是本申请实施例提供的一种通信装置的示意性框图。如图12所示,装置1200可以包括处理单元1220,其中,处理单元1220用于进行数据/信息的处理,使得上述图5至图11所示的方法中终端设备的功能被实现,或者使得上述图5至图11所示的方法中网络设备的功能被实现。
可选地,该装置1200还可以包括收发单元1210,收发单元1210可以与外部进行通信,例如,可以将外部接收的数据/信息输入至处理单元,又如,可以将经过处理单元处理的数据/信息输出至外部。收发单元1210还可以称为通信接口或通信单元。
在一种可能的实现方式中,该装置1200可以是上文图5至图11所示的方法中的终端设备,也可以是用于实现上文图5至图11所示的方法中的终端设备的功能的芯片。具体地,该装置1200可实现对应于上文图5至图11所示的方法中的终端设备执行的流程,其中,处理单元1220用于执行上述方法流程中终端设备的处理相关的操作。
一个示例,处理单元1220,用于派生第一密钥,并根据第一密钥派生第三密钥,其中,第一密钥是基于第二密钥并使用第一参数值确定的,第二密钥为主密钥,第一参数值是基于第二参数值更新得到的,或者第一参数值是根据接入第一小区或第一小区所属的辅站的次数确定的,第三密钥为用户面密钥和/或控制面密钥,第三密钥用于对与第一小区之间的数据和/或信令进行加密或数据完整性保护。
可选地,该第二参数值为该第一小区或该第一小区所属的辅站上一次使用的参数值,或者该第二参数值为上一次接入使用的参数值。
可选地,该第一参数值为该第二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。
可选地,该第一参数值为根据第三参数值以及接入该第一小区或该第一小区所属的辅站的次数确定的,其中,该第三参数值为该第一小区或该第一小区所属的辅站关联的起始参数值。
可选地,该第一参数值为第一集合中的第P个数值,其中P与接入该第一小区或该第一小区所属的辅站的次数相关,该第一集合包括该第一小区或该第一小区所属的辅站关联的多个参数值。
可选地,收发单元1210用于向主站发送该第一消息,该第一消息指示满足执行条件的第一小区或第一小区所属的辅站,该第一消息中包括该第一参数值。
另一个示例,处理单元1220,用于派生第四密钥,根据该第四密钥派生第六密钥,其中,该第四密钥是基于第五密钥确定的,该第五密钥为接入的上一个小区的密钥,或者该第五密钥为上一次接入该第二小区或接入该第二小区所属的辅站使用的密钥,该第六密钥为用户面密钥和/或控制面密钥,该第六密钥用于对与该第二小区之间的数据和/或信令进行加密或数据完整性保护。
可选地,处理单元1220具体用于基于该第五密钥并使用第四参数值派生该第四密钥,该第四参数值为该第二小区或接入该第二小区所属的辅站关联的参数值。
可选地,该第四参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者第四参数值是基于第五参数值更新得到的,或者该第四参数值是根据接入该第二小区或该第二小区所属的辅站的次数确定的。
可选地,该第五参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第五参数值为上一次接入使用的参数值。
应理解,上述处理单元1220和收发单元1210还可以分别执行上述图5至图11所示的方法中由终端设备实现的任一其他步骤、操作和/或功能,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。
在另一种可能的实现方式中,该装置1200可以是上文图5至图11所示的方法中的MN,也可以是用于实现上文图5至图11所示的方法中的MN的功能的芯片。具体地,该装置1200可实现对应于上文图5至图11所示的方法中的MN执行的流程,其中,处理单元1220用于执行上述方法流程中MN的处理相关的操作。
一个示例,处理单元1220,用于派生第一密钥,其中,该第一密钥用于该第一小区的安全,该第一小区为条件小区添加或变更CPAC的候选小区,该第一密钥是基于第二密钥并使用第一参数值确定的,该第二密钥为主密钥,该第一参数值是从终端设备接收到的,或者该第一参数值是基于第二参数值更新得到的,或者该第一参数值是根据该终端设备接入该第一小区或该第一小区所属的辅站的次数确定的。收发单元1210用于向该第一小区或该第一小区所属的辅站发送该第一密钥。
可选地,收发单元1210具体用于向该第一小区或该第一小区所属的辅站发送第二集合,该第二集合包括该第一小区或该第一小区所属的辅站关联的多个密钥,该多个密钥包括第一密钥。
可选地,收发单元1210还用于接收来自该终端设备的第一消息,该第一消息中包括该第一参数值,该第一消息指示满足执行条件的第一小区或第一小区所属的辅站。
可选地,该第二参数值为该第一小区或该第一小区所属的辅站上一次使用的参数值,或者该第二参数值为该终端设备上一次接入使用的参数值。
可选地,该第一参数值为该第二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。
可选地,该第一参数值为根据第三参数值以及该终端设备接入该第一小区或该第一小区所属的辅站的次数确定的,其中,该第三参数值为该第一小区或该第一小区所属的辅站关联的起始参数值。
可选地,该第一参数值为第一集合中的第P个数值,其中P与该终端设备接入该第一小区或该第一小区所属的辅站的次数相关,该第一集合包括该第一小区或该第一小区所属的辅站关联的多个参数值。
另一个示例,处理单元1220,用于派生第四密钥,其中,该第四密钥用于该第二小区的安全,该第四密钥是基于第五密钥确定的,该第五密钥为用于接入的上一个小区的密钥,或者该第五密钥为上一次接入该第二小区或接入该第二小区所属的辅站使用的密钥;收发单元1210用于向该第二小区或该第二小区所属的辅站发送该第四密钥。
可选地,处理单元1220具体用于基于该第五密钥并使用第四参数值派生该第四密钥,该第四参数值为该第二小区或接入该第二小区所属的辅站关联的参数值。
可选地,该第五密钥是基于第六密钥并使用第五参数值确定的,该第六密钥为主密钥,该第五参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者第五参数值是基于第六参数值更新得到的,或者该第五参数值是根据该终端设备接入该第二小区或该第二小区所属的辅站的次数确定的。
可选地,该第六参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第六参数值为该终端设备上一次接入使用的参数值。
应理解,上述处理单元1220和收发单元1210还可以分别执行上述图5至图11所示的方法中由MN实现的任一其他步骤、操作和/或功能,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。
在另一种可能的实现方式中,该装置1200可以是上文图5至图11所示的方法中的SN,也可以是用于实现上文图5至图11所示的方法中的SN的功能的芯片。具体地,该装置1200可实现对应于上文图5至图11所示的方法中的SN执行的流程,其中,处理单元1220用于执行上述方法流程中SN的处理相关的操作。
一个示例,收发单元1210用于接收第二集合,该第二集合包括第一小区或该第一小区所属的辅站关联的多个密钥,该多个密钥包括第一密钥;处理单元1220,用于根据第一标识或终端设备接入该第一小区或该第一小区所属的辅站的次数从该第二集合中确定该第一密钥,该第一标识用于指示该第一密钥在该第二集合中的位置。
可选地,收发单元1210还用于接收第二消息,该第二消息包括第一标识。
另一个示例,处理单元1220,用于派生第四密钥,根据该第四密钥派生第六密钥,其中,该第四密钥用于该第二小区的安全,该第四密钥是基于第五密钥确定的,该第五密钥为上一次接入该第二小区或接入该第二小区所属的辅站使用的密钥,该第六密钥为用户面密钥和/或控制面密钥,该第六密钥用于对与终端设备之间的数据和/或信令进行加密或数据完整性保护。
可选地,处理单元1220,还用于基于该第五密钥并使用第四参数值派生该第四密钥,该第四参数值为该第二小区或接入该第二小区所属的辅站关联的参数值。
可选地,该第五密钥是基于第六密钥并使用第五参数值确定的,该第六密钥为主密钥,该第五参数值是该第二小区或该第二小区所属的辅站关联的参数值,或者第五参数值是基于第六参数值更新得到的,或者该第五参数值是根据该终端设备接入该第二小区或该第二小区所属的辅站的次数确定的。
可选地,该第六参数值为该第二小区或该第二小区所属的辅站上一次使用的参数值,或者该第六参数值为该终端设备上一次接入使用的参数值。
应理解,上述处理单元1220和收发单元1210还可以分别执行上述图5至图11所示的方法中由SN实现的任一其他步骤、操作和/或功能,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。
还应理解,在上述任一种实现方式中,上述收发单元1210可以包括接收单元和发送单元,其中,接收单元用于执行上述收发单元1210中的接收功能,发送单元用于执行上述收发单元1210中的发送功能。
上述装置1200具有实现图5至图11所示的方法中由终端设备所执行的相应步骤的功能,或者,上述装置1200具有实现上述图5至图11所示的方法中由网络设备所执行的相应步骤的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块;例如收发单元可以由收发机替代(例如,收发单元中的发送单元可以由发送机替 代,收发单元中的接收单元可以由接收机替代),其它单元,如处理单元等可以由处理器替代,分别执行各个方法实施例中的收发操作以及相关的处理操作。
应理解,这里的装置1200以功能单元的形式体现。这里的术语“单元”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。
此外,上述收发单元还可以是收发电路(例如可以包括接收电路和发送电路),处理单元可以是处理电路。在本申请的实施例,装置1200可以是前述实施例中的终端设备或网络设备,也可以是芯片或者芯片系统,例如:片上系统(system on chip,SoC)。其中,收发单元可以是输入输出电路、通信接口。处理单元为该芯片上集成的处理器或者微处理器或者集成电路。在此不做限定。
图13是本申请实施例提供的通信装置的又一示意性结构图。如图13所示,该通信装置1300包括:至少一个处理器1310,该处理器1310用于执行指令,使得上述图5至图11所示的方法中的终端设备的功能被实现,或者使得上述图5至图11所示的方法中中的网络设备的功能被实现。
可选地,该装置1300还可以包括收发器1320,该收发器1320用于发送信号和/或接收信号。
可选地,该通信装置1300还包括存储器1330,用于存储指令。该处理器1310与存储器耦合,用于执行存储器中存储的指令,以控制收发器1320发送信号和/或接收信号。
应理解,上述处理器1310和存储器1330可以合成一个处理装置,处理器1310用于执行存储器1330中存储的程序代码来实现上述功能。具体实现时,该存储器1330也可以集成在处理器1310中,或者独立于处理器1310。
还应理解,收发器1320可以包括接收器(或者称,接收机)和发射器(或者称,发射机)。收发器720还可以进一步包括天线,天线的数量可以为一个或多个。收发器1320有可以是通信接口或者接口电路。
当该通信装置1300为芯片时,该芯片包括收发单元和处理单元。其中,收发单元可以是输入输出电路或通信接口;处理单元可以为该芯片上集成的处理器或者微处理器或者集成电路。
本申请实施例还提供了一种处理装置,包括处理器和接口。所述处理器可以使得上述方法实施例中的方法被实现。
应理解,上述处理装置可以是一个芯片。例如,该处理装置可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。
图14是本申请实施例提供的通信装置的又一示意性结构图。如图14所示,该装置1400包括处理电路1410,该处理电路1410用于执行指令,使得上述图5至图11所示的方法中的终端设备的功能被实现,或者使得上述图5至图11所示的方法中中的网络设备的功能被实现。
可选地,该装置1400还可以包括收发电路1420。其中,处理电路1410和收发电路1420通过内部连接通路互相通信,处理电路1410可以控制该收发电路1420发送信号和/或接收信号。
可选地,该装置1400还可以包括存储介质1430,该存储介质1430与处理电路1410、收发电路1420通过内部连接通路互相通信。该存储介质1430用于存储指令,该处理电路1410可以执行该存储介质1430中存储的指令。
在一种可能的实现方式中,装置1400用于实现上述方法实施例中的终端设备对应的流程。
在另一种可能的实现方式中,装置1400用于实现上述方法实施例中的网络设备对应的流程。
根据本申请实施例提供的方法,本申请还提供一种计算机程序产品,该计算机程序产品包括指令,当该指令被处理器运行时,使得上述图5至图11所示的方法中的终端设备的功能被实现,或者使得上述图5至图11所示的方法中中的网络设备的功能被实现。
根据本申请实施例提供的方法,本申请还提供一种计算机可读存储介质,该计算机可读存储介质包括指令,当该指令被处理器运行时,使得上述图5至图11所示的方法中的终端设备的功能被实现,或者使得上述图5至图11所示的方法中中的网络设备的功能被实现。
根据本申请实施例提供的方法,本申请还提供一种系统,其包括前述的一个或多个终端设备以及一个或多个网络设备。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,高密度数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
在本申请实施例中,“示例的”、“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。
应理解,说明书通篇中提到的“实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各个实施例未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。本申请中所有节点、消息的名称仅仅是本申请为描述方便而设定的名称,在实际网络中的名称可能不同,不应理解本申请限定各种节点、消息的名称,相反,任何具有和本申请中用到的节点或消息具有相同或类似功能的名称都视作本申请的方法或等效替换,都在本申请的保护范围之内。
还应理解,在本申请中,“当…时”、“若”以及“如果”均指在某种客观情况下UE或者基站会做出相应的处理,并非是限定时间,且也不要求UE或基站实现时一定要有判断的动作,也不意味着存在其它限定。
需要说明的是,本申请实施例中,“预先设定”、“预先配置”等可以通过在设备(例如,终端设备)中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,本申请对于其具体的实现方式不做限定,例如本申请实施例中预设的规则、预设的常数等。
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本文中术语“……中的至少一个”或“……中的至少一种”,表示所列出的各项的全部或任意组合,例如,“A、B和C中的至少一种”,或者“A、B或C中的至少一种”,可以表示:单独存在A,单独存在B,单独存在C,同时存在A和B,同时存在B和C,同时存在A、B和C这六种情况。本文中的“至少一个”表示一个或者多个。“多个”表示两个或者两个以上。
应理解,在本申请各实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
应理解,在本申请的各种实施例中,第一、第二以及各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围。例如,区分不同的信息等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (44)

  1. 一种通信的方法,其特征在于,所述方法包括:
    派生第一密钥,其中,所述第一密钥是基于第二密钥并使用第一参数值确定的,所述第二密钥为主密钥,所述第一参数值是基于第二参数值更新得到的,或者所述第一参数值是根据接入第一小区或所述第一小区所属的辅站的次数确定的;
    根据所述第一密钥派生第三密钥,所述第三密钥为用户面密钥和/或控制面密钥,所述第三密钥用于对与所述第一小区之间的数据和/或信令进行加密或数据完整性保护。
  2. 根据权利要求1所述的方法,其特征在于,所述第二参数值为所述第一小区或所述第一小区所属的辅站上一次使用的参数值,或者所述第二参数值为上一次接入使用的参数值。
  3. 根据权利要求1所述的方法,其特征在于,所述第二参数值为第三小区上一次接入使用的参数值,所述第三小区为与所述第一小区有相同的所述第二参数。
  4. 根据权利要求3所述的方法,其特征在于,所述派生第一密钥,包括:
    在从有不同第二参数值的小区切换到所述第一小区的情况下,派生所述第一密钥。
  5. 根据权利要求1所述的方法,其特征在于,所述第二参数值为第一小区集合中的小区上一次使用的参数值,其中,所述第一小区集合包括所述第一小区。
  6. 根据权利要求5所述的方法,其特征在于,所述派生第一密钥,包括:
    在从所述第一小区集合外的小区切换到所述第一小区的情况下,派生所述第一密钥。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一参数值为所述第二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。
  8. 根据权利要求1至6中任一项所述的方法,其特征在于,
    所述第一参数值为根据第三参数值以及接入所述第一小区或所述第一小区所属的辅站的次数确定的,所述第三参数值为所述第一小区或所述第一小区所属的辅站关联的起始参数值;或者
    所述第一参数值为根据所述第三参数值以及接入第一小区集合的小区的次数确定的,所述第三参数值为所述第一小区集合关联的起始参数值。
  9. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一参数值为第一集合中的第P个数值,其中P与接入所述第一小区或所述第一小区所属的辅站的次数相关,所述第一集合包括所述第一小区或所述第一小区所属的辅站关联的多个参数值。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述方法还包括:
    向主站发送所述第一消息,所述第一消息指示满足执行条件的第一小区或第一小区所属的辅站,所述第一消息中包括所述第一参数值。
  11. 一种通信的方法,其特征在于,所述方法包括:
    派生第一密钥,其中,所述第一密钥是基于第二密钥并使用第一参数值确定的,所述第二密钥为主密钥,所述第一参数值属于第三集合,所述第三集合包括第一小区集合关联的多个参数值,所述第一小区集合包括所述第一小区;
    根据所述第一密钥派生第三密钥,所述第三密钥为用户面密钥和/或控制面密钥,所述第三密钥用于对与所述第一小区之间的数据和/或信令进行加密或数据完整性保护。
  12. 根据权利要求11所述的方法,其特征在于,所述第一参数值是随机从所述第三集合包括的多个参数值中选择的。
  13. 根据权利要求11所述的方法,其特征在于,所述第一参数值是所述第三集合中的第P个数值,其中P与接入所述第一小区集合的次数相关。
  14. 根据权利要求11至13中任一项所述的方法,其特征在于,从所述第三集合中删除所述第一参数值。
  15. 根据权利要求11至14中任一项所述的方法,其特征在于,所述派生第一密钥,包括:
    在从所述第一小区集合外的小区切换到所述第一小区的情况下,派生所述第一密钥。
  16. 一种通信的方法,其特征在于,所述方法包括:
    派生第一密钥,其中,所述第一密钥用于所述第一小区的安全,所述第一小区为条件小区添加或变更CPAC的候选小区,所述第一密钥是基于第二密钥并使用第一参数值确定的,所述第二密钥为主密钥,所述第一参数值是从终端设备接收到的,或者所述第一参数值是基于第二参数值更新得到的,或者所述第一参数值是根据所述终端设备接入所述第一小区或所述第一小区所属的辅站的次数确定的;
    向所述第一小区或所述第一小区所属的辅站发送所述第一密钥。
  17. 根据权利要求16所述的方法,其特征在于,所述向所述第一小区或所述第一小区所属的辅站发送所述第一密钥,包括:
    向所述第一小区或所述第一小区所属的辅站发送第二集合,所述第二集合包括所述第一小区或所述第一小区所属的辅站关联的多个密钥,所述多个密钥包括第一密钥。
  18. 根据权利要求16或17所述的方法,其特征在于,所述方法还包括:
    接收来自所述终端设备的第一消息,所述第一消息中包括所述第一参数值,所述第一消息指示满足执行条件的第一小区或第一小区所属的辅站。
  19. 根据权利要求16至18中任一项所述的方法,其特征在于,所述第二参数值为所述第一小区或所述第一小区所属的辅站上一次使用的参数值,或者所述第二参数值为所述终端设备上一次接入使用的参数值。
  20. 根据权利要求16至18中任一项所述的方法,其特征在于,所述第二参数值为第三小区上一次接入使用的参数值,所述第三小区为与所述第一小区有相同的所述第二参数。
  21. 根据权利要求20所述的方法,其特征在于,所述派生第一密钥,包括:
    在从有不同第二参数值的小区切换到所述第一小区的情况下,派生所述第一密钥。
  22. 根据权利要求16至18中任一项所述的方法,其特征在于,所述第二参数值为第一小区集合中的小区上一次使用的参数值,其中,所述第一小区集合包括所述第一小区。
  23. 根据权利要求22所述的方法,其特征在于,所述派生第一密钥,包括:
    在从所述第一小区集合外的小区切换到所述第一小区的情况下,派生所述第一密钥。
  24. 根据权利要求16至23中任一项所述的方法,其特征在于,所述第一参数值为所述第二参数值加N,其中,N为大于或等于1的整数,或者N为条件小区添加或变更的候选小区的最大个数。
  25. 根据权利要求16至23中任一项所述的方法,其特征在于,所述第一参数值为根据第三参数值以及所述终端设备接入所述第一小区或所述第一小区所属的辅站的次数确定的,其中,所述第三参数值为所述第一小区或所述第一小区所属的辅站关联的起始参数值;或者
    所述第一参数值为根据所述第三参数值以及接入第一小区集合的小区的次数确定的,所述第三参数值为所述第一小区集合关联的起始参数值。
  26. 根据权利要求16至23中任一项所述的方法,其特征在于,所述第一参数值为第一集合中的第P个数值,其中P与所述终端设备接入所述第一小区或所述第一小区所属的辅站的次数相关,所述第一集合包括所述第一小区或所述第一小区所属的辅站关联的多个参数值。
  27. 一种通信的方法,其特征在于,所述方法包括:
    接收第二集合,所述第二集合包括第一小区或所述第一小区所属的辅站关联的多个密钥,所述多个密钥包括第一密钥;
    根据第一标识或终端设备接入所述第一小区或所述第一小区所属的辅站的次数从所述第二集合中确定所述第一密钥,所述第一标识用于指示所述第一密钥在所述第二集合中的位置。
  28. 根据权利要求27所述的方法,其特征在于,所述方法还包括:
    接收第二消息,所述第二消息包括第一标识。
  29. 一种通信的方法,其特征在于,所述方法包括:
    派生第四密钥,其中,所述第四密钥是基于第五密钥确定的,所述第五密钥为接入的上一个小区的密钥,或者所述第五密钥为上一次接入第二小区或接入所述第二小区所属的辅站使用的密钥,或者所述第五密钥为第二小区集合中的小区上一次使用的密钥,所述第一小区集合中包括所述第二小区,或者所述第五密钥为第四小区上一次接入使用的密钥,所述第四小区为与所述第二小区有相同的密钥或有相同的计数值;
    根据所述第四密钥派生第六密钥,所述第六密钥为用户面密钥和/或控制面密钥,所述第六密钥用 于对与所述第二小区之间的数据和/或信令进行加密或数据完整性保护。
  30. 根据权利要求29所述的方法,其特征在于,所述派生第四密钥,包括:
    在从所述第二小区集合外的小区切换到所述第二小区的情况下,或者在从有不同计数值的小区切换到所述第二小区的情况下,派生所述第四密钥。
  31. 根据权利要求29或30所述的方法,其特征在于,所述第四密钥是基于第五密钥确定的,包括:
    基于所述第五密钥并使用第四参数值派生所述第四密钥。
  32. 根据权利要求31所述的方法,其特征在于,所述第四参数值是所述第二小区或所述第二小区所属的辅站关联的参数值,或者所述第四参数值为所述第二小区集合关联的参数值,或者第四参数值是基于第五参数值更新得到的,或者所述第四参数值是根据接入所述第二小区或所述第二小区所属的辅站的次数确定的。
  33. 根据权利要求32所述的方法,其特征在于,所述第五参数值为所述第二小区或所述第二小区所属的辅站上一次使用的参数值,或者所述第五参数值为上一次接入使用的参数值,或者所述第五参数值为第二小区集合中的小区上一次使用的参数值。
  34. 一种通信的方法,其特征在于,所述方法包括:
    派生第四密钥,其中,所述第四密钥用于所述第二小区的安全,所述第四密钥是基于第五密钥确定的,所述第五密钥为用于接入的上一个小区的密钥,或者所述第五密钥为上一次接入所述第二小区或接入所述第二小区所属的辅站使用的密钥;
    向所述第二小区或所述第二小区所属的辅站发送所述第四密钥。
  35. 一种通信的方法,其特征在于,所述方法包括:
    派生第四密钥,其中,所述第四密钥用于所述第二小区的安全,所述第四密钥是基于第五密钥确定的,所述第五密钥为上一次接入所述第二小区或接入所述第二小区所属的辅站使用的密钥,或者所述第五密钥为第二小区集合中的小区上一次使用的密钥,所述第一小区集合中包括所述第二小区,或者所述第五密钥为第四小区上一次接入使用的密钥,所述第四小区为与所述第二小区有相同的密钥或有相同的计数值;
    根据所述第四密钥派生第六密钥,所述第六密钥为用户面密钥和/或控制面密钥,所述第六密钥用于对与终端设备之间的数据和/或信令进行加密或数据完整性保护。
  36. 根据权利要求34或35所述的方法,其特征在于,所述第四密钥是基于第五密钥确定的,包括:
    基于所述第五密钥并使用第四参数值派生所述第四密钥,所述第四参数值为所述第二小区或接入所述第二小区所属的辅站关联的参数值,或者所述第四参数值为所述第二小区集合关联的参数值。
  37. 根据权利要求34至36中任一项所述的方法,其特征在于,所述第五密钥是基于第六密钥并使用第五参数值确定的,所述第六密钥为主密钥,所述第五参数值是所述第二小区或所述第二小区所属的辅站关联的参数值,或者第五参数值是基于第六参数值更新得到的,或者所述第五参数值是根据所述终端设备接入所述第二小区或所述第二小区所属的辅站的次数确定的,或者所述第五参数值为第二小区集合中的小区上一次使用的参数值。
  38. 根据权利要求37所述的方法,其特征在于,所述第六参数值为所述第二小区或所述第二小区所属的辅站上一次使用的参数值,或者所述第六参数值为所述终端设备上一次接入使用的参数值。
  39. 一种通信装置,其特征在于,包括:用于执行根据权利要求1至10中任一项所述的方法的单元或模块,或者用于执行根据权利要求11至15中任一项所述的方法的单元或模块,或者用于执行根据权利要求29至33中任一项所述的方法的单元或模块;或者,用于执行根据权利要求16至26中任一项所述的方法的单元或模块,或者用于执行根据权利要求34、权利要求35至38中任一项所述的方法的单元或模块;或者,用于执行根据权利要求27或28所述的方法的单元或模块。
  40. 一种通信装置,其特征在于,所述通信装置包括处理器和存储介质,所述存储介质存储有指令,所述指令被所述处理器运行时,使得根据权利要求1至10中任一项所述的方法被实现,或者使得根据权利要求11至15中任一项所述的方法被实现,或者使得根据权利要求29至33中任一项所述的方法被实现;或者,使得根据权利要求16至26中任一项所述的方法被实现,或者使得根据权利要求34、权利要求35至38中任一项所述的方法被实现;或者,使得根据权利要求27或28所述的方法被实现。
  41. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括指令,当所述指令被处理器运行时,使得根据权利要求1至10中任一项所述的方法被实现,或者使得根据权利要求11至15中任一项所述的方法被实现,或者使得根据权利要求29至33中任一项所述的方法被实现;或者,使得根据权利要求16至26中任一项所述的方法被实现,或者使得根据权利要求34、权利要求35至38中任一项所述的方法被实现;或者,使得根据权利要求27或28所述的方法被实现。
  42. 一种计算机程序产品,其特征在于,所述计算机程序产品包括指令,当所述指令被处理器运行时,使得根据权利要求1至10中任一项所述的方法被实现,或者使得根据权利要求11至15中任一项所述的方法被实现,或者使得根据权利要求29至33中任一项所述的方法被实现;或者,使得根据权利要求16至26中任一项所述的方法被实现,或者使得根据权利要求34、权利要求35至38中任一项所述的方法被实现;或者,使得根据权利要求27或28所述的方法被实现。
  43. 一种通信方法,其特征在于,所述通信方法包括:根据权利要求1至10中任一项所述的方法,根据权利要求11至15中任一项所述的方法,根据权利要求16至26中任一项所述的方法以及根据权利要求27或28所述的方法;或者,根据权利要求29至33中任一项所述的方法,根据权利要求34、权利要求35至38中任一项所述的方法。
  44. 一种通信系统,其特征在于,所述通信系统包括:用于执行根据权利要求1至10中任一项所述的方法的单元或模块,用于执行根据权利要求11至15中任一项所述的方法的单元或模块,用于执行根据权利要求16至26中任一项所述的方法的单元或模块,以及用于执行根据权利要求27或28所述的方法的单元或模块;或者,用于执行根据权利要求29至33中任一项所述的方法的单元或模块,用于执行根据权利要求34、权利要求35至38中任一项所述的方法的单元或模块。
PCT/CN2023/111239 2022-09-30 2023-08-04 一种通信的方法和装置 WO2024066738A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2023/112739 WO2024066766A1 (zh) 2022-09-30 2023-08-11 一种通信的方法和装置

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202211214503.X 2022-09-30
CN202211214503 2022-09-30
CN202310409631.8 2023-04-07
CN202310409631.8A CN117812584A (zh) 2022-09-30 2023-04-07 一种通信的方法和装置

Publications (1)

Publication Number Publication Date
WO2024066738A1 true WO2024066738A1 (zh) 2024-04-04

Family

ID=90432174

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2023/111239 WO2024066738A1 (zh) 2022-09-30 2023-08-04 一种通信的方法和装置
PCT/CN2023/112739 WO2024066766A1 (zh) 2022-09-30 2023-08-11 一种通信的方法和装置

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/112739 WO2024066766A1 (zh) 2022-09-30 2023-08-11 一种通信的方法和装置

Country Status (2)

Country Link
CN (1) CN117812584A (zh)
WO (2) WO2024066738A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246696A (zh) * 2017-06-16 2019-01-18 华为技术有限公司 密钥处理方法以及相关装置
CN111148245A (zh) * 2015-01-30 2020-05-12 华为技术有限公司 通信方法、网络设备、用户设备和通信系统
CN112423272A (zh) * 2019-08-05 2021-02-26 华为技术有限公司 数据传输的方法和装置
WO2021043122A1 (zh) * 2019-09-04 2021-03-11 华为技术有限公司 通信方法、装置及计算机可读存储介质
CN112543450A (zh) * 2019-09-23 2021-03-23 大唐移动通信设备有限公司 密钥推衍方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10298549B2 (en) * 2015-12-23 2019-05-21 Qualcomm Incorporated Stateless access stratum security for cellular internet of things
CN112806041B (zh) * 2018-10-30 2022-12-13 华为技术有限公司 一种密钥生成方法、设备及系统
JP6864045B2 (ja) * 2019-07-17 2021-04-21 シャープ株式会社 端末装置、基地局装置、および、方法
WO2021064032A1 (en) * 2019-09-30 2021-04-08 Telefonaktiebolaget Lm Ericsson (Publ) Determining security keys

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111148245A (zh) * 2015-01-30 2020-05-12 华为技术有限公司 通信方法、网络设备、用户设备和通信系统
CN109246696A (zh) * 2017-06-16 2019-01-18 华为技术有限公司 密钥处理方法以及相关装置
CN112423272A (zh) * 2019-08-05 2021-02-26 华为技术有限公司 数据传输的方法和装置
WO2021043122A1 (zh) * 2019-09-04 2021-03-11 华为技术有限公司 通信方法、装置及计算机可读存储介质
CN112543450A (zh) * 2019-09-23 2021-03-23 大唐移动通信设备有限公司 密钥推衍方法及装置

Also Published As

Publication number Publication date
CN117812584A (zh) 2024-04-02
WO2024066766A1 (zh) 2024-04-04

Similar Documents

Publication Publication Date Title
WO2020135400A1 (zh) 通信方法和通信装置
US20180026958A1 (en) Fast-accessing method and apparatus
US20220167256A1 (en) MLD Privacy and Operation Enhancements
WO2020200034A1 (zh) 一种网络接入的方法和装置
WO2017041274A1 (zh) 信道测量与测量结果上报的方法和装置
US20230009565A1 (en) Communication method and apparatus applied to multi-link device in wireless local area network
JP2020523925A (ja) 情報伝送方法及び装置
US20230010109A1 (en) Communication method and apparatus
US20230012998A1 (en) Communication method, access network device, terminal device, and core network device
WO2021026747A1 (zh) 无线通信方法和终端设备
WO2021062730A1 (zh) 无线通信方法和装置
US20230164723A1 (en) Communication method and apparatus
WO2020211778A1 (zh) 小区切换方法以及装置
CN112449348B (zh) 通信方法和通信装置
WO2022011500A1 (zh) 配置方法和装置
KR102104844B1 (ko) 데이터 전송 방법, 제1 장치 및 제2 장치
JP2020520595A (ja) 信号伝送方法および装置
WO2024066738A1 (zh) 一种通信的方法和装置
WO2020164510A1 (zh) 通信方法、通信装置和计算机可读存储介质
TW202416743A (zh) 通信的方法和裝置
WO2024093721A1 (zh) 通信方法、装置及系统
WO2023050181A1 (zh) 无线通信方法及无线通信装置
WO2023280085A1 (zh) 频带范围上报的方法和通信装置
WO2024092423A1 (zh) 一种通信方法及相关装置
WO2024077597A1 (zh) 无线物理层安全通信的方法和通信装置

Legal Events

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

Ref document number: 23869984

Country of ref document: EP

Kind code of ref document: A1