Key generation method and device, related equipment, storage medium and computer program product

By supporting the ability to negotiate keys based on wireless channel characteristics on the terminal and network side, new AS-related keys are generated, which solves the problem that the prior art is difficult to effectively ensure the security of the access layer. Especially in the face of quantum attacks, the AS-related keys are enhanced and the security of AS is improved.

CN119603675APending Publication Date: 2025-03-11CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411731456.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Existing cryptographic technologies are difficult to effectively ensure the security of the access layer (AS), especially in the face of quantum attacks, the security of traditional key algorithms such as AES-128 is threatened.

Method used

By supporting the ability to negotiate keys based on wireless channel characteristics on the terminal and network side, a new AS-related key is generated using the keys associated with wireless channel characteristics and the original AS-related keys, thereby improving the entropy of the AS-related keys and enhancing its security.

Benefits of technology

Effectively respond to security threats such as quantum attacks, improve the security of the access layer (AS), and ensure the data security of network information systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603675A_ABST
    Figure CN119603675A_ABST
Patent Text Reader

Abstract

The invention discloses a key generation method and device, a terminal, network equipment, a storage medium and a computer program product. The method comprises the following steps: under the condition that both a terminal and a network side support a first capability, the terminal generates an access layer (AS) related key based on a first key and a second key; the first capability is used by the terminal to negotiate the first key with the network side, and the first key is associated with a wireless channel feature; the second key is used for performing encryption and integrity protection of the AS under the condition that the terminal and / or the network side does not support the first capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of security technology, and in particular to a key generation method, apparatus, related equipment, storage medium and computer program product. Background Art

[0002] With the rapid development of Internet technology, the network security risks of information systems continue to increase, and the threat challenges are becoming increasingly severe. Cryptographic security is an important foundation for information security and can effectively protect the data security of network information systems; in other words, cryptographic technology is the core technology and important means to protect network information systems.

[0003] However, related cryptographic technologies may not be able to effectively protect the security of the access layer (AS, Access Stratum). Summary of the invention

[0004] To solve the related technical problems, the embodiments of the present application provide a key generation method, apparatus, related equipment, storage medium and computer program product.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application embodiment provides a key generation method, which is applied to a terminal, including:

[0007] In the case that both the terminal and the network side support the first capability, an AS-related key is generated based on the first key and the second key; the first capability is used by the terminal to negotiate the first key with the network side, and the first key is associated with the characteristics of the wireless channel; the second key is used to perform encryption and integrity protection of the AS in the case that the terminal and / or the network side do not support the first capability.

[0008] In the above solution, the step of generating the AS-related key based on the first key and the second key includes:

[0009] Based on the first key and the second key, generating a third key, wherein the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network side support the first capability;

[0010] Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the radio resource control (RRC) layer when the terminal and the network side both support the first capability, the fifth key is used to perform integrity protection of the RRC layer when the terminal and the network side both support the first capability, the sixth key is used to encrypt the user plane (UP) when the terminal and the network side both support the first capability, and the seventh key is used to perform integrity protection of the UP when the terminal and the network side both support the first capability.

[0011] In the above solution, the step of generating the AS-related key based on the first key and the second key includes:

[0012] Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, wherein the eighth key is used to perform RRC layer encryption when the terminal and / or the network side does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal and / or the network side does not support the first capability, the tenth key is used to perform UP encryption when the terminal and / or the network side does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal and / or the network side does not support the first capability;

[0013] Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when the terminal and the network side both support the first capability, the fifth key is used to perform integrity protection of the RRC layer when the terminal and the network side both support the first capability, the sixth key is used to encrypt UP when the terminal and the network side both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network side both support the first capability.

[0014] In the above scheme, the method further includes:

[0015] First information sent by the network side is received, where the first information is used to indicate a first key to be applied from multiple first keys negotiated between the terminal and the network side.

[0016] In the above scheme, the method further includes:

[0017] Sending second information to the network side, where the second information indicates whether the terminal supports the first capability.

[0018] In the above solution, the sending the second information to the network side includes:

[0019] The second information is sent to the network side through a non-access stratum (NAS).

[0020] The embodiment of the present application also provides a key generation method, which is applied to a network device, including:

[0021] When both the terminal and the network device support the first capability, an AS-related key is generated based on the first key and the second key; the first capability is used by the terminal and the network device to negotiate the first key, and the first key is associated with the characteristics of the wireless channel; the second key is used to perform AS encryption and integrity protection when the terminal and / or the network device do not support the first capability.

[0022] In the above solution, the step of generating the AS-related key based on the first key and the second key includes:

[0023] Based on the first key and the second key, generating a third key, wherein the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network device support the first capability;

[0024] Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform RRC layer encryption when the terminal and the network device both support the first capability, the fifth key is used to perform RRC layer integrity protection when the terminal and the network device both support the first capability, the sixth key is used to perform UP encryption when the terminal and the network device both support the first capability, and the seventh key is used to perform UP integrity protection when the terminal and the network device both support the first capability.

[0025] In the above solution, the step of generating the AS-related key based on the first key and the second key includes:

[0026] Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, the eighth key is used to perform RRC layer encryption when the terminal and / or the network device does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal and / or the network device does not support the first capability, the tenth key is used to perform UP encryption when the terminal and / or the network device does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal and / or the network device does not support the first capability;

[0027] Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform encryption at the RRC layer when the terminal and the network device both support the first capability, the fifth key is used to perform integrity protection at the RRC layer when the terminal and the network device both support the first capability, the sixth key is used to perform encryption of UP when the terminal and the network device both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network device both support the first capability.

[0028] In the above scheme, the method further includes:

[0029] A first key to be applied is selected from a plurality of first keys negotiated between the terminal and the network device, and first information is sent to the terminal, where the first information is used to indicate a first key to be applied from the plurality of first keys negotiated between the terminal and the network device.

[0030] In the above scheme, the method further includes:

[0031] Second information sent by the terminal is received, where the second information indicates whether the terminal supports the first capability.

[0032] In the above solution, the receiving the second information sent by the terminal includes:

[0033] Receive the second information sent by the terminal through NAS.

[0034] The present application also provides a key generation device, including:

[0035] The first processing unit is used to generate an AS-related key based on a first key and a second key when both the terminal and the network side support a first capability; the first capability is used by the terminal to negotiate the first key with the network side, and the first key is associated with a wireless channel characteristic; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network side do not support the first capability.

[0036] The present application also provides a key generation device, including:

