Communication method and communication device
By synchronizing key derivation parameters through identifier-matched security mode messages, the method ensures consistent key usage between network and terminal devices, addressing misalignment issues and enhancing access layer security verification success.
Patent Information
- Application Number
- CN202310706745.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-17
AI Technical Summary
The issue of misaligned parameters during key deduction between network and terminal devices in security mode control procedures leads to failed access layer security verification, necessitating a solution to ensure both sides use the same key for successful verification.
Implementing a communication method where network devices and terminal devices use identifiers to synchronize key derivation parameters, ensuring that both sides use the same key by matching identifiers in security mode command and completion messages, and managing retransmissions to maintain parameter consistency.
This approach enhances the likelihood of successful access layer security verification by ensuring that both network and terminal devices derive and use the same key, thereby improving security verification processes.
Smart Images

Figure CN119155677A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and more specifically, to a communication method and a communication device. Background Art
[0002] When the network device starts the security mode control procedure, after the network side sends a security mode command message to the terminal side, the terminal device responds to the Security mode command message and replies a Security mode complete message to the network side.
[0003] Specifically, the terminal device and the network side may deduce the key based on the parameters in the Security mode complete message. If there is a retransmission of the Security mode command message, some parameters such as NAS count may be misaligned, which in turn causes the network side to use different parameters from the terminal side for key deduction. The key deduced by the network side will be provided to the access network device side so that the access network device can perform subsequent access layer security verification based on the key. If the network side uses different parameters from the terminal side for key deduction, resulting in the terminal side and the access network device side using different keys for subsequent access layer security verification, the access layer security verification will fail. How to increase the possibility of successful access layer security verification has become an urgent problem to be solved. Summary of the invention
[0004] The present application provides a communication method, which helps to enable the terminal side and the access network device side to perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0005] In a first aspect, a communication method is provided. The method may be executed by a core network device, or by a component (such as a chip or circuit) of the core network device, and the present application does not limit this. For ease of description, the following is an example of execution by a core network device.
[0006] The communication method includes: a core network device sends a first security mode command message to a terminal device, the first security mode command message includes a first value of a first identifier, and the first value of the first identifier is used to identify the first security mode command message; the core network device receives a first security mode completion message from the terminal device, the first security mode completion message includes a first value of a second identifier, and the first value of the second identifier is used to identify the first security mode completion message; when the first value of the first identifier is the same as the first value of the second identifier, the core network device derives a key according to a parameter included in the first security mode completion message; the core network device sends the key to an access network device.
[0007] Based on the above scheme, the security mode command message sent by the core network device carries the value of the first identifier to identify the security mode command message. In addition, the security mode completion message sent by the terminal device also carries the value of the second identifier to identify which security mode command message the security mode completion message is a response message to. Thus, the core network device can determine whether the security mode completion message is a response to the security mode command message based on the value of the second identifier carried in the received security mode completion message, that is, the core network device can determine the current message process, and then the core network device can more accurately determine which security mode completion message carries the parameters to deduce the key, so that the parameters of the key deduced by the core network device can be the same as the parameters of the terminal deduced key, and the core network device can provide the deduced key to the access network device, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0008] Exemplarily, the key is used to generate a key required for access layer security verification.
[0009] In combination with the first aspect, in certain implementations of the first aspect, before the core network device sends a first security mode command message to the terminal device, the method also includes: the core network device sends a second security mode command message to the terminal device, the second security mode command message including the second value of the first identifier, the second value of the first identifier is used to identify the second security mode command message, wherein the first value of the first identifier is different from the second value of the first identifier.
[0010] Based on the above scheme, when the core network device retransmits the security mode command message, the value of the first identifier carried in the retransmitted security mode command message is different from that in the initially transmitted security mode command message, so that the core network device can determine whether the security mode command message is a response to the retransmitted security mode command message or a response to the initially transmitted security mode command message based on the value of the first identifier carried in the received security mode command message.
[0011] Furthermore, the core network device can deduce the key based on the parameters carried in the response message of the retransmitted security mode command message, so that when there is message retransmission, the parameters used to deduce the key by the core network device can still be the same as the parameters used to deduce the key by the terminal.
[0012] In combination with the first aspect, in certain implementations of the first aspect, before the core network device receives a first security mode completion message from the terminal device, the method also includes: the core network device receives a second security mode completion message from the terminal device, the second security mode completion message includes a second value of the second identifier, and the second value of the second identifier is used to identify the second security mode completion message; wherein the second value of the second identifier is the same as the second value of the first identifier.
[0013] In this way, the core network device can determine that the second security mode completion message is a response message to the first transmitted second security mode command message, rather than a response message to the retransmitted first security mode command message, based on the second value of the first identifier carried in the second security mode command message being the same as the second value of the second identifier carried in the second security mode completion message. Thus, the core network device may not deduce the key based on the parameters included in the second security mode completion message, but deduce the key based on the parameters of the first security mode completion message after receiving the first security mode completion message. Alternatively, the core network device may deduce the key based on the parameters included in the second security mode completion message, but temporarily does not send the key to the access network device.
[0014] In combination with the first aspect, in some implementations of the first aspect, before the core network device sends a first security mode command message to the terminal device, the method also includes: the core network device sends a third security mode command message to the terminal device, the third security mode command message includes the third value of the first identifier, and the third value of the first identifier is used to identify the third security mode command message; the core network device sends a fourth security mode command message to the terminal device, the fourth security mode command message includes the fourth value of the first identifier, the fourth value of the first identifier is used to identify the fourth security mode command message, the fourth security mode command message is a retransmission message of the third security mode command message, and the fourth value of the first identifier is different from the third value of the first identifier; the core network device receives a fourth security mode completion message from the terminal device, the fourth security mode completion message includes the fourth value of the second identifier, and the fourth value of the second identifier is used to identify the fourth security mode completion message.
[0015] The core network device sends a first security mode command message to the terminal device, including: when the fourth value of the second identifier is the same as the fourth value of the first identifier, and the fourth security mode completion message is used to indicate that the terminal device supports Long Term Evolution LTE communication, the core network device sends the first security mode command message to the terminal device.
[0016] Based on the above scheme, the core network device may have retransmitted a certain security mode command message before sending the above-mentioned first security mode command message. For example, the core network device sends a third security mode command message to the terminal device, and sends a fourth security mode command message to the terminal device after the timer expires. The fourth security mode command message is a retransmission message of the third security mode command message. In this case, the core network device can send the first security mode command message to the terminal device after receiving the response message of the retransmitted security mode command message (such as the above-mentioned fourth security mode completion message), so that the core network device clearly learns the capabilities of the terminal device based on the response message of the retransmitted security mode command message, and thus sends parameters matching the capabilities of the terminal device to the terminal device. For example, when the technical solution is applied to a scenario in which a core network device activates a security key and an encryption algorithm through a security mode command message, and configures the encryption algorithm through another security mode command message, the core network device needs to determine that the terminal device has received a response to the security mode command message for activating the security key and the encryption algorithm before sending the security mode command message for configuring the encryption algorithm, so as to avoid key deduction when the security key activation and encryption algorithm activation process fails.
[0017] In combination with the first aspect, in certain implementations of the first aspect, before the core network device receives a fourth security mode completion message from the terminal device, the method also includes: the core network device receives a third security mode completion message from the terminal device, the third security mode completion message includes a third value of the second identifier, and the third value of the second identifier is used to identify the third security mode completion message; when the third value of the second identifier is different from the fourth value of the first identifier, the core network device discards the third security mode completion message.
[0018] Based on the above scheme, if the core network device retransmits a security mode completion message, the core network device receives a response to the initial transmission of the security mode completion message. It can determine that the response message is not a response to the retransmitted security mode completion message based on the value of the second identifier carried in the response message of the initial transmission of the security mode completion message, and thus the response message can be discarded without processing, thereby saving resources.
[0019] In conjunction with the first aspect, in certain implementations of the first aspect, the parameter included in the first security mode completion message is uplink count value information, and specifically the parameter is a non-access stratum NAS uplink count value.
[0020] In combination with the first aspect, in some implementations of the first aspect, the core network device is an access mobility management network element.
[0021] In combination with the first aspect, in some implementations of the first aspect, the first identifier is carried in a message header of the first security mode command message.
[0022] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the core network device saving a first value of the first identifier.
[0023] In a second aspect, a communication method is provided, which can be executed by a terminal device, or can also be executed by a chip or circuit configured in the terminal device, which is not limited in this application. For convenience, the following description is taken as an example of execution by a terminal device.
[0024] The communication method includes: a terminal device receives a first security mode command message from a core network device, the first security mode command message includes a first value of a first identifier, and the first value of the first identifier is used to identify the first security mode command message; the terminal device sends a first security mode completion message to the core network device in response to the first security mode command message, the first security mode completion message includes a first value of a second identifier, and the first value of the second identifier is used to identify the first security mode completion message; wherein the first value of the first identifier and the first value of the second identifier are the same, and the terminal device derives a key based on the parameters included in the first security mode completion message.
[0025] Exemplarily, the key is used to generate a key required for access layer security verification.
[0026] In combination with the second aspect, in certain implementations of the second aspect, before the terminal device receives a first security mode command message from a core network device, the method also includes: the terminal device receives a second security mode command message from the core network device, the second security mode command message includes a second value of the first identifier, and the second value of the first identifier is used to identify the second security mode command message; the terminal device sends a second security mode completion message to the core network device in response to the second security mode command message, the second security mode completion message includes the second value of the second identifier, and the second value of the second identifier is used to identify the second security mode completion message; wherein the second value of the second identifier is the same as the second value of the first identifier, and the first value of the first identifier is different from the second value of the first identifier.
[0027] In combination with the second aspect, in some implementations of the second aspect, before the terminal device receives the first security mode command message from the core network device, the method also includes: the terminal device receives a third security mode command message from the core network device, the third security mode command message includes the third value of the first identifier, and the third value of the first identifier is used to identify the third security mode command message; the terminal device sends a third security mode completion message to the core network device in response to the third security mode command message, the third security mode completion message includes the third value of the second identifier, and the third value of the second identifier is used to identify the third security mode completion message; the terminal device receives a third security mode command message from the core network device A fourth security mode command message of the core network device, the fourth security mode command message includes the fourth value of the first identifier, the fourth value of the first identifier is used to identify the fourth security mode command message, and the fourth value of the first identifier is different from the third value of the first identifier; the terminal device sends a fourth security mode completion message to the core network device in response to the fourth security mode command message, the fourth security mode completion message includes the fourth value of the second identifier, the fourth value of the second identifier is used to identify the fourth security mode completion message, and the fourth security mode completion message is used to indicate that the terminal device supports Long Term Evolution LTE communication, triggering the core network device to send the first security mode command message.
[0028] The technical effects of the method shown in the above second aspect and its possible design can refer to the technical effects in the first aspect and its possible design.
[0029] In a third aspect, a communication device is provided, which is used to implement the method shown in the first aspect. The device includes: a transceiver unit and a processing unit, wherein the transceiver unit is used to send and receive information, and the processing unit is used to perform internal processing actions.
[0030] In a fourth aspect, a communication device is provided, which is used to implement the method shown in the second aspect. The device includes: a transceiver unit and a processing unit, wherein the transceiver unit is used to send and receive information, and the processing unit is used to perform internal processing actions.
[0031] In a fifth aspect, a communication method is provided, which can be executed by a terminal device, or can also be executed by a chip or circuit configured in the terminal device, which is not limited in this application. For convenience, the following description is taken as an example of execution by a terminal device.
[0032] The communication method includes: a terminal device receives a fifth security mode command message from an access network device; the terminal device performs integrity protection check and / or decryption on the fifth security mode command message based on a first key; if the integrity protection check and / or decryption fails, the terminal device performs integrity protection check and / or decryption on the fifth security mode command message based on a second key, wherein the first key is derived based on a first parameter in a seventh security mode completion message, the second key is derived based on a second parameter in a sixth security mode completion message, the seventh security mode completion message and the sixth security mode completion message are sent in a non-access layer security mode control process, and the sixth security mode completion message is sent before the seventh security mode completion message.
[0033] Based on the above scheme, after receiving the security mode command message from the access network device, the terminal device performs integrity protection verification and / or decryption on the security mode command message. If the integrity protection verification and / or decryption fails, the key can be rolled back to perform integrity protection verification and / or decryption again. The key used by the terminal device is derived based on different parameters, and the different parameters are carried in different security mode completion messages. The different security mode completion messages are security mode completion messages sent by the terminal device to the core network device in the non-access layer security mode control process. The core network device can also perform key derivation based on the parameters in the different security mode completion messages to obtain the corresponding key, and provide the deduced key to the access network device, so that the access network device can perform subsequent access layer security verification based on the corresponding key.
[0034] In this technical solution, the key on the access network device side is provided by the core network device, and the core network device receives multiple security mode completion messages from the terminal device. The parameter used by the core network device to deduce the key may be a parameter carried in one of the multiple security mode completion messages. The parameter may be different from the parameter used by the terminal device to deduce the key. Therefore, if the terminal device fails to verify and the key is rolled back for re-verification, the key used may be exactly the same as the key provided by the core network device to the access network device, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0035] In combination with the fifth aspect, in certain implementations of the fifth aspect, the method also includes: in the non-access layer security mode control process, the terminal device receives a sixth security mode command message from a core network device; in response to the sixth security mode command message, the terminal device sends the sixth security mode completion message to the core network device, and derives the second key based on the second parameter; the terminal device receives a seventh security mode command message from the core network device, and after sending the sixth security mode completion message, the terminal device sends the seventh security mode completion message to the core network device in response to the seventh security mode command message, and derives the first key based on the first parameter.
[0036] In combination with the fifth aspect, in certain implementations of the fifth aspect, the method also includes: the terminal device saves the second key, wherein the terminal device derives the second key after the terminal device generates the sixth security mode completion message or after the terminal device sends the sixth security mode completion message, or after the terminal device determines the second parameter in the sixth security mode completion message.
[0037] Based on the above scheme, the terminal device can save the deduced key so that when the key is needed to perform integrity protection verification on the security mode command message received from the access network device in the future, the key can be directly used for verification, thereby improving the verification processing speed.
[0038] In combination with the fifth aspect, in certain implementations of the fifth aspect, after the terminal device generates the sixth security mode completion message or after the terminal device sends the sixth security mode completion message, or after the terminal device determines the second parameter in the sixth security mode completion message, the method also includes: the terminal device saves the second parameter; and the terminal device derives the second key based on the second parameter after the verification fails.
[0039] Based on the above scheme, the terminal device can save the parameters in the security mode completion message. When it is necessary to use the parameters to deduce the key and perform integrity protection verification on the security mode command message received from the access network device based on the key, the parameter can be used to deduce the key and use it. Compared with saving the key derived from the parameter, a certain amount of storage space can be saved.
[0040] In combination with the fifth aspect, in certain implementations of the fifth aspect, before the terminal device performs integrity protection verification on the fifth security mode command message based on the second key, the method also includes: the terminal device determines that the number of times the integrity protection verification is performed on the fifth security mode command message is less than a first threshold.
[0041] Based on the above solution, the terminal device can determine the number of multiple verifications according to the first threshold value to avoid continuous attempts to complete the security test, which may bring security risks.
[0042] In combination with the fifth aspect, in certain implementations of the fifth aspect, if the terminal device fails to perform integrity protection verification on the fifth security mode command message based on the second key, the method further includes: the terminal device determines that the verification has failed; or, the terminal device performs integrity protection verification on the fifth security mode command message based on a third key, wherein the third key is deduced based on a third parameter in a fifth security mode completion message, and the fifth security mode completion message is sent in the non-access layer security mode control process and is sent earlier than the sixth security mode completion message.
[0043] In combination with the fifth aspect, in certain implementations of the fifth aspect, the first parameter is first uplink count value information, the second parameter is second uplink count value information, and the third parameter is third uplink count value information.
[0044] In combination with the fifth aspect, in certain implementations of the fifth aspect, the core network device is an access mobility management network element.
[0045] In a sixth aspect, a communication device is provided, which is used to implement the method shown in the sixth aspect. The device includes: a transceiver unit and a processing unit, wherein the transceiver unit is used to send and receive information, and the processing unit is used to perform internal processing actions.
[0046] In a seventh aspect, a communication method is provided. The method may be executed by a core network device, or by a component (such as a chip or circuit) of the core network device, and this application does not limit this. For ease of description, the following is an example of the execution of the core network device.
[0047] The communication method includes: a core network device receives an eighth security mode completion message from a terminal device, wherein the eighth security mode completion message includes a fourth parameter; if a security mode command message is retransmitted due to a first timer timeout before receiving the eighth security mode completion message, the core network device starts a second timer;
[0048] When the second timer times out and no other security mode completion message is received from the terminal device, the core network device sends a fourth key to the access network device, where the fourth key is derived based on the fourth parameter; or
[0049] Before the second timer times out, the core network device receives a ninth security mode completion message from the terminal device, and the core network device derives a fifth key based on the fifth parameter in the ninth security mode completion message, and sends the fifth key to the access network device.
[0050] Based on the above scheme, before the core network device receives the security mode completion message from the terminal device to deduce the key, if it is determined that the security mode command message has been retransmitted due to the timeout of the first timer, the core network device will temporarily not send the key to the access network device, and the core network device will start the second timer, and wait for the second timer to time out before sending the key to the access network device or receiving the security mode completion message again to deduce a new key and send the new key to the access network device. Avoid the core network from sending the key derived based on the parameters in the received eighth security mode completion message to the access network device too early, and the terminal device sends the ninth security mode completion message after sending the ninth security mode completion message. The terminal device will deduce the key based on the parameters carried in the ninth security mode completion message. If the core network device delays sending the key, it can make the core network device have a high probability of being able to deduce the key based on the parameters carried in the ninth security mode completion message after receiving the ninth security mode completion message, so that the key sent by the core network device to the access network device can be the same as the key used by the terminal, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby improving the possibility of successful access layer security verification.
[0051] In combination with the seventh aspect, in certain implementations of the seventh aspect, the method further includes: the core network device derives the fourth key according to the fourth parameter. Optionally, the deduction of the fourth key is performed after the second timer times out. Optionally, the deduction of the fourth key may not be limited to being performed after the second timer times out, for example, the deduction is performed after receiving the eighth security mode completion message.
[0052] In combination with the seventh aspect, in certain implementations of the seventh aspect, before the core network device receives the eighth security mode completion message from the terminal device, the method also includes: the core network device sends an eighth security mode command message to the terminal device and starts the first timer; after the first timer expires, the core network device sends a ninth security mode command message to the terminal device, wherein the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0053] In combination with the seventh aspect, in certain implementations of the seventh aspect, the fourth parameter is fourth uplink count value information, and the fifth parameter is fifth uplink count value information.
[0054] In combination with the seventh aspect, in certain implementations of the seventh aspect, the core network device is an access mobility management network element.
[0055] In an eighth aspect, a communication device is provided, which is used to implement the method shown in the seventh aspect. The device includes: a transceiver unit and a processing unit, wherein the transceiver unit is used to send and receive information, and the processing unit is used to perform internal processing actions.
[0056] In a ninth aspect, a communication method is provided. The method may be executed by a core network device, or by a component (such as a chip or circuit) of the core network device, and the present application does not limit this. For ease of description, the following is an example of the execution of the core network device.
[0057] The communication method includes: a core network device receives an eighth security mode completion message from a terminal device, and if a security mode command message has been retransmitted due to a first timer timeout before receiving the eighth security mode completion message, the core network device starts a third timer; if no other security mode completion message is received from the terminal device after the third timer times out, the core network device sends a tenth security mode command message to the terminal device and restarts the first timer; or,
[0058] Before the third timer times out, the core network device receives a ninth security mode completion message from the terminal device. After receiving the ninth security mode completion message, the core network device sends a tenth security mode command message to the terminal device and restarts the first timer.
[0059] Based on the above scheme, when the security mode command messages sent by the core network device to the terminal device in sequence include the eighth security mode command message and the ninth security mode command message, and the ninth security mode command message is a retransmission message of the eighth security mode command message, the time for sending subsequent security mode command messages is postponed, so that the core network device can send subsequent security mode command messages after receiving the response message of the retransmitted security mode command message (such as the ninth security mode command message), so as to avoid the core network device mistakenly believing that the received response message of the ninth security mode command message is the response message of the subsequently sent security mode command message, and using parameters different from those on the terminal device side to deduce the key, resulting in failure of the access layer security verification.
[0060] In combination with the ninth aspect, in certain implementations of the ninth aspect, before the core network device receives the eighth security mode completion message from the terminal device, the method also includes: the core network device sends an eighth security mode command message to the terminal device and starts the first timer; after the first timer expires, the core network device sends a ninth security mode command message to the terminal device, wherein the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0061] In combination with the ninth aspect, in certain implementations of the ninth aspect, the core network device is an access mobility management network element.
[0062] In a tenth aspect, a communication device is provided, which is used to implement the method shown in the ninth aspect. The device includes: a transceiver unit and a processing unit, wherein the transceiver unit is used to send and receive information, and the processing unit is used to perform internal processing actions.
[0063] In an eleventh aspect, a communication method is provided. The method may be executed by an access network device, or by a component (such as a chip or circuit) of the access network device, and the present application does not limit this. For ease of description, the following description is given by taking the access network device as an example.
[0064] The communication method includes: an access network device receives a fourth key from a core network device; the access network device performs integrity protection on an access layer security mode command message based on the fourth key, and then sends the access layer security mode command message to a terminal device; the access network device receives an access layer security mode failure message from the terminal device; the access network device sends a first request message to the core network device, wherein the first request message is used to request a key; the access network device receives a fifth key from the core network device; and the access network device performs an access layer security mode control process again based on the fifth key.
[0065] Based on the above scheme, when the access network device receives a security mode failure message from the terminal device, it will not directly send a release connection message to the UE, but can re-request the core network device to provide a key, and re-initiate the access layer security mode control process based on the key regained from the core network device, wherein the key used by the access network device to initiate the access layer security mode control process twice is derived based on different parameters, and the different parameters are carried in different security mode completion messages, and the different security mode completion messages are security mode completion messages sent by the terminal device to the core network device in the non-access layer security mode control process. Specifically, the core network device performs key derivation based on the parameters in the different security mode completion messages to obtain the corresponding key, and provides the deduced key to the access network device, so that the access network device can perform subsequent access layer security verification based on the corresponding key.
[0066] In combination with the eleventh aspect, in certain implementations of the eleventh aspect, the fourth key is derived based on the fourth parameter in the eighth security mode completion message, the fifth key is derived based on the fifth parameter in the ninth security mode completion message, the eighth security mode completion message and the ninth security mode completion message are sent in the non-access layer security mode control process, and the eighth security mode completion message is sent before the ninth security mode completion message.
[0067] In this technical solution, the key on the access network device side is provided by the core network device, and the core network device receives multiple security mode completion messages from the terminal device. The parameter used by the core network device to deduce the key may be a parameter carried in one of the multiple security mode completion messages. The parameter may be different from the parameter used by the terminal device to deduce the key. Therefore, if the access network device obtains the key from the core network device again after receiving the access layer security mode failure message, and initiates the access layer security mode control process again based on the obtained key, the key used may be exactly the same as the key based on which the terminal device verifies the access layer security mode command message, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0068] In combination with the eleventh aspect, in certain implementations of the eleventh aspect, the access network device sending a first request message to the core network device includes: when the access layer security mode failure message indicates that the integrity protection check of the access layer security mode command message has failed, the access network device sends a first request message to the core network device.
[0069] In combination with the eleventh aspect, in certain implementations of the eleventh aspect, the core network device is an access mobility management network element.
[0070] In a twelfth aspect, a communication method is provided. The method may be executed by a core network device, or by a component (such as a chip or circuit) of the core network device, and the present application does not limit this. For ease of description, the following is an example of execution by a core network device.
[0071] The communication method includes: a core network device receives an eighth security mode completion message from a terminal device, the eighth security mode completion message includes a fourth parameter; the core network device derives a fourth key based on the fourth parameter, and sends the fourth key to an access network device; the core network device receives a ninth security mode completion message from the terminal device, the ninth security mode completion message includes a fifth parameter; the core network device receives a first request message from the access network device, the first request message is used to request a key; the core network device sends a fifth key to the access network device, the fifth key is derived based on the fifth parameter.
[0072] In combination with the twelfth aspect, in certain implementations of the twelfth aspect, before the core network device receives the eighth security mode completion message from the terminal device, the method also includes: the core network device sends an eighth security mode command message to the terminal device and starts the first timer; after the first timer expires, the core network device sends a ninth security mode command message to the terminal device, wherein the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0073] In combination with the twelfth aspect, in certain implementations of the twelfth aspect, the method further includes: the core network device derives the fifth key according to the fifth parameter. Optionally, the deduction of the fifth key is performed after receiving the first request message. Optionally, the deduction of the fifth key is not limited to being performed after receiving the first request message, for example, the deduction is performed after receiving the ninth security mode completion message.
[0074] In combination with the twelfth aspect, in certain implementations of the twelfth aspect, the method further includes: the core network device storing the fifth key and / or the fifth parameter.
[0075] In combination with the twelfth aspect, in certain implementations of the twelfth aspect, the core network device is an access mobility management network element.
[0076] In a thirteenth aspect, a communication device is provided, which is used to implement the method shown in the eleventh aspect. The device includes: a transceiver unit and a processing unit, wherein the transceiver unit is used to send and receive information, and the processing unit is used to perform internal processing actions.
[0077] In a fourteenth aspect, a communication device is provided, which is used to implement the method shown in the above twelfth aspect. The device includes: a transceiver unit and a processing unit, wherein the transceiver unit is used to send and receive information, and the processing unit is used to perform internal processing actions.
[0078] In a fifteenth aspect, a communication method is provided. The method may be executed by an access network device, or by a component (such as a chip or circuit) of the access network device, and the present application does not limit this. For ease of description, the following description is given by taking the execution of the access network device as an example.
[0079] The communication method comprises: an access network device receives a fourth key from a core network device; after the access network device performs integrity protection on an access layer security mode command message based on the fourth key, the access network device sends the access layer security mode command message to a terminal device; the access network device receives an access layer security mode failure message from the terminal device; the access network device starts a fourth timer;
[0080] In the case where the fourth timer times out and the fifth key is still not received from the core network device, the access network device sends a radio resource control release message to the terminal device; or,
[0081] Before the fourth timer times out, the access network device receives a fifth key from the core network device, and the access network device performs the access layer security mode control process again based on the fifth key.
[0082] Based on the above scheme, when the access network device receives the security mode failure message from the terminal device, it may temporarily not feedback the connection release message, but start the fourth timer and wait for the fourth timer to time out before sending the connection release message to the terminal device to release the connection between the terminal device and the access network device. Alternatively, before the fourth timer times out, other keys provided by the core network are received, and the access layer security mode control process can be retried based on the received key, thereby increasing the possibility of successful access layer security verification.
[0083] In combination with the fifteenth aspect, in certain implementations of the fifteenth aspect, the fourth key is derived based on the fourth parameter in the eighth security mode completion message, the fifth key is derived based on the fifth parameter in the ninth security mode completion message, the eighth security mode completion message and the ninth security mode completion message are sent in the non-access layer security mode control process, and the eighth security mode completion message is sent before the ninth security mode completion message. In this technical solution, the key used by the access network device to initiate the access layer security mode control process twice is derived based on different parameters, and the different parameters are carried in different security mode completion messages, and the different security mode completion messages are security mode completion messages sent by the terminal device to the core network device in the security mode control process. Specifically, the core network device performs key derivation based on the parameters in the different security mode completion messages to obtain the corresponding key, and provides the deduced key to the access network device, so that the access network device can perform subsequent access layer security verification based on the corresponding key.
[0084] That is, the key on the access network device side is provided by the core network device, and the core network device receives multiple security mode completion messages from the terminal devices. The parameter used by the core network device to deduce the key may be the parameter carried in one of the multiple security mode completion messages. The parameter may be different from the parameter used by the terminal device to deduce the key. Therefore, if the access network device obtains the key from the core network device again after receiving the access layer security mode failure message, and initiates the access layer security mode control process again based on the obtained key, the key used may be exactly the same as the key based on which the terminal device verifies the access layer security mode command message, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0085] In combination with the fifteenth aspect, in certain implementations of the fifteenth aspect, after the access network device receives the fifth key, the fourth timer is stopped.
[0086] In a fifteenth aspect, a communication device is provided, which is used to implement the method shown in the fourteenth aspect. The device includes: a transceiver unit and a processing unit, wherein the transceiver unit is used to send and receive information, and the processing unit is used to perform internal processing actions.
[0087] In the sixteenth aspect, a communication system is provided, comprising a core network device and a terminal device, wherein the core network device is used to execute the method shown in the above-mentioned first aspect, and the terminal device executes the method shown in the above-mentioned second aspect.
[0088] In the seventeenth aspect, a communication device is provided, which includes: a memory for storing programs; a processor for executing the programs stored in the memory, and when the programs stored in the memory are executed, the processor is used to execute the methods provided in the above aspects.
[0089] In an eighteenth aspect, the present application provides a processor for executing the methods provided in the above aspects. In the process of executing these methods, the process of sending the above information and obtaining / receiving the above information in the above methods can be understood as the process of the processor outputting the above information and the process of the processor receiving the input above information. When outputting the above information, the processor outputs the above information to the transceiver so that it can be transmitted by the transceiver. After being output by the processor, the above information may also need to be processed otherwise before reaching the transceiver. Similarly, when the processor receives the input information, the transceiver obtains / receives the above information and inputs it into the processor. Furthermore, after the transceiver receives the above information, the above information may need to be processed otherwise before being input into the processor.
[0090] Based on the above principle, for example, the receiving request message mentioned in the above method can be understood as the processor receiving input information.
[0091] For the operations such as transmission, sending and acquisition / reception involved in the processor, unless otherwise specified, or unless they conflict with their actual functions or internal logic in the relevant descriptions, they can be more generally understood as processor output, reception, input and other operations, rather than transmission, sending and receiving operations performed directly by the RF circuit and antenna.
[0092] In the implementation process, the processor may be a processor specifically used to execute these methods, or a processor that executes computer instructions in a memory to execute these methods, such as a general-purpose processor. The memory may be a non-transitory memory, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or may be separately arranged on different chips. The embodiment of the present application does not limit the type of memory and the arrangement of the memory and the processor.
[0093] In a nineteenth aspect, a computer-readable storage medium is provided, which stores a program code for execution by a device, wherein the program code includes a method for executing the methods provided in the above aspects.
[0094] In the twentieth aspect, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is used to execute the methods provided in the above aspects.
[0095] In the twenty-first aspect, a chip is provided, which includes a processor and a communication interface, and the processor reads instructions stored in a memory through the communication interface to execute the methods provided in the above aspects.
[0096] Optionally, as an implementation manner, the chip may further include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the methods provided by the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] Figure 1 It is a schematic diagram of the network architecture 100 provided in this application.
[0098] Figure 2 This is a specific flow chart of a security mode command program provided by the present application when a UE has an underlying abnormality.
[0099] Figure 3 It is a schematic flow chart of a communication method provided by the present application.
[0100] Figure 4 It is a schematic flow chart of another communication method provided by the present application.
[0101] Figure 5 It is a schematic flow chart of another communication method provided by the present application.
[0102] Figure 6 It is a schematic flow chart of another communication method provided by the present application.
[0103] Figure 7 It is a schematic flow chart of another communication method provided by the present application.
[0104] Figure 8 It is a schematic flow chart of another communication method provided by the present application.
[0105] Fig. 9 It is a schematic flow chart of another communication method provided by the present application.
[0106] Fig.10 It is a schematic flow chart of another communication method provided by the present application.
[0107] Fig.11 It is a schematic flow chart of another communication method provided by the present application.
[0108] Fig.12 It is a schematic flow chart of another communication method provided by the present application.
[0109] Fig.13It is a schematic block diagram of a communication device 10 provided in an embodiment of the present application.
[0110] Fig.14 It is a schematic diagram of another communication device 20 provided in an embodiment of the present application.
[0111] Fig.15 It is a schematic diagram of a chip system 30 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0112] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0113] The technical solution provided in this application can be applied to various communication systems, such as: new radio (NR) system, long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD) system, etc. The technical solution provided in this application can also be applied to device to device (D2D) communication, vehicle to everything (V2X) communication, machine to machine (M2M) communication, machine type communication (MTC), and Internet of things (IoT) communication system or other communication systems.
[0114] In the communication system, the part operated by the operator can be called a public land mobile network (PLMN), or an operator network, etc. PLMN is a network established and operated by the government or an operator approved by it for the purpose of providing land mobile communication services to the public. It is mainly a public network in which mobile network operators (MNO) provide mobile broadband access services to users. The PLMN described in the embodiment of the present application may specifically be a network that meets the requirements of the 3GPP standard, referred to as a 3GPP network. 3GPP networks generally include but are not limited to 5G networks, fourth-generation mobile communications (4th-generation, 4G) networks, and other future communication systems, such as (6th-generation, 6G) networks, etc. This technical solution is also applicable to SNPN (Stand-alone Non-Public Network).
[0115] For the convenience of description, the embodiments of the present application will be described using PLMN or 5G network as an example.
[0116] Figure 1 This is a schematic diagram of a network architecture 100 provided by the present application, taking the 5G network architecture based on a service-oriented architecture in a non-roaming scenario defined in the 3GPP standardization process as an example. As shown in the figure, the network architecture may include three parts, namely, a terminal device part, a DN, and an operator network PLMN part. The functions of the network elements of each part are briefly described below.
[0117] The terminal equipment part may include a terminal device 110, which may also be referred to as a user equipment (UE). The terminal device 110 in the present application is a device with wireless transceiver functions, which may communicate with one or more core network (CN) devices via an access network device (or may also be referred to as an access device) in a radio access network (RAN) 140. The terminal device 110 may also be referred to as an access terminal, a terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a user agent or a user device, etc. The terminal device 110 may be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; it may also be deployed on the water (e.g., a ship, etc.); it may also be deployed in the air (e.g., on an airplane, a balloon, and a satellite, etc.). The terminal device 110 may be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a smart phone, a mobile phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), etc. Alternatively, the terminal device 110 may also be a handheld device with wireless communication function, a computing device or other device connected to a wireless modem, a vehicle-mounted device, a wearable device, a drone device or a terminal in the Internet of Things or the Internet of Vehicles, a terminal in any form in a 5G network and future networks, a relay user device or a terminal in a future evolved 6G network, etc. Among them, the relay user device may be, for example, a 5G residential gateway (RG). For example, the terminal device 110 can be a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The terminal device here refers to a 3GPP terminal. The embodiment of the present application does not limit the type or type of terminal device. For ease of explanation, the following description of the present application takes UE as an example to refer to the terminal device.
[0118] The operator network PLMN part may include but is not limited to a (radio) access network ((R)AN) 120 and a core network (CN) part.
[0119] (R)AN 120 can be regarded as a sub-network of the operator network, and is an implementation system between the service nodes in the operator network and the terminal device 110. To access the operator network, the terminal device 110 first passes through (R)AN 120, and then can connect to the service nodes of the operator network through (R)AN 120. The access network device (RAN device) in the embodiment of the present application is a device that provides wireless communication functions for the terminal device 110, and can also be called a network device. The RAN device includes but is not limited to: the next generation node base station (gNB) in the 5G system, the evolved node B (eNB) in the long term evolution (LTE), the radio network controller (RNC), the node B (NB), the base station controller (BSC), the base transceiver station (BTS), the home base station (for example, home evolved node B, or home node B, HNB), the base band unit (BBU), the transmission point (TRP), the transmitting point (TP), the small base station device (pico), the mobile switching center, or the network device in the future network. In systems using different wireless access technologies, the names of the devices with access network device functions may be different. For the convenience of description, in all embodiments of the present application, the above-mentioned devices that provide wireless communication functions for the terminal device 110 are collectively referred to as access network devices or RAN or AN for short. It should be understood that this document does not limit the specific type of access network equipment.
[0120] The CN part may include but is not limited to the following NFs: user plane function (UPF) 130, network exposure function (NEF) 131, network function repository function (NRF) 132, policy control function (PCF) 133, unified data management function (UDM) 134, unified data repository function (UDR) 135, network data analytics function (NWDAF) 136, authentication server function (AUSF) 137, access and mobility management function (AMF) 138, session management function (SMF) 139.
[0121] The data network DN 140, which may also be referred to as a packet data network (PDN), is usually a network located outside the operator network, such as a third-party network. Of course, in some implementations, the DN may also be deployed by the operator, that is, the DN is part of the PLMN. This application does not limit whether the DN belongs to the PLMN. The operator network PLMN may access multiple data networks DN 140, and multiple services may be deployed on the data network DN 140, which may provide services such as data and / or voice to the terminal device 110. For example, the data network DN 140 may be a private network of a smart factory, and the sensors installed in the workshop of the smart factory may be the terminal devices 110. The control server in which the sensors are deployed in the data network DN 140 may provide services for the sensors. The sensors may communicate with the control server, obtain instructions from the control server, and transmit the collected sensor data to the control server according to the instructions. For another example, the data network DN 140 may be an internal office network of a company, and the mobile phones or computers of the company's employees may be the terminal devices 110, and the employees' mobile phones or computers may access information, data resources, etc. on the company's internal office network. The terminal device 110 can establish a connection with the operator network through an interface (such as N1, etc.) provided by the operator network, and use data and / or voice services provided by the operator network. The terminal device 110 can also access the data network DN 140 through the operator network, and use the operator services deployed on the data network DN 140, and / or services provided by a third party.
[0122] The following is a brief description of the NF functions included in CN.
[0123] 1. UPF 130 is a gateway provided by the operator and is the gateway for communication between the operator network and the data network DN 140. UPF 130 includes user-plane related functions such as data packet routing and transmission, data packet detection, service usage reporting, quality of service (QoS) processing, legal monitoring, uplink data packet detection, downlink data packet storage, etc.
[0124] 2. NEF 131 is a control plane function provided by the operator. It mainly enables third parties to use the services provided by the network, supports the network to open its capabilities, event and data analysis, provides PLMN security configuration information from external applications, and converts the interactive information inside and outside the PLMN. It provides an API interface for the operator network to be open to the outside world, and provides it for the interaction between external servers and internal operator networks.
[0125] 3. NRF 132 is a control plane function provided by the operator, which can be used to maintain real-time information of network functions and services in the network. For example, it supports network service discovery, maintains the services supported by the NF profile of the NF instance, supports service discovery of the service communication proxy (SCP), maintains the SCP profile of the SCP instance, sends notifications about newly registered, unregistered, and updated NFs and SCPs, and maintains the health status of NF and SCP operations.
[0126] 4. PCF 133 is a control plane function provided by the operator. It supports a unified policy framework to govern network behavior, provide policy rules to other control functions, and contract information related to policy decisions.
[0127] 5. UDM 134 is a control plane function provided by the operator, responsible for storing information such as the subscriber permanent identifier (SUPI) of the subscriber in the operator network, the generic public subscription identifier (GPSI) of the subscriber, and credentials. The SUPI will be encrypted during transmission, and the encrypted SUPI is called a hidden subscriber subscription identifier (SUCI). The information stored in UDM 134 can be used for authentication and authorization of the terminal device 110 to access the operator network. The subscriber of the above-mentioned operator network can specifically be a user who uses the services provided by the operator network, such as a user who uses a mobile phone core card (Subscriber Identity Module, SIM) card of China Telecom, or a user who uses a mobile phone core card of China Mobile, etc. The credentials of the above-mentioned subscriber can be a small file storing long-term keys stored in the mobile phone core card or information related to the encryption of the mobile phone core card, which is used for authentication and / or authorization. It should be noted that permanent identifiers, credentials, security contexts, authentication data (cookies), and tokens are equivalent to verification / authentication and authorization-related information. In the embodiments of the present application, no distinction or restriction is made for the sake of convenience of description.
[0128] 6. UDR 135 is a control plane function provided by the operator, which provides the functions of storing and retrieving subscription data for UDM, storing and retrieving policy data for PCF, storing and retrieving user's NF group ID information, etc.
[0129] 7. NWDAF 136 is a control plane function provided by the operator. Its main function is to collect data from NF, external application function AF and operation, administration and maintenance (OAM) system, etc., and provide NWDAF service registration, data opening and analysis data to NF and AF. In this application, NWDAF is mainly responsible for security-related data analysis. Therefore, in this application, NWDAF can also be understood as a network element with security analysis function. The network element with security analysis function is called NWDAF only as an example. There may be other network element names in the future, and this application does not limit this.
[0130] 8. AUSF 137 is a control plane function provided by the operator, and is usually used for primary authentication, i.e., authentication between the terminal device 110 (subscriber) and the operator network. After receiving the authentication request initiated by the subscriber, AUSF 137 may authenticate and / or authorize the subscriber through the authentication information and / or authorization information stored in UDM 134, or generate the authentication and / or authorization information of the subscriber through UDM 134. AUSF 137 may feed back the authentication information and / or authorization information to the subscriber.
[0131] 9. AMF 138 is a control plane network function provided by the operator network, responsible for access control and mobility management of the terminal device 110 accessing the operator network, such as mobility status management, allocation of user temporary identity, authentication and authorization of users, etc.
[0132] AMF 138 is used to establish NAS connection with UE and has the same 5G NAS security context as UE. The 5G NAS security context includes KAMF, key identification information with the same NAS layer key, UE security capability, uplink NAS COUNT value, and downlink NAS COUNT value. NAS layer keys include NAS encryption keys and NAS integrity protection keys, which are used for confidentiality protection and integrity protection of NAS messages respectively.
[0133] 10. SMF 139 is a control plane network function provided by the operator network, responsible for managing the PDU session of the terminal device 110. The PDU session is a channel for transmitting PDUs. The terminal device needs to transmit PDUs to and from the data network DN 140 through the PDU session. SMF 139 is responsible for establishing, maintaining and deleting PDU sessions. SMF 139 includes session management (such as session establishment, modification and release, including tunnel maintenance between the user plane function UPF 130 and (R)AN 120), selection and control of UPF 130, service and session continuity (SSC) mode selection, roaming and other session-related functions.
[0134] 11. AF 141 is a control plane network function provided by the operator network, which is used to provide application layer information. It can interact with the policy framework through the network open function network element or directly interact with the policy framework to make policy decision requests, etc. It can be located inside or outside the operator network.
[0135] It is understandable that the above network elements or functions can be physical entities in hardware devices, software instances running on dedicated hardware, or virtualized functions instantiated on a shared platform (e.g., a cloud platform). In short, an NF can be implemented by hardware or software.
[0136] Figure 1 Among them, Nnef, Nnrf, Npcf, Nudm, Nudr, Nnwdaf, Nausf, Namf, Nsmf, N1, N2, N3, N4, and N6 are interface serial numbers. For example, the meaning of the above interface serial numbers can refer to the meaning defined in the 3GPP standard protocol, and this application does not limit the meaning of the above interface serial numbers. It should be noted that the interface name between the various network functions in the figure is only an example. In the specific implementation, the interface name of the system architecture may also be other names, which is not limited by this application. In addition, the name of the message (or signaling) transmitted between the above-mentioned network elements is also only an example, and does not constitute any limitation on the function of the message itself.
[0137] For the convenience of explanation, in the embodiments of the present application, the network functions (such as NEF 131 ... SMF139) are collectively referred to as NFs, that is, the NFs described later in the embodiments of the present application can be replaced by any network function. Figure 1 Only some network functions are schematically described. The NF described below is not limited to Figure 1 The network functions shown in .
[0138] It should be understood that the above-mentioned network architecture applied to the embodiment of the present application is only a network architecture described from the perspective of a service-oriented architecture, and the network architecture applicable to the embodiment of the present application is not limited to this. Any network architecture that can realize the functions of the above-mentioned network elements is applicable to the embodiment of the present application.
[0139] It should also be understood that the AMF, SMF, UPF, NEF, AUSF, NRF, PCF, and UDM shown in the figure can be understood as network elements used to implement different functions in the core network, for example, they can be combined into network slices as needed. These core network network elements can be independent devices or integrated into the same device to implement different functions. This application does not limit the specific form of the above network elements.
[0140] It should also be understood that the above naming is only defined for the convenience of distinguishing different functions and should not constitute any limitation to this application. This application does not exclude the possibility of using other naming in 5G networks and other future networks. For example, in a 6G network, some or all of the above network elements may use the terminology in 5G, or may use other names.
[0141] To facilitate understanding of the embodiments of the present application, some basic concepts involved in the present application are briefly described.
[0142] 1. Network Non-Access Stratum (NAS) Security mode control procedure: This procedure includes the round-trip of messages between AMF and UE. AMF sends a Security mode command message to the UE, and the UE replies with a Security mode complete message. The specific process of the Security mode command procedure is not described in detail in this application. Please refer to the introduction of the relevant section in the current protocol (6.7.2 in TS33.501), which will not be repeated here.
[0143] 2. Base station key (K gNB ): K in UE and AMF can be AMF and the uplink count value to derive the key K gNB In this application, K gNB The generation method is not described in detail. Please refer to the introduction of the relevant chapter in the current protocol (A.9 in TS33.501), which will not be repeated here.
[0144] Specifically, deducing K gNBThe required uplink count value can be determined through the above-mentioned Security mode control procedure negotiation.
[0145] This application mainly involves the derivation of K when the uplink count values negotiated by the UE and the AMF are inconsistent when the UE fails to respond to the Security Mode Complete message in a timely manner in the Security Mode Command Procedure. gNB impact.
[0146] 3. Security mode command procedure when UE is abnormal: Figure 2 As shown in the figure, if the UE encounters underlying abnormalities (such as poor signal, high bit error rate, etc.) during the security mode command procedure, the uplink count values negotiated by the UE and AMF may be inconsistent.
[0147] Figure 2 The security mode command procedure shown includes the following steps:
[0148] S210, AMF sends Security mode command1. After receiving the message, UE processes it normally and replies Security mode complete1 (uplink count is 0). However, due to UE underlying abnormality (such as small uplink authorization, poor signal, high bit error, etc.), Security mode complete1 is not sent to AMF in time.
[0149] S220, AMF protection timer T3560 times out, and Security mode command2 is resent again (the downlink count value is different from that in Security mode command1, and the rest of the content is the same), that is, Security mode command2 is a retransmission message of Security mode command1; after normal processing, UE replies to the network Security mode complete2 (uplink count is 1).
[0150] S230: The UE bottom layer returns to normal, the Security mode complete 1 in step S210 is sent successfully, and the AMF receives it successfully, and the AMF refreshes the uplink count value to 0.
[0151] S240, UE sends Security mode complete 1 successfully, performs the first key derivation based on the uplink count value 0, and obtains K gNB #1.
[0152] S250, AMF sends Security mode command3, which carries information such as security algorithm. After receiving the message, UE processes it normally and replies to AMF Security mode complete3 (uplink count is 2).
[0153] S260, AMF receives Security mode complete2 sent by the UE in step S220 and refreshes the count value to 1.
[0154] S270, UE sends Security mode complete 2 successfully, performs a second key derivation based on the uplink count value 1, and obtains K gNB #2.
[0155] S271, AMF receives Security mode complete2 successfully, and performs key deduction based on the uplink count value 1 to obtain K gNB #2 and provide it to the base station.
[0156] S280, AMF receives Security mode complete3 sent by the UE in step S250 and discards Security mode complete3.
[0157] S290, UE sends Security mode complete3 successfully, performs the third key derivation based on the uplink count value 2, and obtains K gNB #3.
[0158] Figure 2 In the process shown, the UE sends three Security mode complete3s, and the uplink count value maintained by the UE is 2; however, the AMF receives the first two Security mode complete2s and maintains an uplink count value of 1; the uplink count value 2 in the discarded Security mode complete3 is discarded. The uplink count values maintained by the UE and the network are inconsistent, resulting in the UE and AMF deducing K gNB The upstream count values used are different, and the final deduced K gNB Different, resulting in the failure of the RRC side security process. In addition, it should be noted that Figure 2The scenario of AMF retransmission of Security mode command shown is only an example and does not constitute any limitation on the protection scope of this application. AMF retransmission of Security mode command may occur in other situations, such as poor communication quality, abnormal communication link, etc. This application does not limit the reasons for AMF retransmission of Security mode command.
[0159] In addition, in order to facilitate understanding of the embodiments of the present application, the following points are explained.
[0160] First, in this application, "used for indication" may include being used for direct indication and being used for indirect indication. When describing that a certain indication information is used for indicating A, it may include that the indication information directly indicates A or indirectly indicates A, but it does not mean that A must be included in the indication information.
[0161] The information indicated by the indication information is called the information to be indicated. In the specific implementation process, there are many ways to indicate the information to be indicated. The information to be indicated can be sent as a whole, or divided into multiple sub-information and sent separately, and the sending period and / or sending time of these sub-information can be the same or different. The specific sending method is not limited in this application. Among them, the sending period and / or sending time of these sub-information can be pre-defined, for example, pre-defined according to the protocol, or can be configured by the transmitting end device by sending configuration information to the receiving end device.
[0162] Second, "at least one" shown in the present application refers to one or more, and "multiple" refers to two or more. In addition, in the embodiments of the present application, "first", "second" and various digital numbers (for example, "#1", "#2", etc.) are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of each process below does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. It should be understood that the objects described in this way can be interchanged in appropriate circumstances, so that the schemes other than the embodiments of the present application can be described. In addition, in the embodiments of the present application, the words "310", "320" and the like are only for the convenience of description, and are not to limit the order of execution steps.
[0163] Third, in this application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific way.
[0164] Fourth, the "storage" involved in the embodiments of the present application may refer to storage in one or more memories. The one or more memories may be separately set or integrated in an encoder or decoder, a processor, or a communication device. The one or more memories may also be partially separately set and partially integrated in a decoder, a processor, or a communication device. The type of memory may be any form of storage medium, which is not limited by the present application.
[0165] Fifth, the “protocol” involved in the embodiments of the present application may refer to a standard protocol in the communication field, for example, it may include an LTE protocol, an NR protocol, and related protocols used in future communication systems, which is not limited in the present application.
[0166] Sixth, in the embodiments of the present application, "under the circumstances", "when", and "if" can sometimes be used interchangeably. It should be pointed out that when the distinction between them is not emphasized, the meanings they intend to express are the same.
[0167] Seventh, in the embodiments of the present application, various terms and English abbreviations, such as radio resource control (RRC), etc., are illustrative examples given for the convenience of description and should not constitute any limitation to the present application. The present application does not exclude the possibility of defining other terms that can achieve the same or similar functions in existing or future protocols.
[0168] Eighth, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0169] Combination of the above Figure 1 Briefly introduces the scenarios in which the communication method provided in the embodiments of the present application can be applied, and introduces the basic concepts that may be involved in the embodiments of the present application, and combines the basic concepts with the Figure 2 The security mode control procedure flow when the UE is abnormal is introduced. Figure 2 It can be seen from the process that if the uplink count values maintained by the UE side and the network side are inconsistent, it will cause the UE and AMF to deduce KgNB The upstream count values used are different, and K is finally generated. gNB Different, resulting in the failure of the RRC side security process.
[0170] The present application provides a communication method which can be applied in Figure 1 In the communication system shown, the possibility of access layer security verification failure caused by inconsistent keys on the UE side and the network side is reduced.
[0171] It should be understood that the embodiments shown below do not particularly limit the specific structure of the execution subject of the method provided in the embodiments of the present application, as long as it is possible to communicate according to the method provided in the embodiments of the present application by running a program that records the code of the method provided in the embodiments of the present application. For example, the execution subject of the method provided in the embodiments of the present application may be a network element, or a functional module in the network element that can call and execute the program.
[0172] Figure 3 is a schematic flow chart of a communication method provided by the present application. Figure 3 In the communication method shown, the security mode command message sent by the core network device carries the value of the first identifier to identify the security mode command message. Furthermore, the response message (such as a security mode completion message or a security mode failure message) to the security mode command message sent by the terminal device carries the value of the second identifier to identify the response message. Furthermore, the value of the second identifier carried in the response message in response to a security mode command message is the same as the value of the first identifier carried in the security mode command message. For ease of description, Figure 3 In the embodiment shown, the response message of the safe mode command message is a safe mode completion message. When the response message of the safe mode command message is a safe mode failure message, the description of the safe mode completion message can be referred to and will not be repeated.
[0173] Among them, the values of the first identifier carried in different security mode command messages sent by the core network device are different; the values of the second identifier carried in different security mode completion messages sent by the terminal device are different.
[0174] Exemplarily, the first identifier may be understood as field #1 in the security mode command message, and the second identifier may be understood as field #2 in the security mode completion message, wherein field #1 and field #2 may be fields representing the same physical meaning or fields representing different physical meanings. For example, field #1 may be a procedure transaction identity (PTI) field in the security mode command message, and field #2 may also be a PTI field in the security mode completion message. Figure 3 In the illustrated embodiment, there is no limitation on whether field #1 and field #2 have the same meaning.
[0175] Specifically, Figure 3 The communication method shown comprises the following steps:
[0176] S310, the core network device sends a first security mode command message to the terminal device, or the terminal device receives a first security mode command message from the core network device.
[0177] The core network equipment can be Figure 1 The AMF shown in . It should be understood that the name of the core network device is not limited in this embodiment, and the network elements that can be used for access control and mobility management of terminal devices accessing the operator network can be considered as the core network devices involved in this embodiment. For the convenience of description, the following takes the core network device as AMF as an example for explanation.
[0178] Exemplarily, the security mode command message sent by the core network device to the terminal device is specifically a non-access layer security mode command message.
[0179] The security mode command process is used to activate the security mechanism between the terminal device and the core network device. For details, please refer to the relevant description in Section 6.7.2 of the standard TS 33.501 version 18.1.0. The security mode command process includes a pair of messages: a security mode command message and a security mode completion / failure message. The network device triggers the security mode command process by sending a security mode command message to the terminal device.
[0180] Specifically, the first security mode command message includes a first value of a first identifier. The first value of the first identifier is used to identify the first security mode command message. The first security mode command message is an integrity-protected security mode command message.
[0181] Exemplarily, the first value of the first identifier is used to identify the first security mode command message, which can be understood as the first value of the first identifier and the first security mode command message having a one-to-one correspondence.
[0182] There are multiple implementations of the AMF generating the first value of the first identifier, including but not limited to the following two possible implementations:
[0183] As a possible implementation method, if the first security mode command message is the first security mode command message sent by the AMF, the first value of the first identifier can be set to an initial value, such as the first value of the first identifier is 0, 1 or k.
[0184] As another possible implementation method, if the first security mode command message is the Nth security mode command message sent by the AMF, the first value of the first identifier is increased by one based on the value of the first identifier of the N-1th security mode command message. For example, if the value of the first identifier of the N-1th security mode command message is N-1, then the first value of the first identifier is N.
[0185] Exemplarily, the first value of the first identifier carried in the above-mentioned first security mode command message can be understood as: the first security mode command message carries the first identifier, and the value of the first identifier is the first value. Therefore, in this embodiment, the manner in which the first value of the first identifier is carried in the first security mode command message can be understood as the manner in which the first security mode command message carries the first identifier.
[0186] The manner in which the first security mode command message carries the first identifier includes but is not limited to the following possible implementation manners:
[0187] As a possible implementation, the first identifier is field #1 in the first security mode command message, and the mandatory information element (IE) already in the first security mode command message can be used as the first identifier, wherein the content of the first security mode command message can refer to table 8.2.25.1.1 in the current protocol TS24.501. The first value of the first identifier is the value of field #1.
[0188] Exemplarily, the mandatory item spare half octet field defined in the first security mode command message is modified as the first identifier, that is, the field carrying the first identifier is placed at the position of the original mandatory item spare half octet field. For ease of understanding, how to modify the mandatory item IE defined in the first security mode command message so that the mandatory item IE can be used as the first identifier is described in conjunction with Table 1.
[0189] Table 1
[0190]
[0191]
[0192] As another possible implementation, the first identifier is field #1 in the first security mode command message, and the field #1 may be a mandatory IE newly added in the first security mode command message. The first value of the first identifier is the value of field #1.
[0193] For example, a 1-byte mandatory option IE is added in the first security mode command message as the first identifier. For ease of understanding, how to add a mandatory option IE in the first security mode command message is described in conjunction with Table 2 so that the added mandatory option IE can be used as the first identifier.
[0194] Table 2
[0195]
[0196]
[0197] As another possible implementation, the first identifier is field #1 in the first security mode command message, and the field #1 can be carried in the first security mode command message as an optional IE of the first security mode command message. The first value of the first identifier is the value of field #1.
[0198] For example, a 1-byte optional IE is added to the first security mode command message as the first identifier. For ease of understanding, Table 3 is used to illustrate how to add an optional IE to the first security mode command message so that the optional IE can be used as the first identifier.
[0199] Table 3
[0200]
[0201]
[0202] The above combined Tables 1 to 3 illustrate how to carry the first identifier in the first security mode command message. Exemplarily, the first identifier may be a procedure transaction identity (PTI) field in the first security mode command message, that is, 9.X in the above Tables 1 to 3 represents the PTI field. Specifically, when the first identifier is the PTI field, the value of the first identifier includes but is not limited to the following two possible implementations:
[0203] As a possible implementation manner, the PTI field in the first security mode command message occupies 8 bits, each bit can take a value of 0 or 1, so that the PTI field can have 256 different values.
[0204] As another possible implementation, the PTI field in the first security mode command message occupies 4 bits, each bit can take a value of 0 or 1, so that the PTI field can have 8 different values.
[0205] It should be understood that in this embodiment, after the AMF sends the first security mode command message, the AMF can save the first value of the first identifier so as to subsequently determine whether the received security mode completion message is a response to the first security mode command message based on the first value of the first identifier.
[0206] After receiving the first security mode command message, the terminal device verifies the first security mode command message. If the verification is successful, the terminal device generates a first security mode completion message. The first security mode completion message is a response message to the first security mode command message.
[0207] The terminal device verifies the first security mode command message, including: checking whether the terminal device security capability information carried in the first security mode completion message is correct, and verifying whether the integrity protection of the first security mode command message is correct. It should be understood that this embodiment does not limit how the terminal device verifies the received first security mode command message, and the description of the terminal device verifying the security mode command message in the existing protocol can be referred to, which will not be repeated in this application.
[0208] Specifically, the first security mode completion message includes the first value of the second identifier. Since the first security mode completion message is a security mode completion message generated for the first security mode command message, the first value of the second identifier is equal to the first value of the first identifier.
[0209] Exemplarily, the first value of the second identifier carried in the above-mentioned first security mode completion message can be understood as: the first security mode completion message carries the second identifier, and the value of the second identifier is the first value. Therefore, the manner in which the first value of the second identifier is carried in the first security mode completion message in this embodiment can be understood as the manner in which the second identifier is carried in the first security mode command message.
[0210] The manner in which the first security mode completion message carries the second identifier includes but is not limited to the following possible implementation manners:
[0211] As a possible implementation, the second identifier is field #2 in the first security mode completion message, and the mandatory IE of the first security mode completion message can be used as the second identifier, wherein the content of the first security mode completion message can refer to table 8.2.26.1.1 in the current protocol TS24.501. The first value of the second identifier is the value of field #2.
[0212] Exemplarily, the SPARE bit in the first security mode completion message is modified as the second identifier, that is, the field carrying the second identifier is placed in the position of the original mandatory SPARE field. For ease of understanding, Table 4 is used to illustrate how to modify the mandatory IE in the first security mode completion message so that the mandatory IE can be used as the second identifier.
[0213] Table 4
[0214]
[0215] It should be understood that when the first identifier carried in the first security mode command message received by the terminal device is as described in Table 1 above, the terminal device can carry the second identifier as shown in Table 4 in the first security mode completion message in response to the first security mode command message.
[0216] As another possible implementation manner, the second identifier is field #2 in the first security mode completion message, and the field #2 may be a mandatory IE newly added in the first security mode completion message.
[0217] For example, a 1-byte mandatory option IE is added to the first security mode completion message as the second identifier. For ease of understanding, Table 5 is used to illustrate how to add a mandatory option IE to the first security mode completion message so that the added mandatory option IE can be used as the second identifier.
[0218] Table 5
[0219]
[0220] It should be understood that when the first identifier carried in the first security mode command message received by the terminal device is as described in Table 2 above, the terminal device can carry the second identifier as shown in Table 5 in the first security mode completion message in response to the first security mode command message.
[0221] As another possible implementation, the second identifier is field #2 in the first security mode security message, and the field #2 can be used as an optional IE of the first security mode completion message.
[0222] For example, a 1-byte optional IE is added to the first security mode completion message as the second identifier. For ease of understanding, Table 6 is used to illustrate how to add a new optional IE to the first security mode completion message so that the optional IE can be used as the second identifier.
[0223] Table 6
[0224]
[0225] It should be understood that when the first identifier carried in the first security mode command message received by the terminal device is as described in Table 3 above, the terminal device can carry the second identifier as shown in Table 6 in the first security mode completion message in response to the first security mode command message.
[0226] The above combined Tables 4 to 6 illustrate how to carry the second identifier in the first security mode completion message. Exemplarily, the second identifier may be a procedure transaction identity (PTI) field in the first security mode completion message, that is, 9.X in the above Tables 4 to 6 represents the PTI field. Specifically, when the second identifier is the PTI field, the value of the second identifier includes but is not limited to the following two possible implementations:
[0227] As a possible implementation manner, the PTI field in the first security mode completion message occupies 8 bits, each bit can take a value of 0 or 1, so that the PTI field can have 256 different values.
[0228] As another possible implementation, the PTI field in the first security mode completion message occupies 4 bits, each bit can take the value of 0 or 1, so that the PTI field can have 8 different values. In addition, the encrypted message of the first security mode completion message also carries uplink parameters, wherein the uplink parameters can be uplink count value information. For example, the security mode completion message contains a sequence number, which is the lower 8 bits of the NAS counter value. For the sake of ease of description, the uplink count value information carried in the security mode completion message is referred to as uplink count below, such as the uplink count#1 carried in the first security mode completion message. It should be noted that the specific form of the uplink parameters carried in the security mode completion message in this embodiment is not described in detail, and reference may be made to the description of the uplink parameters carried by the security mode completion message in the existing protocol TS24.501.
[0229] S320, the terminal device sends a first security mode completion message to the AMF, or the AMF receives a first security mode completion message from the terminal device.
[0230] S330, the terminal device derives a key according to the parameters included in the first security mode completion message.
[0231] Specifically, the terminal device performs a key (eg, K based on the uplink parameter (eg, uplink count#1) corresponding to the first security mode completion message. gNB ) deduced, we get K gNB#1. It should be understood that there is no time limit for the terminal device to deduce the key and send the first security mode completion message. After the terminal device determines the uplink parameter corresponding to the first security mode completion message, it can deduce the key, or deduce the key after sending the first security mode completion message. This application does not limit this.
[0232] In this embodiment, after the terminal device derives the key, it can perform integrity protection verification and / or decryption on the access layer security mode command message subsequently received from the access network device according to the key. Among them, performing integrity protection verification and / or decryption on the access layer security mode command message subsequently received according to the key includes: the terminal device can further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key according to the key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection verification and / or decryption on the access layer security mode command message subsequently received from the access network device. This embodiment does not limit the specific integrity protection verification and / or decryption method.
[0233] S340, AMF derives the key according to the parameters included in the first security mode completion message.
[0234] Specifically, when the first value of the first identifier and the first value of the second identifier are the same, the AMF derives the key according to the parameters included in the first security mode completion message.
[0235] Exemplarily, after receiving the first security mode completion message, the AMF obtains the first value of the second identifier carried in the first security mode completion message, and obtains the first value of the first identifier stored locally. It is determined that the first value of the second identifier contained in the first security mode completion message is the same as the first value of the first identifier stored locally, thereby determining that the first security mode completion message is a response message to the first security mode command message.
[0236] Furthermore, the AMF performs key (e.g., K gNB ) deduced, wherein the AMF deduces the key for the base station, such as AMF deduces K based on the uplink parameters gNB #1. After AMF derives the key, it can provide the derived key to the access network device. Figure 3 The method flow shown also includes:
[0237] S350, AMF sends the key to the access network device.
[0238] In this embodiment, after the access network device receives the key from the AMF, it can perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device according to the key. Among them, performing integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device according to the key includes: the access network device can further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key according to the key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device. This embodiment does not limit the specific integrity protection and / or encryption method.
[0239] In the following, for the convenience of description, we will use K gNB Other scenarios that require the use of uplink parameters for key deduction are similar to the deduction of K based on uplink parameters. gNB Similarly, it will not be repeated in this application.
[0240] Figure 3 In the illustrated embodiment, AMF can determine whether the received first security mode completion message is a response message of the sent first security mode command message based on the first value of the first identifier of the sent first security mode command message and the first value of the second identifier of the received first security mode completion message, and derive the key and send it to the access network device when the first value of the first identifier and the first value of the second identifier are the same, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0241] In the above-mentioned case where the first value of the saved first identifier and the first value of the received second identifier are the same, the AMF derives the key according to the parameters included in the first security mode completion message. It can also be understood that: when the AMF determines that the first security mode completion message is a response message to the first security mode command message based on the first value of the first identifier and the first value of the second identifier, the AMF derives the key according to the parameters included in the first security mode completion message.
[0242] In addition, when the first value of the saved first identifier and the first value of the received second identifier are different, the AMF determines that the first security mode completion message is not a response message to the first security mode command message, and the first security mode completion message can be discarded. Specifically, when the AMF determines that the first security mode completion message is lost, the AMF can continue to wait for receiving other security mode completion messages after the first security mode completion message, and continue to determine whether to execute the above steps S340 and S350 after receiving other security mode completion messages; or the AMF can consider that the current security mode flow command process has failed and no longer execute the above steps S340 and S350.
[0243] It should be noted that the above embodiments are mainly described by taking the example of the terminal device sending the first security mode completion message, which does not constitute any limitation on the protection scope of the present application. After receiving the first security mode command message and the verification fails, the terminal device can also send a first security mode rejection message, and carry a third identifier in the first security mode rejection message, and indicate whether the first security mode rejection message is a message in response to the first security mode command message through the value of the third identifier. After receiving the first security mode rejection message, the AMF determines that the security mode process fails.
[0244] Specifically, Figure 3 The communication method shown can be applied to the scenario where the AMF retransmits the security mode command message, so that the AMF and the terminal device can deduce the key based on the same parameters, thereby improving the accuracy of the key deduction. Exemplarily, the AMF retransmits the security mode command message including but not limited to the following two implementations:
[0245] Implementation method #1: The first security mode command message is the security mode command message retransmitted by AMF.
[0246] The security mode command message retransmitted by AMF means that before AMF sends the first security mode command message, AMF has sent one or more security mode command messages to the terminal device. In addition, the content contained in the one or more security mode command messages sent is different from the first security mode command message only in the downlink NAS COUNT value.
[0247] This implementation #1 is explained by taking a previously sent security mode command message as an example, that is, in the case shown in this implementation #1, before AMF sends the first security mode command message to the terminal device, AMF has sent the second security mode command message to the terminal device, and the second security mode command message includes the second value of the first identifier, and the second value of the first identifier is used to identify the second security mode command message. Among them, the first value of the first identifier carried by the first security mode command message is different from the second value of the first identifier carried by the second security mode command message, for example, the first value of the first identifier carried by the first security mode command message is greater than the second value of the first identifier carried by the second security mode command message.
[0248] Optionally, before receiving the above-mentioned first security mode completion message, AMF also receives a second security mode completion message from the terminal device, and the second security mode completion message includes a second value of the second identifier. If the second value of the second identifier is the same as the second value of the first identifier included in the second security mode command message, AMF can determine that the second security mode completion message is a response to the second security mode command message. And / or because the second value of the second identifier carried by the second security mode completion message is different from the first value of the first identifier of the first security mode command message (stored by AMF), AMF determines that the second security mode completion message is not a response to the first security mode command message, so AMF discards the second security mode completion message and does not perform key deduction based on the parameters in the second security mode completion message.
[0249] To facilitate understanding, the following is a specific example to illustrate how the AMF and the terminal device use the same parameters to derive the key in the case shown in implementation method #1.
[0250] Example 1:
[0251] like Figure 4 As shown, the following steps are included:
[0252] S410, AMF sends a security mode command message #1 to the terminal device.
[0253] The security mode command message #1 is equivalent to the second security mode command message involved in the situation shown in the above-mentioned implementation method #1.
[0254] Optionally, when AMF sends security mode command message #1, it can also start a timer (e.g., T3560).
[0255] Optionally, the security mode command message #1 carries the security capability information of the terminal device, the selected encryption algorithm, and the selected integrity protection algorithm. The security capability information of the terminal device is used by the terminal device to determine that the security capability information of the terminal device has not been tampered with during transmission. The selected encryption algorithm and the selected integrity protection algorithm are used for security protection of specific non-access layer messages.
[0256] In this example, the security mode command message #1 carries the second value of the first identifier, such as PTI#2, and the security mode command message #1 also carries a downlink parameter, such as downlink count#0. Optionally, the security mode command message #1 may be encrypted.
[0257] It should be understood that in this embodiment, after AMF sends security mode command message #1, AMF can save the second value of the first identifier (e.g., PTI#2) carried in security mode command message #1, so as to facilitate the subsequent judgment based on the second value of the first identifier whether the received security mode completion message is a response to the security mode command message #1.
[0258] S420, the terminal device verifies the security mode command message #1, and if the verification is successful, generates a security mode completion message #1 in reply to the security mode command message #1.
[0259] The security mode completion message #1 is equivalent to the second security mode completion message involved in the situation shown in the above-mentioned implementation method #1.
[0260] Specifically, the security mode completion message #1 includes a second value of the second identifier (eg, PTI#2), and the second value of the second identifier is equal to the second value of the first identifier.
[0261] In addition, the encrypted message of the security mode completion message #1 also carries uplink parameters, such as uplink count #0.
[0262] In this embodiment, after receiving the security mode command message #1, the terminal device processes it normally and replies with the security mode completion message #1, but the security mode completion message #1 may not reach the AMF in time due to some abnormal conditions. Abnormal conditions include abnormalities in the underlying layer of the terminal device (such as small uplink authorization, poor signal, high bit error, etc.), unstable air interface quality between the terminal device and the base station, and confusion in the processing of the base station itself.
[0263] If the AMF does not receive the security mode completion message #1 of the terminal device in time for the security mode command message #1, for example, if the AMF protection timer (such as T3560) times out and the security mode completion message #1 is not received, the AMF will resend the security mode command message to the terminal device. Figure 4 The method shown also includes:
[0264] S430, AMF sends a security mode command message #2 to the terminal device.
[0265] The security mode command message #2 is equivalent to the first security mode command message involved in the situation shown in the above implementation mode #1. The security mode command message #2 is a retransmission message of the security mode command message #1.
[0266] Optionally, the security mode command message #2 carries an activation key, an encryption algorithm, and an integrity protection algorithm.
[0267] In this example, the security mode command message #2 carries the first value of the first identifier, such as PTI#1, and the encrypted security mode command message #2 also carries a downlink parameter, such as downlink count#1.
[0268] It should be understood that in this embodiment, after the AMF sends the security mode command message #2, the AMF will locally save the first value of the first identifier (e.g., PTI#1) carried in the security mode command message #2, so as to facilitate the subsequent judgment based on the first value of the first identifier whether the received security mode completion message is a response to the security mode command message #2.
[0269] As an optional implementation, when AMF locally saves the first value of the first identifier of security mode command message #2, AMF discards the locally saved second value of the first identifier carried by security mode command message #1. Alternatively, AMF updates the locally saved second value of the first identifier carried by security mode command message #1 to the first value of the first identifier of security mode command message #2. That is to say, AMF locally saves the value of the first identifier carried in the last sent security mode command message. For example, after a timer (such as T3560) times out, AMF deletes the locally saved second value of the first identifier; for another example, after AMF locally saves the first value of the first identifier, the locally saved second value of the first identifier is set to invalid or directly deleted.
[0270] S440, the terminal device verifies the security mode command message #2, and if the verification is successful, generates a security mode completion message #2 in reply to the security mode command message #2.
[0271] The security mode completion message #2 is equivalent to the first security mode completion message involved in the situation shown in the above-mentioned implementation method #1.
[0272] Specifically, the security mode completion message #2 includes the first value of the second identifier, and the first value of the second identifier is used to identify the security mode completion message #2. The first value of the second identifier (such as PTI#1) is the same as the first value of the first identifier (such as PTI#1) carried by the replied security mode command message #2.
[0273] In addition, the encrypted message of the security mode completion message #2 also carries uplink parameters, such as uplink count #1.
[0274] Exemplarily, if the bottom layer of the terminal device returns to normal, the safe mode completion message #1 generated for the safe mode command message #1 in the above step S420 may be sent to the AMF before the safe mode completion message #2. Figure 4 The method shown also includes:
[0275] S450, the terminal device sends a security mode completion message #1 to the AMF, or the AMF receives a security mode completion message #1 from the terminal device.
[0276] S451, the terminal device derives the key according to the parameters included in the security mode completion message #1.
[0277] The terminal device performs the first key deduction based on the uplink count#0 and obtains K gNB #0. It should be understood that there is no time limit for the terminal device to deduce the key and send the security mode completion message #1. After the terminal device determines the uplink parameters corresponding to the security mode completion message #1, it can deduce the key, or deduce the key after sending the security mode completion message #1. This application does not limit this.
[0278] From the description of the security mode completion message #1 generated and replied by the terminal device in response to the security mode command message #1 in the above step S420, it can be seen that the security mode completion message #1 carries the second value of the second identifier (such as PTI#2).
[0279] S460, AMF determines to discard the security mode completion message #1 based on the first value of the first identifier stored locally and the second value of the second identifier of the received security mode completion message #1.
[0280] In this embodiment, after the AMF sends the security mode command message #2, the value of the locally stored first identifier is refreshed to the first value of the first identifier carried by the security mode command message #2. When the AMF receives the security mode completion message #1 carrying the second value of the second identifier (such as PTI#2), it is determined that the second value of the second identifier is different from the first value of the locally stored first identifier. It can be determined that the security mode completion message #1 is not a reply to the security mode command message #2 that the AMF last sent to the UE, and thus the security mode completion message #1 can be discarded, that is, the AMF does not perform key derivation based on the uplink parameters in the security mode completion message #1.
[0281] S470, the terminal device sends a security mode completion message #2 to the AMF, or the AMF receives a security mode completion message #2 from the terminal device.
[0282] S471, the terminal device derives the key according to the parameters included in the security mode completion message #2. The terminal device performs a second key derivation based on the uplink count #1 and obtains K gNB #1. It should be understood that there is no time limit for the terminal device to deduce the key and send the security mode completion message #1. After the terminal device determines the uplink parameters corresponding to the security mode completion message #2, it can deduce the key, or deduce the key after sending the security mode completion message #1. This application does not limit this.
[0283] From the description of the security mode completion message #2 generated and replied by the terminal device in response to the security mode command message #2 in the above step S440, it can be seen that the security mode completion message #2 carries the first value of the second identifier (such as PTI#1).
[0284] S480, AMF derives the key based on the parameters included in the security mode completion message #2.
[0285] Specifically, when the first value of the first identifier and the first value of the second identifier are the same, AMF derives the key according to the parameters included in the security mode completion message #2.
[0286] Exemplarily, after receiving the security mode completion message #2, the AMF obtains the first value of the second identifier carried in the security mode completion message #2, and obtains the first value of the first identifier stored locally. It is determined that the first value of the second identifier contained in the security mode completion message #2 is the same as the first value of the first identifier stored locally, thereby determining that the security mode completion message #2 is a response message to the security mode command message #2.
[0287] In this embodiment, after the AMF sends the security mode command message #2, the value of the locally stored first identifier is refreshed to the first value of the first identifier of the security mode command message #2. When the AMF receives the security mode completion message #2 carrying the first value of the second identifier (such as PTI#1), it is determined that the first value of the second identifier is the same as the first value of the locally stored first identifier. Therefore, it can be determined that the security mode completion message #2 is a reply to the security mode command message #2, and the key can be deduced based on the parameters included in the security mode completion message #2.
[0288] S490, AMF sends the key to the access network device.
[0289] The AMF generates a key (e.g., K gNB ) deduced, we get K gNB #1. And K gNB #1 is provided to the base station. For detailed description, please refer to Figure 3 The description of step S350 in the illustrated embodiment will not be repeated here.
[0290] Figure 4 In the communication method shown, by carrying identification information in the security mode command message and the security mode completion message, the network side determines whether the security mode completion message is a reply to the last sent security mode command message according to the value of the second identification carried in the security mode completion message, thereby avoiding the network side discarding error, thereby making the uplink count values maintained by the terminal device and the network side unified (for example, both are uplink count#1), so that the terminal device and the network generate the same K gNB (For example, both are K gNB #1).
[0291] It should be understood that the above-mentioned AMF sending the security mode command message #1 and the security mode command message #2 is only an example, and does not constitute any limitation on the protection scope of this application. AMF can also send more than two security mode command messages. For example, AMF can retransmit the security mode command message #1 multiple times; for example, before sending the security mode command message #1, AMF also sent other security mode command messages to the terminal device (for example, AMF first sends a security mode command message to activate the security key, encryption algorithm and integrity protection algorithm, and then configures the EPS encryption algorithm and integrity protection algorithm through the security mode command message #1).
[0292] Implementation #2: AMF retransmits a security mode command message before sending the first security mode command message. For example, the first security mode command message is used to configure the EPS encryption and integrity protection algorithm.
[0293] In the case shown in implementation method #2, before AMF sends the first security mode command message to the terminal device, AMF sends a third security mode command message to the terminal device, the third security mode command message includes the third value of the first identifier, the third value of the first identifier (e.g., PTI#3) is used to identify the third security mode command message, and the third security mode command message is used to activate the security mode command process; AMF sends a fourth security mode command message to the terminal device, the fourth security mode command message includes the fourth value of the first identifier, the fourth value of the first identifier (e.g., PTI#4), the fourth security mode command message is a retransmission message of the third security mode command message, and the third value of the first identifier of the fourth security mode command message is different from the fourth value of the first identifier of the third security mode command message.
[0294] Further, in the case shown in implementation method #2, the AMF receives a fourth security mode completion message from the terminal device, the fourth security mode completion message includes the fourth value of the second identifier, and the AMF sends a first security mode command message to the terminal device, including: the fourth value of the second identifier is the same as the fourth value of the first identifier, and the fourth security mode completion message is used to indicate that the terminal device supports Long Term Evolution LTE communication, and the AMF sends the first security mode command message to the terminal device.
[0295] In addition, before the AMF receives a fourth security mode completion message from the terminal device, the method also includes: the AMF receives a third security mode completion message from the terminal device, the third security mode completion message includes a third value of a second identifier, and the third value of the second identifier is used to identify the third security mode completion message; when the third value of the second identifier is different from the fourth value of the first identifier, the AMF discards the third security mode completion message.
[0296] To facilitate understanding, the following is a specific example to illustrate how the AMF and the terminal device use the same parameters to derive the key in the case shown in implementation method #2.
[0297] Example 2:
[0298] like Figure 5 As shown, the following steps are included:
[0299] S510, the terminal device sends an initial NAS message to the AMF.
[0300] The initial NAS message is the initial message sent by the terminal device to the AMF. The initial NAS message contains the capabilities currently supported by the terminal device, such as whether the terminal device supports S1 (i.e., LTE communication capabilities). The IE indicating whether the terminal device supports S1 cannot be carried in plain text.
[0301] S520, AMF sends an authentication request message to the terminal device. The authentication request message is used to request the generation of security key parameters.
[0302] S530, the terminal device sends an authentication response message to the AMF. The authentication response message indicates that the security key parameter generation is complete.
[0303] S540, AMF sends a security mode command message #3 to the terminal device.
[0304] The security mode command message #3 is equivalent to the third security mode command message involved in the situation shown in the above-mentioned implementation method #2.
[0305] Optionally, the security mode command message #3 carries the security capability information of the terminal device, the selected encryption algorithm, and the selected integrity protection algorithm. The security capability information of the terminal device is used by the terminal device to determine that the security capability information of the terminal device has not been tampered with during transmission. The selected encryption algorithm and the selected integrity protection algorithm are used for security protection of specific non-access layer messages.
[0306] In this example, the security mode command message #3 carries the third value of the first identifier (e.g., PTI#3), and the security mode command message #3 also carries a downlink parameter, such as downlink count#2. Optionally, the security mode command message #3 may be encrypted. It should be understood that in this embodiment, after the AMF sends the security mode command message #3, the AMF may save the third value of the first identifier (e.g., PTI#3) carried in the security mode command message #3, so as to subsequently determine whether the received security mode completion message is a response to the security mode command message #3 based on the third value of the first identifier.
[0307] S550, the terminal device verifies the security mode command message #3, and if the verification is successful, generates a security mode completion message #3 in reply to the security mode command message #3.
[0308] Optionally, when AMF sends security mode command message #3, it can also start a timer (e.g., T3560).
[0309] The security mode completion message #3 is equivalent to the third security mode completion message involved in the situation shown in the above-mentioned implementation method #2.
[0310] Specifically, the security mode completion message #3 includes a third value of the second identifier (eg, PTI#3), and the third value of the second identifier is equal to the third value of the first identifier.
[0311] In addition, the encrypted message of the security mode completion message #3 also carries uplink parameters, such as uplink count #2.
[0312] In this embodiment, after receiving the security mode command message #3, the terminal device processes and replies to the security mode command message #3 normally, but the security mode completion message #3 may not reach the AMF in time due to some abnormal conditions. Abnormal conditions include abnormalities in the underlying layer of the terminal device (such as small uplink authorization, poor signal, high bit error, etc.), unstable air interface quality between the terminal device and the base station, and confusion in the processing of the base station itself.
[0313] If the AMF does not receive the terminal device's security mode completion message #3 in time for the security mode command message #3. For example, if the AMF protection timer (e.g., T3560) times out and the security mode completion message #3 is still not received, the AMF will resend the security mode command message to the terminal device. Figure 5 The method shown also includes:
[0314] S560, AMF sends a security mode command message #4 to the terminal device.
[0315] The security mode command message #4 is equivalent to the fourth security mode command message involved in the situation shown in the above implementation mode #2. The security mode command message #4 is a retransmission message of the security mode command message #3.
[0316] In this example, the security mode command message #4 carries the fourth value of the first identifier (eg, PTI#4), and the encrypted security mode command message #4 also carries a downlink parameter, such as downlink count#2.
[0317] It should be understood that in this embodiment, after the AMF sends the security mode command message #4, the AMF locally saves the fourth value of the first identifier carried in the security mode command message #4 (e.g., PTI#4), so as to facilitate the subsequent judgment based on the fourth value of the first identifier whether the received security mode completion message is a response to the security mode command message #4.
[0318] As an optional implementation, when AMF locally stores the fourth value of the first identifier, AMF discards the third value of the first identifier stored locally. Alternatively, AMF updates the third value of the first identifier stored locally to the fourth value of the first identifier. That is to say, AMF locally stores the value of the first identifier carried in the last sent security mode command message. For example, after a timer (such as T3560) times out, AMF deletes the third value of the first identifier stored locally; for another example, after AMF locally stores the fourth value of the first identifier, the third value of the first identifier stored locally is set to invalid or directly deleted.
[0319] S570, the terminal device verifies the security mode command message #4, and if the verification is successful, generates a security mode completion message #4 in reply to the security mode command message #4.
[0320] The security mode completion message #4 is equivalent to the fourth security mode completion message involved in the situation shown in the above-mentioned implementation method #2.
[0321] Specifically, the security mode completion message #4 includes the fourth value of the second identifier, and the fourth value of the second identifier is used to identify the security mode completion message #4. The fourth value of the second identifier (such as PTI#4) is the same as the fourth value of the first identifier (such as PTI#4) carried by the replied security mode command message #4.
[0322] In addition, the encrypted message of the security mode completion message #4 also carries uplink parameters, such as uplink count #3.
[0323] Exemplarily, if the bottom layer of the terminal device returns to normal, the safe mode completion message #3 generated for the safe mode command message #3 in the above step S550 may be sent to the AMF before the safe mode completion message #4. Figure 5 The method shown also includes:
[0324] S580, the terminal device sends a security mode completion message #3 to the AMF, or the AMF receives a security mode completion message #3 from the terminal device.
[0325] S581, the terminal device derives the key according to the parameters included in the security mode completion message #3.
[0326] The terminal device performs the first key deduction based on the uplink count#2 and obtains K gNB #2. It should be understood that there is no time limit for the terminal device to deduce the key and send the security mode completion message #3. After the terminal device determines the uplink parameters corresponding to the security mode completion message #3, it can deduce the key, or deduce the key after sending the security mode completion message #3. This application does not limit this.
[0327] From the description of the security mode completion message #3 generated and replied by the terminal device in response to the security mode command message #3 in the above step S550, it can be seen that the security mode completion message #3 carries the third value of the second identifier (such as PTI#3).
[0328] S590, AMF determines to discard the security mode completion message #3 based on the fourth value of the locally stored first identifier and the third value of the received second identifier.
[0329] In this embodiment, after the AMF sends the security mode command message #4, the value of the locally stored first identifier is refreshed to the fourth value of the first identifier carried in the security mode command message #4 (e.g., PTI#4). When the AMF receives the security mode completion message #3 carrying the third value of the second identifier (e.g., PTI#3), it is determined that the third value of the second identifier is different from the fourth value of the locally stored first identifier. It can be determined that the security mode completion message #3 is not a reply to the security mode command message #4 that the AMF last sent to the UE, and thus the security mode completion message #3 can be discarded, that is, the AMF does not perform key deduction based on the uplink parameters in the security mode completion message #3.
[0330] S591, the terminal device sends a security mode completion message #4 to the AMF, or the AMF receives a security mode completion message #4 from the terminal device.
[0331] S592, the terminal device derives the key according to the parameters included in the security mode completion message #4.
[0332] The terminal device performs a second key deduction based on the uplink count#3 and obtains K gNB #3. It should be understood that there is no time limit for the terminal device to deduce the key and send the security mode completion message #4. After the terminal device determines the uplink parameters corresponding to the security mode completion message #4, it can deduce the key, or deduce the key after sending the security mode completion message #4. This application does not limit this.
[0333] From the description of the security mode completion message #4 generated and replied by the terminal device in the above step S570 in response to the security mode command message #4, it can be seen that the security mode completion message #4 carries the fourth value of the second identifier (such as PTI#4).
[0334] S593, AMF determines to send security mode command message #2.
[0335] In this embodiment, after the AMF sends the security mode command message #4, the value of the locally stored first identifier is refreshed to the fourth value of the first identifier carried in the security mode command message #4 (e.g., PTI#4). When the AMF receives the security mode completion message #4 carrying the fourth value of the second identifier (e.g., PTI#4), it is determined that the fourth value of the second identifier is the same as the fourth value of the locally stored first identifier, and it can be determined that the security mode completion message #4 is a reply to the security mode command message #4.
[0336] Furthermore, after AMF receives the security mode completion message #4, AMF parses the complete initial NAS message carried in the security mode completion message #4, and finds that the terminal device supports S1 capability and the current N26 interface exists, then sends an SMC message to configure the EPS encryption algorithm. Figure 5 The method flow shown also includes:
[0337] S594, AMF sends a security mode command message #2 to the terminal device.
[0338] The security mode command message #2 is equivalent to the first security mode command message involved in the situation shown in the above implementation method #2. Figure 3 The description of step S310 is not repeated here.
[0339] Specifically, the terminal device verifies the security mode command message #2, and if the verification is successful, generates a security mode completion message #2 in reply to the security mode command message #2.
[0340] The security mode completion message #2 is equivalent to the first security mode completion message involved in the situation shown in the above-mentioned implementation method #2.
[0341] In addition, it should be noted that, in this embodiment, if the terminal device receives a security mode command message #2 carrying a first value of a first identifier (e.g., PTI#1), and determines that the first value of the first identifier is greater than the third value of the first identifier carried in the above-mentioned security mode command message #3 (e.g., PTI#1 is 3, and PTI#3 is 1), the terminal device immediately sends a security mode completion message #2 to the AMF, so that the terminal device may not receive the above-mentioned security mode command message #4 (e.g., due to channel quality issues, security mode command message #4 is delayed and arrives later than security mode command message #2), or, based on the fourth value of the first identifier carried in security mode command message #4 (e.g., PTI#2, PTI#2 is 2), the security mode command message #4 may be discarded and not processed, thereby saving the verification overhead of the terminal device.
[0342] S595, the terminal device sends a security mode completion message #2 to the AMF, or the AMF receives a security mode completion message #2 from the terminal device.
[0343] refer to Figure 3 The description of step S320 is not repeated here.
[0344] S596, the terminal device derives the key according to the parameters included in the security mode completion message #2.
[0345] refer to Figure 3 The description of step S330 is not repeated here.
[0346] S597, AMF derives the key based on the parameters included in the security mode completion message #2.
[0347] refer to Figure 3 The description of step S340 is not repeated here.
[0348] S598, AMF sends the key to the access network device.
[0349] refer to Figure 3 The description of step S350 is not repeated here.
[0350] S599, AMF sends a registration success message to the terminal device.
[0351] Figures 3 to 5 In the communication method shown, different security mode command messages can be identified by carrying identification information in the security mode command message sent by the network side, and the security mode completion message replied by the terminal device carries an identifier in the security mode command message to identify that the security mode completion message is a reply to a certain security mode command message, so that the network side can judge whether the received security mode completion message is a response to the most recently sent security mode command message based on the value of the second identifier carried in the received security mode completion message and the value of the first identifier carried in the most recently sent security mode command message, so that the parameters of the key deduced by the core network device can be the same as the parameters of the terminal deduced key, and the core network device can provide the deduced key to the access network device, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0352] This application also provides another communication method by redefining the terminal device to deduce the key K gNB The logic (e.g., the terminal device derives the key K based on the latest uplink count value) gNB If the AS layer security process fails, the terminal device can use the key K obtained in the previous derivation. gNB Try to re-execute the AS layer security process) to make the AS layer security process execute successfully. Figure 6 This communication method is described in detail.
[0353] Figure 6 It is a schematic flow chart of another communication method provided by the present application. It includes the following steps:
[0354] S601, the access network device receives the key from the AMF.
[0355] In this embodiment, after the access network device receives the key from the AMF, it can perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device according to the key. Among them, performing integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device according to the key includes: the access network device can further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key according to the key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device.
[0356] For example, the access network device receives the second key from the AMF.
[0357] S610, the access network device sends a fifth security mode command message to the terminal device.
[0358] Optionally, the fifth security mode command message is integrity protected and / or encrypted based on the second key. Among them, the fifth security mode command message is integrity protected and / or encrypted based on the second key, including: the access network device further generates an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key according to the second key, and uses the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection and / or encryption protection on the fifth security mode command message. It should be understood that in this embodiment, there is no limitation on the timing of the access network device further generating the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key according to the first key, which can be after sending the fifth security mode command message, or it can be generated immediately after receiving the first key.
[0359] Exemplarily, the security mode command message sent by the access network device to the terminal device is specifically an access layer security mode command message.
[0360] S620: The terminal device performs integrity protection verification and / or decryption on the fifth security mode command message based on the first key.
[0361] Specifically, the terminal device performs integrity protection verification and / or decryption on the fifth security mode command message based on the first key, including:
[0362] The terminal device can further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key based on the first key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection verification and / or decryption on the fifth security mode command message received from the access network device. It should be understood that in this embodiment, there is no limitation on the timing for the terminal device to further generate the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key based on the first key, which can be generated after receiving the fifth security mode command message, or after the first key is derived.
[0363] Specifically, in this embodiment, if the terminal device fails to perform integrity protection check and / or decryption on the fifth security mode command message based on the first key, the terminal device can re-perform integrity protection check and / or decryption on the fifth security mode command message based on at least one key other than the first key, then Figure 3 The method flow shown also includes:
[0364] S630: The terminal device performs integrity protection verification and / or decryption on the fifth security mode command message based on the second key.
[0365] Specifically, the terminal device performs integrity protection verification and / or decryption on the fifth security mode command message based on the second key, including:
[0366] The terminal device can further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key based on the second key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection check and / or decrypt the fifth security mode command message received from the access network device. It should be understood that in this embodiment, there is no limitation on the timing for the terminal device to further generate the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key based on the second key, which can be after the integrity protection check and / or decryption of the fifth security mode command message based on the first key fails, or it can be generated immediately after the second key is derived.
[0367] The first key based on which the integrity protection check and / or decryption of the fifth security mode command message on the above-mentioned terminal device side is performed is derived by the terminal device based on the first parameter in the seventh security mode completion message, and the second key is derived by the terminal device based on the second parameter in the sixth security mode completion message.
[0368] For ease of understanding, the following describes the sending of the sixth security mode completion message and the seventh security mode completion message. Before the access network device sends the fifth security mode command message to the terminal device, Figure 6 The method flow shown also includes:
[0369] S611, AMF sends the sixth security mode command message to the terminal device.
[0370] The sixth security mode command message carries a first parameter, and the first parameter is used to deduce the above-mentioned first key.
[0371] S612: The terminal device sends a sixth security mode completion message to AMF.
[0372] After receiving the sixth security mode command message, the terminal device verifies the sixth security mode command message, and generates a sixth security mode completion message in reply to the sixth security mode command message if the verification is successful.
[0373] S613, the terminal device derives a key according to the parameters included in the sixth security mode completion message.
[0374] Specifically, the terminal device performs a key (eg, K) based on the uplink parameter (eg, uplink count) corresponding to the sixth security mode completion message. gNB ) to deduce the second key. It should be understood that there is no time limit for the terminal device to deduce the second key and send the sixth security mode completion message. After the terminal device determines the uplink parameter corresponding to the sixth security mode completion message, the key deduction can be performed, or the key deduction can be performed after sending the sixth security mode completion message. This application does not limit this.
[0375] S614, AMF derives the key according to the parameters included in the sixth security mode completion message.
[0376] Specifically, AMF performs key (e.g., K) based on the uplink parameter (e.g., uplink count) corresponding to the sixth security mode completion message. gNB ) to obtain a second key. And the derived second key is provided to the access network device.
[0377] S615, AMF sends the seventh security mode command message to the terminal device.
[0378] Optionally, the seventh security mode command message is a retransmission message of the sixth security mode completion message.
[0379] S616: The terminal device sends a seventh security mode completion message to AMF.
[0380] After receiving the seventh security mode command message, the terminal device verifies the seventh security mode command message, and generates a seventh security mode completion message in reply to the sixth security mode command message if the verification is successful.
[0381] S617, the terminal device derives a key according to the parameters included in the seventh security mode completion message.
[0382] Specifically, the terminal device performs a key (eg, K) based on the uplink parameter (eg, uplink count) corresponding to the seventh security mode completion message. gNB ) to deduce the first key. It should be understood that there is no time limit for the terminal device to deduce the first key and send the seventh security mode completion message. After the terminal device determines the uplink parameter corresponding to the seventh security mode completion message, the key deduction can be performed, or the key deduction can be performed after sending the seventh security mode completion message. This application does not limit this.
[0383] It should be noted that in this embodiment, the terminal device successively performs integrity protection verification on the security mode command message received from the access network device based on the first key and the second key is only an example, and does not constitute any limitation on the protection scope of this application. The terminal device may also perform integrity protection verification on the security mode command message received from the access network device based on keys other than the first key and the second key.
[0384] For example, if the terminal device fails to perform integrity protection verification on the fifth security mode command message based on the second key, the terminal device may also perform integrity protection verification on the fifth security mode command message based on the third key, wherein the third key is deduced based on the third parameter in the fifth security mode completion message, and the fifth security mode completion message is a security mode completion message sent by the terminal device to the AMF in the non-access layer security mode control process, and the fifth security mode completion message is sent earlier than the sixth security mode completion message.
[0385] It can be seen from the above-mentioned process that the terminal device performs integrity protection verification on the security mode command message received from the access network device that the terminal device can perform integrity protection verification on the security mode command message received from the access network device based on different keys. In this embodiment, the terminal device obtains different keys in a manner including but not limited to the following two implementations:
[0386] As a possible implementation, after the terminal device sends a security mode completion message to the AMF, the terminal device locally derives and saves a key based on the parameters in the security mode completion message. The key is used to generate the key required for access layer security verification.
[0387] For example, after the terminal device sends a seventh security mode completion message to the AMF in response to the seventh security mode command message, the terminal device derives a first key based on the first parameter and saves the first key; for another example, after the terminal device sends a sixth security mode completion message to the AMF in response to the sixth security mode command message, the terminal device derives a second key based on the second parameter and saves the second key.
[0388] In addition, it should be noted that Figure 6 The illustrated embodiment mainly takes the scenario in which the AMF sends multiple security mode command messages (e.g., the scenario in which the AMF retransmits the security mode command message) as an example to illustrate that the terminal device performs integrity protection verification on the security mode command message received from the access network device based on different key verifications. This does not constitute any limitation on the protection scope of the present application. The integrity protection verification of the security mode command message received from the access network device by the terminal device based on different keys can also be applied to other scenarios, including but not limited to: the terminal device locally stores multiple keys, or the terminal device locally stores multiple parameters for deducing the key, and there is no limitation on the method for obtaining the key and the parameters required to derive the key.
[0389] In this implementation, the subsequent terminal device Figure 6 When the method shown performs integrity protection verification on the security mode command message received from the access network device, the integrity protection verification process can be directly performed based on the saved key, which takes a short time, but the memory space required to store the key is large. Moreover, if the previous key is continuously used for integrity protection verification, a large number of keys need to be saved, which takes up a large amount of memory, and there may be certain security risks. Therefore, in order to save memory overhead and ensure security, in this implementation method, the terminal device can save the key obtained by the last deduction. If the integrity protection verification fails, the previously saved key is used to perform another integrity protection verification. If it fails again, the access network device integrity protection verification failure is replied; if successful, the access network device integrity protection verification success is replied.
[0390] As another possible implementation, after the terminal device sends the security mode completion message to the AMF, the terminal device locally saves the parameters in the security mode completion message.
[0391] For example, after the terminal device sends a seventh security mode completion message to the AMF in response to the seventh security mode command message, the terminal device saves the first parameter; for another example, after the terminal device sends a sixth security mode completion message to the AMF in response to the sixth security mode command message, the terminal device saves the second parameter.
[0392] In this implementation, the subsequent terminal device Figure 6When the method shown performs integrity protection verification on the security mode command message received from the access network device, it is necessary to perform key deduction according to different parameters, and perform integrity protection verification processing based on the deduced key. Saving parameters takes up little memory, but key deduction is required, and the processing time is long. Moreover, if the previous parameters are continuously used for key deduction, and integrity protection verification processing is performed based on the deduced key, a large number of parameters need to be saved, which takes up a large amount of memory, and the long processing time may pose certain security risks. Therefore, in order to save memory overhead and ensure security, in this implementation mode, the terminal device can save the last parameter. If the integrity protection verification fails, the previously saved parameters are used to deduce the key again for integrity protection verification. If it fails again, the access network device integrity protection verification failure is replied; if successful, the access network device integrity protection verification success is replied.
[0393] Exemplarily, in this embodiment, in order to avoid repeated attempts to perform integrity protection checks on the security mode command message received from the access network device, which may cause large memory overhead and security risks, the terminal device can determine whether the number of repeated attempts has reached a threshold before re-performing integrity protection checks on the security mode command message.
[0394] For example, before the terminal device performs integrity protection check on the fifth security mode command message based on the second key, the terminal device determines that the number of times integrity protection check is performed on the fifth security mode command message is less than a first threshold.
[0395] Optionally, the value of the first threshold is N (e.g., N=5), which can be understood as when the RRC on the terminal device side receives the security mode command message from the access network device, it performs an integrity protection check. If the check fails, the previously derived key (or the key derived based on the previous parameters) is used to perform the integrity protection check again. The attempt may be made N times or all locally stored keys (or parameters) have been tried and all failed, then a reply is given that the access network device verification failed; if one attempt succeeds, then a reply may be given that the access network device verification succeeded, and the RRC on the terminal device side starts the set of keys that successfully completed the verification.
[0396] Figure 6 In the communication method shown, after the terminal device fails the integrity protection check of the security mode command message sent by the access network device, it can also use the previously derived and saved key (or the previous uplink count value to re-derive the key) for verification, supporting the terminal device to perform multiple integrity protection checks, thereby increasing the probability of success of the terminal device integrity protection check.
[0397] The present application also provides a communication method, in which the network side delays the derivation of a key so that the terminal device and the network side can generate the same key. Figure 7 This communication method is described in detail.
[0398] Figure 7 This is a schematic flow chart of another communication method provided by the present application. It includes the following steps:
[0399] S710, the terminal device sends an eighth security mode completion message to AMF.
[0400] Specifically, the eighth security mode completion message includes a fourth parameter (eg, a fourth uplink count).
[0401] S720, AMF delays deducing the key and / or delays sending the key to the access network device.
[0402] AMF receives the eighth security mode completion message. Further, if before AMF receives the eighth security mode completion message, the security mode command message is retransmitted due to the timeout of the first timer (such as T3560 timer), then after AMF receives the eighth security mode completion message, it can delay the derivation of the key and / or delay the sending of the key to the access network device, so as to wait whether other security mode completion messages can be received.
[0403] Before AMF receives the eighth security mode completion message, the retransmission of the security mode command message can specifically be: before AMF receives the eighth security mode completion message from the terminal device, AMF sends an eighth security mode command message to the terminal device and starts a first timer; after the first timer expires, AMF sends a ninth security mode command message to the terminal device, wherein the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0404] In the case where the security mode command message has been retransmitted, after the AMF receives the security mode completion message from the terminal device, it can delay the derivation of the key and / or delay the sending of the key to the access network device, including but not limited to the following two implementations:
[0405] As a possible implementation method, when no other security mode completion message is received from the terminal device when the second timer times out, the AMF derives the fourth key and sends the fourth key to the access network device, where the fourth key is derived based on the fourth parameter.
[0406] As another possible implementation, when no other security mode completion message is received from the terminal device when the second timer times out, the AMF sends the fourth key to the access network device, where the fourth key is derived from the fourth parameter. In this implementation, the timing for the AMF to derive the fourth key is not limited, and it may be when the second timer times out or after receiving the fourth parameter.
[0407] As another possible implementation method, before the second timer expires, a ninth security mode completion message is received from the terminal device, and the AMF derives the fifth key based on the fifth parameter (e.g., the fifth uplink count) in the ninth security mode completion message, and sends the fifth key to the access network device.
[0408] For ease of understanding, the following describes how AMF delays key derivation in combination with specific implementation methods:
[0409] Implementation method #3: The security mode command message sent by AMF to the terminal device includes an eighth security mode command message and a ninth security mode command message, and the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0410] Combine the following Figure 8 This article describes in detail how AMF derives the key in the case of implementation #3. Figure 8 As shown, the following steps are included:
[0411] S811, AMF sends the eighth security mode command message to the terminal device and starts the first timer.
[0412] S812, the first timer of AMF (such as T3560) times out, sends the ninth security mode command message to the terminal device, and restarts the first timer.
[0413] In this embodiment, when the first timer (e.g., T3560) times out and no response message to the eighth security mode command message is received, the AMF can retransmit the security mode command message to the terminal device, that is, the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0414] S813, the terminal device sends an eighth security mode completion message to the AMF. The eighth security mode completion message is a message sent by the terminal device in response to the eighth security mode command message. As a possible implementation method, the AMF can start the second timer at the moment of receiving the eighth security mode completion message, and the AMF deduces the key and / or sends the key according to the timeout of the second timer. In this implementation method, the AMF starts the second timer at the moment of receiving the eighth security mode completion message. How the AMF deduce the key and / or sends the key according to the timeout of the second timer will be described in detail below, and will not be described in detail here.
[0415] As another possible implementation, AMF may start the second timer at the moment of sending the ninth security mode command message to the terminal device, and AMF derives the key and / or sends the key according to the timeout of the second timer. In this implementation, AMF starts the second timer at the moment of sending the ninth security mode command message to the terminal device. How AMF derives the key and / or sends the key according to the timeout of the second timer will be described in detail below, and will not be described in detail here.
[0416] As an example but not limitation, the second timer may be the first timer, such as T3560. Alternatively, the second timer is a timer different from T3560, such as the timing duration of the second timer is less than the timing duration of the first timer; or, the timing duration of the second timer is greater than the timing duration of the first timer. In this embodiment, the timing duration of the second timer is not limited and can be set with reference to historical communication data.
[0417] The AMF derives a key and / or sends a key according to the expiration of the second timer, specifically including the following possible implementation methods:
[0418] As a possible implementation method, when the second timer expires and the ninth security mode completion message in response to the ninth security mode command message is not received from the terminal device, the AMF derives the fourth key and sends the fourth key to the access network device, where the fourth key is deduced based on the fourth parameter.
[0419] As another possible implementation, when the second timer times out and the ninth security mode completion message in response to the ninth security mode command message is not received, the AMF sends the fourth key to the access network device, where the fourth key is derived from the fourth parameter. In this implementation, the timing for the AMF to derive the fourth key is not limited, and it may be when the second timer times out or after receiving the fourth parameter.
[0420] As another possible implementation method, before the second timer expires, a ninth security mode completion message is received from the terminal device in response to the ninth security mode command message, and the AMF derives the fifth key based on the fifth parameter (e.g., the fifth uplink count) in the ninth security mode completion message, and sends the fifth key to the access network device.
[0421] If, before the second timer times out, the AMF receives a ninth security mode completion message in response to the ninth security mode command message from the terminal device, the AMF derives the fifth key according to the fifth parameter in the ninth security mode completion message, and sends the fifth key to the access network device, Figure 8 The method flow shown may also include:
[0422] S814, the terminal device sends a ninth security mode completion message to the AMF. The ninth security mode completion message is a message in which the terminal device responds to the ninth security mode command message, and the ninth security mode completion message includes the fifth parameter.
[0423] S815, AMF derives the key based on the fifth parameter.
[0424] Before the second timer times out, the AMF receives the ninth security mode completion message. Further, the AMF derives a key according to the fifth parameter and sends the derived key to the access network device.
[0425] S816, AMF sends the key to the access network device.
[0426] If the second timer times out and AMF has not received any security mode completion message other than the eighth security mode completion message, AMF may send the fourth key derived from the fourth parameter included in the eighth security mode completion message to the access network device. The timing for AMF to derive the fourth key is not limited, and may be when the second timer times out or after receiving the fourth parameter; or, AMF may perform multiple key derivations in succession to obtain multiple keys (e.g., AMF performs key derivation after receiving the eighth security mode completion message to obtain the fourth key, and also performs key derivation after receiving the ninth security mode completion message to obtain the fifth key), but provides the latest deduced key to the access network device.
[0427] In addition, it should be noted that if the AMF determines that it is not necessary to send a key to the access network device based on the received eighth security mode completion message, the AMF may not need to start the above-mentioned second timer. For example, the AMF determines that the terminal device does not need to perform security protection when subsequently transmitting access layer messages between the terminal device and the access network device based on the information of the terminal device carried in the eighth security mode completion message.
[0428] Implementation method #4: The security mode command messages sent by AMF to the terminal device in sequence include an eighth security mode command message, a ninth security mode command message and a tenth security mode command message, and the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0429] Combine the following Fig. 9 This article describes in detail how AMF derives the key in the case of implementation #4. Fig. 9 As shown, the following steps are included:
[0430] S911, AMF sends the eighth security mode command message to the terminal device and starts the first timer.
[0431] S912, the first timer of AMF (such as T3560) times out, sends the ninth security mode command message to the terminal device, and restarts the first timer.
[0432] In this embodiment, when the first timer (e.g., T3560) times out and no response message to the eighth security mode command message is received, the AMF can retransmit the security mode command message to the terminal device, that is, the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0433] S913, the terminal device sends a security mode completion message #A to the AMF. The security mode completion message #A is a message in which the terminal device responds to the eighth security mode command message, and the AMF stops the first timer.
[0434] S914, AMF sends the tenth security mode command message to the terminal device and restarts the first timer.
[0435] S915: The terminal device sends a security mode completion message #B to the AMF. The security mode completion message #B is a message in which the terminal device responds to the ninth security mode command message. The security mode completion message #B is equivalent to Figure 7 The eighth security mode completion message shown in .
[0436] As a possible implementation, the AMF may start the second timer upon receiving the security mode completion message #B.
[0437] As another possible implementation, the AMF may start the second timer at the moment of sending the tenth security mode command message to the terminal device.
[0438] For the description related to the first timer and the second timer, please refer to the description in the above example three, which will not be repeated here.
[0439] Further, if before the second timer times out, the AMF receives a security mode completion message #C from the terminal device in response to the tenth security mode command message, the AMF derives the fifth key according to the fifth parameter in the security mode completion message #C, and sends the fifth key to the access network device. Fig. 9 The method flow shown may also include:
[0440] S916, the terminal device sends a security mode completion message #C to the AMF. The security mode completion message #C is a message in which the terminal device responds to the tenth security mode command message.
[0441] S917: AMF derives the key based on the fifth parameter.
[0442] Before the second timer times out, the AMF receives the security mode completion message #C. Further, the AMF derives a key according to the fifth parameter and sends the derived key to the access network device.
[0443] S918, AMF provides the key to the access network device.
[0444] It should be noted that if, after the second timer expires, AMF does not receive any security mode completion message other than security mode completion message #B, AMF can deduce the fourth key based on the fourth parameter included in the security mode completion message #B and send the fourth key to the access network device.
[0445] in addition, Figure 6 and Figure 7 The communication methods shown can be used in combination. For example, if the AMF side does not deduce the same key as the terminal device side (for example, the T3560 timer times out again and the AMF side has not received the security mode completion message), the terminal device can use Figure 6 The method shown performs integrity protection checking.
[0446] Figure 7 In the communication method shown, after AMF receives the security mode completion message from the terminal device, it can postpone providing the key to the access network device and start the second timer. When the second timer times out, if AMF has not received other security mode completion messages, AMF provides the key to the access network device; or, when other security mode completion messages are received before the second timer times out, AMF performs key deduction based on the parameters in the most recently received security mode completion message, and provides the deduced key to the access network device. This allows the parameters of the key deduced by the core network device to be the same as the parameters of the terminal key deduction, and the core network device can provide the deduced key to the access network device, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0447] The present application also provides a communication method, in which, when the security mode command messages sent by AMF to a terminal device in sequence include an eighth security mode command message, a ninth security mode command message, and a tenth security mode command message, and the ninth security mode command message is a retransmission message of the eighth security mode command message, the time of sending the tenth security mode command message is postponed, so that AMF can send subsequent security mode command messages after receiving a response message to the retransmitted security mode command message (such as the ninth security mode command message), so as to avoid AMF mistakenly believing that the response message received to the ninth security mode command message is a response message to the tenth security mode command message, and using parameters different from those on the terminal device side to deduce a key, resulting in access layer security verification failure. The following will be combined with Fig.10 This communication method is described in detail.
[0448] Fig.10 This is a schematic flow chart of another communication method provided by the present application. It includes the following steps:
[0449] S1011, AMF sends the eighth security mode command message to the terminal device and starts the first timer.
[0450] S1012, the first timer of AMF (such as T3560) times out, sends a ninth security mode command message to the terminal device, and restarts the first timer.
[0451] In this embodiment, when the first timer (e.g., T3560) times out and no response message to the eighth security mode command message is received, the AMF can retransmit the security mode command message to the terminal device, that is, the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0452] S1013, the terminal device sends an eighth security mode completion message to the AMF. The eighth security mode completion message is a message in which the terminal device responds to the eighth security mode command message.
[0453] In this embodiment, the AMF may stop the first timer and start the third timer when receiving the eighth security mode completion message.
[0454] As an example but not limitation, the third timer may be the first timer, such as T3560. Alternatively, the third timer is a timer different from T3560, such as the timing duration of the third timer is less than the timing duration of the first timer; or, for example, the timing duration of the third timer is greater than the timing duration of the first timer. In this embodiment, the timing duration of the third timer is not limited and can be set with reference to historical communication data.
[0455] S1014, the terminal device sends a ninth security mode completion message to the AMF. The ninth security mode completion message is a message in which the terminal device responds to the ninth security mode command message.
[0456] As a possible implementation method, if the AMF receives a ninth security mode completion message sent by the UE before the third timer expires, the AMF sends a tenth security mode command message to the terminal device based on the ninth security mode completion message and restarts the first timer.
[0457] As another possible implementation method, if the AMF does not receive the ninth security mode completion message before the third timer expires, after the third timer expires, the AMF sends the tenth security mode command message to the terminal device.
[0458] S1015, AMF sends the tenth security mode command message to the terminal device and restarts the first timer.
[0459] S1016, the terminal device sends a tenth security mode completion message to the AMF. The tenth security mode completion message is a message in which the terminal device responds to the tenth security mode command message.
[0460] S1017, AMF derives the key based on the parameters in the tenth security mode command message.
[0461] S1018, AMF provides the key to the access network device.
[0462] The present application also provides a communication method. When the access network device receives a security mode failure message from the terminal device, it can re-request the AMF to provide a key and re-initiate the access layer security mode control process based on the re-acquired key, in order to increase the possibility of successful access layer security verification. Fig.11 This communication method is described in detail.
[0463] Fig.11 This is a schematic flow chart of another communication method provided by the present application. It includes the following steps:
[0464] S1111, AMF sends the eighth security mode command message to the terminal device and starts the first timer.
[0465] S1112, the first timer of AMF (such as T3560) times out, sends a ninth security mode command message to the terminal device, and restarts the first timer.
[0466] In this embodiment, when the first timer (e.g., T3560) times out and no response message to the eighth security mode command message is received, the AMF can retransmit the security mode command message to the terminal device, that is, the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0467] S1113, the terminal device sends an eighth security mode completion message to the AMF. The eighth security mode completion message is a message in which the terminal device responds to the eighth security mode command message.
[0468] S1114, the terminal device derives a key according to the parameters included in the eighth security mode completion message.
[0469] Specifically, the terminal device performs a key (eg, K) based on the uplink parameter (eg, uplink count) corresponding to the eighth security mode completion message. gNB ) is deduced to obtain the fourth key. It should be understood that there is no time limit for the terminal device to deduce the fourth key and send the eighth security mode completion message. After the terminal device determines the uplink parameter corresponding to the eighth security mode completion message, the key deduction can be performed, or the key deduction can be performed after sending the eighth security mode completion message. This application does not limit this.
[0470] In this embodiment, the AMF can stop the first timer when receiving the eighth security mode completion message, generate a fourth key, and provide it to the access network device.
[0471] In this embodiment, after receiving the fourth key, the access network device may send an access layer security mode command message to the terminal device. For details, see S1117.
[0472] S1115, the terminal device sends a ninth security mode completion message to the AMF. The ninth security mode completion message is a message in which the terminal device responds to the ninth security mode command message.
[0473] S1116, the terminal device derives a key according to the parameters included in the ninth security mode completion message.
[0474] Specifically, the terminal device performs a key (eg, K) based on the uplink parameter (eg, uplink count) corresponding to the ninth security mode completion message. gNB ) to deduce the fifth key. It should be understood that there is no time limit for the terminal device to deduce the fifth key and send the ninth security mode completion message. After the terminal device determines the uplink parameters corresponding to the ninth security mode completion message, it can deduce the key, or deduce the key after sending the ninth security mode completion message. This application does not limit this. As a possible implementation method, after receiving the ninth security mode completion message, the AMF saves the uplink parameters in the ninth security mode command message.
[0475] As another possible implementation method, after receiving the ninth security mode completion message, AMF derives the fifth key based on the uplink parameters in the ninth security mode command message, but there is no need to provide the fifth key to the access network device.
[0476] S1117, the access network device sends an access layer security mode command message to the terminal device.
[0477] In this embodiment, after the access network device receives the fourth key from the AMF, the access layer security mode command message subsequently sent to the terminal device may be integrity protected and / or encrypted according to the fourth key. Among them, the access layer security mode command message subsequently sent to the terminal device according to the fourth key is integrity protected and / or encrypted including: the access network device may further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key according to the fourth key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device.
[0478] Since the access network device performs integrity protection and / or encryption protection on the access layer security mode command message based on the fourth key, and the fifth key is derived from the uplink parameters in the ninth security mode command message stored on the terminal device side, the terminal device fails to perform integrity verification on the access layer security mode command message based on the fifth key.
[0479] S1118, the terminal device sends an access layer security mode failure message to the access network device.
[0480] Optionally, the access layer security mode failure message includes a cause value, and the cause value is used to indicate that the terminal device fails to verify the integrity protection of the access layer security mode command message.
[0481] In this embodiment, when the access network device receives the access layer security mode failure message, it can request the key from the AMF again instead of directly sending a connection failure message to the terminal device.
[0482] Optionally, the access network device may determine whether to request a key from AMF. For example, if the access layer security mode failure message carries a cause value, it may determine whether to request a key from AMF based on the cause value (e.g., request a key from AMF when the cause value indicates a key error, or not request a key from AMF when the cause value indicates a terminal device abnormality); or the access network device may also determine whether to request a key from AMF based on a local policy.
[0483] Exemplarily, when the access network device decides to request a key from the AMF, Figure 1 The method flow shown also includes:
[0484] S1119, the access network device sends a first request message to the AMF. The first request message is used to request a key.
[0485] S1101, AMF sends a first response message to the access network device. The first response message includes a fifth key.
[0486] Specifically, the time when the access network device sends the access layer security mode command message is later than the time when the AMF receives the above-mentioned ninth security mode completion message, that is, when the AMF receives the first request message, the fifth key or the uplink parameters required to deduce the fifth key have been locally stored.
[0487] The AMF regenerates the fifth key based on the locally stored uplink parameter value or sends the generated fifth key to the access network device. For example, if the AMF locally stores the uplink parameter, the fifth key is derived based on the uplink parameter; for another example, if the AMF locally stores the fifth key, the fifth key is used directly.
[0488] In this embodiment, after the access network device obtains the fifth key, it can re-initiate the access layer security mode control process based on the fifth key. For example, the access network device can perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device according to the fifth key. Among them, performing integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device according to the fifth key includes: the access network device can further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key according to the key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device.
[0489] In this embodiment, the key used by the access network device to initiate the access layer security mode control process twice is derived based on different parameters, and the different parameters are carried in different security mode completion messages. The different security mode completion messages are security mode completion messages sent by the terminal device to the core network device in the security mode control process. Specifically, the core network device performs key derivation based on the parameters in the different security mode completion messages to obtain the corresponding key, and provides the derived key to the access network device, so that the access network device can perform subsequent access layer security verification based on the corresponding key. The key on the access network device side is provided by the core network device, and the core network device receives multiple security mode completion messages from the terminal device. The parameter used by the core network device to derive the key may be a parameter carried in one of the multiple security mode completion messages, which may be different from the parameter used by the terminal device to derive the key. Therefore, if the access network device obtains the key from the core network device again after receiving the access layer security mode failure message, and re-initiates the access layer security mode control process based on the obtained key, the key used may be exactly the same as the key based on which the terminal device verifies the access layer security mode command message, so that the terminal side and the access network device side can perform subsequent access layer security verification based on the same key, thereby increasing the possibility of successful access layer security verification.
[0490] It should be understood that Fig.11 The method flow shown in the figure shows that after receiving the access layer security mode failure message, the access network device can re-acquire the key from the AMF through the first request message, and re-initiate the access layer security mode control process based on the acquired key. In this application, there is no limitation on the process after re-initiating the access layer security mode control process. For example, if the access network device receives the access layer security mode failure message again, the access network device can send an RRC release message to the terminal device, or the access network device can also re-acquire the key from the AMF, and re-initiate the access layer security mode control process based on the acquired key. In this embodiment, there is no limitation on the number of times the access network device re-initiates the access layer security mode control process, which can be one or more times. In addition, in this application, there is no limitation on the number of times the security mode command message is retransmitted in the non-access layer security mode control process.
[0491] The present application also provides a communication method. When the access network device receives a security mode failure message from the terminal device, it can start a timer and send an RRC release message after the timer expires. If a key is received from the AMF before the timer expires, the access layer security mode control process can be re-initiated based on the received key, so as to increase the possibility of successful access layer security verification. Fig.12 This communication method is described in detail.
[0492] Fig.12 This is a schematic flow chart of another communication method provided by the present application. It includes the following steps:
[0493] S1211, AMF sends the eighth security mode command message to the terminal device and starts the first timer.
[0494] S1212, the first timer of AMF (such as T3560) times out, sends a ninth security mode command message to the terminal device, and restarts the first timer.
[0495] In this embodiment, when the first timer (e.g., T3560) times out and no response message to the eighth security mode command message is received, the AMF can retransmit the security mode command message to the terminal device, that is, the ninth security mode command message is a retransmission message of the eighth security mode command message.
[0496] S1213, the terminal device sends an eighth security mode completion message to the AMF. The eighth security mode completion message is a message in which the terminal device responds to the eighth security mode command message.
[0497] S1214: The terminal device derives a key according to the parameters included in the eighth security mode completion message.
[0498] Specifically, the terminal device performs a key (eg, K) based on the uplink parameter (eg, uplink count) corresponding to the eighth security mode completion message. gNB ) is deduced to obtain the fourth key. It should be understood that there is no time limit for the terminal device to deduce the fourth key and send the eighth security mode completion message. After the terminal device determines the uplink parameter corresponding to the eighth security mode completion message, the key deduction can be performed, or the key deduction can be performed after sending the eighth security mode completion message. This application does not limit this.
[0499] In this embodiment, the AMF can stop the first timer when receiving the eighth security mode completion message, generate a fourth key, and provide it to the access network device.
[0500] In this embodiment, after receiving the fourth key, the access network device may send an access layer security mode command message to the terminal device. For details, see S1215.
[0501] S1215, the access network device sends an access layer security mode command message #1 to the terminal device.
[0502] In this embodiment, after the access network device receives the fourth key from the AMF, the access layer security mode command message subsequently sent to the terminal device may be integrity protected and / or encrypted according to the fourth key. Among them, the access layer security mode command message subsequently sent to the terminal device according to the fourth key is integrity protected and / or encrypted including: the access network device may further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key according to the fourth key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device.
[0503] S1216, the terminal device sends an access layer security mode failure message #1 to the access network device.
[0504] Optionally, the access network device starts a fourth timer; the fourth timer is used to wait whether the AMF will send a newly generated key.
[0505] If the fifth key is not received from the AMF after the fourth timer times out, the access network device sends a radio resource control release message to the terminal device; or,
[0506] Before the fourth timer times out, the access network device receives the fifth key from the AMF, and the access network device performs the access layer security mode control process again based on the fifth key.
[0507] S1217, the terminal device sends a ninth security mode completion message to the AMF. The ninth security mode completion message is a message in which the terminal device responds to the ninth security mode command message.
[0508] S1218, the terminal device derives a key according to the parameters included in the ninth security mode completion message.
[0509] Specifically, the terminal device performs a key (eg, K) based on the uplink parameter (eg, uplink count) corresponding to the ninth security mode completion message. gNB ) is deduced to obtain the fifth key. It should be understood that there is no time limit for the terminal device to deduce the fifth key and send the ninth security mode completion message. After the terminal device determines the uplink parameter corresponding to the ninth security mode completion message, the key deduction can be performed, or the key deduction can be performed after sending the ninth security mode completion message. This application does not limit this.
[0510] After receiving the ninth security mode completion message, the AMF derives the fifth key based on the uplink parameter in the ninth security mode command message, and provides the fifth key to the access network device.
[0511] S1219, AMF sends the fifth key to the access network device.
[0512] S1201, the access network device sends an access layer security mode command message #2 to the terminal device.
[0513] In this embodiment, after the access network device receives the fifth key from the AMF, the access layer security mode command message subsequently sent to the terminal device may be integrity protected and / or encrypted according to the fifth key. Among them, the access layer security mode command message subsequently sent to the terminal device according to the fifth key is integrity protected and / or encrypted including: the access network device may further generate an access layer signaling plane integrity protection key and / or an access layer signaling plane confidentiality protection key according to the fourth key, and use the access layer signaling plane integrity protection key and / or the access layer signaling plane confidentiality protection key to perform integrity protection and / or encryption protection on the access layer security mode command message subsequently sent to the terminal device.
[0514] Further, in the case of starting the fourth timer, if the fourth timer has not expired, this step S1201 is performed, and the access network device stops the fourth timer.
[0515] S1202, the terminal device sends an access layer security mode completion message to the access network device.
[0516] The terminal device successfully verifies the access layer security mode command message #2 based on the fifth key, and sends an access layer security mode completion message to the access network device; the access network device successfully verifies the access layer security mode completion message and completes the air interface security activation process between the terminal device and the access network device.
[0517] Fig.12 In the embodiment shown, when the access network device receives a security mode failure message from the terminal device, it may temporarily not feed back an RRC release message, but start the fourth timer and wait until the fourth timer times out before sending an RRC release message to the terminal device to release the connection between the terminal device and the access network device. Alternatively, before the fourth timer times out, other keys provided by the core network are received, and the access layer security mode control process may be retried based on the received keys.
[0518] It should be understood that the sequence numbers of the above processes do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0519] It should also be understood that in the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0520] It should also be understood that in some of the above embodiments, the devices in the existing network architecture are mainly used as examples for exemplary description (such as AMF, access network equipment and terminal equipment, etc.), and it should be understood that the specific form of the device is not limited in the embodiments of the present application. For example, devices that can achieve the same function in the future are applicable to the embodiments of the present application.
[0521] It can be understood that in the above-mentioned method embodiments, the methods and operations implemented by devices (such as AMF, access network equipment and terminal equipment, etc.) can also be implemented by components of the equipment (such as chips or circuits).
[0522] Above, combined Figures 3 to 12 The communication method provided by the embodiment of the present application is described in detail. The above communication method is mainly introduced from the perspective of interaction between various protocol layers of the terminal device. It can be understood that in order to realize the above functions, the terminal device includes a hardware structure and / or software module corresponding to each function.
[0523] Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0524] The following combination Figures 13 to 15 The communication device provided by the present application is described in detail. It should be understood that the description of the device embodiment corresponds to the description of the method embodiment. Therefore, the content not described in detail can be referred to the method embodiment above, and some content will not be repeated for the sake of brevity.
[0525] The embodiment of the present application can divide the functional modules of the transmitting end device or the receiving end device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.
[0526] Fig.13 1 is a schematic block diagram of a communication device 10 provided in an embodiment of the present application. The device 10 includes a transceiver module 11 and a processing module 12. The transceiver module 11 can implement corresponding communication functions, and the processing module 12 is used to perform data processing, or in other words, the transceiver module 11 is used to perform operations related to receiving and sending, and the processing module 12 is used to perform other operations besides receiving and sending. The transceiver module 11 can also be called a communication interface or a communication unit.
[0527] Optionally, the device 10 may further include a storage module 13, which may be used to store instructions and / or data. The processing module 12 may read the instructions and / or data in the storage module so that the device implements the actions of the devices in the aforementioned method embodiments.
[0528] In one design, the device 10 may correspond to the AMF in the above method embodiment, or be a component (such as a chip) of the AMF.
[0529] The device 10 can implement the steps or processes corresponding to the AMF execution in the above method embodiment, wherein the transceiver module 11 can be used to perform the AMF transceiver related operations in the above method embodiment, and the processing module 12 can be used to perform the AMF processing related operations in the above method embodiment.
[0530] In one possible implementation, the transceiver module 11 is used to send a first security mode command message to a terminal device, wherein the first security mode command message includes a first value of a first identifier, and the first value of the first identifier is used to identify the first security mode command message. The transceiver module 11 is also used to receive a first security mode completion message from the terminal device, wherein the first security mode completion message includes a first value of a second identifier, and the first value of the second identifier is used to identify the first security completion message. The processing module 12 is used to derive a key based on parameters included in the first security mode completion message when the first value of the first identifier and the first value of the second identifier are the same, wherein the key is used to generate a key required for access layer security verification. The transceiver module 11 is also used to send the key to an access network device.
[0531] In another possible implementation, the transceiver module 11 is used to receive an eighth security mode completion message from the terminal device, wherein the eighth security mode completion message includes a fourth parameter; if the security mode command message is retransmitted due to the timeout of the first timer before receiving the eighth security mode completion message, the processing module 12 is used to start the second timer; when the second timer times out and no other security mode completion message is received from the terminal device, the transceiver module 11 is used to send a fourth key to the access network device, wherein the fourth key is derived based on the fourth parameter; or,
[0532] Before the second timer times out, the transceiver module 11 receives a ninth security mode completion message from the terminal device, and the processing module 12 is used to deduce the fifth key based on the fifth parameter in the ninth security mode completion message, and the transceiver module 11 is used to send the fifth key to the access network device.
[0533] In another possible implementation, the transceiver module 11 is configured to receive an eighth security mode completion message from the terminal device. If the security mode command message is retransmitted due to the first timer timing out before receiving the eighth security mode completion message, the processing module 12 is configured to start a third timer.
[0534] When the third timer times out and no other security mode completion message is received from the terminal device, the transceiver module 11 sends a tenth security mode command message to the terminal device, and the processing module 12 restarts the first timer; or,
[0535] Before the third timer times out, the transceiver module 11 receives a ninth security mode completion message from the terminal device, and after receiving the ninth security mode completion message, sends a tenth security mode command message to the terminal device, and the processing module 12 restarts the first timing.
[0536] In another possible implementation, the transceiver module 11 is used to receive an eighth security mode completion message from the terminal device, and the eighth security mode completion message includes a fourth parameter. The processing module 12 is used to deduce a fourth key according to the fourth parameter, and the transceiver module 11 sends the fourth key to the access network device; the transceiver module 11 receives a ninth security mode completion message from the terminal device, and the ninth security mode completion message includes a fifth parameter; the transceiver module 11 receives a first request message from the access network device, and the first request message is used to request a key; the transceiver module 11 sends a fifth key to the access network device, and the fifth key is derived according to the fifth parameter.
[0537] Wherein, when the device 10 is used to perform Figure 3 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S310, S320 and S350; the processing module 12 can be used to execute the processing steps in the method, such as step S340.
[0538] When the device 10 is used to perform Figure 4 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S410, S430, S450, S470 and S490; the processing module 12 can be used to execute the processing steps in the method, such as steps S460 and S480.
[0539] When the device 10 is used to perform Figure 5 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S510, S520, S530, S540, S560, S580, S591, S594, S595, S598 and S599; the processing module 12 can be used to execute the processing steps in the method, such as steps S590, S593 and S597.
[0540] When the device 10 is used to perform Figure 6 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S611, S612, S601, S615 and S616; the processing module 12 can be used to execute the processing steps in the method, such as step S614.
[0541] When the device 10 is used to perform Figure 7 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as step S710; the processing module 12 can be used to execute the processing steps in the method, such as step S720.
[0542] When the device 10 is used to perform Figure 8When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S811, S812, S813, S814 and S816; the processing module 12 can be used to execute the processing steps in the method, such as step S815.
[0543] When the device 10 is used to perform Fig. 9 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S911, S912, S913, S914, S915, S916 and S918; the processing module 12 can be used to execute the processing steps in the method, such as step S917.
[0544] When the device 10 is used to perform Fig.10 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S1011, S1012, S1013, S1014, S1015, S1016 and S1018; the processing module 12 can be used to execute the processing steps in the method, such as step S1017.
[0545] When the device 10 is used to perform Fig.11 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S1111, S1112, S1113, S1114, S1115, S1117, S1118, S1101 and S1119; the processing module 12 can be used to execute the processing steps in the method.
[0546] When the device 10 is used to perform Fig.12 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S1211, S1212, S1213, S1217 and S1219; the processing module 12 can be used to execute the processing steps in the method.
[0547] It should be understood that the specific process of each unit executing the above corresponding steps has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.
[0548] In another design, the apparatus 10 may correspond to the terminal device in the above method embodiment, or be a component (such as a chip) of the terminal device.
[0549] The device 10 can implement the steps or processes executed by the terminal device in the above method embodiment, wherein the transceiver module 11 can be used to execute the transceiver related operations of the terminal device in the above method embodiment, and the processing module 12 can be used to execute the processing related operations of the terminal device in the above method embodiment.
[0550] In one possible implementation, the transceiver module 11 is used to receive a first security mode command message from a core network device, the first security mode command message including a first value of an identifier, and the first value of the first identifier is used to identify the first security mode command message; the transceiver module 11 is used to send a first security mode completion message to the core network device in response to the first security mode command message, the first security mode completion message including a first value of a second identifier, and the first value of the second identifier is used to identify the first security completion message; wherein the first value of the first identifier is the same as the first value of the second identifier; the processing module 12 is used to deduce a key based on parameters included in the first security mode completion message, and the key is used to generate a key required for access layer security verification.
[0551] In another possible implementation, the transceiver module 11 is used to receive a fifth security mode command message from an access network device; the processing module 12 is used to perform an integrity protection check on the fifth security mode command message based on a first key; the processing module 12 is also used to perform an integrity protection check on the fifth security mode command message based on a second key if the check fails, wherein the first key is deduced based on a first parameter in a seventh security mode completion message, the second key is deduced based on a second parameter in a sixth security mode completion message, the seventh security mode completion message and the sixth security mode completion message are sent in a security mode control process, and the sixth security mode completion message is sent before the seventh security mode completion message.
[0552] Wherein, when the device 10 is used to perform Figure 3 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S310 and S320; the processing module 12 can be used to execute the processing steps in the method, such as step S330.
[0553] When the device 10 is used to perform Figure 4 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S410, S430, S450 and S470; the processing module 12 can be used to execute the processing steps in the method, such as steps S420, S451, S471 and S440.
[0554] When the device 10 is used to perform Figure 5 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S510, S520, S530, S540, S560, S580, S591, S594, S595 and S598; the processing module 12 can be used to execute the processing steps in the method, such as steps S550, S570, S581, S592 and S596.
[0555] When the device 10 is used to perform Figure 6 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S611, S612, S613, S615 and S616; the processing module 12 can be used to execute the processing steps in the method, such as steps S613, S617, S620 and S630.
[0556] When the device 10 is used to perform Figure 7 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as step S710; the processing module 12 can be used to execute the processing steps in the method.
[0557] When the device 10 is used to perform Figure 8 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S811, S812, S813, and S814; the processing module 12 can be used to execute the processing steps in the method.
[0558] When the device 10 is used to perform Fig. 9 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S911, S912, S913, S914, S915, and S916; the processing module 12 can be used to execute the processing steps in the method.
[0559] When the device 10 is used to perform Fig.10 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S1011, S1012, S1013, S1014, S1015, and S1016; the processing module 12 can be used to execute the processing steps in the method.
[0560] When the device 10 is used to perform Fig.11 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S1111, S1112, S1113, S1115, S1117, and S1118; the processing module 12 can be used to execute the processing steps in the method, such as steps S1114 and S1116.
[0561] When the device 10 is used to perform Fig.12 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S1211, S1212, S1213, S1215, S1216, S1217, S1201 and S1202; the processing module 12 can be used to execute the processing steps in the method, such as steps S1214 and S1218.
[0562] It should be understood that the specific process of each unit executing the above corresponding steps has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.
[0563] In yet another design, the apparatus 10 may correspond to the access network device in the above method embodiment, or a component (such as a chip) of the access network device.
[0564] The device 10 can implement the steps or processes executed by the access network device in the above method embodiment, wherein the transceiver module 11 can be used to execute the transceiver-related operations of the access network device in the above method embodiment, and the processing module 12 can be used to execute the processing-related operations of the access network device in the above method embodiment.
[0565] In a possible implementation, the transceiver module 11 is used to receive a fourth key from a core network device; the processing module 12 is used to perform integrity protection on an access layer security mode command message based on the fourth key; the transceiver module 11 sends the access layer security mode command message to the terminal device; the transceiver module 11 receives an access layer security mode failure message from the terminal device; the transceiver module 11 sends a first request message to the core network device, wherein the first request message is used to request a key; the transceiver module 11 receives a fifth key from the core network device; the processing module 12 performs an access layer security mode control process again based on the fifth key,
[0566] Among them, the fourth key is deduced based on the fourth parameter in the eighth security mode completion message, the fifth key is deduced based on the fifth parameter in the ninth security mode completion message, the eighth security mode completion message and the ninth security mode completion message are sent in the security mode control process, and the eighth security mode completion message is sent before the ninth security mode completion message.
[0567] In another possible implementation, the transceiver module 11 is used to receive a fourth key from a core network device; the transceiver module 11 is prepared to perform integrity protection on an access layer security mode command message based on the fourth key; the transceiver module 11 sends the access layer security mode command message to the terminal device; the transceiver module 11 receives an access layer security mode failure message from the terminal device; the processing module 12 starts a fourth timer; if the fifth key from the core network device is not received when the fourth timer times out, the transceiver module 11 sends a wireless resource control release message to the terminal device; or,
[0568] Before the fourth timer times out, the transceiver module 11 receives the fifth key from the core network device, and the processing module 12 performs the access layer security mode control process again based on the fifth key.
[0569] Among them, the fourth key is deduced based on the fourth parameter in the eighth security mode completion message, the fifth key is deduced based on the fifth parameter in the ninth security mode completion message, the eighth security mode completion message and the ninth security mode completion message are sent in the non-access layer security mode control process, and the eighth security mode completion message is sent before the ninth security mode completion message.
[0570] Wherein, when the device 10 is used to perform Figure 3 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as step S350; the processing module 12 can be used to execute the processing steps in the method.
[0571] When the device 10 is used to perform Figure 4 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as step S490; the processing module 12 can be used to execute the processing steps in the method.
[0572] When the device 10 is used to perform Figure 5 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as step S599; the processing module 12 can be used to execute the processing steps in the method.
[0573] When the device 10 is used to perform Figure 6 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S601 and S610; the processing module 12 can be used to execute the processing steps in the method.
[0574] When the device 10 is used to perform Figure 8 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as step S816; the processing module 12 can be used to execute the processing steps in the method.
[0575] When the device 10 is used to perform Fig. 9 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as step S918; the processing module 12 can be used to execute the processing steps in the method.
[0576] When the device 10 is used to perform Fig.10 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as step S1018; the processing module 12 can be used to execute the processing steps in the method.
[0577] When the device 10 is used to perform Fig.11When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S1117, S1118, S1119, and S1101; the processing module 12 can be used to execute the processing steps in the method.
[0578] When the device 10 is used to perform Fig.12 When the method is performed, the transceiver module 11 can be used to execute the steps of sending and receiving information in the method, such as steps S1215, S1216, S1219, S1201 and S1202; the processing module 12 can be used to execute the processing steps in the method.
[0579] It should also be understood that the device 10 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the device 10 may be specifically a mobile management network element in the above-mentioned embodiment, and may be used to execute the various processes and / or steps corresponding to the mobile management network element in the above-mentioned method embodiments; or, the device 10 may be specifically a terminal device in the above-mentioned embodiment, and may be used to execute the various processes and / or steps corresponding to the terminal device in the above-mentioned method embodiments. To avoid repetition, it will not be repeated here.
[0580] The device 10 of each of the above schemes has the function of implementing the corresponding steps performed by the device (such as terminal device, network device) in the above method. This function can be implemented by hardware, or by hardware executing the corresponding software implementation. The hardware or software includes one or more modules corresponding to the above functions; for example, the transceiver module can be replaced by a transceiver (for example, the sending unit in the transceiver module can be replaced by a transmitter, and the receiving unit in the transceiver module can be replaced by a receiver), and other units, such as processing modules, can be replaced by processors to respectively perform the transceiver operations and related processing operations in each method embodiment.
[0581] In addition, the transceiver module 11 may also be a transceiver circuit (for example, may include a receiving circuit and a sending circuit), and the processing module may be a processing circuit.
[0582] Fig.142 is a schematic diagram of another communication device 20 provided in an embodiment of the present application. The device 20 includes a processor 21, and the processor 21 is used to execute a computer program or instruction stored in a memory 22, or read data / signaling stored in the memory 22 to execute the method in each method embodiment above. Optionally, there are one or more processors 21.
[0583] Alternatively, if Fig.14 As shown, the device 20 also includes a memory 22, which is used to store computer programs or instructions and / or data. The memory 22 can be integrated with the processor 21, or can also be separately set. Optionally, the memory 22 is one or more.
[0584] Alternatively, if Fig.14 As shown, the device 20 further includes a transceiver 23, and the transceiver 23 is used for receiving and / or sending signals. For example, the processor 21 is used to control the transceiver 23 to receive and / or send signals.
[0585] As a solution, the device 20 is used to implement the operations performed by the AMF in the above method embodiments.
[0586] As another solution, the device 20 is used to implement the operations performed by the terminal device in the above various method embodiments.
[0587] As another solution, the device 20 is used to implement the operations performed by the access network device in the above method embodiments.
[0588] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0589] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory and / or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM includes the following forms: static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0590] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) can be integrated into the processor.
[0591] It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0592] Fig.15 Schematic diagram of a chip system 30 provided in an embodiment of the present application. The chip system 30 (or also referred to as a processing system) includes a logic circuit 31 and an input / output interface 32.
[0593] Among them, the logic circuit 31 can be a processing circuit in the chip system 30. The logic circuit 31 can be coupled to the storage unit and call the instructions in the storage unit so that the chip system 30 can implement the methods and functions of each embodiment of the present application. The input / output interface 32 can be an input / output circuit in the chip system 30, outputting information processed by the chip system 30, or inputting data or signaling information to be processed into the chip system 30 for processing.
[0594] As a solution, the chip system 30 is used to implement the operations performed by the AMF, terminal device or access network device in the above method embodiments.
[0595] For example, the logic circuit 31 is used to implement the processing-related operations performed by the AMF, terminal device or access network device in the above method embodiments; the input / output interface 32 is used to implement the sending and / or receiving-related operations performed by the AMF, terminal device or access network device in the above method embodiments.
[0596] An embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored for implementing the methods executed by the AMF, terminal device or access network device in the above-mentioned method embodiments.
[0597] For example, when the computer program is executed by a computer, the computer can implement the methods performed by the AMF, terminal device or access network device in each embodiment of the above method.
[0598] An embodiment of the present application also provides a computer program product, comprising instructions, which, when executed by a computer, implement the methods performed by the AMF, terminal device or access network device in the above-mentioned method embodiments.
[0599] An embodiment of the present application also provides a communication system, including one or more devices such as the aforementioned AMF, terminal equipment and / or access network equipment.
[0600] The explanation of the relevant contents and beneficial effects of any of the above-mentioned devices can be referred to the corresponding method embodiments provided above, which will not be repeated here.
[0601] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, 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.
[0602] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. For example, the computer can be a personal computer, a server, or a network device, etc. 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, for example, 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 (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 a computer can access or a data storage device such as a server or data center that contains one or more available media integrations. 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 DVD), or a semiconductor medium (e.g., a solid state disk (SSD), etc. For example, the aforementioned available medium includes, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0603] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A communication method, characterized in that: include: Sending a first security mode command message to a terminal device, where the first security mode command message includes a first value of a first identifier, where the first value of the first identifier is used to identify the first security mode command message; receiving a first security mode completion message from the terminal device, where the first security mode completion message includes a first value of a second identifier, where the first value of the second identifier is used to identify the first security completion message; In a case where the first value of the first identifier is the same as the first value of the second identifier, deriving a key according to a parameter included in the first security mode completion message; The key is sent to the access network device.
2. The method according to claim 1, characterized in that Before sending the first security mode command message to the terminal device, the method further includes: Sending a second security mode command message to the terminal device, where the second security mode command message includes a second value of the first identifier, and the second value of the first identifier is used to identify the second security mode command message; The first security mode command message is a retransmission message of the second security mode command message, and the first value of the first identifier is different from the second value of the first identifier.
3. The method according to claim 2, characterized in that Before receiving the first security mode completion message from the terminal device, the method further includes: receiving a second security mode completion message from the terminal device, where the second security mode completion message includes a second value of the second identifier, where the second value of the second identifier is used to identify the second security mode completion message; The second value of the second identifier is the same as the second value of the first identifier.
4. The method according to claim 1, characterized in that: Before sending the first security mode command message to the terminal device, the method further includes: Sending a third security mode command message to the terminal device, where the third security mode command message includes a third value of the first identifier, where the third value of the first identifier is used to identify the third security mode command message; sending a fourth security mode command message to the terminal device, where the fourth security mode command message includes a fourth value of the first identifier, where the fourth value of the first identifier is used to identify the fourth security mode command message, The fourth security mode command message is a retransmission message of the third security mode command message, and the fourth value of the first identifier is different from the third value of the first identifier; receiving a fourth security mode completion message from the terminal device, the fourth security mode completion message including a fourth value of the second identifier, the fourth value of the second identifier being used to identify the fourth security mode completion message, The sending a first security mode command message to the terminal device includes: The fourth value of the second identifier is the same as the fourth value of the first identifier, and the fourth security mode completion message is used to indicate that the terminal device supports Long Term Evolution LTE communication, and the first security mode command message is sent to the terminal device.
5. The method according to claim 4, characterized in that Before receiving the fourth security mode completion message from the terminal device, the method further includes: receiving a third security mode completion message from the terminal device, wherein the third security mode completion message includes a third value of the second identifier, and the third value of the second identifier is used to identify the third security mode completion message; When the third value of the second identifier is different from the fourth value of the first identifier, the third security mode completion message is discarded.
6. The method according to any one of claims 1 to 5, characterized in that The parameter included in the first security mode completion message is uplink count value information.
7. The method according to any one of claims 1 to 6, characterized in that The method is executed by an access mobility management network element, or the method is executed by a chip used for the access mobility management network element.
8. A communication method, characterized in that: include: receiving a first security mode command message from a core network device, where the first security mode command message includes a first value of a first identifier, where the first value of the first identifier is used to identify the first security mode command message; sending a first security mode completion message to the core network device in response to the first security mode command message, where the first security mode completion message includes a first value of a second identifier, where the first value of the second identifier is used to identify the first security mode completion message, where the first value of the first identifier is the same as the first value of the second identifier; A key is derived according to the parameters included in the first security mode completion message.
9. The method according to claim 8, characterized in that Before receiving the first security mode command message from the core network device, the method further includes: receiving a second security mode command message from the core network device, where the second security mode command message includes a second value of the first identifier, where the second value of the first identifier is used to identify the second security mode command message, sending a second security mode completion message to the core network device in response to the second security mode command message, where the second security mode completion message includes a second value of the second identifier, where the second value of the second identifier is used to identify the second security mode completion message; The first value of the first identifier is different from the second value of the first identifier, and the second value of the first identifier is the same as the second value of the second identifier.
10. The method according to claim 9, characterized in that Before receiving the first security mode command message from the core network device, the method further includes: receiving a third security mode command message from the core network device, where the third security mode command message includes a third value of the first identifier, where the third value of the first identifier is used to identify the third security mode command message; sending a third security mode completion message to the core network device in response to the third security mode command message, where the third security mode completion message includes a third value of the second identifier, and the third value of the second identifier is used to identify the third security mode completion message; receiving a fourth security mode command message from the core network device, where the fourth security mode command message includes a fourth value of the first identifier, where the fourth value of the first identifier is used to identify the fourth security mode command message, and where the fourth value of the first identifier is different from the third value of the first identifier; In response to the fourth security mode command message, a fourth security mode completion message is sent to the core network device, the fourth security mode completion message includes a fourth value of the second identifier, the fourth value of the second identifier is used to identify the fourth security mode completion message, the fourth security mode completion message is used to indicate that the terminal device supports Long Term Evolution LTE communication, and triggers the core network device to send the first security mode command message.
11. A communication method, characterized in that: include: receiving a fifth security mode command message from the access network device; Performing integrity protection verification and / or decryption on the fifth security mode command message based on the first key; If the integrity protection check and / or decryption fails, performing integrity protection check and / or decryption on the fifth security mode command message based on the second key, The first key is deduced based on the first parameter in the seventh security mode completion message, the second key is deduced based on the second parameter in the sixth security mode completion message, the seventh security mode completion message and the sixth security mode completion message are sent in the non-access layer security mode control process, and the sixth security mode completion message is sent before the seventh security mode completion message.
12. The method according to claim 11, characterized in that The method further comprises: In the non-access layer security mode control process, receiving a sixth security mode command message from a core network device; In response to the sixth security mode command message, sending the sixth security mode completion message to the core network device, and deriving the second key based on the second parameter; Receive a seventh security mode command message from a core network device, and after sending the sixth security mode completion message, send the seventh security mode completion message to the core network device in response to the seventh security mode command message, and deduce the first key based on the first parameter.
13. The method according to claim 11 or 12, characterized in that: The method further comprises: The second key is saved, wherein the second key is deduced after the sixth security mode completion message is generated or after the sixth security mode completion message is sent.
14. The method according to any one of claims 11 to 13, characterized in that After generating the sixth security mode completion message or after sending the sixth security mode completion message, the method further includes: saving the second parameter; Deducing the second key based on the second parameter is performed after the integrity protection check and / or decryption fails.
15. The method according to any one of claims 11 to 14, characterized in that Before performing integrity protection check on the fifth security mode command message based on the second key, the method further includes: It is determined that the number of times integrity protection checks are performed on the fifth security mode command message is less than a first threshold.
16. The method according to any one of claims 11 to 15, characterized in that If the integrity protection check and / or decryption of the fifth security mode command message based on the second key fails, the method further includes: Determining that integrity protection checking and / or decryption has failed; or, The fifth security mode command message is integrity checked and / or decrypted based on a third key, wherein the third key is derived based on a third parameter in a fifth security mode completion message, the fifth security mode completion message is sent in the non-access layer security mode control process, and the fifth security mode completion message is sent before the sixth security mode completion message.
17. The method according to claim 16, characterized in that The first parameter is first uplink count value information, the second parameter is second uplink count value information, and the third parameter is third uplink count value information.
18. The method according to claim 12, characterized in that: The core network device is an access mobility management network element.
19. A communication device, characterized in that: include: One or more functional modules for executing the method according to any one of claims 1 to 6, or one or more functional modules for executing the method according to any one of claims 7 to 10, or one or more functional modules for executing the method according to any one of claims 11 to 18.
20. A communication device, characterized in that: include: A processor, configured to execute a computer program stored in a memory so that the apparatus performs the method according to any one of claims 1 to 6, or so that the apparatus performs the method according to any one of claims 7 to 10, or so that the apparatus performs the method according to any one of claims 11 to 18.
21. A computer program product, characterized in that The computer program product comprises instructions for performing the method of any one of claims 1 to 18.
22. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program; when the computer program is executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 18.
23. A chip, characterized in that: The chip is installed in a communication device, and the chip includes a processor and a communication interface. When the processor reads instructions through the communication interface and runs, the communication device executes the method according to any one of claims 1 to 18.