[0037] The second processing unit is used to generate an AS-related key based on a first key and a second key when both the terminal and the network device support a first capability; the first capability is used for the terminal and the network device to negotiate the first key, and the first key is associated with a wireless channel characteristic; the second key is used for encryption and integrity protection of the AS when the terminal and / or the network device do not support the first capability.

[0038] The embodiment of the present application also provides a terminal, comprising: a first communication interface and a first processor; wherein,

[0039] The first processor is used to generate an AS-related key based on a first key and a second key when both the terminal and the network side support the first capability; the first capability is used for the terminal to negotiate the first key with the network side, and the first key is associated with a wireless channel characteristic; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network side does not support the first capability.

[0040] The embodiment of the present application further provides a network device, comprising: a second communication interface and a second processor; wherein:

[0041] The second processor is used to generate an AS-related key based on a first key and a second key when both the terminal and the network device support a first capability; the first capability is used for the terminal and the network device to negotiate the first key, and the first key is associated with a wireless channel characteristic; the second key is used to perform AS encryption and integrity protection when the terminal and / or the network device do not support the first capability.

[0042] The embodiment of the present application further provides a terminal, comprising: a first processor and a first memory for storing a computer program that can be run on the processor,

[0043] Wherein, the first processor is used to execute the steps of any of the above-mentioned terminal side methods when running the computer program.

[0044] The embodiment of the present application further provides a network device, comprising: a second processor and a second memory for storing a computer program that can be run on the processor,

[0045] Wherein, the second processor is used to execute the steps of any one of the above-mentioned methods on the network device side when running the computer program.

[0046] An embodiment of the present application also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods on the terminal side are implemented, or the steps of any of the above-mentioned methods on the network device side are implemented.

[0047] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods on the terminal side, or implements the steps of any of the above-mentioned methods on the network device side.

[0048] The key generation method, device, related equipment, storage medium and computer program product provided in the embodiments of the present application, when both the terminal and the network side support the first capability, the terminal generates an AS-related key based on the first key and the second key; the first capability is used for the terminal to negotiate the first key with the network side, and the first key is associated with the wireless channel characteristics; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network side do not support the first capability. The scheme provided in the embodiments of the present application, when both the terminal and the network side support the ability to negotiate keys based on wireless channel characteristics (i.e., the first capability), the terminal uses the key associated with the wireless channel characteristics (i.e., the first key) and the original AS-related key (i.e., the second key) to generate a new AS-related key, thereby improving the entropy of the AS-related key, that is, being able to enhance the AS-related key, and then being able to effectively respond to security threats such as quantum attacks and improve the security of the AS. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of a key generation method according to an embodiment of the present application;

[0050] Figure 2 A schematic diagram of another key generation method according to an embodiment of the present application;

[0051] Figure 3 A flowchart of an example key enhancement scheme for application in this application;

[0052] Figure 4 This is a schematic diagram of the structure of a key generation device according to an embodiment of the present application;

[0053] Figure 5 This is a schematic diagram of the structure of another key generation device according to an embodiment of the present application;

[0054] Figure 6 This is a schematic diagram of the terminal structure of an embodiment of the present application;

[0055] Figure 7 This is a schematic diagram of the network device structure of an embodiment of the present application;

[0056] Figure 8 This is a schematic diagram of the key generation system structure of an embodiment of the present application. DETAILED DESCRIPTION

[0057] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0058] In the related art, the network authentication and key agreement (AKA) protocol of the communication network is implemented based on the MILENAGE algorithm, which is used to complete the authentication and key agreement between the user service identification module (USIM) and the unified data management (UDM). Among them, the underlying algorithm of the MILENAGE algorithm is the Advanced Encryption Standard (AES)-128, and the key K shared between the USIM and the UDM is 128 bits.

[0059] However, with the development of quantum computing technology, traditional cryptographic algorithms face serious security threats. Specifically, quantum computers have powerful computing power, which can greatly reduce the difficulty of cracking symmetric cryptographic algorithms, greatly increasing the risk of AES-128 being cracked. Attackers can obtain the plaintext of AES-128 to calculate the 128-bit key K.

[0060] Therefore, in order to deal with quantum attacks, we can consider using AES-256 to replace AES-128, and use a 256-bit key K to resist the threat of quantum computing. In the communication network, we can replace AES-128 with AES-256 by upgrading network elements such as USIM, mobile equipment (ME, Mobile Equipment), access and mobility management function (AMF, Access and Mobility management Function), authentication service function (AUSF, AUthentication Server Function), UDM, etc., that is, replace MILENAGE-128 with MILENAGE-256, and use a 256-bit key K, so as to resist the threat of quantum computing.

[0061] However, the related technology derives keys at all levels by concatenating the key CK and the key IK (i.e., CK||IK) as 256-bit input, such as K_ausf, K_seaf, K_amf, K_gNB and other keys. Since the key K does not have sufficient entropy of 256 bits (i.e., the key randomness is not enough for 256 bits), the key CK and the key IK do not have sufficient entropy of 256 bits, so the series of keys derived from the combination of CK||IK do not have sufficient entropy of 256 bits. Therefore, the key K_gNB used for encryption and integrity protection of AS does not have sufficient entropy of 256 bits, and cannot provide 256-bit security capabilities, resulting in possible security risks for AS in the scenario of quantum attacks; in other words, the related cryptographic technology may not be able to effectively protect the security of AS.

[0062] Based on this, in various embodiments of the present application, when both the terminal and the network side support the ability to negotiate keys based on wireless channel characteristics, the terminal uses the keys associated with the wireless channel characteristics and the original AS-related keys (such as keys K_gNB, etc.) to generate new AS-related keys, thereby improving the entropy of AS-related keys, that is, enhancing AS-related keys, and then effectively responding to security threats such as quantum attacks and improving the security of AS.

[0063] It should be noted that, in various embodiments of the present application, “one or more / one or more items” refers to at least one / at least one item, and “multiple / multiple items” refers to at least two / at least two items.

[0064] Specifically, the embodiment of the present application provides a key generation method, which is applied to a terminal, such as Figure 1 As shown, the method includes:

[0065] Step 101: When both the terminal and the network side support the first capability, generate an AS-related key based on the first key and the second key; the first capability is used by the terminal to negotiate the first key with the network side, and the first key is associated with the characteristics of the wireless channel; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network side does not support the first capability.

[0066] In actual application, the terminal may also be referred to as user equipment (UE), user or ME, etc. The embodiments of the present application do not limit the specific name of the terminal, as long as its function is realized. In addition, the network side may include network equipment, such as a base station, etc.; the interaction between the terminal and the network side may include the interaction between the terminal and the network equipment; in other words, in various embodiments of the present application, the term "network side" and "network equipment" may be replaced.

[0067] In actual application, since the first capability is used for the terminal to negotiate the first key with the network side, and the first key is associated with the wireless channel characteristics, the first capability can be understood as the ability to negotiate keys based on wireless channel characteristics. In addition, the first capability can also be called wireless key distribution (WKD, Wirelesss Key Distribution) capability or key wireless distribution capability, etc. The specific name of the first capability is not limited in the embodiment of the present application, as long as its function is realized. Specifically, for the first capability, in the relevant technology, experts and scholars in the field of wireless communications around the world have proposed a method for achieving information-theoretic security level in the physical layer of the wireless communication system by using the inherent security characteristics of the wireless channel. The method uses the wireless channel to enable the sender and receiver to extract channel state information with similar characteristics from the wireless channel, and generate a consistent symmetric key based on the information, thereby realizing secure communication at the physical layer. The wireless channel has decorrelation in space, and the signals received at a certain distance (such as half a wavelength) interval will experience different channel fading. Therefore, the eavesdropper cannot extract the same channel characteristics as the legitimate receiver to generate a key, which ensures the security of the key generated between legitimate users. Since the key (such as the first key) generated by the wireless physical layer key generation technology (i.e., the first capability) has high security, it is regarded as an effective technical means for realizing key distribution through a wireless environment in the future. Here, the specific process of the terminal and the network side negotiating the first key can be understood by referring to the relevant technology, and the embodiments of the present application will not be described in detail.

[0068] In actual application, the second key can be understood as the original AS-related key, and specifically may include a key known to the terminal through related technologies, such as key K_gNB (key K_gNB is the base station side key in the related technology, and the terminal can derive key K_gNB based on key K), etc. Here, the specific manner in which the terminal determines the second key can be understood with reference to the related technology, and the embodiments of the present application will not go into details. In addition, the AS-related key generated by the terminal based on the first key and the second key can be understood as a new AS-related key. When the terminal and / or the network side do not support the first capability, the terminal and the network side can perform AS encryption and integrity protection based on the second key; when both the terminal and the network side support the first capability, the terminal and the network side can perform AS encryption and integrity protection based on the new AS-related key.

[0069] In actual application, in the process of generating a new AS-related key based on the first key and the second key, the terminal can first generate a new key K_gNB (which may be recorded as the third key in the subsequent description) based on the first key and the original key K_gNB (that is, the second key), and then generate a new key K_RRCenc (which may be recorded as the fourth key in the subsequent description), a new key K_RRCint (which may be recorded as the fifth key in the subsequent description), a new key K_UPenc (which may be recorded as the sixth key in the subsequent description), and a new key K_UPint (which may be recorded as the seventh key in the subsequent description) based on the third key.

[0070] Based on this, in one embodiment, generating the AS-related key based on the first key and the second key may include:

[0071] Based on the first key and the second key, generating a third key, wherein the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network side support the first capability;

[0072] Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when both the terminal and the network side support the first capability, the fifth key is used to perform integrity protection of the RRC layer when both the terminal and the network side support the first capability, the sixth key is used to encrypt UP when both the terminal and the network side support the first capability, and the seventh key is used to perform integrity protection of UP when both the terminal and the network side support the first capability.

[0073] In actual application, the terminal may generate the third key based on the first key and the second key using a key derivation function (KDF). In addition, the specific manner in which the terminal generates the fourth key, the fifth key, the sixth key, and the seventh key based on the third key may be understood by referring to the specific manner in which the key K_RRCenc, the key K_RRCint, the key K_UPenc, and the key K_UPint are generated based on the key K_gNB in ​​the related art, and this embodiment of the application will not be elaborated on.

[0074] In actual application, in the process of generating a new AS-related key based on the first key and the second key, the terminal can also first generate the original key K_RRCenc (which can be recorded as the eighth key in the subsequent description), the original key K_RRCint (which can be recorded as the ninth key in the subsequent description), the original key K_UPenc (which can be recorded as the tenth key in the subsequent description) and the original key K_UPint (which can be recorded as the eleventh key in the subsequent description) based on the original key K_gNB (that is, the second key), and then generate a new key K_RRCenc (that is, the fourth key), a new key K_RRCint (that is, the fifth key), a new key K_UPenc (that is, the sixth key), and a new key K_UPint (that is, the seventh key) based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key.

[0075] Based on this, in one embodiment, generating the AS-related key based on the first key and the second key may include:

[0076] Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, wherein the eighth key is used to perform RRC layer encryption when the terminal and / or the network side does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal and / or the network side does not support the first capability, the tenth key is used to perform UP encryption when the terminal and / or the network side does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal and / or the network side does not support the first capability;

[0077] Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when the terminal and the network side both support the first capability, the fifth key is used to perform integrity protection of the RRC layer when the terminal and the network side both support the first capability, the sixth key is used to encrypt UP when the terminal and the network side both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network side both support the first capability.

[0078] Among them, in actual application, the specific method in which the terminal generates the eighth key, the ninth key, the tenth key and the eleventh key based on the second key can be understood by referring to the relevant technology, and the embodiment of the present application will not be repeated. In addition, in the process of generating the fourth key, the fifth key, the sixth key and the seventh key based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, the terminal can generate the fourth key based on the first key and the eighth key using KDF, generate the fifth key based on the first key and the ninth key using KDF, generate the sixth key based on the first key and the tenth key using KDF, and generate the seventh key based on the first key and the eleventh key using KDF.

[0079] In actual application, it can be seen from the above description that, in the case where both the terminal and the network side support the first capability, the AS-related keys (i.e., new AS-related keys) may include the third key, the fourth key, the fifth key, the sixth key, and the seventh key. In the case where the terminal and / or the network side do not support the first capability, the AS-related keys (i.e., original AS-related keys) may include the second key, the eighth key, the ninth key, the tenth key, and the eleventh key.

[0080] In actual application, when the terminal negotiates the first key with the network side, multiple first keys may be determined (ie negotiated). Afterwards, the network side may select an application first key from the multiple first keys and indicate it to the terminal.

[0081] Based on this, in one embodiment, the method may further include:

[0082] First information sent by the network side is received, where the first information is used to indicate a first key to be applied from multiple first keys negotiated between the terminal and the network side.

[0083] Among them, in actual application, the network side can select a first key for application from the multiple first keys based on a specific strategy (such as selecting in sequence or randomly selecting, etc.), and the first information can specifically include the identifier of the first key. In addition, the network side can send the first information to the terminal through an AS security mode command (SMC, Security Mode Command), that is, the network side can send an AS SMC to the terminal, and the AS SMC can include the first information; after receiving the first information, the terminal can generate a new AS-related key based on the second key and the first key indicated by the first information.

[0084] In actual application, the terminal needs to report to the network side whether it supports the first capability, so that the network side can determine whether to generate new AS-related keys, that is, determine whether to generate the third key, fourth key, fifth key, sixth key, and seventh key.

[0085] Based on this, in one embodiment, if Figure 1 As shown, before step 101, the method may further include:

[0086] Step 100: Send second information to the network side, where the second information indicates whether the terminal supports the first capability.

[0087] Among them, in actual application, when the network device includes a base station, the terminal can send the second information to the base station through AMF. Specifically, the terminal can send an initial registration request (which can be expressed as Initial Registration Request in English) to AMF, and the request can include the second information. The AMF can send the security context of the terminal to the base station, and the security context of the terminal can include the second information. After receiving the second information, the base station can determine whether the terminal supports the first capability based on the second information, and generate a new AS-related key based on the first key and the second key when both the terminal and itself support the first capability; when the terminal and / or itself do not support the first capability, AS encryption and integrity protection are performed based on the second key.

[0088] Based on this, in one embodiment, sending the second information to the network side may include:

[0089] The second information is sent to the network side through NAS.

[0090] Accordingly, the embodiment of the present application also provides a key generation method, which is applied to a network device (such as a base station, etc., corresponding to the above-mentioned network side), such as Figure 2 As shown, the method includes:

[0091] Step 201: When both the terminal and the network device support the first capability, an AS-related key is generated based on the first key and the second key; the first capability is used by the terminal and the network device to negotiate the first key, and the first key is associated with the characteristics of the wireless channel; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network device do not support the first capability.

[0092] In one embodiment, generating the AS-related key based on the first key and the second key may include:

[0093] Based on the first key and the second key, generating a third key, wherein the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network device support the first capability;

[0094] Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform RRC layer encryption when the terminal and the network device both support the first capability, the fifth key is used to perform RRC layer integrity protection when the terminal and the network device both support the first capability, the sixth key is used to perform UP encryption when the terminal and the network device both support the first capability, and the seventh key is used to perform UP integrity protection when the terminal and the network device both support the first capability.

[0095] In another embodiment, generating the AS-related key based on the first key and the second key may include:

[0096] Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, the eighth key is used to perform RRC layer encryption when the terminal and / or the network device does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal and / or the network device does not support the first capability, the tenth key is used to perform UP encryption when the terminal and / or the network device does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal and / or the network device does not support the first capability;

[0097] Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform encryption at the RRC layer when the terminal and the network device both support the first capability, the fifth key is used to perform integrity protection at the RRC layer when the terminal and the network device both support the first capability, the sixth key is used to perform encryption of UP when the terminal and the network device both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network device both support the first capability.

[0098] In one embodiment, the method may further include:

[0099] A first key to be applied is selected from a plurality of first keys negotiated between the terminal and the network device, and first information is sent to the terminal, where the first information is used to indicate a first key to be applied from the plurality of first keys negotiated between the terminal and the network device.

[0100] In one embodiment, if Figure 2 As shown, before step 201, the method may further include:

[0101] Step 200: Receive second information sent by the terminal, where the second information indicates whether the terminal supports the first capability.

[0102] In one embodiment, the receiving the second information sent by the terminal may include:

[0103] Receive the second information sent by the terminal through NAS.

[0104] The key generation method provided in the embodiment of the present application, when both the terminal and the network side support the first capability, the terminal generates an AS-related key based on the first key and the second key; the first capability is used for the terminal to negotiate the first key with the network side, and the first key is associated with the wireless channel characteristics; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network side do not support the first capability. The scheme provided in the embodiment of the present application, when both the terminal and the network side support the ability to negotiate keys based on wireless channel characteristics (i.e., the first capability), the terminal uses the key associated with the wireless channel characteristics (i.e., the first key) and the original AS-related key (i.e., the second key) to generate a new AS-related key, thereby improving the entropy of the AS-related key, that is, being able to enhance the AS-related key, and then being able to effectively respond to security threats such as quantum attacks and improve the security of the AS.

[0105] The present application is described in further detail below in conjunction with application examples.

[0106] In this application example, the terminal is called UE; the network device includes a base station, called the next generation Node B (gNB). This application example provides a communication network key enhancement solution. Figure 3 The specific implementation process of the solution is described in detail.

[0107] like Figure 3As shown, first, the UE can write support for AS encryption and integrity protection algorithms into the UE security capabilities, and write support for WKD capabilities (i.e., the above-mentioned first capabilities) into the UE WKD capabilities (which can be recorded as WKDC_UE, i.e., the above-mentioned second information). Among them, the UE security capabilities may include the UE's support status for AS encryption and integrity protection algorithms; WKDC_UE can indicate whether the UE supports WKD; WKDC_UE can be saved in a newly added field of the interface, or in a reserved field of the UE security capabilities. Afterwards, the UE can send an initial NAS message to the AMF, that is, send an initial registration request (which can be expressed as Initial Registration Request in English) to the AMF. The request may include (i.e., carry) user hidden identifier (SUCI) / globally unique temporary UE identity (GUTI), UE security capabilities, WKDC_UE, and other content. Here, if the AMF does not have the UE's security context or fails to perform an integrity check, the AMF can initiate the AKA authentication process with the UE. After AKA authentication is successful, AMF and UE can complete the establishment of NAS security mode; and AMF can send UE security context to gNB, and UE security context can include (i.e. carry) derived key K_gNB (i.e. the above-mentioned second key), UE security capability, WKDC_UE and other contents.

[0108] After receiving the UE security context, the gNB can determine whether the UE supports WKD based on WKDC_UE, and perform the following two corresponding operations based on the judgment result:

[0109] Processing 1: If WKDC_UE supports WKD and gNB also supports WKD, then execute solution 1 (which can be recorded as case 1);

[0110] Processing 2: If gNB does not support WKD and / or WKDC_UE does not support WKD, run the regular AS SMC process, that is, execute solution 2 (which can be recorded as case 2).

[0111] like Figure 3 As shown, for the scheme 1, if the gNB determines that there is no locally available WK associated with the UE (i.e., the above-mentioned first key), the gNB can send a WKD request to the UE; thereafter, the UE and the gNB can complete the WKD negotiation, that is, the UE and the gNB can each generate several wireless keys (i.e., the above-mentioned multiple first keys): WK_1, WK_2, ..., WK_n, and the identifiers of these wireless keys can be respectively recorded as WKID_1, WKID_2, ..., WKID_n.

[0112] After the gNB obtains the available WK associated with the UE (i.e., the first key mentioned above), it can derive AS-related keys based on the wireless key WK and the key K_gNB (i.e., the second key mentioned above) and select the AS protection algorithm; that is, the gNB can select a wireless key WK (i.e., a first key of the above application) from several wireless keys according to a policy (such as random selection or sequential selection), and its key identifier is WKID; and can calculate the AS encryption and integrity protection keys based on K_gNB and WK.

[0113] Among them, when calculating the AS encryption and integrity protection keys, the gNB can first derive WK_gNB (that is, the above-mentioned third key) through KDF based on K_gNB (that is, the above-mentioned second key) and WK (that is, the above-mentioned first key); and then calculate K_RRCenc (that is, the above-mentioned fourth key), K_RRCint (that is, the above-mentioned fifth key), K_UPenc (that is, the above-mentioned sixth key), and K_UPint (that is, the above-mentioned seventh key) based on WK_gNB. Alternatively, the gNB may first calculate K_RRCenc (i.e., the eighth key), K_RRCint (i.e., the ninth key), K_UPenc (i.e., the tenth key), and K_UPint (i.e., the eleventh key) based on K_gNB (i.e., the second key); and then calculate a new K_RRCenc (i.e., the fourth key), a new K_RRCint (i.e., the fifth key), a new K_UPenc (i.e., the sixth key), and a new K_UPint (i.e., the seventh key) based on WK (i.e., the first key), K_RRCenc, K_RRCint, K_UPenc, and K_UPint respectively; the specific calculation method may include K_RRCenc=KDF(WK, K_RRCenc), etc.

[0114] After the gNB completes the calculation of the AS encryption and integrity protection key, it can select the encryption and integrity protection algorithm of RRC and UP from the UE security capability, calculate the integrity protection parameter MAC-I of the AS SMC based on K_RRCint, and start RRC integrity protection. In addition, the gNB can send an AS SMC to the UE, and the AS SMC can include (i.e., carry) an encryption and integrity algorithm indication (this information can be used to indicate the encryption and integrity protection algorithm of RRC and UP selected by the gNB from the UE security capability), WKID (this information can be used to indicate the WK selected by the gNB, i.e., the above-mentioned first information), and MAC-I. In addition, the gNB can start RRC downlink encryption.

[0115] After the UE receives the AS SMC, that is, after receiving the above-mentioned first information, it can obtain WK (that is, the above-mentioned first key) according to the WKID, and can calculate the AS encryption and integrity protection keys based on K_gNB (that is, the above-mentioned second key) and WK. When calculating the AS encryption and integrity protection keys, the UE can first derive WK_gNB (that is, the above-mentioned third key) through KDF based on K_gNB (that is, the above-mentioned second key) and WK (that is, the above-mentioned first key); then calculate K_RRCenc (that is, the above-mentioned fourth key), K_RRCint (that is, the above-mentioned fifth key), K_UPenc (that is, the above-mentioned sixth key), and K_UPint (that is, the above-mentioned seventh key) based on WK_gNB. Alternatively, the UE may first calculate K_RRCenc (i.e., the eighth key), K_RRCint (i.e., the ninth key), K_UPenc (i.e., the tenth key), and K_UPint (i.e., the eleventh key) based on K_gNB (i.e., the second key mentioned above); and then calculate the new K_RRCenc (i.e., the fourth key mentioned above), the new K_RRCint (i.e., the fifth key mentioned above), the new K_UPenc (i.e., the sixth key), and the new K_UPint (i.e., the seventh key) based on WK (i.e., the first key mentioned above), K_RRCenc, K_RRCint, K_UPenc, and K_UPint respectively; the specific calculation method may include K_RRCenc=KDF(WK, K_RRCenc), etc.

[0116] After the UE completes the calculation of the AS encryption and integrity protection keys, it can use the algorithm indicated by the encryption and integrity algorithm indication in the AS SMC to verify the MAC-I of the AS SMC, start RRC integrity protection, and start RRC downlink decryption. The UE can send an AS SMC completion message (expressed as AS SMC Complete in English) containing (i.e. carrying) the integrity protection parameter MAC-I to the gNB, and can start RRC uplink encryption. After that, the gNB can verify the MAC-I of the AS SMC completion message and start RRC uplink decryption. In this way, the AS SMC process is completed between the UE and the gNB, and the key can be derived based on WK_gNB (i.e. the third key mentioned above) to achieve AS secure communication.

[0117] like Figure 3As shown, for the scheme 2, the gNB can start the conventional AS SMC process, which is used for RRC and UP security algorithm negotiation and RRC security activation. Specifically, the gNB can calculate the encryption key and integrity key of the RRC and UP layers through KDF based on K_gNB sent by AMF (i.e., calculate K_RRCenc, K_RRCint, K_UPenc, K_UPint); and the gNB can select the encryption and integrity protection algorithms of RRC and UP from the UE security capabilities and enable integrity protection.

[0118] Afterwards, the gNB may send an AS SMC to the UE, which may include the selected RRC and UP confidentiality and integrity algorithm indication and MAC-I, which is generated by integrity protection of the AS SMC based on the integrity key K_RRCint. After sending the AS SMC, the gNB may enable RRC downlink encryption. Afterwards, the UE may calculate the encryption key and integrity key of the RRC and UP layers on the terminal side (i.e., calculate K_RRCenc, K_RRCint, K_UPenc, K_UPint); and the UE may verify the integrity of the AS SMC, i.e., use the selected RRC integrity algorithm indicated in the AS SMC and the current RRC integrity key K_RRCint to verify whether the MAC-I is correct; if the verification is consistent, RRC integrity protection and RRC downlink decryption are enabled.

[0119] Afterwards, the UE may send an AS SMC completion message to the gNB, which may include an integrity protection parameter MAC-I; MAC-I is generated by integrity protection of the AS SMC using the selected RRC algorithm indicated in the AS SMC and the RRC integrity key K_RRCint based on the current K_gNB. After sending the AS SMC completion message, the UE may enable RRC uplink encryption. Afterwards, the gNB may verify the integrity of the AS SMC completion message, that is, verify whether the MAC-I is correct using the selected RRC integrity algorithm indicated in the AS SMC and the RRC integrity key K_RRCint based on the current K_gNB, and if correct, enable RRC uplink decryption. In this way, the AS SMC process is completed between the UE and the gNB, and keys can be derived based on K_gNB to achieve AS secure communication.

[0120] In the solution provided by this application example, the UE and gNB negotiate the WKD support status through NAS interaction; the UE synchronizes the terminal side's support status for WKD with the network side gNB through the newly added WKDC_UE field (i.e. the second information mentioned above); the gNB selects the wireless key WK (i.e. the first key mentioned above), and the gNB / UE generates AS-related keys based on K_gNB (i.e. the second key mentioned above) and WK. In this way, by introducing the wireless key WK generated by wireless key distribution, WK and K_gNB are mixed to generate keys for AS encryption and integrity protection, which can improve the entropy of AS-related keys, thereby improving the security of AS and effectively responding to security threats such as quantum attacks.

[0121] In order to implement the method on the terminal side of the embodiment of the present application, the embodiment of the present application also provides a key generation device, which is set on the terminal, such as Figure 4 As shown, the device comprises:

[0122] The first processing unit 401 is used to generate an AS-related key based on a first key and a second key when both the terminal and the network side support a first capability; the first capability is used by the terminal to negotiate the first key with the network side, and the first key is associated with a wireless channel characteristic; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network side do not support the first capability.

[0123] In one embodiment, the first processing unit 401 is specifically configured to:

[0124] Based on the first key and the second key, generating a third key, wherein the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network side support the first capability;

[0125] Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when both the terminal and the network side support the first capability, the fifth key is used to perform integrity protection of the RRC layer when both the terminal and the network side support the first capability, the sixth key is used to encrypt UP when both the terminal and the network side support the first capability, and the seventh key is used to perform integrity protection of UP when both the terminal and the network side support the first capability.

[0126] In one embodiment, the first processing unit 401 is specifically configured to:

[0127] Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, wherein the eighth key is used to perform RRC layer encryption when the terminal and / or the network side does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal and / or the network side does not support the first capability, the tenth key is used to perform UP encryption when the terminal and / or the network side does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal and / or the network side does not support the first capability;

[0128] Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when the terminal and the network side both support the first capability, the fifth key is used to perform integrity protection of the RRC layer when the terminal and the network side both support the first capability, the sixth key is used to encrypt UP when the terminal and the network side both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network side both support the first capability.

[0129] In one embodiment, if Figure 4 As shown, the device may also include:

[0130] The first receiving unit 402 is configured to receive first information sent by the network side, where the first information is used to indicate a first key to be applied from among multiple first keys negotiated between the terminal and the network side.

[0131] In one embodiment, if Figure 4 As shown, the device may also include:

[0132] The first sending unit 403 is configured to send second information to the network side, where the second information indicates whether the terminal supports the first capability.

[0133] In one embodiment, the first sending unit 403 is specifically configured to send the second information to the network side via NAS.

[0134] In actual application, the first processing unit 401 can be implemented by a processor in the key generation device; the first receiving unit 402 and the first sending unit 403 can be implemented by a communication interface in the key generation device.

[0135] In order to implement the method on the network device side of the embodiment of the present application, the embodiment of the present application also provides a key generation device, which is arranged on the network device, such as Figure 5 As shown, the device comprises:

[0136] The second processing unit 501 is used to generate an AS-related key based on a first key and a second key when both the terminal and the network device support a first capability; the first capability is used by the terminal and the network device to negotiate the first key, and the first key is associated with a wireless channel characteristic; the second key is used to perform AS encryption and integrity protection when the terminal and / or the network device do not support the first capability.

[0137] In one embodiment, the second processing unit 501 is specifically configured to:

[0138] Based on the first key and the second key, generating a third key, wherein the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network device support the first capability;

[0139] Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform RRC layer encryption when the terminal and the network device both support the first capability, the fifth key is used to perform RRC layer integrity protection when the terminal and the network device both support the first capability, the sixth key is used to perform UP encryption when the terminal and the network device both support the first capability, and the seventh key is used to perform UP integrity protection when the terminal and the network device both support the first capability.

[0140] In one embodiment, the second processing unit 501 is specifically configured to:

[0141] Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, the eighth key is used to perform RRC layer encryption when the terminal and / or the network device does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal and / or the network device does not support the first capability, the tenth key is used to perform UP encryption when the terminal and / or the network device does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal and / or the network device does not support the first capability;

[0142] Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform encryption at the RRC layer when the terminal and the network device both support the first capability, the fifth key is used to perform integrity protection at the RRC layer when the terminal and the network device both support the first capability, the sixth key is used to perform encryption of UP when the terminal and the network device both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network device both support the first capability.

[0143] In one embodiment, the second processing unit 501 is further configured to select a first key for application from a plurality of first keys negotiated between the terminal and the network device;

[0144] Accordingly, if Figure 5 As shown, the device may also include:

[0145] The second sending unit 502 is used to send first information to the terminal, where the first information is used to indicate a first key to be applied from among multiple first keys negotiated between the terminal and the network device.

[0146] In one embodiment, if Figure 5 As shown, the device may also include:

[0147] The second receiving unit 503 is configured to receive second information sent by the terminal, where the second information indicates whether the terminal supports the first capability.

[0148] In one embodiment, the second receiving unit 503 is specifically configured to receive the second information sent by the terminal via NAS.

[0149] In actual application, the second processing unit 501 can be implemented by a processor in the key generation device; the second sending unit 502 and the second receiving unit 503 can be implemented by a communication interface in the key generation device.

[0150] It should be noted that: the key generation device provided in the above embodiment only uses the division of the above program modules as an example to illustrate when generating a key. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the key generation device provided in the above embodiment and the key generation method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0151] Based on the hardware implementation of the above program modules, and in order to implement the method on the terminal side of the embodiment of the present application, the embodiment of the present application also provides a terminal, such as Figure 6 As shown, the terminal 600 includes:

[0152] The first communication interface 601 is capable of exchanging information with the network side and / or other terminals;

[0153] A first processor 602 is connected to the first communication interface 601 to implement information interaction with the network side and / or other terminals, and is used to execute the method provided by one or more technical solutions on the terminal side when running a computer program;

[0154] A first memory 603 , in which the computer program is stored.

[0155] Specifically, the first processor 602 is used to generate an AS-related key based on a first key and a second key when both the terminal 600 and the network side support the first capability; the first capability is used for the terminal 600 to negotiate the first key with the network side, and the first key is associated with a wireless channel characteristic; the second key is used to perform AS encryption and integrity protection when the terminal 600 and / or the network side do not support the first capability.

[0156] In one embodiment, the first processor 602 is further configured to:

[0157] Based on the first key and the second key, generate a third key, where the third key is used to perform encryption and integrity protection of the AS when both the terminal 600 and the network side support the first capability;

[0158] Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when both the terminal 600 and the network side support the first capability, the fifth key is used to perform integrity protection of the RRC layer when both the terminal 600 and the network side support the first capability, the sixth key is used to encrypt UP when both the terminal 600 and the network side support the first capability, and the seventh key is used to perform integrity protection of UP when both the terminal 600 and the network side support the first capability.

[0159] In one embodiment, the first processor 602 is further configured to:

[0160] Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, wherein the eighth key is used to perform RRC layer encryption when the terminal 600 and / or the network side does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal 600 and / or the network side does not support the first capability, the tenth key is used to perform UP encryption when the terminal 600 and / or the network side does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal 600 and / or the network side does not support the first capability;

[0161] Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when both the terminal 600 and the network side support the first capability, the fifth key is used to perform integrity protection of the RRC layer when both the terminal 600 and the network side support the first capability, the sixth key is used to encrypt UP when both the terminal 600 and the network side support the first capability, and the seventh key is used to perform integrity protection of UP when both the terminal 600 and the network side support the first capability.

[0162] In one embodiment, the first communication interface 601 is used to receive first information sent by the network side, where the first information is used to indicate a first key to be applied from among multiple first keys negotiated between the terminal 600 and the network side.

[0163] In one embodiment, the first communication interface 601 is further used to send second information to the network side, where the second information indicates whether the terminal 600 supports the first capability.

[0164] In one embodiment, the first communication interface 601 is further used to send the second information to the network side through NAS.

[0165] It should be noted that the specific processing process of the first processor 602 and the first communication interface 601 can be understood by referring to the above method, which will not be repeated here.

[0166] Of course, in actual application, the various components in the terminal 600 are coupled together through the bus system 604. It can be understood that the bus system 604 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 604 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 6 Various buses are labeled as bus system 604 .

[0167] The first memory 603 in the embodiment of the present application is used to store various types of data to support the operation of the terminal 600. Examples of such data include: any computer program used to operate on the terminal 600.

[0168] The method disclosed in the above embodiment of the present application can be applied to the first processor 602, or implemented by the first processor 602. The first processor 602 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 602. The first processor 602 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The first processor 602 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the first memory 603, and the first processor 602 reads the information in the first memory 603 and completes the steps of the above method in combination with its hardware.

[0169] In an exemplary embodiment, the terminal 600 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0170] Based on the hardware implementation of the above program modules, and in order to implement the method of the network device side of the embodiment of the present application, the embodiment of the present application also provides a network device, such as Figure 7 As shown, the network device 700 includes:

[0171] The second communication interface 701 is capable of exchanging information with a terminal and / or other network devices;

[0172] The second processor 702 is connected to the second communication interface 701 to implement information interaction with the terminal and / or other network devices, and is used to execute the method provided by one or more technical solutions on the network device side when running the computer program;

[0173] A second memory 703 , on which the computer program is stored.

[0174] Specifically, the second processor 702 is used to generate an AS-related key based on a first key and a second key when both the terminal and the network device 700 support the first capability; the first capability is used for the terminal and the network device 700 to negotiate the first key, and the first key is associated with a wireless channel characteristic; the second key is used to perform AS encryption and integrity protection when the terminal and / or the network device 700 do not support the first capability.

[0175] In one embodiment, the second processor 702 is further configured to:

[0176] Based on the first key and the second key, generate a third key, where the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network device 700 support the first capability;

[0177] Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when the terminal and the network device 700 both support the first capability, the fifth key is used to perform integrity protection of the RRC layer when the terminal and the network device 700 both support the first capability, the sixth key is used to encrypt UP when the terminal and the network device 700 both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network device 700 both support the first capability.

[0178] In one embodiment, the second processor 702 is further configured to:

[0179] Based on the second key, an eighth key, a ninth key, a tenth key and an eleventh key are generated, the eighth key is used for performing RRC layer encryption when the terminal and / or the network device 700 does not support the first capability, the ninth key is used for performing RRC layer integrity protection when the terminal and / or the network device 700 does not support the first capability, the tenth key is used for performing UP encryption when the terminal and / or the network device 700 does not support the first capability, and the eleventh key is used for performing UP integrity protection when the terminal and / or the network device 700 does not support the first capability;

[0180] Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform RRC layer encryption when the terminal and the network device 700 both support the first capability, the fifth key is used to perform RRC layer integrity protection when the terminal and the network device 700 both support the first capability, the sixth key is used to perform UP encryption when the terminal and the network device 700 both support the first capability, and the seventh key is used to perform UP integrity protection when the terminal and the network device 700 both support the first capability.

[0181] In one embodiment, the second processor 702 is further configured to select a first key for application from a plurality of first keys negotiated between the terminal and the network device 700;

[0182] Correspondingly, the second communication interface 701 is used to send first information to the terminal, where the first information is used to indicate a first key to be applied from among multiple first keys negotiated between the terminal and the network device 700 .

[0183] In one embodiment, the second communication interface 701 is further used to receive second information sent by the terminal, where the second information indicates whether the terminal supports the first capability.

[0184] In one embodiment, the second communication interface 701 is further used to receive the second information sent by the terminal through NAS.

[0185] It should be noted that the specific processing process of the second processor 702 and the second communication interface 701 can be understood by referring to the above method, which will not be repeated here.

[0186] Of course, in actual application, the various components in the network device 700 are coupled together through the bus system 704. It can be understood that the bus system 704 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 704 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 7 Various buses are labeled as bus system 704 .

[0187] The second memory 703 in the embodiment of the present application is used to store various types of data to support the operation of the network device 700. Examples of such data include: any computer program used to operate on the network device 700.

[0188] The method disclosed in the above embodiment of the present application can be applied to the second processor 702, or implemented by the second processor 702. The second processor 702 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of the hardware in the second processor 702 or an instruction in the form of software. The second processor 702 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The second processor 702 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the second memory 703, and the second processor 702 reads the information in the second memory 703 and completes the steps of the above method in combination with its hardware.

[0189] In an exemplary embodiment, the network device 700 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general purpose processors, controllers, MCUs, Microprocessors, or other electronic components to perform the aforementioned methods.

[0190] It can be understood that the memory (first memory 603, second memory 703) of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can 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), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM).The memory described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.

[0191] In order to implement the method provided in the embodiment of the present application, the embodiment of the present application also provides a key generation system, such as Figure 8 As shown, the system includes: a terminal 801 and a network device 802.

[0192] Here, it should be noted that the specific processing process of the terminal 801 and the network device 802 has been described in detail above and will not be repeated here.

[0193] In an exemplary embodiment, the embodiment of the present application further provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 603 storing a computer program, and the computer program can be executed by the first processor 602 of the terminal 600 to complete the steps of any of the methods on the terminal side. For another example, a second memory 703 storing a computer program can be executed by the second processor 702 of the network device 700 to complete the steps of any of the methods on the network device side. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.

[0194] In an exemplary embodiment, the embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the first processor 602 of the terminal 600 to complete the steps of any of the aforementioned methods on the terminal side; or, the computer program can be executed by the second processor 702 of the network device 700 to complete the steps of any of the aforementioned methods on the network device side.

[0195] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0196] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0197] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A key generation method, characterized in that: Applied to terminals, including: In the case that both the terminal and the network side support the first capability, an access layer AS-related key is generated based on the first key and the second key; the first capability is used by the terminal to negotiate the first key with the network side, and the first key is associated with the characteristics of the wireless channel; the second key is used to perform encryption and integrity protection of the AS in the case that the terminal and / or the network side do not support the first capability.

2. The method according to claim 1, characterized in that The step of generating an AS-related key based on the first key and the second key includes: Based on the first key and the second key, generating a third key, wherein the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network side support the first capability; Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the radio resource control RRC layer when the terminal and the network side both support the first capability, the fifth key is used to perform integrity protection of the RRC layer when the terminal and the network side both support the first capability, the sixth key is used to encrypt the user plane UP when the terminal and the network side both support the first capability, and the seventh key is used to perform integrity protection of the UP when the terminal and the network side both support the first capability.

3. The method according to claim 1, characterized in that The step of generating an AS-related key based on the first key and the second key includes: Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, wherein the eighth key is used to perform RRC layer encryption when the terminal and / or the network side does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal and / or the network side does not support the first capability, the tenth key is used to perform UP encryption when the terminal and / or the network side does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal and / or the network side does not support the first capability; Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to encrypt the RRC layer when the terminal and the network side both support the first capability, the fifth key is used to perform integrity protection of the RRC layer when the terminal and the network side both support the first capability, the sixth key is used to encrypt UP when the terminal and the network side both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network side both support the first capability.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: First information sent by the network side is received, where the first information is used to indicate a first key to be applied from multiple first keys negotiated between the terminal and the network side.

5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Sending second information to the network side, where the second information indicates whether the terminal supports the first capability.

6. The method according to claim 5, characterized in that The sending the second information to the network side includes: The second information is sent to the network side through a non-access layer NAS.

7. A key generation method, characterized in that: Applied to network equipment, including: When both the terminal and the network device support the first capability, an AS-related key is generated based on the first key and the second key; the first capability is used by the terminal and the network device to negotiate the first key, and the first key is associated with the characteristics of the wireless channel; the second key is used to perform AS encryption and integrity protection when the terminal and / or the network device do not support the first capability.

8. The method according to claim 7, characterized in that The step of generating an AS-related key based on the first key and the second key includes: Based on the first key and the second key, generating a third key, wherein the third key is used to perform encryption and integrity protection of the AS when both the terminal and the network device support the first capability; Based on the third key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform RRC layer encryption when the terminal and the network device both support the first capability, the fifth key is used to perform RRC layer integrity protection when the terminal and the network device both support the first capability, the sixth key is used to perform UP encryption when the terminal and the network device both support the first capability, and the seventh key is used to perform UP integrity protection when the terminal and the network device both support the first capability.

9. The method according to claim 7, characterized in that: The step of generating an AS-related key based on the first key and the second key includes: Based on the second key, an eighth key, a ninth key, a tenth key, and an eleventh key are generated, the eighth key is used to perform RRC layer encryption when the terminal and / or the network device does not support the first capability, the ninth key is used to perform RRC layer integrity protection when the terminal and / or the network device does not support the first capability, the tenth key is used to perform UP encryption when the terminal and / or the network device does not support the first capability, and the eleventh key is used to perform UP integrity protection when the terminal and / or the network device does not support the first capability; Based on the first key and the eighth key, the ninth key, the tenth key and the eleventh key, a fourth key, a fifth key, a sixth key and a seventh key are generated, the fourth key is used to perform encryption at the RRC layer when the terminal and the network device both support the first capability, the fifth key is used to perform integrity protection at the RRC layer when the terminal and the network device both support the first capability, the sixth key is used to perform encryption of UP when the terminal and the network device both support the first capability, and the seventh key is used to perform integrity protection of UP when the terminal and the network device both support the first capability.

10. The method according to any one of claims 7 to 9, characterized in that: The method further comprises: A first key to be applied is selected from a plurality of first keys negotiated between the terminal and the network device, and first information is sent to the terminal, where the first information is used to indicate a first key to be applied from the plurality of first keys negotiated between the terminal and the network device.

11. The method according to any one of claims 7 to 9, characterized in that: The method further comprises: Second information sent by the terminal is received, where the second information indicates whether the terminal supports the first capability.

12. The method according to claim 11, characterized in that The receiving the second information sent by the terminal includes: Receive the second information sent by the terminal through NAS.

13. A key generation device, characterized in that: include: A first processing unit, configured to generate an AS-related key based on the first key and the second key when both the terminal and the network side support the first capability; The first capability is used by the terminal to negotiate the first key with the network side, and the first key is associated with a wireless channel feature; The second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network side does not support the first capability.

14. A key generation device, characterized in that: include: A second processing unit, configured to generate an AS-related key based on the first key and the second key when both the terminal and the network device support the first capability; The first capability is used by the terminal and the network device to negotiate the first key, and the first key is associated with the characteristics of the wireless channel; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network device does not support the first capability.

15. A terminal, characterized in that: include: a first communication interface and a first processor; wherein, The first processor is used to generate an AS-related key based on a first key and a second key when both the terminal and the network side support the first capability; the first capability is used for the terminal to negotiate the first key with the network side, and the first key is associated with a wireless channel characteristic; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network side does not support the first capability.

16. A network device, characterized in that: include: A second communication interface and a second processor; wherein, The second processor is configured to generate an AS-related key based on the first key and the second key when both the terminal and the network device support the first capability; The first capability is used by the terminal and the network device to negotiate the first key, and the first key is associated with the characteristics of the wireless channel; the second key is used to perform encryption and integrity protection of the AS when the terminal and / or the network device does not support the first capability.

17. A terminal, characterized in that: include: a first processor and a first memory for storing a computer program executable on the processor, Wherein, when the first processor is used to run the computer program, the steps of the method described in any one of claims 1 to 6 are executed.

18. A network device, characterized in that: include: a second processor and a second memory for storing a computer program executable on the processor, Wherein, when the second processor is used to run the computer program, the steps of the method described in any one of claims 7 to 12 are executed.

19. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6, or implements the steps of the method according to any one of claims 7 to 12.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6, or implements the steps of the method according to any one of claims 7 to 12.